From 650b227732611934169fe1220a3d4309a60768ec Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Tue, 29 Oct 2024 18:09:28 +0000 Subject: [PATCH 1/9] Update API model --- .../aws-models/bedrock-runtime.json | 4 +- codegen/sdk-codegen/aws-models/bedrock.json | 276 +++++++++-- .../sdk-codegen/aws-models/cleanrooms.json | 442 +++++++++++++----- .../aws-models/cloudwatch-logs.json | 9 + .../sdk-codegen/aws-models/iotfleetwise.json | 12 +- .../sdk-codegen/aws-models/redshift-data.json | 159 ++++++- codegen/sdk-codegen/aws-models/sagemaker.json | 202 ++++---- 7 files changed, 860 insertions(+), 244 deletions(-) diff --git a/codegen/sdk-codegen/aws-models/bedrock-runtime.json b/codegen/sdk-codegen/aws-models/bedrock-runtime.json index 8d9605678b6..2d7658960a2 100644 --- a/codegen/sdk-codegen/aws-models/bedrock-runtime.json +++ b/codegen/sdk-codegen/aws-models/bedrock-runtime.json @@ -1027,7 +1027,7 @@ "min": 1, "max": 2048 }, - "smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:imported-model/[a-z0-9]{12})|([0-9]{12}:provisioned-model/[a-z0-9]{12})|([0-9]{12}:inference-profile/[a-zA-Z0-9-:.]+)))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|(([0-9a-zA-Z][_-]?)+)|([a-zA-Z0-9-:.]+)$" + "smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:imported-model/[a-z0-9]{12})|([0-9]{12}:provisioned-model/[a-z0-9]{12})|([0-9]{12}:(inference-profile|application-inference-profile)/[a-zA-Z0-9-:.]+)))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|(([0-9a-zA-Z][_-]?)+)|([a-zA-Z0-9-:.]+)$" } }, "com.amazonaws.bedrockruntime#Converse": { @@ -3078,7 +3078,7 @@ "min": 1, "max": 2048 }, - "smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:imported-model/[a-z0-9]{12})|([0-9]{12}:provisioned-model/[a-z0-9]{12})|([0-9]{12}:inference-profile/[a-zA-Z0-9-:.]+)))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|(([0-9a-zA-Z][_-]?)+)|([a-zA-Z0-9-:.]+)$" + "smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:imported-model/[a-z0-9]{12})|([0-9]{12}:provisioned-model/[a-z0-9]{12})|([0-9]{12}:(inference-profile|application-inference-profile)/[a-zA-Z0-9-:.]+)))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|(([0-9a-zA-Z][_-]?)+)|([a-zA-Z0-9-:.]+)$" } }, "com.amazonaws.bedrockruntime#InvokeModelRequest": { diff --git a/codegen/sdk-codegen/aws-models/bedrock.json b/codegen/sdk-codegen/aws-models/bedrock.json index eebd326ccaf..bde550cad81 100644 --- a/codegen/sdk-codegen/aws-models/bedrock.json +++ b/codegen/sdk-codegen/aws-models/bedrock.json @@ -1369,6 +1369,112 @@ "smithy.api#output": {} } }, + "com.amazonaws.bedrock#CreateInferenceProfile": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#CreateInferenceProfileRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#CreateInferenceProfileResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#ConflictException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrock#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#TooManyTagsException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates an application inference profile to track metrics and costs when invoking a model. To create an application inference profile for a foundation model in one region, specify the ARN of the model in that region. To create an application inference profile for a foundation model across multiple regions, specify the ARN of the system-defined inference profile that contains the regions that you want to route requests to. For more information, see Increase throughput and resilience with cross-region inference in Amazon Bedrock. in the Amazon Bedrock User Guide.

", + "smithy.api#http": { + "code": 201, + "method": "POST", + "uri": "/inference-profiles" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.bedrock#CreateInferenceProfileRequest": { + "type": "structure", + "members": { + "inferenceProfileName": { + "target": "com.amazonaws.bedrock#InferenceProfileName", + "traits": { + "smithy.api#documentation": "

A name for the inference profile.

", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.bedrock#InferenceProfileDescription", + "traits": { + "smithy.api#documentation": "

A description for the inference profile.

" + } + }, + "clientRequestToken": { + "target": "com.amazonaws.bedrock#IdempotencyToken", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request,\n Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.

", + "smithy.api#idempotencyToken": {} + } + }, + "modelSource": { + "target": "com.amazonaws.bedrock#InferenceProfileModelSource", + "traits": { + "smithy.api#documentation": "

The foundation model or system-defined inference profile that the inference profile will track metrics and costs for.

", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.bedrock#TagList", + "traits": { + "smithy.api#documentation": "

An array of objects, each of which contains a tag and its value. For more information, see Tagging resources in the Amazon Bedrock User Guide.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#CreateInferenceProfileResponse": { + "type": "structure", + "members": { + "inferenceProfileArn": { + "target": "com.amazonaws.bedrock#InferenceProfileArn", + "traits": { + "smithy.api#documentation": "

The ARN of the inference profile that you created.

", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.bedrock#InferenceProfileStatus", + "traits": { + "smithy.api#documentation": "

The status of the inference profile. ACTIVE means that the inference profile is ready to be used.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.bedrock#CreateModelCopyJob": { "type": "operation", "input": { @@ -2257,6 +2363,67 @@ "smithy.api#output": {} } }, + "com.amazonaws.bedrock#DeleteInferenceProfile": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#DeleteInferenceProfileRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#DeleteInferenceProfileResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#ConflictException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes an application inference profile. For more information, see Increase throughput and resilience with cross-region inference in Amazon Bedrock. in the Amazon Bedrock User Guide.

", + "smithy.api#http": { + "code": 200, + "method": "DELETE", + "uri": "/inference-profiles/{inferenceProfileIdentifier}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.bedrock#DeleteInferenceProfileRequest": { + "type": "structure", + "members": { + "inferenceProfileIdentifier": { + "target": "com.amazonaws.bedrock#InferenceProfileIdentifier", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) or ID of the application inference profile to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#DeleteInferenceProfileResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.bedrock#DeleteModelInvocationLoggingConfiguration": { "type": "operation", "input": { @@ -2720,7 +2887,7 @@ "min": 1, "max": 2048 }, - "smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:((:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:provisioned-model/[a-z0-9]{12})|([0-9]{12}:imported-model/[a-z0-9]{12})|([0-9]{12}:inference-profile/(([a-z]{2}.)[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63})))))|(([a-z]{2}[.]{1})([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63})))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))$" + "smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:((:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:provisioned-model/[a-z0-9]{12})|([0-9]{12}:imported-model/[a-z0-9]{12})|([0-9]{12}:application-inference-profile/[a-z0-9]{12})|([0-9]{12}:inference-profile/(([a-z]{2}.)[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63})))))|(([a-z]{2}[.]{1})([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63})))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))$" } }, "com.amazonaws.bedrock#EvaluationModelIdentifiers": { @@ -3795,7 +3962,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about an inference profile. For more information, see the Amazon Bedrock User Guide.

", + "smithy.api#documentation": "

Gets information about an inference profile. For more information, see Increase throughput and resilience with cross-region inference in Amazon Bedrock. in the Amazon Bedrock User Guide.

", "smithy.api#http": { "code": 200, "method": "GET", @@ -3810,7 +3977,7 @@ "inferenceProfileIdentifier": { "target": "com.amazonaws.bedrock#InferenceProfileIdentifier", "traits": { - "smithy.api#documentation": "

The unique identifier of the inference profile.

", + "smithy.api#documentation": "

The ID or Amazon Resource Name (ARN) of the inference profile.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3830,13 +3997,6 @@ "smithy.api#required": {} } }, - "models": { - "target": "com.amazonaws.bedrock#InferenceProfileModels", - "traits": { - "smithy.api#documentation": "

A list of information about each model in the inference profile.

", - "smithy.api#required": {} - } - }, "description": { "target": "com.amazonaws.bedrock#InferenceProfileDescription", "traits": { @@ -3862,6 +4022,13 @@ "smithy.api#required": {} } }, + "models": { + "target": "com.amazonaws.bedrock#InferenceProfileModels", + "traits": { + "smithy.api#documentation": "

A list of information about each model in the inference profile.

", + "smithy.api#required": {} + } + }, "inferenceProfileId": { "target": "com.amazonaws.bedrock#InferenceProfileId", "traits": { @@ -3872,14 +4039,14 @@ "status": { "target": "com.amazonaws.bedrock#InferenceProfileStatus", "traits": { - "smithy.api#documentation": "

The status of the inference profile. ACTIVE means that the inference profile is available to use.

", + "smithy.api#documentation": "

The status of the inference profile. ACTIVE means that the inference profile is ready to be used.

", "smithy.api#required": {} } }, "type": { "target": "com.amazonaws.bedrock#InferenceProfileType", "traits": { - "smithy.api#documentation": "

The type of the inference profile. SYSTEM_DEFINED means that the inference profile is defined by Amazon Bedrock.

", + "smithy.api#documentation": "

The type of the inference profile. The following types are possible:

\n ", "smithy.api#required": {} } } @@ -6226,7 +6393,7 @@ "min": 1, "max": 2048 }, - "smithy.api#pattern": "^arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{0,20}):(|[0-9]{12}):inference-profile/[a-zA-Z0-9-:.]+$" + "smithy.api#pattern": "^arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{0,20}):(|[0-9]{12}):(inference-profile|application-inference-profile)/[a-zA-Z0-9-:.]+$" } }, "com.amazonaws.bedrock#InferenceProfileDescription": { @@ -6234,9 +6401,10 @@ "traits": { "smithy.api#length": { "min": 1, - "max": 500 + "max": 200 }, - "smithy.api#pattern": "^.+$" + "smithy.api#pattern": "^([0-9a-zA-Z:.][ _-]?)+$", + "smithy.api#sensitive": {} } }, "com.amazonaws.bedrock#InferenceProfileId": { @@ -6256,7 +6424,7 @@ "min": 1, "max": 2048 }, - "smithy.api#pattern": "^(arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{0,20}):(|[0-9]{12}):inference-profile/)?[a-zA-Z0-9-:.]+$" + "smithy.api#pattern": "^(arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{0,20}):(|[0-9]{12}):(inference-profile|application-inference-profile)/)?[a-zA-Z0-9-:.]+$" } }, "com.amazonaws.bedrock#InferenceProfileModel": { @@ -6273,6 +6441,30 @@ "smithy.api#documentation": "

Contains information about a model.

" } }, + "com.amazonaws.bedrock#InferenceProfileModelSource": { + "type": "union", + "members": { + "copyFrom": { + "target": "com.amazonaws.bedrock#InferenceProfileModelSourceArn", + "traits": { + "smithy.api#documentation": "

The ARN of the model or system-defined inference profile that is the source for the inference profile.

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

Contains information about the model or system-defined inference profile that is the source for an inference profile..

" + } + }, + "com.amazonaws.bedrock#InferenceProfileModelSourceArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{0,20}):(|[0-9]{12}):(inference-profile|foundation-model)/[a-zA-Z0-9-:.]+$" + } + }, "com.amazonaws.bedrock#InferenceProfileModels": { "type": "list", "member": { @@ -6302,11 +6494,22 @@ "target": "com.amazonaws.bedrock#InferenceProfileIdentifier" } }, + "create": { + "target": "com.amazonaws.bedrock#CreateInferenceProfile" + }, "read": { "target": "com.amazonaws.bedrock#GetInferenceProfile" }, + "delete": { + "target": "com.amazonaws.bedrock#DeleteInferenceProfile" + }, "list": { "target": "com.amazonaws.bedrock#ListInferenceProfiles" + }, + "traits": { + "aws.cloudformation#cfnResource": { + "name": "InferenceProfile" + } } }, "com.amazonaws.bedrock#InferenceProfileStatus": { @@ -6336,13 +6539,6 @@ "smithy.api#required": {} } }, - "models": { - "target": "com.amazonaws.bedrock#InferenceProfileModels", - "traits": { - "smithy.api#documentation": "

A list of information about each model in the inference profile.

", - "smithy.api#required": {} - } - }, "description": { "target": "com.amazonaws.bedrock#InferenceProfileDescription", "traits": { @@ -6368,6 +6564,13 @@ "smithy.api#required": {} } }, + "models": { + "target": "com.amazonaws.bedrock#InferenceProfileModels", + "traits": { + "smithy.api#documentation": "

A list of information about each model in the inference profile.

", + "smithy.api#required": {} + } + }, "inferenceProfileId": { "target": "com.amazonaws.bedrock#InferenceProfileId", "traits": { @@ -6378,14 +6581,14 @@ "status": { "target": "com.amazonaws.bedrock#InferenceProfileStatus", "traits": { - "smithy.api#documentation": "

The status of the inference profile. ACTIVE means that the inference profile is available to use.

", + "smithy.api#documentation": "

The status of the inference profile. ACTIVE means that the inference profile is ready to be used.

", "smithy.api#required": {} } }, "type": { "target": "com.amazonaws.bedrock#InferenceProfileType", "traits": { - "smithy.api#documentation": "

The type of the inference profile. SYSTEM_DEFINED means that the inference profile is defined by Amazon Bedrock.

", + "smithy.api#documentation": "

The type of the inference profile. The following types are possible:

\n ", "smithy.api#required": {} } } @@ -6402,6 +6605,12 @@ "traits": { "smithy.api#enumValue": "SYSTEM_DEFINED" } + }, + "APPLICATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "APPLICATION" + } } } }, @@ -7051,7 +7260,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of inference profiles that you can use.

", + "smithy.api#documentation": "

Returns a list of inference profiles that you can use. For more information, see Increase throughput and resilience with cross-region inference in Amazon Bedrock. in the Amazon Bedrock User Guide.

", "smithy.api#http": { "code": 200, "method": "GET", @@ -7082,6 +7291,13 @@ "smithy.api#documentation": "

If the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.

", "smithy.api#httpQuery": "nextToken" } + }, + "typeEquals": { + "target": "com.amazonaws.bedrock#InferenceProfileType", + "traits": { + "smithy.api#documentation": "

Filters for inference profiles that match the type you specify.

\n ", + "smithy.api#httpQuery": "type" + } } }, "traits": { @@ -7768,7 +7984,7 @@ } ], "traits": { - "smithy.api#documentation": "

List the tags associated with the specified resource.

\n

For more information, see Tagging resources in the Amazon Bedrock User Guide.

", + "smithy.api#documentation": "

List the tags associated with the specified resource.

\n

For more information, see Tagging resources in the Amazon Bedrock User Guide.

", "smithy.api#http": { "code": 200, "method": "POST", @@ -9470,7 +9686,7 @@ } ], "traits": { - "smithy.api#documentation": "

Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.

", + "smithy.api#documentation": "

Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.

", "smithy.api#http": { "code": 200, "method": "POST", @@ -9524,7 +9740,7 @@ "min": 20, "max": 1011 }, - "smithy.api#pattern": "(^[a-zA-Z0-9][a-zA-Z0-9\\-]*$)|(^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:([0-9]{12}|)((:(fine-tuning-job|model-customization-job|custom-model)/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}(/[a-z0-9]{12})$)|(:guardrail/[a-z0-9]+$)|(:(provisioned-model|model-invocation-job|model-evaluation-job|evaluation-job|model-import-job|imported-model)/[a-z0-9]{12}$)))" + "smithy.api#pattern": "(^[a-zA-Z0-9][a-zA-Z0-9\\-]*$)|(^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:([0-9]{12}|)((:(fine-tuning-job|model-customization-job|custom-model)/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}(/[a-z0-9]{12})$)|(:guardrail/[a-z0-9]+$)|(:(inference-profile|application-inference-profile)/[a-zA-Z0-9-:.]+$)|(:(provisioned-model|model-invocation-job|model-evaluation-job|evaluation-job|model-import-job|imported-model)/[a-z0-9]{12}$)))" } }, "com.amazonaws.bedrock#TaggingResource": { @@ -9651,7 +9867,7 @@ } ], "traits": { - "smithy.api#documentation": "

Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.

", + "smithy.api#documentation": "

Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.

", "smithy.api#http": { "code": 200, "method": "POST", diff --git a/codegen/sdk-codegen/aws-models/cleanrooms.json b/codegen/sdk-codegen/aws-models/cleanrooms.json index ec1149fb1a3..0a281c5a2c3 100644 --- a/codegen/sdk-codegen/aws-models/cleanrooms.json +++ b/codegen/sdk-codegen/aws-models/cleanrooms.json @@ -977,25 +977,25 @@ } }, "com.amazonaws.cleanrooms#AnalysisFormat": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "name": "SQL", - "value": "SQL" + "type": "enum", + "members": { + "SQL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SQL" } - ] + } } }, "com.amazonaws.cleanrooms#AnalysisMethod": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "name": "DIRECT_QUERY", - "value": "DIRECT_QUERY" + "type": "enum", + "members": { + "DIRECT_QUERY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DIRECT_QUERY" } - ] + } } }, "com.amazonaws.cleanrooms#AnalysisParameter": { @@ -1145,7 +1145,7 @@ "additionalAnalyses": { "target": "com.amazonaws.cleanrooms#AdditionalAnalyses", "traits": { - "smithy.api#documentation": "

An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

\n

The\n additionalAnalyses\n parameter is\n currently\n supported for the list analysis rule (AnalysisRuleList) and the custom\n analysis rule (AnalysisRuleCustom).

" + "smithy.api#documentation": "

An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

\n

The additionalAnalyses parameter is currently supported for the list\n analysis rule (AnalysisRuleList) and the custom analysis rule\n (AnalysisRuleCustom).

" } } }, @@ -1537,7 +1537,7 @@ "smithy.api#length": { "max": 200 }, - "smithy.api#pattern": "^(ANY_QUERY|arn:aws:cleanrooms:[\\w]{2}-[\\w]{4,9}-[\\d]:[\\d]{12}:membership/[\\d\\w-]+/analysistemplate/[\\d\\w-]+)$" + "smithy.api#pattern": "^(ANY_QUERY|ANY_JOB|arn:aws:cleanrooms:[\\w]{2}-[\\w]{4,9}-[\\d]:[\\d]{12}:membership/[\\d\\w-]+/analysistemplate/[\\d\\w-]+)$" } }, "com.amazonaws.cleanrooms#AnalysisTemplateIdentifier": { @@ -1784,6 +1784,23 @@ } } }, + "com.amazonaws.cleanrooms#AnalyticsEngine": { + "type": "enum", + "members": { + "SPARK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SPARK" + } + }, + "CLEAN_ROOMS_SQL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CLEAN_ROOMS_SQL" + } + } + } + }, "com.amazonaws.cleanrooms#BatchGetCollaborationAnalysisTemplate": { "type": "operation", "input": { @@ -2145,6 +2162,21 @@ } } }, + "com.amazonaws.cleanrooms#BilledResourceUtilization": { + "type": "structure", + "members": { + "units": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "

The number of Clean Rooms Processing Unit (CRPU) hours that have been billed.

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

Information related to the utilization of resources that have been billed or charged for in a given context, such as a protected query.

" + } + }, "com.amazonaws.cleanrooms#CleanroomsArn": { "type": "string", "traits": { @@ -2244,6 +2276,12 @@ "smithy.api#documentation": "

An indicator as to whether query logging has been enabled or disabled for the\n collaboration.

", "smithy.api#required": {} } + }, + "analyticsEngine": { + "target": "com.amazonaws.cleanrooms#AnalyticsEngine", + "traits": { + "smithy.api#documentation": "

The analytics engine for the collaboration.

" + } } }, "traits": { @@ -2505,7 +2543,7 @@ "creatorAccountId": { "target": "com.amazonaws.cleanrooms#AccountId", "traits": { - "smithy.api#documentation": "

The identifier used to reference members of the collaboration. Only supports AWS account ID.

", + "smithy.api#documentation": "

The identifier used to reference members of the collaboration. Only supports Amazon Web Services account ID.

", "smithy.api#required": {} } }, @@ -2583,7 +2621,7 @@ "creatorAccountId": { "target": "com.amazonaws.cleanrooms#AccountId", "traits": { - "smithy.api#documentation": "

The identifier used to reference members of the collaboration. Only supports AWS account ID.

", + "smithy.api#documentation": "

The identifier used to reference members of the collaboration. Only supports Amazon Web Services account ID.

", "smithy.api#required": {} } }, @@ -3045,18 +3083,20 @@ } }, "com.amazonaws.cleanrooms#CollaborationQueryLogStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "name": "ENABLED", - "value": "ENABLED" - }, - { - "name": "DISABLED", - "value": "DISABLED" + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" } - ] + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } } }, "com.amazonaws.cleanrooms#CollaborationResource": { @@ -3216,6 +3256,12 @@ "traits": { "smithy.api#documentation": "

The ARN of a member in a collaboration.

" } + }, + "analyticsEngine": { + "target": "com.amazonaws.cleanrooms#AnalyticsEngine", + "traits": { + "smithy.api#documentation": "

The analytics engine.

" + } } }, "traits": { @@ -3274,6 +3320,20 @@ "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDBFF-\\uDC00\\uDFFF\\t]*$" } }, + "com.amazonaws.cleanrooms#ComputeConfiguration": { + "type": "union", + "members": { + "worker": { + "target": "com.amazonaws.cleanrooms#WorkerComputeConfiguration", + "traits": { + "smithy.api#documentation": "

The worker configuration for the compute environment.

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

The configuration of the compute resources for an analysis with the Spark analytics engine.

" + } + }, "com.amazonaws.cleanrooms#ConfigurationDetails": { "type": "union", "members": { @@ -3858,7 +3918,7 @@ "configuredTableAssociationId": { "target": "com.amazonaws.cleanrooms#ConfiguredTableAssociationIdentifier", "traits": { - "smithy.api#documentation": "

\n The\n unique identifier for the configured table association.

", + "smithy.api#documentation": "

The unique identifier for the configured table association.

", "smithy.api#required": {}, "smithy.api#resourceIdentifier": "ConfiguredTableAssociationId" } @@ -3866,7 +3926,7 @@ "configuredTableAssociationArn": { "target": "com.amazonaws.cleanrooms#ConfiguredTableAssociationArn", "traits": { - "smithy.api#documentation": "

\n The\n Amazon Resource Name (ARN) of the configured table association.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the configured table association.

", "smithy.api#required": {} } }, @@ -3900,7 +3960,7 @@ } }, "traits": { - "smithy.api#documentation": "

An\n analysis rule for a configured table association. This analysis rule specifies how data\n from the table can be used within its associated\n collaboration.\n In the console, the ConfiguredTableAssociationAnalysisRule is referred to as the\n collaboration analysis rule.

" + "smithy.api#documentation": "

An analysis rule for a configured table association. This analysis rule specifies how\n data from the table can be used within its associated collaboration. In the console, the\n ConfiguredTableAssociationAnalysisRule is referred to as the\n collaboration analysis rule.

" } }, "com.amazonaws.cleanrooms#ConfiguredTableAssociationAnalysisRuleAggregation": { @@ -3915,7 +3975,7 @@ "allowedAdditionalAnalyses": { "target": "com.amazonaws.cleanrooms#AllowedAdditionalAnalyses", "traits": { - "smithy.api#documentation": "

The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.

\n

The\n allowedAdditionalAnalyses\n parameter\n is currently supported for the list analysis rule\n (AnalysisRuleList) and the custom analysis rule\n (AnalysisRuleCustom).

" + "smithy.api#documentation": "

The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.

\n

The allowedAdditionalAnalyses parameter is currently supported for the list\n analysis rule (AnalysisRuleList) and the custom analysis rule\n (AnalysisRuleCustom).

" } } }, @@ -3929,7 +3989,7 @@ "allowedResultReceivers": { "target": "com.amazonaws.cleanrooms#AllowedResultReceivers", "traits": { - "smithy.api#documentation": "

The list of\n collaboration members who are allowed\n to\n receive results of queries run with this configured table.

" + "smithy.api#documentation": "

The list of collaboration members who are allowed to receive results of queries run\n with this configured table.

" } }, "allowedAdditionalAnalyses": { @@ -4550,6 +4610,12 @@ "traits": { "smithy.api#documentation": "

The collaboration creator's payment responsibilities set by the collaboration creator.

\n

If the collaboration creator hasn't specified anyone as the member paying for query\n compute costs, then the member who can query is the default payer.

" } + }, + "analyticsEngine": { + "target": "com.amazonaws.cleanrooms#AnalyticsEngine", + "traits": { + "smithy.api#documentation": "

The analytics engine.

" + } } } }, @@ -4923,7 +4989,7 @@ "analysisRule": { "target": "com.amazonaws.cleanrooms#ConfiguredTableAssociationAnalysisRule", "traits": { - "smithy.api#documentation": "

The analysis rule for the configured table association.\n In the console, the\n ConfiguredTableAssociationAnalysisRule is referred to as the\n collaboration analysis rule.

", + "smithy.api#documentation": "

The analysis rule for the configured table association. In the console, the\n ConfiguredTableAssociationAnalysisRule is referred to as the\n collaboration analysis rule.

", "smithy.api#required": {} } } @@ -5842,7 +5908,7 @@ "aws.iam#iamAction": { "documentation": "Grants permission to delete an existing configured table association analysis rule" }, - "smithy.api#documentation": "

Deletes\n an analysis rule for a configured table association.

", + "smithy.api#documentation": "

Deletes an analysis rule for a configured table association.

", "smithy.api#http": { "code": 204, "method": "DELETE", @@ -5866,7 +5932,7 @@ "configuredTableAssociationIdentifier": { "target": "com.amazonaws.cleanrooms#ConfiguredTableAssociationIdentifier", "traits": { - "smithy.api#documentation": "

The\n identifier for the configured table association that's related to the analysis rule that you\n want to delete.

", + "smithy.api#documentation": "

The identifier for the configured table association that's related to the analysis rule\n that you want to delete.

", "smithy.api#httpLabel": {}, "smithy.api#required": {}, "smithy.api#resourceIdentifier": "ConfiguredTableAssociationId" @@ -5875,7 +5941,7 @@ "analysisRuleType": { "target": "com.amazonaws.cleanrooms#ConfiguredTableAssociationAnalysisRuleType", "traits": { - "smithy.api#documentation": "

The\n type of the analysis rule that you want to delete.

", + "smithy.api#documentation": "

The type of the analysis rule that you want to delete.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -7352,7 +7418,7 @@ "aws.iam#iamAction": { "documentation": "Grants permission to get analysis rules for a configured table association" }, - "smithy.api#documentation": "

\n Retrieves\n the analysis rule for a configured table association.

", + "smithy.api#documentation": "

Retrieves the analysis rule for a configured table association.

", "smithy.api#http": { "code": 200, "method": "GET", @@ -7376,7 +7442,7 @@ "configuredTableAssociationIdentifier": { "target": "com.amazonaws.cleanrooms#ConfiguredTableAssociationIdentifier", "traits": { - "smithy.api#documentation": "

\n The\n identifier for the configured table association that's related to the analysis\n rule.

", + "smithy.api#documentation": "

The identifier for the configured table association that's related to the analysis\n rule.

", "smithy.api#httpLabel": {}, "smithy.api#required": {}, "smithy.api#resourceIdentifier": "ConfiguredTableAssociationId" @@ -7385,7 +7451,7 @@ "analysisRuleType": { "target": "com.amazonaws.cleanrooms#ConfiguredTableAssociationAnalysisRuleType", "traits": { - "smithy.api#documentation": "

\n The\n type of analysis rule that you want to retrieve.

", + "smithy.api#documentation": "

The type of analysis rule that you want to retrieve.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -7401,7 +7467,7 @@ "analysisRule": { "target": "com.amazonaws.cleanrooms#ConfiguredTableAssociationAnalysisRule", "traits": { - "smithy.api#documentation": "

The\n analysis rule for the configured table association. In the console, the\n ConfiguredTableAssociationAnalysisRule is referred to as the\n collaboration analysis rule.

", + "smithy.api#documentation": "

The analysis rule for the configured table association. In the console, the\n ConfiguredTableAssociationAnalysisRule is referred to as the\n collaboration analysis rule.

", "smithy.api#required": {} } } @@ -8842,14 +8908,14 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

", + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

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

The maximum size of the results that is returned per call.

", + "smithy.api#documentation": "

The maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a `nextToken` even if the \n`maxResults` value has not been met.

", "smithy.api#httpQuery": "maxResults" } } @@ -8861,7 +8927,7 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

" + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

" } }, "analysisTemplateSummaries": { @@ -8927,14 +8993,14 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

", + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

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

The maximum size of the results that is returned per call.

", + "smithy.api#documentation": "

The maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a `nextToken` even if the \n`maxResults` value has not been met.

", "smithy.api#httpQuery": "maxResults" } } @@ -8946,7 +9012,7 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

" + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

" } }, "collaborationAnalysisTemplateSummaries": { @@ -9015,14 +9081,14 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of results.

", + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

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

The maximum size of the results that is returned per call.

", + "smithy.api#documentation": "

The maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a `nextToken` even if the \n`maxResults` value has not been met.

", "smithy.api#httpQuery": "maxResults" } } @@ -9044,7 +9110,7 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of results.

" + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

" } } }, @@ -9203,14 +9269,14 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

", + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

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

The maximum size of the results that is returned per call. Service chooses a default if\n it has not been set. Service may return a nextToken even if the maximum results has not\n been met.

", + "smithy.api#documentation": "

The maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a `nextToken` even if the \n`maxResults` value has not been met.

", "smithy.api#httpQuery": "maxResults" } } @@ -9225,7 +9291,7 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

" + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

" } }, "collaborationPrivacyBudgetTemplateSummaries": { @@ -9305,14 +9371,14 @@ "maxResults": { "target": "com.amazonaws.cleanrooms#MaxResults", "traits": { - "smithy.api#documentation": "

The maximum size of the results that is returned per call. Service chooses a default if\n it has not been set. Service may return a nextToken even if the maximum results has not\n been met.

", + "smithy.api#documentation": "

The maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a `nextToken` even if the \n`maxResults` value has not been met.

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

The token value retrieved from a previous call to access the next page of\n results.

", + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

", "smithy.api#httpQuery": "nextToken" } } @@ -9334,7 +9400,7 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

" + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

" } } }, @@ -9384,14 +9450,14 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

", + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

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

The maximum size of the results that is returned per call. Service chooses a default if\n it has not been set. Service may return a nextToken even if the maximum results has not\n been met.

", + "smithy.api#documentation": "

The maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a `nextToken` even if the \n`maxResults` value has not been met.

", "smithy.api#httpQuery": "maxResults" } }, @@ -9410,7 +9476,7 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

" + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

" } }, "collaborationList": { @@ -9478,14 +9544,14 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of results.

", + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

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

The maximum size of the results that is returned per call. Service chooses a default if\n it has not been set. Service may return a nextToken even if the maximum results has not\n been met.

", + "smithy.api#documentation": "

The maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a `nextToken` even if the \n`maxResults` value has not been met.

", "smithy.api#httpQuery": "maxResults" } } @@ -9568,14 +9634,14 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

", + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

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

The maximum size of the results that is returned per call.

", + "smithy.api#documentation": "

The maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a `nextToken` even if the \n`maxResults` value has not been met.

", "smithy.api#httpQuery": "maxResults" } } @@ -9594,7 +9660,7 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

" + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

" } } } @@ -9641,14 +9707,14 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

", + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

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

The maximum size of the results that is returned per call.

", + "smithy.api#documentation": "

The maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a `nextToken` even if the \n`maxResults` value has not been met.

", "smithy.api#httpQuery": "maxResults" } } @@ -9667,7 +9733,7 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

" + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

" } } } @@ -9912,14 +9978,14 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

", + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

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

The maximum size of the results that is returned per call.

", + "smithy.api#documentation": "

The maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a `nextToken` even if the \n`maxResults` value has not been met.

", "smithy.api#httpQuery": "maxResults" } } @@ -9931,7 +9997,7 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

" + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

" } }, "memberSummaries": { @@ -9985,14 +10051,14 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

", + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

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

The maximum size of the results that is returned per call.

", + "smithy.api#documentation": "

The maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a `nextToken` even if the \n`maxResults` value has not been met.

", "smithy.api#httpQuery": "maxResults" } }, @@ -10011,7 +10077,7 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

" + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

" } }, "membershipSummaries": { @@ -10079,14 +10145,14 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

", + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

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

The maximum size of the results that is returned per call. Service chooses a default if\n it has not been set. Service may return a nextToken even if the maximum results has not\n been met.

", + "smithy.api#documentation": "

The maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a `nextToken` even if the \n`maxResults` value has not been met.

", "smithy.api#httpQuery": "maxResults" } } @@ -10101,7 +10167,7 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

" + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

" } }, "privacyBudgetTemplateSummaries": { @@ -10181,14 +10247,14 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

", + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

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

The maximum size of the results that is returned per call. Service chooses a default if\n it has not been set. Service may return a nextToken even if the maximum results has not\n been met.

", + "smithy.api#documentation": "

The maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a `nextToken` even if the \n`maxResults` value has not been met.

", "smithy.api#httpQuery": "maxResults" } } @@ -10210,7 +10276,7 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

" + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

" } } }, @@ -10281,14 +10347,14 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

", + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

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

The maximum size of the results that is returned per call. Service chooses a default if\n it has not been set. Service can return a nextToken even if the maximum results has not\n been met.

", + "smithy.api#documentation": "

The maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a `nextToken` even if the \n `maxResults` value has not been met.

", "smithy.api#httpQuery": "maxResults" } } @@ -10300,7 +10366,7 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

" + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

" } }, "protectedQueries": { @@ -10366,21 +10432,21 @@ "schemaType": { "target": "com.amazonaws.cleanrooms#SchemaType", "traits": { - "smithy.api#documentation": "

If present, filter schemas by schema type. The only valid schema type is currently\n `TABLE`.

", + "smithy.api#documentation": "

If present, filter schemas by schema type.

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

The token value retrieved from a previous call to access the next page of\n results.

", + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

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

The maximum size of the results that is returned per call.

", + "smithy.api#documentation": "

The maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a `nextToken` even if the \n`maxResults` value has not been met.

", "smithy.api#httpQuery": "maxResults" } } @@ -10399,7 +10465,7 @@ "nextToken": { "target": "com.amazonaws.cleanrooms#PaginationToken", "traits": { - "smithy.api#documentation": "

The token value retrieved from a previous call to access the next page of\n results.

" + "smithy.api#documentation": "

The pagination token that's used to fetch the next set of results.

" } } } @@ -10480,18 +10546,20 @@ } }, "com.amazonaws.cleanrooms#MemberAbility": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "name": "CAN_QUERY", - "value": "CAN_QUERY" - }, - { - "name": "CAN_RECEIVE_RESULTS", - "value": "CAN_RECEIVE_RESULTS" + "type": "enum", + "members": { + "CAN_QUERY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CAN_QUERY" } - ] + }, + "CAN_RECEIVE_RESULTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CAN_RECEIVE_RESULTS" + } + } } }, "com.amazonaws.cleanrooms#MemberList": { @@ -11132,6 +11200,84 @@ "traits": { "smithy.api#enumValue": "VARBYTE" } + }, + "BINARY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BINARY" + } + }, + "BYTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BYTE" + } + }, + "CHARACTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CHARACTER" + } + }, + "DOUBLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DOUBLE" + } + }, + "FLOAT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FLOAT" + } + }, + "INT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INT" + } + }, + "LONG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LONG" + } + }, + "NUMERIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NUMERIC" + } + }, + "SHORT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SHORT" + } + }, + "STRING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STRING" + } + }, + "TIMESTAMP_LTZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMESTAMP_LTZ" + } + }, + "TIMESTAMP_NTZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMESTAMP_NTZ" + } + }, + "TINYINT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TINYINT" + } } } }, @@ -11180,6 +11326,9 @@ { "target": "com.amazonaws.cleanrooms#ResourceNotFoundException" }, + { + "target": "com.amazonaws.cleanrooms#ServiceQuotaExceededException" + }, { "target": "com.amazonaws.cleanrooms#ThrottlingException" }, @@ -11507,7 +11656,7 @@ "parameters": { "target": "com.amazonaws.cleanrooms#PrivacyBudgetTemplateParametersOutput", "traits": { - "smithy.api#documentation": "

Specifies the\n epsilon\n and noise parameters for the privacy budget template.

", + "smithy.api#documentation": "

Specifies the epsilon and noise parameters for the privacy budget template.

", "smithy.api#required": {} } } @@ -11806,6 +11955,12 @@ "traits": { "smithy.api#documentation": "

The sensitivity parameters of the differential privacy results of the protected query.

" } + }, + "computeConfiguration": { + "target": "com.amazonaws.cleanrooms#ComputeConfiguration", + "traits": { + "smithy.api#documentation": "

The compute configuration for the protected query.

" + } } }, "traits": { @@ -11850,7 +12005,7 @@ "accountId": { "target": "com.amazonaws.cleanrooms#AccountId", "traits": { - "smithy.api#documentation": "

The\n unique identifier for the account.

", + "smithy.api#documentation": "

The unique identifier for the account.

", "smithy.api#required": {} } } @@ -11891,7 +12046,7 @@ "s3": { "target": "com.amazonaws.cleanrooms#ProtectedQueryS3OutputConfiguration", "traits": { - "smithy.api#documentation": "

Required configuration for a protected query with an\n s3\n output type.

" + "smithy.api#documentation": "

Required configuration for a protected query with an s3 output type.

" } }, "member": { @@ -11977,6 +12132,12 @@ "traits": { "smithy.api#documentation": "

The S3 prefix to unload the protected query results.

" } + }, + "singleFileOutput": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Indicates whether files should be output as a single file (TRUE) or output\n as multiple files (FALSE). This parameter is only supported for analyses with\n the Spark analytics engine.

" + } } }, "traits": { @@ -12036,6 +12197,12 @@ "traits": { "smithy.api#documentation": "

The duration of the protected query, from creation until query completion.

" } + }, + "billedResourceUtilization": { + "target": "com.amazonaws.cleanrooms#BilledResourceUtilization", + "traits": { + "smithy.api#documentation": "

The billed resource utilization.

" + } } }, "traits": { @@ -12112,7 +12279,7 @@ "status": { "target": "com.amazonaws.cleanrooms#ProtectedQueryStatus", "traits": { - "smithy.api#documentation": "

The status of the protected query. Value values are `SUBMITTED`, `STARTED`, `CANCELLED`,\n `CANCELLING`, `FAILED`, `SUCCESS`, `TIMED_OUT`.

", + "smithy.api#documentation": "

The status of the protected query.

", "smithy.api#required": {} } }, @@ -12450,7 +12617,7 @@ "columns": { "target": "com.amazonaws.cleanrooms#ColumnList", "traits": { - "smithy.api#documentation": "

The columns for the relation this schema represents.

", + "smithy.api#documentation": "

The columns for the relation that this schema represents.

", "smithy.api#required": {} } }, @@ -12464,14 +12631,14 @@ "analysisRuleTypes": { "target": "com.amazonaws.cleanrooms#AnalysisRuleTypeList", "traits": { - "smithy.api#documentation": "

The analysis rule types associated with the schema. Currently, only one entry is\n present.

", + "smithy.api#documentation": "

The analysis rule types that are associated with the schema. Currently, only one entry is\n present.

", "smithy.api#required": {} } }, "analysisMethod": { "target": "com.amazonaws.cleanrooms#AnalysisMethod", "traits": { - "smithy.api#documentation": "

The analysis method for the schema. The only valid value is currently\n DIRECT_QUERY.

" + "smithy.api#documentation": "

The analysis method for the schema. The only valid value is currently\n DIRECT_QUERY.

" } }, "creatorAccountId": { @@ -12498,7 +12665,7 @@ "collaborationArn": { "target": "com.amazonaws.cleanrooms#CollaborationArn", "traits": { - "smithy.api#documentation": "

The unique ARN for the collaboration that the schema belongs to.

", + "smithy.api#documentation": "

The unique Amazon Resource Name (ARN) for the collaboration that the schema belongs to.

", "smithy.api#required": {} } }, @@ -12512,21 +12679,21 @@ "createTime": { "target": "smithy.api#Timestamp", "traits": { - "smithy.api#documentation": "

The time the schema was created.

", + "smithy.api#documentation": "

The time at which the schema was created.

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

The time the schema was last updated.

", + "smithy.api#documentation": "

The most recent time at which the schema was updated.

", "smithy.api#required": {} } }, "type": { "target": "com.amazonaws.cleanrooms#SchemaType", "traits": { - "smithy.api#documentation": "

The type of schema. The only valid value is currently `TABLE`.

", + "smithy.api#documentation": "

The type of schema.

", "smithy.api#required": {} } }, @@ -12798,7 +12965,7 @@ "type": { "target": "com.amazonaws.cleanrooms#SchemaType", "traits": { - "smithy.api#documentation": "

The type of schema object. The only valid schema type is currently `TABLE`.

", + "smithy.api#documentation": "

The type of schema object.

", "smithy.api#required": {} } }, @@ -12992,6 +13159,12 @@ "traits": { "smithy.api#documentation": "

The details needed to write the query results.

" } + }, + "computeConfiguration": { + "target": "com.amazonaws.cleanrooms#ComputeConfiguration", + "traits": { + "smithy.api#documentation": "

The compute configuration for the protected query.

" + } } } }, @@ -13667,7 +13840,7 @@ "aws.iam#iamAction": { "documentation": "Grants permission to update analysis rules for a configured table association" }, - "smithy.api#documentation": "

\n Updates\n the analysis rule for a configured table association.

", + "smithy.api#documentation": "

Updates the analysis rule for a configured table association.

", "smithy.api#http": { "code": 200, "method": "PATCH", @@ -13699,7 +13872,7 @@ "analysisRuleType": { "target": "com.amazonaws.cleanrooms#ConfiguredTableAssociationAnalysisRuleType", "traits": { - "smithy.api#documentation": "

The analysis rule type\n that\n you want to update.

", + "smithy.api#documentation": "

The analysis rule type that you want to update.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -13707,7 +13880,7 @@ "analysisRulePolicy": { "target": "com.amazonaws.cleanrooms#ConfiguredTableAssociationAnalysisRulePolicy", "traits": { - "smithy.api#documentation": "

\n The\n updated analysis rule policy for the configured table association.

", + "smithy.api#documentation": "

The updated analysis rule policy for the configured table association.

", "smithy.api#required": {} } } @@ -13722,7 +13895,7 @@ "analysisRule": { "target": "com.amazonaws.cleanrooms#ConfiguredTableAssociationAnalysisRule", "traits": { - "smithy.api#documentation": "

\n The\n updated analysis rule for the configured table association. In the console, the\n ConfiguredTableAssociationAnalysisRule is referred to as the\n collaboration analysis rule.

", + "smithy.api#documentation": "

The updated analysis rule for the configured table association. In the console, the\n ConfiguredTableAssociationAnalysisRule is referred to as the\n collaboration analysis rule.

", "smithy.api#required": {} } } @@ -14329,6 +14502,47 @@ } ] } + }, + "com.amazonaws.cleanrooms#WorkerComputeConfiguration": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.cleanrooms#WorkerComputeType", + "traits": { + "smithy.api#documentation": "

The worker compute configuration type.

" + } + }, + "number": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The number of workers.

", + "smithy.api#range": { + "min": 2, + "max": 400 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

The configuration of the compute resources for workers running an analysis with the\n Clean Rooms SQL analytics engine.

" + } + }, + "com.amazonaws.cleanrooms#WorkerComputeType": { + "type": "enum", + "members": { + "CR1X": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CR.1X" + } + }, + "CR4X": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CR.4X" + } + } + } } } } \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/cloudwatch-logs.json b/codegen/sdk-codegen/aws-models/cloudwatch-logs.json index 06fb8310e2b..b71d5352b0d 100644 --- a/codegen/sdk-codegen/aws-models/cloudwatch-logs.json +++ b/codegen/sdk-codegen/aws-models/cloudwatch-logs.json @@ -497,6 +497,9 @@ "smithy.api#input": {} } }, + "com.amazonaws.cloudwatchlogs#Baseline": { + "type": "boolean" + }, "com.amazonaws.cloudwatchlogs#Boolean": { "type": "boolean" }, @@ -9872,6 +9875,12 @@ "traits": { "smithy.api#documentation": "

If you are temporarily suppressing an anomaly or pattern, use this structure to specify\n how long the suppression is to last.

" } + }, + "baseline": { + "target": "com.amazonaws.cloudwatchlogs#Baseline", + "traits": { + "smithy.api#documentation": "

Set this to true to prevent CloudWatch Logs from displaying this behavior as an anomaly in the future. The behavior is then treated as \n baseline behavior. However, if similar but \n more severe occurrences of this behavior occur in the future, those will still be reported as anomalies.

\n

The default is false\n

" + } } }, "traits": { diff --git a/codegen/sdk-codegen/aws-models/iotfleetwise.json b/codegen/sdk-codegen/aws-models/iotfleetwise.json index 6d45e04fa88..fd71612930c 100644 --- a/codegen/sdk-codegen/aws-models/iotfleetwise.json +++ b/codegen/sdk-codegen/aws-models/iotfleetwise.json @@ -324,6 +324,9 @@ { "target": "com.amazonaws.iotfleetwise#InternalServerException" }, + { + "target": "com.amazonaws.iotfleetwise#LimitExceededException" + }, { "target": "com.amazonaws.iotfleetwise#ThrottlingException" }, @@ -8439,6 +8442,9 @@ { "target": "com.amazonaws.iotfleetwise#InternalServerException" }, + { + "target": "com.amazonaws.iotfleetwise#LimitExceededException" + }, { "target": "com.amazonaws.iotfleetwise#ResourceNotFoundException" }, @@ -9014,7 +9020,8 @@ }, "traits": { "smithy.api#length": { - "min": 1 + "min": 1, + "max": 10 } } }, @@ -9243,7 +9250,8 @@ }, "traits": { "smithy.api#length": { - "min": 1 + "min": 1, + "max": 10 } } }, diff --git a/codegen/sdk-codegen/aws-models/redshift-data.json b/codegen/sdk-codegen/aws-models/redshift-data.json index 6468cc35399..89940d6af0d 100644 --- a/codegen/sdk-codegen/aws-models/redshift-data.json +++ b/codegen/sdk-codegen/aws-models/redshift-data.json @@ -149,6 +149,12 @@ "traits": { "smithy.api#documentation": "

The session identifier of the query.

" } + }, + "ResultFormat": { + "target": "com.amazonaws.redshiftdata#ResultFormatString", + "traits": { + "smithy.api#documentation": "

The data format of the result of the SQL statement. If no format is specified, the default is JSON.

" + } } }, "traits": { @@ -299,8 +305,7 @@ "smithy.api#length": { "min": 1, "max": 63 - }, - "smithy.api#pattern": "^[a-z]([a-z0-9]|-[a-z0-9])*$" + } } }, "com.amazonaws.redshiftdata#ColumnList": { @@ -603,6 +608,12 @@ "traits": { "smithy.api#documentation": "

The session identifier of the query.

" } + }, + "ResultFormat": { + "target": "com.amazonaws.redshiftdata#ResultFormatString", + "traits": { + "smithy.api#documentation": "

The data format of the result of the SQL statement.

" + } } }, "traits": { @@ -867,6 +878,12 @@ "traits": { "smithy.api#documentation": "

The session identifier of the query.

" } + }, + "ResultFormat": { + "target": "com.amazonaws.redshiftdata#ResultFormatString", + "traits": { + "smithy.api#documentation": "

The data format of the result of the SQL statement. If no format is specified, the default is JSON.

" + } } }, "traits": { @@ -985,6 +1002,12 @@ "target": "com.amazonaws.redshiftdata#Field" } }, + "com.amazonaws.redshiftdata#FormattedSqlRecords": { + "type": "list", + "member": { + "target": "com.amazonaws.redshiftdata#QueryRecords" + } + }, "com.amazonaws.redshiftdata#GetStatementResult": { "type": "operation", "input": { @@ -1005,7 +1028,7 @@ } ], "traits": { - "smithy.api#documentation": "

Fetches the temporarily cached result of an SQL statement. \n A token is returned to page through the statement results.

\n

For more information about the Amazon Redshift Data API and CLI usage examples, see \n Using the Amazon Redshift Data API in the \n Amazon Redshift Management Guide.

", + "smithy.api#documentation": "

Fetches the temporarily cached result of an SQL statement in JSON format. \n The ExecuteStatement or BatchExecuteStatement operation that ran the SQL statement must have specified ResultFormat as JSON\n , or let the format default to JSON.\n A token is returned to page through the statement results.

\n

For more information about the Amazon Redshift Data API and CLI usage examples, see \n Using the Amazon Redshift Data API in the \n Amazon Redshift Management Guide.

", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1041,7 +1064,7 @@ "Records": { "target": "com.amazonaws.redshiftdata#SqlRecords", "traits": { - "smithy.api#documentation": "

The results of the SQL statement.

", + "smithy.api#documentation": "

The results of the SQL statement in JSON format.

", "smithy.api#required": {} } }, @@ -1069,6 +1092,96 @@ "smithy.api#output": {} } }, + "com.amazonaws.redshiftdata#GetStatementResultV2": { + "type": "operation", + "input": { + "target": "com.amazonaws.redshiftdata#GetStatementResultV2Request" + }, + "output": { + "target": "com.amazonaws.redshiftdata#GetStatementResultV2Response" + }, + "errors": [ + { + "target": "com.amazonaws.redshiftdata#InternalServerException" + }, + { + "target": "com.amazonaws.redshiftdata#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.redshiftdata#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Fetches the temporarily cached result of an SQL statement in CSV format. \n The ExecuteStatement or BatchExecuteStatement operation that ran the SQL statement must have specified ResultFormat as CSV.\n A token is returned to page through the statement results.

\n

For more information about the Amazon Redshift Data API and CLI usage examples, see \n Using the Amazon Redshift Data API in the \n Amazon Redshift Management Guide.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Records" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.redshiftdata#GetStatementResultV2Request": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.redshiftdata#UUID", + "traits": { + "smithy.api#documentation": "

The identifier of the SQL statement whose results are to be fetched. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. \n A suffix indicates then number of the SQL statement.\n For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the second SQL statement of a batch query.\n This identifier is returned by BatchExecuteStatment, ExecuteStatment, and ListStatements.

", + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.redshiftdata#String", + "traits": { + "smithy.api#documentation": "

A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.redshiftdata#GetStatementResultV2Response": { + "type": "structure", + "members": { + "Records": { + "target": "com.amazonaws.redshiftdata#FormattedSqlRecords", + "traits": { + "smithy.api#documentation": "

The results of the SQL statement in CSV format.

", + "smithy.api#required": {} + } + }, + "ColumnMetadata": { + "target": "com.amazonaws.redshiftdata#ColumnMetadataList", + "traits": { + "smithy.api#documentation": "

The properties (metadata) of a column.

" + } + }, + "TotalNumRows": { + "target": "com.amazonaws.redshiftdata#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The total number of rows in the result set returned from a query. \n You can use this number to estimate the number of calls to the GetStatementResultV2 operation needed to page through the results.

" + } + }, + "ResultFormat": { + "target": "com.amazonaws.redshiftdata#ResultFormatString", + "traits": { + "smithy.api#documentation": "

The data format of the result of the SQL statement.

" + } + }, + "NextToken": { + "target": "com.amazonaws.redshiftdata#String", + "traits": { + "smithy.api#documentation": "

A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.redshiftdata#Integer": { "type": "integer", "traits": { @@ -1564,6 +1677,20 @@ } } }, + "com.amazonaws.redshiftdata#QueryRecords": { + "type": "union", + "members": { + "CSVRecords": { + "target": "com.amazonaws.redshiftdata#String", + "traits": { + "smithy.api#documentation": "

The results of the SQL statement in CSV format.

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

The results of the SQL statement.

" + } + }, "com.amazonaws.redshiftdata#QueryTimeoutException": { "type": "structure", "members": { @@ -1599,6 +1726,9 @@ { "target": "com.amazonaws.redshiftdata#GetStatementResult" }, + { + "target": "com.amazonaws.redshiftdata#GetStatementResultV2" + }, { "target": "com.amazonaws.redshiftdata#ListDatabases" }, @@ -2278,6 +2408,21 @@ "smithy.api#httpError": 404 } }, + "com.amazonaws.redshiftdata#ResultFormatString": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "JSON", + "value": "JSON" + }, + { + "name": "CSV", + "value": "CSV" + } + ] + } + }, "com.amazonaws.redshiftdata#SchemaList": { "type": "list", "member": { @@ -2416,6 +2561,12 @@ "traits": { "smithy.api#documentation": "

The session identifier of the query.

" } + }, + "ResultFormat": { + "target": "com.amazonaws.redshiftdata#ResultFormatString", + "traits": { + "smithy.api#documentation": "

The data format of the result of the SQL statement.

" + } } }, "traits": { diff --git a/codegen/sdk-codegen/aws-models/sagemaker.json b/codegen/sdk-codegen/aws-models/sagemaker.json index 0efafed0185..73ee37f4f18 100644 --- a/codegen/sdk-codegen/aws-models/sagemaker.json +++ b/codegen/sdk-codegen/aws-models/sagemaker.json @@ -923,13 +923,13 @@ "target": "com.amazonaws.sagemaker#LambdaFunctionArn", "traits": { "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of a Lambda function implements the logic for annotation consolidation and to process output data.

\n

This parameter is required for all labeling jobs. For built-in task types, use one\n of the following Amazon SageMaker Ground Truth Lambda function ARNs for\n AnnotationConsolidationLambdaArn. For custom labeling workflows, see\n Post-annotation Lambda.

\n

\n Bounding box - Finds the most similar boxes from\n different workers based on the Jaccard index of the boxes.

\n \n

\n Image classification - Uses a variant of the\n Expectation Maximization approach to estimate the true class of an image based on\n annotations from individual workers.

\n \n

\n Multi-label image classification - Uses a variant of\n the Expectation Maximization approach to estimate the true classes of an image based on\n annotations from individual workers.

\n \n

\n Semantic segmentation - Treats each pixel in an image\n as a multi-class classification and treats pixel annotations from workers as \"votes\" for\n the correct label.

\n \n

\n Text classification - Uses a variant of the\n Expectation Maximization approach to estimate the true class of text based on\n annotations from individual workers.

\n \n

\n Multi-label text classification - Uses a variant of\n the Expectation Maximization approach to estimate the true classes of text based on\n annotations from individual workers.

\n \n

\n Named entity recognition - Groups similar selections\n and calculates aggregate boundaries, resolving to most-assigned label.

\n \n

\n Video Classification - Use this task type when you need workers to classify videos using\n predefined labels that you specify. Workers are shown videos and are asked to choose one\n label for each video.

\n \n

\n Video Frame Object Detection - Use this task type to\n have workers identify and locate objects in a sequence of video frames (images extracted\n from a video) using bounding boxes. For example, you can use this task to ask workers to\n identify and localize various objects in a series of video frames, such as cars, bikes,\n and pedestrians.

\n \n

\n Video Frame Object Tracking - Use this task type to\n have workers track the movement of objects in a sequence of video frames (images\n extracted from a video) using bounding boxes. For example, you can use this task to ask\n workers to track the movement of objects, such as cars, bikes, and pedestrians.

\n \n

\n 3D Point Cloud Object Detection - Use this task type\n when you want workers to classify objects in a 3D point cloud by drawing 3D cuboids\n around objects. For example, you can use this task type to ask workers to identify\n different types of objects in a point cloud, such as cars, bikes, and\n pedestrians.

\n \n

\n 3D Point Cloud Object Tracking - Use this task type\n when you want workers to draw 3D cuboids around objects that appear in a sequence of 3D\n point cloud frames. For example, you can use this task type to ask workers to track the\n movement of vehicles across multiple point cloud frames.

\n \n

\n 3D Point Cloud Semantic Segmentation - Use this task\n type when you want workers to create a point-level semantic segmentation masks by\n painting objects in a 3D point cloud using different colors where each color is assigned\n to one of the classes you specify.

\n \n

\n Use the following ARNs for Label Verification and Adjustment Jobs\n

\n

Use label verification and adjustment jobs to review and adjust labels. To learn more,\n see Verify and Adjust Labels .

\n

\n Semantic Segmentation Adjustment - Treats each pixel\n in an image as a multi-class classification and treats pixel adjusted annotations from\n workers as \"votes\" for the correct label.

\n \n

\n Semantic Segmentation Verification - Uses a variant\n of the Expectation Maximization approach to estimate the true class of verification\n judgment for semantic segmentation labels based on annotations from individual\n workers.

\n \n

\n Bounding Box Adjustment - Finds the most similar\n boxes from different workers based on the Jaccard index of the adjusted\n annotations.

\n \n

\n Bounding Box Verification - Uses a variant of the\n Expectation Maximization approach to estimate the true class of verification judgement\n for bounding box labels based on annotations from individual workers.

\n \n

\n Video Frame Object Detection Adjustment - \n Use this task type when you want workers to adjust bounding boxes that workers have added \n to video frames to classify and localize objects in a sequence of video frames.

\n \n

\n Video Frame Object Tracking Adjustment - \n Use this task type when you want workers to adjust bounding boxes that workers have added \n to video frames to track object movement across a sequence of video frames.

\n \n

\n 3D Point Cloud Object Detection Adjustment - Use this\n task type when you want workers to adjust 3D cuboids around objects in a 3D point cloud.

\n \n

\n 3D Point Cloud Object Tracking Adjustment - Use this\n task type when you want workers to adjust 3D cuboids around objects that appear in a\n sequence of 3D point cloud frames.

\n \n

\n 3D Point Cloud Semantic Segmentation Adjustment - Use this task\n type when you want workers to adjust a point-level semantic segmentation masks using a paint tool.

\n ", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of a Lambda function implements the logic for annotation consolidation and to process output data.

\n

For built-in task types, use one of the following Amazon SageMaker Ground Truth Lambda function ARNs for AnnotationConsolidationLambdaArn. For custom labeling workflows, see Post-annotation Lambda.

\n

\n Bounding box - Finds the most similar boxes from\n different workers based on the Jaccard index of the boxes.

\n \n

\n Image classification - Uses a variant of the\n Expectation Maximization approach to estimate the true class of an image based on\n annotations from individual workers.

\n \n

\n Multi-label image classification - Uses a variant of\n the Expectation Maximization approach to estimate the true classes of an image based on\n annotations from individual workers.

\n \n

\n Semantic segmentation - Treats each pixel in an image\n as a multi-class classification and treats pixel annotations from workers as \"votes\" for\n the correct label.

\n \n

\n Text classification - Uses a variant of the\n Expectation Maximization approach to estimate the true class of text based on\n annotations from individual workers.

\n \n

\n Multi-label text classification - Uses a variant of\n the Expectation Maximization approach to estimate the true classes of text based on\n annotations from individual workers.

\n \n

\n Named entity recognition - Groups similar selections\n and calculates aggregate boundaries, resolving to most-assigned label.

\n \n

\n Video Classification - Use this task type when you need workers to classify videos using\n predefined labels that you specify. Workers are shown videos and are asked to choose one\n label for each video.

\n \n

\n Video Frame Object Detection - Use this task type to\n have workers identify and locate objects in a sequence of video frames (images extracted\n from a video) using bounding boxes. For example, you can use this task to ask workers to\n identify and localize various objects in a series of video frames, such as cars, bikes,\n and pedestrians.

\n \n

\n Video Frame Object Tracking - Use this task type to\n have workers track the movement of objects in a sequence of video frames (images\n extracted from a video) using bounding boxes. For example, you can use this task to ask\n workers to track the movement of objects, such as cars, bikes, and pedestrians.

\n \n

\n 3D Point Cloud Object Detection - Use this task type\n when you want workers to classify objects in a 3D point cloud by drawing 3D cuboids\n around objects. For example, you can use this task type to ask workers to identify\n different types of objects in a point cloud, such as cars, bikes, and\n pedestrians.

\n \n

\n 3D Point Cloud Object Tracking - Use this task type\n when you want workers to draw 3D cuboids around objects that appear in a sequence of 3D\n point cloud frames. For example, you can use this task type to ask workers to track the\n movement of vehicles across multiple point cloud frames.

\n \n

\n 3D Point Cloud Semantic Segmentation - Use this task\n type when you want workers to create a point-level semantic segmentation masks by\n painting objects in a 3D point cloud using different colors where each color is assigned\n to one of the classes you specify.

\n \n

\n Use the following ARNs for Label Verification and Adjustment Jobs\n

\n

Use label verification and adjustment jobs to review and adjust labels. To learn more,\n see Verify and Adjust Labels .

\n

\n Semantic Segmentation Adjustment - Treats each pixel\n in an image as a multi-class classification and treats pixel adjusted annotations from\n workers as \"votes\" for the correct label.

\n \n

\n Semantic Segmentation Verification - Uses a variant\n of the Expectation Maximization approach to estimate the true class of verification\n judgment for semantic segmentation labels based on annotations from individual\n workers.

\n \n

\n Bounding Box Adjustment - Finds the most similar\n boxes from different workers based on the Jaccard index of the adjusted\n annotations.

\n \n

\n Bounding Box Verification - Uses a variant of the\n Expectation Maximization approach to estimate the true class of verification judgement\n for bounding box labels based on annotations from individual workers.

\n \n

\n Video Frame Object Detection Adjustment - \n Use this task type when you want workers to adjust bounding boxes that workers have added \n to video frames to classify and localize objects in a sequence of video frames.

\n \n

\n Video Frame Object Tracking Adjustment - \n Use this task type when you want workers to adjust bounding boxes that workers have added \n to video frames to track object movement across a sequence of video frames.

\n \n

\n 3D Point Cloud Object Detection Adjustment - Use this\n task type when you want workers to adjust 3D cuboids around objects in a 3D point cloud.

\n \n

\n 3D Point Cloud Object Tracking Adjustment - Use this\n task type when you want workers to adjust 3D cuboids around objects that appear in a\n sequence of 3D point cloud frames.

\n \n

\n 3D Point Cloud Semantic Segmentation Adjustment - Use this task\n type when you want workers to adjust a point-level semantic segmentation masks using a paint tool.

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

Configures how labels are consolidated across human workers and processes output data.\n

" + "smithy.api#documentation": "

Configures how labels are consolidated across human workers and processes output data.

" } }, "com.amazonaws.sagemaker#AppArn": { @@ -8310,7 +8310,7 @@ "Environment": { "target": "com.amazonaws.sagemaker#EnvironmentMap", "traits": { - "smithy.api#documentation": "

The environment variables to set in the Docker container. Don't include any\n sensitive data in your environment variables.

\n

The maximum length of each key and value in the Environment map is\n 1024 bytes. The maximum length of all keys and values in the map, combined, is 32 KB. If\n you pass multiple containers to a CreateModel request, then the maximum\n length of all of their maps, combined, is also 32 KB.

" + "smithy.api#documentation": "

The environment variables to set in the Docker container. Don't include any\n sensitive data in your environment variables.

\n

The maximum length of each key and value in the Environment map is\n 1024 bytes. The maximum length of all keys and values in the map, combined, is 32 KB. If\n you pass multiple containers to a CreateModel request, then the maximum\n length of all of their maps, combined, is also 32 KB.

" } }, "ModelPackageName": { @@ -9408,7 +9408,7 @@ "target": "com.amazonaws.sagemaker#CreateCodeRepositoryOutput" }, "traits": { - "smithy.api#documentation": "

Creates a Git repository as a resource in your SageMaker account. You can associate the\n repository with notebook instances so that you can use Git source control for the\n notebooks you create. The Git repository is a resource in your SageMaker account, so it can\n be associated with more than one notebook instance, and it persists independently from\n the lifecycle of any notebook instances it is associated with.

\n

The repository can be hosted either in Amazon Web Services CodeCommit\n or in any other Git repository.

" + "smithy.api#documentation": "

Creates a Git repository as a resource in your SageMaker account. You can\n associate the repository with notebook instances so that you can use Git source control\n for the notebooks you create. The Git repository is a resource in your SageMaker\n account, so it can be associated with more than one notebook instance, and it persists\n independently from the lifecycle of any notebook instances it is associated with.

\n

The repository can be hosted either in Amazon Web Services CodeCommit\n or in any other Git repository.

" } }, "com.amazonaws.sagemaker#CreateCodeRepositoryInput": { @@ -9418,7 +9418,7 @@ "target": "com.amazonaws.sagemaker#EntityName", "traits": { "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

The name of the Git repository. The name must have 1 to 63 characters. Valid\n characters are a-z, A-Z, 0-9, and - (hyphen).

", + "smithy.api#documentation": "

The name of the Git repository. The name must have 1 to 63 characters. Valid\n characters are a-z, A-Z, 0-9, and - (hyphen).

", "smithy.api#required": {} } }, @@ -9426,14 +9426,14 @@ "target": "com.amazonaws.sagemaker#GitConfig", "traits": { "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

Specifies details about the repository, including the URL where the repository is\n located, the default branch, and credentials to use to access the repository.

", + "smithy.api#documentation": "

Specifies details about the repository, including the URL where the repository is\n located, the default branch, and credentials to use to access the repository.

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

An array of key-value pairs. You can use tags to categorize your Amazon Web Services\n resources in different ways, for example, by purpose, owner, or environment. For more\n information, see Tagging Amazon Web Services Resources.

" + "smithy.api#documentation": "

An array of key-value pairs. You can use tags to categorize your Amazon Web Services\n resources in different ways, for example, by purpose, owner, or environment. For more\n information, see Tagging Amazon Web Services Resources.

" } } }, @@ -9928,7 +9928,7 @@ "DefaultSpaceSettings": { "target": "com.amazonaws.sagemaker#DefaultSpaceSettings", "traits": { - "smithy.api#documentation": "

The default settings used to create a space.

" + "smithy.api#documentation": "

The default settings for shared spaces that users create in the domain.

" } } }, @@ -12532,7 +12532,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an SageMaker notebook instance. A notebook instance is a machine learning (ML)\n compute instance running on a Jupyter notebook.

\n

In a CreateNotebookInstance request, specify the type of ML compute\n instance that you want to run. SageMaker launches the instance, installs common libraries\n that you can use to explore datasets for model training, and attaches an ML storage\n volume to the notebook instance.

\n

SageMaker also provides a set of example notebooks. Each notebook demonstrates how to\n use SageMaker with a specific algorithm or with a machine learning framework.

\n

After receiving the request, SageMaker does the following:

\n
    \n
  1. \n

    Creates a network interface in the SageMaker VPC.

    \n
  2. \n
  3. \n

    (Option) If you specified SubnetId, SageMaker creates a network\n interface in your own VPC, which is inferred from the subnet ID that you provide\n in the input. When creating this network interface, SageMaker attaches the security\n group that you specified in the request to the network interface that it creates\n in your VPC.

    \n
  4. \n
  5. \n

    Launches an EC2 instance of the type specified in the request in the SageMaker\n VPC. If you specified SubnetId of your VPC, SageMaker specifies both\n network interfaces when launching this instance. This enables inbound traffic\n from your own VPC to the notebook instance, assuming that the security groups\n allow it.

    \n
  6. \n
\n

After creating the notebook instance, SageMaker returns its Amazon Resource Name (ARN).\n You can't change the name of a notebook instance after you create it.

\n

After SageMaker creates the notebook instance, you can connect to the Jupyter server and\n work in Jupyter notebooks. For example, you can write code to explore a dataset that you\n can use for model training, train a model, host models by creating SageMaker endpoints, and\n validate hosted models.

\n

For more information, see How It Works.

" + "smithy.api#documentation": "

Creates an SageMaker notebook instance. A notebook instance is a machine\n learning (ML) compute instance running on a Jupyter notebook.

\n

In a CreateNotebookInstance request, specify the type of ML compute\n instance that you want to run. SageMaker launches the instance, installs common\n libraries that you can use to explore datasets for model training, and attaches an ML\n storage volume to the notebook instance.

\n

SageMaker also provides a set of example notebooks. Each notebook\n demonstrates how to use SageMaker with a specific algorithm or with a machine\n learning framework.

\n

After receiving the request, SageMaker does the following:

\n
    \n
  1. \n

    Creates a network interface in the SageMaker VPC.

    \n
  2. \n
  3. \n

    (Option) If you specified SubnetId, SageMaker creates\n a network interface in your own VPC, which is inferred from the subnet ID that\n you provide in the input. When creating this network interface, SageMaker attaches the security group that you specified in the request to the network\n interface that it creates in your VPC.

    \n
  4. \n
  5. \n

    Launches an EC2 instance of the type specified in the request in the\n SageMaker VPC. If you specified SubnetId of your VPC,\n SageMaker specifies both network interfaces when launching this\n instance. This enables inbound traffic from your own VPC to the notebook\n instance, assuming that the security groups allow it.

    \n
  6. \n
\n

After creating the notebook instance, SageMaker returns its Amazon Resource\n Name (ARN). You can't change the name of a notebook instance after you create\n it.

\n

After SageMaker creates the notebook instance, you can connect to the\n Jupyter server and work in Jupyter notebooks. For example, you can write code to explore\n a dataset that you can use for model training, train a model, host models by creating\n SageMaker endpoints, and validate hosted models.

\n

For more information, see How It Works.

" } }, "com.amazonaws.sagemaker#CreateNotebookInstanceInput": { @@ -12557,75 +12557,75 @@ "SubnetId": { "target": "com.amazonaws.sagemaker#SubnetId", "traits": { - "smithy.api#documentation": "

The ID of the subnet in a VPC to which you would like to have a connectivity from\n your ML compute instance.

" + "smithy.api#documentation": "

The ID of the subnet in a VPC to which you would like to have a connectivity from\n your ML compute instance.

" } }, "SecurityGroupIds": { "target": "com.amazonaws.sagemaker#SecurityGroupIds", "traits": { - "smithy.api#documentation": "

The VPC security group IDs, in the form sg-xxxxxxxx. The security groups must be\n for the same VPC as specified in the subnet.

" + "smithy.api#documentation": "

The VPC security group IDs, in the form sg-xxxxxxxx. The security groups must be\n for the same VPC as specified in the subnet.

" } }, "RoleArn": { "target": "com.amazonaws.sagemaker#RoleArn", "traits": { "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

When you send any requests to Amazon Web Services resources from the notebook\n instance, SageMaker assumes this role to perform tasks on your behalf. You must grant this\n role necessary permissions so SageMaker can perform these tasks. The policy must allow the\n SageMaker service principal (sagemaker.amazonaws.com) permissions to assume this role. For\n more information, see SageMaker Roles.

\n \n

To be able to pass this role to SageMaker, the caller of this API must have the\n iam:PassRole permission.

\n
", + "smithy.api#documentation": "

When you send any requests to Amazon Web Services resources from the notebook\n instance, SageMaker assumes this role to perform tasks on your behalf. You must\n grant this role necessary permissions so SageMaker can perform these tasks. The\n policy must allow the SageMaker service principal (sagemaker.amazonaws.com)\n permissions to assume this role. For more information, see SageMaker Roles.

\n \n

To be able to pass this role to SageMaker, the caller of this API must\n have the iam:PassRole permission.

\n
", "smithy.api#required": {} } }, "KmsKeyId": { "target": "com.amazonaws.sagemaker#KmsKeyId", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that\n SageMaker uses to encrypt data on the storage volume attached to your notebook instance. The\n KMS key you provide must be enabled. For information, see Enabling and Disabling\n Keys in the Amazon Web Services Key Management Service Developer\n Guide.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that\n SageMaker uses to encrypt data on the storage volume attached to your\n notebook instance. The KMS key you provide must be enabled. For information, see Enabling and\n Disabling Keys in the Amazon Web Services Key Management Service\n Developer Guide.

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

An array of key-value pairs. You can use tags to categorize your Amazon Web Services\n resources in different ways, for example, by purpose, owner, or environment. For more\n information, see Tagging Amazon Web Services Resources.

" + "smithy.api#documentation": "

An array of key-value pairs. You can use tags to categorize your Amazon Web Services\n resources in different ways, for example, by purpose, owner, or environment. For more\n information, see Tagging Amazon Web Services Resources.

" } }, "LifecycleConfigName": { "target": "com.amazonaws.sagemaker#NotebookInstanceLifecycleConfigName", "traits": { - "smithy.api#documentation": "

The name of a lifecycle configuration to associate with the notebook instance. For\n information about lifestyle configurations, see Step 2.1: (Optional)\n Customize a Notebook Instance.

" + "smithy.api#documentation": "

The name of a lifecycle configuration to associate with the notebook instance. For\n information about lifestyle configurations, see Step 2.1: (Optional)\n Customize a Notebook Instance.

" } }, "DirectInternetAccess": { "target": "com.amazonaws.sagemaker#DirectInternetAccess", "traits": { - "smithy.api#documentation": "

Sets whether SageMaker provides internet access to the notebook instance. If you set this\n to Disabled this notebook instance is able to access resources only in your\n VPC, and is not be able to connect to SageMaker training and endpoint services unless you\n configure a NAT Gateway in your VPC.

\n

For more information, see Notebook Instances Are Internet-Enabled by Default. You can set the value\n of this parameter to Disabled only if you set a value for the\n SubnetId parameter.

" + "smithy.api#documentation": "

Sets whether SageMaker provides internet access to the notebook instance. If\n you set this to Disabled this notebook instance is able to access resources\n only in your VPC, and is not be able to connect to SageMaker training and\n endpoint services unless you configure a NAT Gateway in your VPC.

\n

For more information, see Notebook Instances Are Internet-Enabled by Default. You can set the value\n of this parameter to Disabled only if you set a value for the\n SubnetId parameter.

" } }, "VolumeSizeInGB": { "target": "com.amazonaws.sagemaker#NotebookInstanceVolumeSizeInGB", "traits": { - "smithy.api#documentation": "

The size, in GB, of the ML storage volume to attach to the notebook instance. The\n default value is 5 GB.

" + "smithy.api#documentation": "

The size, in GB, of the ML storage volume to attach to the notebook instance. The\n default value is 5 GB.

" } }, "AcceleratorTypes": { "target": "com.amazonaws.sagemaker#NotebookInstanceAcceleratorTypes", "traits": { - "smithy.api#documentation": "

A list of Elastic Inference (EI) instance types to associate with this notebook\n instance. Currently, only one instance type can be associated with a notebook instance.\n For more information, see Using Elastic Inference in Amazon SageMaker.

" + "smithy.api#documentation": "

This parameter is no longer supported. Elastic Inference (EI) is no longer\n available.

\n

This parameter was used to specify a list of EI instance types to associate with this\n notebook instance.

" } }, "DefaultCodeRepository": { "target": "com.amazonaws.sagemaker#CodeRepositoryNameOrUrl", "traits": { - "smithy.api#documentation": "

A Git repository to associate with the notebook instance as its default code\n repository. This can be either the name of a Git repository stored as a resource in your\n account, or the URL of a Git repository in Amazon Web Services CodeCommit\n or in any other Git repository. When you open a notebook instance, it opens in the\n directory that contains this repository. For more information, see Associating Git\n Repositories with SageMaker Notebook Instances.

" + "smithy.api#documentation": "

A Git repository to associate with the notebook instance as its default code\n repository. This can be either the name of a Git repository stored as a resource in your\n account, or the URL of a Git repository in Amazon Web Services CodeCommit\n or in any other Git repository. When you open a notebook instance, it opens in the\n directory that contains this repository. For more information, see Associating Git\n Repositories with SageMaker Notebook Instances.

" } }, "AdditionalCodeRepositories": { "target": "com.amazonaws.sagemaker#AdditionalCodeRepositoryNamesOrUrls", "traits": { - "smithy.api#documentation": "

An array of up to three Git repositories to associate with the notebook instance.\n These can be either the names of Git repositories stored as resources in your account,\n or the URL of Git repositories in Amazon Web Services CodeCommit\n or in any other Git repository. These repositories are cloned at the same level as the\n default repository of your notebook instance. For more information, see Associating Git\n Repositories with SageMaker Notebook Instances.

" + "smithy.api#documentation": "

An array of up to three Git repositories to associate with the notebook instance.\n These can be either the names of Git repositories stored as resources in your account,\n or the URL of Git repositories in Amazon Web Services CodeCommit\n or in any other Git repository. These repositories are cloned at the same level as the\n default repository of your notebook instance. For more information, see Associating Git\n Repositories with SageMaker Notebook Instances.

" } }, "RootAccess": { "target": "com.amazonaws.sagemaker#RootAccess", "traits": { - "smithy.api#documentation": "

Whether root access is enabled or disabled for users of the notebook instance. The\n default value is Enabled.

\n \n

Lifecycle configurations need root access to be able to set up a notebook\n instance. Because of this, lifecycle configurations associated with a notebook\n instance always run with root access even if you disable root access for\n users.

\n
" + "smithy.api#documentation": "

Whether root access is enabled or disabled for users of the notebook instance. The\n default value is Enabled.

\n \n

Lifecycle configurations need root access to be able to set up a notebook\n instance. Because of this, lifecycle configurations associated with a notebook\n instance always run with root access even if you disable root access for\n users.

\n
" } }, "PlatformIdentifier": { @@ -12659,7 +12659,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a lifecycle configuration that you can associate with a notebook instance. A\n lifecycle configuration is a collection of shell scripts that\n run when you create or start a notebook instance.

\n

Each lifecycle configuration script has a limit of 16384 characters.

\n

The value of the $PATH environment variable that is available to both\n scripts is /sbin:bin:/usr/sbin:/usr/bin.

\n

View Amazon CloudWatch Logs for notebook instance lifecycle configurations in log group\n /aws/sagemaker/NotebookInstances in log stream\n [notebook-instance-name]/[LifecycleConfigHook].

\n

Lifecycle configuration scripts cannot run for longer than 5 minutes. If a script runs\n for longer than 5 minutes, it fails and the notebook instance is not created or\n started.

\n

For information about notebook instance lifestyle configurations, see Step\n 2.1: (Optional) Customize a Notebook Instance.

" + "smithy.api#documentation": "

Creates a lifecycle configuration that you can associate with a notebook instance. A\n lifecycle configuration is a collection of shell scripts that\n run when you create or start a notebook instance.

\n

Each lifecycle configuration script has a limit of 16384 characters.

\n

The value of the $PATH environment variable that is available to both\n scripts is /sbin:bin:/usr/sbin:/usr/bin.

\n

View Amazon CloudWatch Logs for notebook instance lifecycle configurations in log\n group /aws/sagemaker/NotebookInstances in log stream\n [notebook-instance-name]/[LifecycleConfigHook].

\n

Lifecycle configuration scripts cannot run for longer than 5 minutes. If a script runs\n for longer than 5 minutes, it fails and the notebook instance is not created or\n started.

\n

For information about notebook instance lifestyle configurations, see Step\n 2.1: (Optional) Customize a Notebook Instance.

" } }, "com.amazonaws.sagemaker#CreateNotebookInstanceLifecycleConfigInput": { @@ -12676,13 +12676,13 @@ "OnCreate": { "target": "com.amazonaws.sagemaker#NotebookInstanceLifecycleConfigList", "traits": { - "smithy.api#documentation": "

A shell script that runs only once, when you create a notebook instance. The shell\n script must be a base64-encoded string.

" + "smithy.api#documentation": "

A shell script that runs only once, when you create a notebook instance. The shell\n script must be a base64-encoded string.

" } }, "OnStart": { "target": "com.amazonaws.sagemaker#NotebookInstanceLifecycleConfigList", "traits": { - "smithy.api#documentation": "

A shell script that runs every time you start a notebook instance, including when you\n create the notebook instance. The shell script must be a base64-encoded string.

" + "smithy.api#documentation": "

A shell script that runs every time you start a notebook instance, including when you\n create the notebook instance. The shell script must be a base64-encoded string.

" } } }, @@ -13088,7 +13088,7 @@ "target": "com.amazonaws.sagemaker#CreatePresignedNotebookInstanceUrlOutput" }, "traits": { - "smithy.api#documentation": "

Returns a URL that you can use to connect to the Jupyter server from a notebook\n instance. In the SageMaker console, when you choose Open next to a notebook\n instance, SageMaker opens a new tab showing the Jupyter server home page from the notebook\n instance. The console uses this API to get the URL and show the page.

\n

The IAM role or user used to call this API defines the permissions to access the\n notebook instance. Once the presigned URL is created, no additional permission is\n required to access this URL. IAM authorization policies for this API are also enforced\n for every HTTP request and WebSocket frame that attempts to connect to the notebook\n instance.

\n

You can restrict access to this API and to the URL that it returns to a list of IP\n addresses that you specify. Use the NotIpAddress condition operator and the\n aws:SourceIP condition context key to specify the list of IP addresses\n that you want to have access to the notebook instance. For more information, see Limit Access to a Notebook Instance by IP Address.

\n \n

The URL that you get from a call to CreatePresignedNotebookInstanceUrl is valid only for 5 minutes. If you\n try to use the URL after the 5-minute limit expires, you are directed to the Amazon Web Services console sign-in page.

\n
" + "smithy.api#documentation": "

Returns a URL that you can use to connect to the Jupyter server from a notebook\n instance. In the SageMaker console, when you choose Open next to a\n notebook instance, SageMaker opens a new tab showing the Jupyter server home\n page from the notebook instance. The console uses this API to get the URL and show the\n page.

\n

The IAM role or user used to call this API defines the permissions to\n access the notebook instance. Once the presigned URL is created, no additional\n permission is required to access this URL. IAM authorization policies for\n this API are also enforced for every HTTP request and WebSocket frame that attempts to\n connect to the notebook instance.

\n

You can restrict access to this API and to the URL that it returns to a list of IP\n addresses that you specify. Use the NotIpAddress condition operator and the\n aws:SourceIP condition context key to specify the list of IP addresses\n that you want to have access to the notebook instance. For more information, see Limit Access to a Notebook Instance by IP Address.

\n \n

The URL that you get from a call to CreatePresignedNotebookInstanceUrl is valid only for 5 minutes. If you\n try to use the URL after the 5-minute limit expires, you are directed to the Amazon Web Services console sign-in page.

\n
" } }, "com.amazonaws.sagemaker#CreatePresignedNotebookInstanceUrlInput": { @@ -14281,7 +14281,7 @@ } }, "traits": { - "smithy.api#documentation": "

A file system, created by you, that you assign to a user profile or space for an\n Amazon SageMaker Domain. Permitted users can access this file system in Amazon SageMaker Studio.

" + "smithy.api#documentation": "

A file system, created by you, that you assign to a user profile or space for an\n Amazon SageMaker Domain. Permitted users can access this file system in Amazon SageMaker Studio.

" } }, "com.amazonaws.sagemaker#CustomFileSystemConfig": { @@ -14295,7 +14295,7 @@ } }, "traits": { - "smithy.api#documentation": "

The settings for assigning a custom file system to a user profile or space for an\n Amazon SageMaker Domain. Permitted users can access this file system in Amazon SageMaker Studio.

" + "smithy.api#documentation": "

The settings for assigning a custom file system to a user profile or space for an\n Amazon SageMaker Domain. Permitted users can access this file system in Amazon SageMaker Studio.

" } }, "com.amazonaws.sagemaker#CustomFileSystemConfigs": { @@ -15085,7 +15085,7 @@ } }, "traits": { - "smithy.api#documentation": "

A collection of settings that apply to spaces created in the domain.

" + "smithy.api#documentation": "

The default settings for shared spaces that users create in the domain.

\n

SageMaker applies these settings only to shared spaces. It doesn't apply them to private spaces.

" } }, "com.amazonaws.sagemaker#DefaultSpaceStorageSettings": { @@ -16658,7 +16658,7 @@ "target": "smithy.api#Unit" }, "traits": { - "smithy.api#documentation": "

Deletes an SageMaker notebook instance. Before you can delete a notebook instance, you\n must call the StopNotebookInstance API.

\n \n

When you delete a notebook instance, you lose all of your data. SageMaker removes\n the ML compute instance, and deletes the ML storage volume and the network interface\n associated with the notebook instance.

\n
" + "smithy.api#documentation": "

Deletes an SageMaker notebook instance. Before you can delete a notebook\n instance, you must call the StopNotebookInstance API.

\n \n

When you delete a notebook instance, you lose all of your data. SageMaker removes the ML compute instance, and deletes the ML storage volume and the\n network interface associated with the notebook instance.

\n
" } }, "com.amazonaws.sagemaker#DeleteNotebookInstanceInput": { @@ -18567,7 +18567,7 @@ "GitConfig": { "target": "com.amazonaws.sagemaker#GitConfig", "traits": { - "smithy.api#documentation": "

Configuration details about the repository, including the URL where the repository is\n located, the default branch, and the Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret that contains the credentials used to access the\n repository.

" + "smithy.api#documentation": "

Configuration details about the repository, including the URL where the repository is\n located, the default branch, and the Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret that contains the credentials used to access the\n repository.

" } } }, @@ -19365,7 +19365,7 @@ "DefaultSpaceSettings": { "target": "com.amazonaws.sagemaker#DefaultSpaceSettings", "traits": { - "smithy.api#documentation": "

The default settings used to create a space.

" + "smithy.api#documentation": "

The default settings for shared spaces that users create in the domain.

" } } }, @@ -23360,7 +23360,7 @@ "target": "com.amazonaws.sagemaker#DescribeNotebookInstanceLifecycleConfigOutput" }, "traits": { - "smithy.api#documentation": "

Returns a description of a notebook instance lifecycle configuration.

\n

For information about notebook instance lifestyle configurations, see Step\n 2.1: (Optional) Customize a Notebook Instance.

" + "smithy.api#documentation": "

Returns a description of a notebook instance lifecycle configuration.

\n

For information about notebook instance lifestyle configurations, see Step\n 2.1: (Optional) Customize a Notebook Instance.

" } }, "com.amazonaws.sagemaker#DescribeNotebookInstanceLifecycleConfigInput": { @@ -23403,7 +23403,7 @@ "OnStart": { "target": "com.amazonaws.sagemaker#NotebookInstanceLifecycleConfigList", "traits": { - "smithy.api#documentation": "

The shell script that runs every time you start a notebook instance, including when\n you create the notebook instance.

" + "smithy.api#documentation": "

The shell script that runs every time you start a notebook instance, including when\n you create the notebook instance.

" } }, "LastModifiedTime": { @@ -23483,13 +23483,13 @@ "KmsKeyId": { "target": "com.amazonaws.sagemaker#KmsKeyId", "traits": { - "smithy.api#documentation": "

The Amazon Web Services KMS key ID SageMaker uses to encrypt data when storing it on the\n ML storage volume attached to the instance.

" + "smithy.api#documentation": "

The Amazon Web Services KMS key ID SageMaker uses to encrypt data when\n storing it on the ML storage volume attached to the instance.

" } }, "NetworkInterfaceId": { "target": "com.amazonaws.sagemaker#NetworkInterfaceId", "traits": { - "smithy.api#documentation": "

The network interface IDs that SageMaker created at the time of creating the instance.\n

" + "smithy.api#documentation": "

The network interface IDs that SageMaker created at the time of creating\n the instance.

" } }, "LastModifiedTime": { @@ -23513,7 +23513,7 @@ "DirectInternetAccess": { "target": "com.amazonaws.sagemaker#DirectInternetAccess", "traits": { - "smithy.api#documentation": "

Describes whether SageMaker provides internet access to the notebook instance. If this\n value is set to Disabled, the notebook instance does not have\n internet access, and cannot connect to SageMaker training and endpoint services.

\n

For more information, see Notebook Instances Are Internet-Enabled by Default.

" + "smithy.api#documentation": "

Describes whether SageMaker provides internet access to the notebook instance.\n If this value is set to Disabled, the notebook instance does not\n have internet access, and cannot connect to SageMaker training and endpoint\n services.

\n

For more information, see Notebook Instances Are Internet-Enabled by Default.

" } }, "VolumeSizeInGB": { @@ -23525,7 +23525,7 @@ "AcceleratorTypes": { "target": "com.amazonaws.sagemaker#NotebookInstanceAcceleratorTypes", "traits": { - "smithy.api#documentation": "

A list of the Elastic Inference (EI) instance types associated with this notebook\n instance. Currently only one EI instance type can be associated with a notebook\n instance. For more information, see Using Elastic Inference in\n Amazon SageMaker.

" + "smithy.api#documentation": "

This parameter is no longer supported. Elastic Inference (EI) is no longer\n available.

\n

This parameter was used to specify a list of the EI instance types associated with\n this notebook instance.

" } }, "DefaultCodeRepository": { @@ -26747,7 +26747,7 @@ } }, "traits": { - "smithy.api#documentation": "

A file system, created by you in Amazon EFS, that you assign to a user profile\n or space for an Amazon SageMaker Domain. Permitted users can access this file\n system in Amazon SageMaker Studio.

" + "smithy.api#documentation": "

A file system, created by you in Amazon EFS, that you assign to a user profile\n or space for an Amazon SageMaker Domain. Permitted users can access this file\n system in Amazon SageMaker Studio.

" } }, "com.amazonaws.sagemaker#EFSFileSystemConfig": { @@ -26764,12 +26764,12 @@ "FileSystemPath": { "target": "com.amazonaws.sagemaker#FileSystemPath", "traits": { - "smithy.api#documentation": "

The path to the file system directory that is accessible in Amazon SageMaker\n Studio. Permitted users can access only this directory and below.

" + "smithy.api#documentation": "

The path to the file system directory that is accessible in Amazon SageMaker\n Studio. Permitted users can access only this directory and below.

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

The settings for assigning a custom Amazon EFS file system to a user profile\n or space for an Amazon SageMaker Domain.

" + "smithy.api#documentation": "

The settings for assigning a custom Amazon EFS file system to a user profile\n or space for an Amazon SageMaker Domain.

" } }, "com.amazonaws.sagemaker#EMRStepMetadata": { @@ -34281,7 +34281,7 @@ "target": "com.amazonaws.sagemaker#MinimumInstanceMetadataServiceVersion", "traits": { "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

Indicates the minimum IMDS version that the notebook instance supports. When passed as part of CreateNotebookInstance, if no value is selected, then it defaults to IMDSv1. This means that both IMDSv1 and IMDSv2 are supported. If passed as part of UpdateNotebookInstance, there is no default.

", + "smithy.api#documentation": "

Indicates the minimum IMDS version that the notebook instance supports. When passed as\n part of CreateNotebookInstance, if no value is selected, then it defaults\n to IMDSv1. This means that both IMDSv1 and IMDSv2 are supported. If passed as part of\n UpdateNotebookInstance, there is no default.

", "smithy.api#required": {} } } @@ -37567,25 +37567,25 @@ "CreationTimeAfter": { "target": "com.amazonaws.sagemaker#CreationTime", "traits": { - "smithy.api#documentation": "

A filter that returns only Git repositories that were created after the specified\n time.

" + "smithy.api#documentation": "

A filter that returns only Git repositories that were created after the specified\n time.

" } }, "CreationTimeBefore": { "target": "com.amazonaws.sagemaker#CreationTime", "traits": { - "smithy.api#documentation": "

A filter that returns only Git repositories that were created before the specified\n time.

" + "smithy.api#documentation": "

A filter that returns only Git repositories that were created before the specified\n time.

" } }, "LastModifiedTimeAfter": { "target": "com.amazonaws.sagemaker#Timestamp", "traits": { - "smithy.api#documentation": "

A filter that returns only Git repositories that were last modified after the\n specified time.

" + "smithy.api#documentation": "

A filter that returns only Git repositories that were last modified after the\n specified time.

" } }, "LastModifiedTimeBefore": { "target": "com.amazonaws.sagemaker#Timestamp", "traits": { - "smithy.api#documentation": "

A filter that returns only Git repositories that were last modified before the\n specified time.

" + "smithy.api#documentation": "

A filter that returns only Git repositories that were last modified before the\n specified time.

" } }, "MaxResults": { @@ -37597,13 +37597,13 @@ "NameContains": { "target": "com.amazonaws.sagemaker#CodeRepositoryNameContains", "traits": { - "smithy.api#documentation": "

A string in the Git repositories name. This filter returns only repositories whose\n name contains the specified string.

" + "smithy.api#documentation": "

A string in the Git repositories name. This filter returns only repositories whose\n name contains the specified string.

" } }, "NextToken": { "target": "com.amazonaws.sagemaker#NextToken", "traits": { - "smithy.api#documentation": "

If the result of a ListCodeRepositoriesOutput request was truncated, the\n response includes a NextToken. To get the next set of Git repositories, use\n the token in the next request.

" + "smithy.api#documentation": "

If the result of a ListCodeRepositoriesOutput request was truncated, the\n response includes a NextToken. To get the next set of Git repositories, use\n the token in the next request.

" } }, "SortBy": { @@ -37630,14 +37630,14 @@ "target": "com.amazonaws.sagemaker#CodeRepositorySummaryList", "traits": { "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

Gets a list of summaries of the Git repositories. Each summary specifies the following\n values for the repository:

\n ", + "smithy.api#documentation": "

Gets a list of summaries of the Git repositories. Each summary specifies the following\n values for the repository:

\n ", "smithy.api#required": {} } }, "NextToken": { "target": "com.amazonaws.sagemaker#NextToken", "traits": { - "smithy.api#documentation": "

If the result of a ListCodeRepositoriesOutput request was truncated, the\n response includes a NextToken. To get the next set of Git repositories, use\n the token in the next request.

" + "smithy.api#documentation": "

If the result of a ListCodeRepositoriesOutput request was truncated, the\n response includes a NextToken. To get the next set of Git repositories, use\n the token in the next request.

" } } }, @@ -41986,7 +41986,7 @@ "NextToken": { "target": "com.amazonaws.sagemaker#NextToken", "traits": { - "smithy.api#documentation": "

If the result of a ListNotebookInstanceLifecycleConfigs request was\n truncated, the response includes a NextToken. To get the next set of\n lifecycle configurations, use the token in the next request.

" + "smithy.api#documentation": "

If the result of a ListNotebookInstanceLifecycleConfigs request was\n truncated, the response includes a NextToken. To get the next set of\n lifecycle configurations, use the token in the next request.

" } }, "MaxResults": { @@ -42010,31 +42010,31 @@ "NameContains": { "target": "com.amazonaws.sagemaker#NotebookInstanceLifecycleConfigNameContains", "traits": { - "smithy.api#documentation": "

A string in the lifecycle configuration name. This filter returns only lifecycle\n configurations whose name contains the specified string.

" + "smithy.api#documentation": "

A string in the lifecycle configuration name. This filter returns only lifecycle\n configurations whose name contains the specified string.

" } }, "CreationTimeBefore": { "target": "com.amazonaws.sagemaker#CreationTime", "traits": { - "smithy.api#documentation": "

A filter that returns only lifecycle configurations that were created before the\n specified time (timestamp).

" + "smithy.api#documentation": "

A filter that returns only lifecycle configurations that were created before the\n specified time (timestamp).

" } }, "CreationTimeAfter": { "target": "com.amazonaws.sagemaker#CreationTime", "traits": { - "smithy.api#documentation": "

A filter that returns only lifecycle configurations that were created after the\n specified time (timestamp).

" + "smithy.api#documentation": "

A filter that returns only lifecycle configurations that were created after the\n specified time (timestamp).

" } }, "LastModifiedTimeBefore": { "target": "com.amazonaws.sagemaker#LastModifiedTime", "traits": { - "smithy.api#documentation": "

A filter that returns only lifecycle configurations that were modified before the\n specified time (timestamp).

" + "smithy.api#documentation": "

A filter that returns only lifecycle configurations that were modified before the\n specified time (timestamp).

" } }, "LastModifiedTimeAfter": { "target": "com.amazonaws.sagemaker#LastModifiedTime", "traits": { - "smithy.api#documentation": "

A filter that returns only lifecycle configurations that were modified after the\n specified time (timestamp).

" + "smithy.api#documentation": "

A filter that returns only lifecycle configurations that were modified after the\n specified time (timestamp).

" } } }, @@ -42048,13 +42048,13 @@ "NextToken": { "target": "com.amazonaws.sagemaker#NextToken", "traits": { - "smithy.api#documentation": "

If the response is truncated, SageMaker returns this token. To get the next set of\n lifecycle configurations, use it in the next request.

" + "smithy.api#documentation": "

If the response is truncated, SageMaker returns this token. To get the next\n set of lifecycle configurations, use it in the next request.

" } }, "NotebookInstanceLifecycleConfigs": { "target": "com.amazonaws.sagemaker#NotebookInstanceLifecycleConfigSummaryList", "traits": { - "smithy.api#documentation": "

An array of NotebookInstanceLifecycleConfiguration objects, each listing\n a lifecycle configuration.

" + "smithy.api#documentation": "

An array of NotebookInstanceLifecycleConfiguration objects, each listing\n a lifecycle configuration.

" } } }, @@ -42071,7 +42071,7 @@ "target": "com.amazonaws.sagemaker#ListNotebookInstancesOutput" }, "traits": { - "smithy.api#documentation": "

Returns a list of the SageMaker notebook instances in the requester's account in an\n Amazon Web Services Region.

", + "smithy.api#documentation": "

Returns a list of the SageMaker notebook instances in the requester's\n account in an Amazon Web Services Region.

", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -42172,7 +42172,7 @@ "NextToken": { "target": "com.amazonaws.sagemaker#NextToken", "traits": { - "smithy.api#documentation": "

If the response to the previous ListNotebookInstances request was\n truncated, SageMaker returns this token. To retrieve the next set of notebook instances, use\n the token in the next request.

" + "smithy.api#documentation": "

If the response to the previous ListNotebookInstances request was\n truncated, SageMaker returns this token. To retrieve the next set of notebook\n instances, use the token in the next request.

" } }, "NotebookInstances": { @@ -49048,12 +49048,12 @@ "Content": { "target": "com.amazonaws.sagemaker#NotebookInstanceLifecycleConfigContent", "traits": { - "smithy.api#documentation": "

A base64-encoded string that contains a shell script for a notebook instance lifecycle\n configuration.

" + "smithy.api#documentation": "

A base64-encoded string that contains a shell script for a notebook instance lifecycle\n configuration.

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

Contains the notebook instance lifecycle configuration script.

\n

Each lifecycle configuration script has a limit of 16384 characters.

\n

The value of the $PATH environment variable that is available to both\n scripts is /sbin:bin:/usr/sbin:/usr/bin.

\n

View Amazon CloudWatch Logs for notebook instance lifecycle configurations in log group\n /aws/sagemaker/NotebookInstances in log stream\n [notebook-instance-name]/[LifecycleConfigHook].

\n

Lifecycle configuration scripts cannot run for longer than 5 minutes. If a script runs\n for longer than 5 minutes, it fails and the notebook instance is not created or\n started.

\n

For information about notebook instance lifestyle configurations, see Step\n 2.1: (Optional) Customize a Notebook Instance.

" + "smithy.api#documentation": "

Contains the notebook instance lifecycle configuration script.

\n

Each lifecycle configuration script has a limit of 16384 characters.

\n

The value of the $PATH environment variable that is available to both\n scripts is /sbin:bin:/usr/sbin:/usr/bin.

\n

View Amazon CloudWatch Logs for notebook instance lifecycle configurations in log\n group /aws/sagemaker/NotebookInstances in log stream\n [notebook-instance-name]/[LifecycleConfigHook].

\n

Lifecycle configuration scripts cannot run for longer than 5 minutes. If a script runs\n for longer than 5 minutes, it fails and the notebook instance is not created or\n started.

\n

For information about notebook instance lifestyle configurations, see Step\n 2.1: (Optional) Customize a Notebook Instance.

" } }, "com.amazonaws.sagemaker#NotebookInstanceName": { @@ -49191,7 +49191,7 @@ "Url": { "target": "com.amazonaws.sagemaker#NotebookInstanceUrl", "traits": { - "smithy.api#documentation": "

The URL that you use to connect to the Jupyter notebook running in your notebook\n instance.

" + "smithy.api#documentation": "

The URL that you use to connect to the Jupyter notebook running in your notebook\n instance.

" } }, "InstanceType": { @@ -49215,19 +49215,19 @@ "NotebookInstanceLifecycleConfigName": { "target": "com.amazonaws.sagemaker#NotebookInstanceLifecycleConfigName", "traits": { - "smithy.api#documentation": "

The name of a notebook instance lifecycle configuration associated with this notebook\n instance.

\n

For information about notebook instance lifestyle configurations, see Step\n 2.1: (Optional) Customize a Notebook Instance.

" + "smithy.api#documentation": "

The name of a notebook instance lifecycle configuration associated with this notebook\n instance.

\n

For information about notebook instance lifestyle configurations, see Step\n 2.1: (Optional) Customize a Notebook Instance.

" } }, "DefaultCodeRepository": { "target": "com.amazonaws.sagemaker#CodeRepositoryNameOrUrl", "traits": { - "smithy.api#documentation": "

The Git repository associated with the notebook instance as its default code\n repository. This can be either the name of a Git repository stored as a resource in your\n account, or the URL of a Git repository in Amazon Web Services CodeCommit\n or in any other Git repository. When you open a notebook instance, it opens in the\n directory that contains this repository. For more information, see Associating Git\n Repositories with SageMaker Notebook Instances.

" + "smithy.api#documentation": "

The Git repository associated with the notebook instance as its default code\n repository. This can be either the name of a Git repository stored as a resource in your\n account, or the URL of a Git repository in Amazon Web Services CodeCommit\n or in any other Git repository. When you open a notebook instance, it opens in the\n directory that contains this repository. For more information, see Associating Git\n Repositories with SageMaker Notebook Instances.

" } }, "AdditionalCodeRepositories": { "target": "com.amazonaws.sagemaker#AdditionalCodeRepositoryNamesOrUrls", "traits": { - "smithy.api#documentation": "

An array of up to three Git repositories associated with the notebook instance. These\n can be either the names of Git repositories stored as resources in your account, or the\n URL of Git repositories in Amazon Web Services CodeCommit\n or in any other Git repository. These repositories are cloned at the same level as the\n default repository of your notebook instance. For more information, see Associating Git\n Repositories with SageMaker Notebook Instances.

" + "smithy.api#documentation": "

An array of up to three Git repositories associated with the notebook instance. These\n can be either the names of Git repositories stored as resources in your account, or the\n URL of Git repositories in Amazon Web Services CodeCommit\n or in any other Git repository. These repositories are cloned at the same level as the\n default repository of your notebook instance. For more information, see Associating Git\n Repositories with SageMaker Notebook Instances.

" } } }, @@ -50358,7 +50358,7 @@ "CompilerOptions": { "target": "com.amazonaws.sagemaker#CompilerOptions", "traits": { - "smithy.api#documentation": "

Specifies additional parameters for compiler options in JSON format. The compiler\n options are TargetPlatform specific. It is required for NVIDIA accelerators\n and highly recommended for CPU compilations. For any other cases, it is optional to\n specify CompilerOptions.\n

\n " + "smithy.api#documentation": "

Specifies additional parameters for compiler options in JSON format. The compiler\n options are TargetPlatform specific. It is required for NVIDIA accelerators\n and highly recommended for CPU compilations. For any other cases, it is optional to\n specify CompilerOptions.\n

\n " } }, "KmsKeyId": { @@ -50793,7 +50793,7 @@ "AcceleratorType": { "target": "com.amazonaws.sagemaker#ProductionVariantAcceleratorType", "traits": { - "smithy.api#documentation": "

The size of the Elastic Inference (EI) instance to use for the production variant. EI\n instances provide on-demand GPU computing for inference. For more information, see\n Using Elastic\n Inference in Amazon SageMaker.

" + "smithy.api#documentation": "

This parameter is no longer supported. Elastic Inference (EI) is no longer\n available.

\n

This parameter was used to specify the size of the EI instance to use for the\n production variant.

" } }, "VariantStatus": { @@ -51573,7 +51573,7 @@ "min": 0, "max": 15 }, - "smithy.api#pattern": "^(notebook-al1-v1|notebook-al2-v1|notebook-al2-v2)$" + "smithy.api#pattern": "^(notebook-al1-v1|notebook-al2-v1|notebook-al2-v2|notebook-al2-v3)$" } }, "com.amazonaws.sagemaker#PolicyString": { @@ -52761,7 +52761,7 @@ "AcceleratorType": { "target": "com.amazonaws.sagemaker#ProductionVariantAcceleratorType", "traits": { - "smithy.api#documentation": "

The size of the Elastic Inference (EI) instance to use for the production variant. EI\n instances provide on-demand GPU computing for inference. For more information, see\n Using Elastic\n Inference in Amazon SageMaker.

" + "smithy.api#documentation": "

This parameter is no longer supported. Elastic Inference (EI) is no longer\n available.

\n

This parameter was used to specify the size of the EI instance to use for the\n production variant.

" } }, "CoreDumpConfig": { @@ -56987,7 +56987,7 @@ "HomeEfsFileSystem": { "target": "com.amazonaws.sagemaker#RetentionType", "traits": { - "smithy.api#documentation": "

The default is Retain, which specifies to keep the data stored on the Amazon EFS volume.

\n

Specify Delete to delete the data stored on the Amazon EFS volume.

" + "smithy.api#documentation": "

The default is Retain, which specifies to keep the data stored on the\n Amazon EFS volume.

\n

Specify Delete to delete the data stored on the Amazon EFS\n volume.

" } } }, @@ -57366,7 +57366,7 @@ "ManifestS3Uri": { "target": "com.amazonaws.sagemaker#S3ModelUri", "traits": { - "smithy.api#documentation": "

The Amazon S3 URI of the manifest file. The manifest file is a CSV file that stores the artifact locations.

" + "smithy.api#documentation": "

The Amazon S3 URI of the manifest file. The manifest file is a CSV file that stores the\n artifact locations.

" } } }, @@ -61189,7 +61189,7 @@ "CustomFileSystems": { "target": "com.amazonaws.sagemaker#CustomFileSystems", "traits": { - "smithy.api#documentation": "

A file system, created by you, that you assign to a space for an Amazon SageMaker\n Domain. Permitted users can access this file system in Amazon SageMaker\n Studio.

" + "smithy.api#documentation": "

A file system, created by you, that you assign to a space for an Amazon SageMaker\n Domain. Permitted users can access this file system in Amazon SageMaker\n Studio.

" } } }, @@ -61626,7 +61626,7 @@ } ], "traits": { - "smithy.api#documentation": "

Launches an ML compute instance with the latest version of the libraries and\n attaches your ML storage volume. After configuring the notebook instance, SageMaker sets the\n notebook instance status to InService. A notebook instance's status must be\n InService before you can connect to your Jupyter notebook.

" + "smithy.api#documentation": "

Launches an ML compute instance with the latest version of the libraries and\n attaches your ML storage volume. After configuring the notebook instance, SageMaker sets the notebook instance status to InService. A notebook\n instance's status must be InService before you can connect to your Jupyter\n notebook.

" } }, "com.amazonaws.sagemaker#StartNotebookInstanceInput": { @@ -62255,7 +62255,7 @@ "target": "smithy.api#Unit" }, "traits": { - "smithy.api#documentation": "

Terminates the ML compute instance. Before terminating the instance, SageMaker\n disconnects the ML storage volume from it. SageMaker preserves the ML storage volume. SageMaker\n stops charging you for the ML compute instance when you call\n StopNotebookInstance.

\n

To access data on the ML storage volume for a notebook instance that has been\n terminated, call the StartNotebookInstance API.\n StartNotebookInstance launches another ML compute instance, configures\n it, and attaches the preserved ML storage volume so you can continue your work.\n

" + "smithy.api#documentation": "

Terminates the ML compute instance. Before terminating the instance, SageMaker disconnects the ML storage volume from it. SageMaker preserves the\n ML storage volume. SageMaker stops charging you for the ML compute instance when\n you call StopNotebookInstance.

\n

To access data on the ML storage volume for a notebook instance that has been\n terminated, call the StartNotebookInstance API.\n StartNotebookInstance launches another ML compute instance, configures\n it, and attaches the preserved ML storage volume so you can continue your work.\n

" } }, "com.amazonaws.sagemaker#StopNotebookInstanceInput": { @@ -64611,6 +64611,18 @@ "smithy.api#enumValue": "ml.p5.48xlarge" } }, + "ML_P5E_48XLARGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ml.p5e.48xlarge" + } + }, + "ML_P5EN_48XLARGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ml.p5en.48xlarge" + } + }, "ML_C5_XLARGE": { "target": "smithy.api#Unit", "traits": { @@ -64737,6 +64749,12 @@ "smithy.api#enumValue": "ml.trn1n.32xlarge" } }, + "ML_TRN2_48XLARGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ml.trn2.48xlarge" + } + }, "ML_M6I_LARGE": { "target": "smithy.api#Unit", "traits": { @@ -67941,7 +67959,7 @@ "GitConfig": { "target": "com.amazonaws.sagemaker#GitConfigForUpdate", "traits": { - "smithy.api#documentation": "

The configuration of the git repository, including the URL and the Amazon Resource\n Name (ARN) of the Amazon Web Services Secrets Manager secret that contains the\n credentials used to access the repository. The secret must have a staging label of\n AWSCURRENT and must be in the following format:

\n

\n {\"username\": UserName, \"password\":\n Password}\n

" + "smithy.api#documentation": "

The configuration of the git repository, including the URL and the Amazon Resource\n Name (ARN) of the Amazon Web Services Secrets Manager secret that contains the\n credentials used to access the repository. The secret must have a staging label of\n AWSCURRENT and must be in the following format:

\n

\n {\"username\": UserName, \"password\":\n Password}\n

" } } }, @@ -68183,7 +68201,7 @@ "DefaultSpaceSettings": { "target": "com.amazonaws.sagemaker#DefaultSpaceSettings", "traits": { - "smithy.api#documentation": "

The default settings used to create a space within the domain.

" + "smithy.api#documentation": "

The default settings for shared spaces that users create in the domain.

" } }, "SubnetIds": { @@ -69426,7 +69444,7 @@ "RoleArn": { "target": "com.amazonaws.sagemaker#RoleArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume to access the\n notebook instance. For more information, see SageMaker Roles.

\n \n

To be able to pass this role to SageMaker, the caller of this API must have the\n iam:PassRole permission.

\n
" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume to\n access the notebook instance. For more information, see SageMaker Roles.

\n \n

To be able to pass this role to SageMaker, the caller of this API must\n have the iam:PassRole permission.

\n
" } }, "LifecycleConfigName": { @@ -69444,7 +69462,7 @@ "VolumeSizeInGB": { "target": "com.amazonaws.sagemaker#NotebookInstanceVolumeSizeInGB", "traits": { - "smithy.api#documentation": "

The size, in GB, of the ML storage volume to attach to the notebook instance. The\n default value is 5 GB. ML storage volumes are encrypted, so SageMaker can't determine the\n amount of available free space on the volume. Because of this, you can increase the\n volume size when you update a notebook instance, but you can't decrease the volume size.\n If you want to decrease the size of the ML storage volume in use, create a new notebook\n instance with the desired size.

" + "smithy.api#documentation": "

The size, in GB, of the ML storage volume to attach to the notebook instance. The\n default value is 5 GB. ML storage volumes are encrypted, so SageMaker can't\n determine the amount of available free space on the volume. Because of this, you can\n increase the volume size when you update a notebook instance, but you can't decrease the\n volume size. If you want to decrease the size of the ML storage volume in use, create a\n new notebook instance with the desired size.

" } }, "DefaultCodeRepository": { @@ -69462,13 +69480,13 @@ "AcceleratorTypes": { "target": "com.amazonaws.sagemaker#NotebookInstanceAcceleratorTypes", "traits": { - "smithy.api#documentation": "

A list of the Elastic Inference (EI) instance types to associate with this notebook\n instance. Currently only one EI instance type can be associated with a notebook\n instance. For more information, see Using Elastic Inference in\n Amazon SageMaker.

" + "smithy.api#documentation": "

This parameter is no longer supported. Elastic Inference (EI) is no longer\n available.

\n

This parameter was used to specify a list of the EI instance types to associate with\n this notebook instance.

" } }, "DisassociateAcceleratorTypes": { "target": "com.amazonaws.sagemaker#DisassociateNotebookInstanceAcceleratorTypes", "traits": { - "smithy.api#documentation": "

A list of the Elastic Inference (EI) instance types to remove from this notebook\n instance. This operation is idempotent. If you specify an accelerator type that is not\n associated with the notebook instance when you call this method, it does not throw an\n error.

" + "smithy.api#documentation": "

This parameter is no longer supported. Elastic Inference (EI) is no longer\n available.

\n

This parameter was used to specify a list of the EI instance types to remove from this notebook\n instance.

" } }, "DisassociateDefaultCodeRepository": { @@ -69531,13 +69549,13 @@ "OnCreate": { "target": "com.amazonaws.sagemaker#NotebookInstanceLifecycleConfigList", "traits": { - "smithy.api#documentation": "

The shell script that runs only once, when you create a notebook instance. The shell\n script must be a base64-encoded string.

" + "smithy.api#documentation": "

The shell script that runs only once, when you create a notebook instance. The shell\n script must be a base64-encoded string.

" } }, "OnStart": { "target": "com.amazonaws.sagemaker#NotebookInstanceLifecycleConfigList", "traits": { - "smithy.api#documentation": "

The shell script that runs every time you start a notebook instance, including when\n you create the notebook instance. The shell script must be a base64-encoded\n string.

" + "smithy.api#documentation": "

The shell script that runs every time you start a notebook instance, including when\n you create the notebook instance. The shell script must be a base64-encoded\n string.

" } } }, @@ -70478,13 +70496,13 @@ "ExecutionRole": { "target": "com.amazonaws.sagemaker#RoleArn", "traits": { - "smithy.api#documentation": "

The execution role for the user.

" + "smithy.api#documentation": "

The execution role for the user.

\n

SageMaker applies this setting only to private spaces that the user creates in the domain. SageMaker doesn't apply this setting to shared spaces.

" } }, "SecurityGroups": { "target": "com.amazonaws.sagemaker#SecurityGroupIds", "traits": { - "smithy.api#documentation": "

The security groups for the Amazon Virtual Private Cloud (VPC) that the domain uses for\n communication.

\n

Optional when the CreateDomain.AppNetworkAccessType parameter is set to\n PublicInternetOnly.

\n

Required when the CreateDomain.AppNetworkAccessType parameter is set to\n VpcOnly, unless specified as part of the DefaultUserSettings for\n the domain.

\n

Amazon SageMaker adds a security group to allow NFS traffic from Amazon SageMaker Studio. Therefore, the number of security groups that you can specify is one less than the\n maximum number shown.

" + "smithy.api#documentation": "

The security groups for the Amazon Virtual Private Cloud (VPC) that the domain uses for\n communication.

\n

Optional when the CreateDomain.AppNetworkAccessType parameter is set to\n PublicInternetOnly.

\n

Required when the CreateDomain.AppNetworkAccessType parameter is set to\n VpcOnly, unless specified as part of the DefaultUserSettings for\n the domain.

\n

Amazon SageMaker adds a security group to allow NFS traffic from Amazon SageMaker Studio. Therefore, the number of security groups that you can specify is one less than the\n maximum number shown.

\n

SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces.

" } }, "SharingSettings": { @@ -70526,25 +70544,25 @@ "CanvasAppSettings": { "target": "com.amazonaws.sagemaker#CanvasAppSettings", "traits": { - "smithy.api#documentation": "

The Canvas app settings.

" + "smithy.api#documentation": "

The Canvas app settings.

\n

SageMaker applies these settings only to private spaces that SageMaker creates for the Canvas app.

" } }, "CodeEditorAppSettings": { "target": "com.amazonaws.sagemaker#CodeEditorAppSettings", "traits": { - "smithy.api#documentation": "

The Code Editor application settings.

" + "smithy.api#documentation": "

The Code Editor application settings.

\n

SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces.

" } }, "JupyterLabAppSettings": { "target": "com.amazonaws.sagemaker#JupyterLabAppSettings", "traits": { - "smithy.api#documentation": "

The settings for the JupyterLab application.

" + "smithy.api#documentation": "

The settings for the JupyterLab application.

\n

SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces.

" } }, "SpaceStorageSettings": { "target": "com.amazonaws.sagemaker#DefaultSpaceStorageSettings", "traits": { - "smithy.api#documentation": "

The storage settings for a space.

" + "smithy.api#documentation": "

The storage settings for a space.

\n

SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces.

" } }, "DefaultLandingUri": { @@ -70562,13 +70580,13 @@ "CustomPosixUserConfig": { "target": "com.amazonaws.sagemaker#CustomPosixUserConfig", "traits": { - "smithy.api#documentation": "

Details about the POSIX identity that is used for file system operations.

" + "smithy.api#documentation": "

Details about the POSIX identity that is used for file system operations.

\n

SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces.

" } }, "CustomFileSystemConfigs": { "target": "com.amazonaws.sagemaker#CustomFileSystemConfigs", "traits": { - "smithy.api#documentation": "

The settings for assigning a custom file system to a user profile. Permitted users can\n access this file system in Amazon SageMaker Studio.

" + "smithy.api#documentation": "

The settings for assigning a custom file system to a user profile. Permitted users can\n access this file system in Amazon SageMaker Studio.

\n

SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces.

" } }, "StudioWebPortalSettings": { @@ -70580,7 +70598,7 @@ "AutoMountHomeEFS": { "target": "com.amazonaws.sagemaker#AutoMountHomeEFS", "traits": { - "smithy.api#documentation": "

Indicates whether auto-mounting of an EFS volume is supported for the user profile. The\n DefaultAsDomain value is only supported for user profiles. Do not use the\n DefaultAsDomain value when setting this parameter for a domain.

" + "smithy.api#documentation": "

Indicates whether auto-mounting of an EFS volume is supported for the user profile. The\n DefaultAsDomain value is only supported for user profiles. Do not use the\n DefaultAsDomain value when setting this parameter for a domain.

\n

SageMaker applies this setting only to private spaces that the user creates in the domain. SageMaker doesn't apply this setting to shared spaces.

" } } }, @@ -70926,7 +70944,7 @@ } }, "traits": { - "smithy.api#documentation": "

Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources\n have access to. You can control access to and from your resources by configuring a VPC.\n For more information, see Give SageMaker Access to Resources in your Amazon VPC.

" + "smithy.api#documentation": "

Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources\n have access to. You can control access to and from your resources by configuring a VPC.\n For more information, see Give SageMaker Access to\n Resources in your Amazon VPC.

" } }, "com.amazonaws.sagemaker#VpcId": { From 5e6056003a21043125100664580d56fd3dbf9692 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Tue, 29 Oct 2024 18:09:28 +0000 Subject: [PATCH 2/9] Update endpoints model --- .../software/amazon/smithy/aws/go/codegen/endpoints.json | 1 + 1 file changed, 1 insertion(+) diff --git a/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json b/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json index 5a517bed706..402bb50da55 100644 --- a/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json +++ b/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json @@ -20929,6 +20929,7 @@ "tags" : [ "dualstack" ] } ] }, + "eu-south-2" : { }, "eu-west-1" : { "variants" : [ { "hostname" : "textract.eu-west-1.api.aws", From 0a916449e784463c7410da8fc2836d909ec49bf5 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Tue, 29 Oct 2024 18:29:29 +0000 Subject: [PATCH 3/9] Regenerated Clients --- .../19f55fd9f72d4fbeb8871e730edf88fe.json | 8 + .../34e7e629c6b64b4bb5c06abde33a7537.json | 8 + .../390ae55c65584a0ca1c5aab76acf2f51.json | 8 + .../9e300e8375914fdca3f0281e75e765de.json | 8 + .../bc32758c5c424079963e1357287e9c89.json | 8 + .../e36a67b15cc8407fa7d67c05c29f0320.json | 8 + .../e4a01c5cafd64f3c8e82640add5968e8.json | 8 + .../attributevalue/go_module_metadata.go | 2 +- .../bedrock/api_op_CreateInferenceProfile.go | 230 ++++++++++++++ .../bedrock/api_op_DeleteInferenceProfile.go | 156 ++++++++++ service/bedrock/api_op_GetInferenceProfile.go | 18 +- .../bedrock/api_op_ListInferenceProfiles.go | 15 +- service/bedrock/api_op_ListTagsForResource.go | 2 +- service/bedrock/api_op_TagResource.go | 2 +- service/bedrock/api_op_UntagResource.go | 2 +- service/bedrock/deserializers.go | 289 ++++++++++++++++++ service/bedrock/generated.json | 2 + service/bedrock/serializers.go | 196 ++++++++++++ .../api_op_CreateInferenceProfile.go.snap | 42 +++ .../api_op_DeleteInferenceProfile.go.snap | 41 +++ service/bedrock/snapshot_test.go | 48 +++ service/bedrock/types/enums.go | 2 + service/bedrock/types/types.go | 33 +- service/bedrock/types/types_exported_test.go | 18 ++ service/bedrock/validators.go | 86 ++++++ .../cleanrooms/api_op_CreateCollaboration.go | 3 + .../api_op_ListAnalysisTemplates.go | 14 +- ...i_op_ListCollaborationAnalysisTemplates.go | 14 +- ...tionConfiguredAudienceModelAssociations.go | 14 +- ...ListCollaborationPrivacyBudgetTemplates.go | 18 +- .../api_op_ListCollaborationPrivacyBudgets.go | 18 +- .../cleanrooms/api_op_ListCollaborations.go | 18 +- ...ListConfiguredAudienceModelAssociations.go | 15 +- .../api_op_ListConfiguredTableAssociations.go | 14 +- .../cleanrooms/api_op_ListConfiguredTables.go | 14 +- service/cleanrooms/api_op_ListMembers.go | 14 +- service/cleanrooms/api_op_ListMemberships.go | 14 +- .../api_op_ListPrivacyBudgetTemplates.go | 18 +- .../cleanrooms/api_op_ListPrivacyBudgets.go | 18 +- .../cleanrooms/api_op_ListProtectedQueries.go | 18 +- service/cleanrooms/api_op_ListSchemas.go | 17 +- .../cleanrooms/api_op_StartProtectedQuery.go | 3 + service/cleanrooms/deserializers.go | 198 ++++++++++++ service/cleanrooms/serializers.go | 52 ++++ service/cleanrooms/types/enums.go | 64 ++++ service/cleanrooms/types/types.go | 91 +++++- .../cleanrooms/types/types_exported_test.go | 18 ++ .../cloudwatchlogs/api_op_UpdateAnomaly.go | 8 + service/cloudwatchlogs/serializers.go | 5 + service/iotfleetwise/deserializers.go | 6 + .../api_op_BatchExecuteStatement.go | 5 + .../redshiftdata/api_op_DescribeStatement.go | 3 + .../redshiftdata/api_op_ExecuteStatement.go | 4 + .../redshiftdata/api_op_GetStatementResult.go | 8 +- .../api_op_GetStatementResultV2.go | 279 +++++++++++++++++ service/redshiftdata/deserializers.go | 281 +++++++++++++++++ service/redshiftdata/generated.json | 1 + service/redshiftdata/serializers.go | 88 ++++++ .../api_op_GetStatementResultV2.go.snap | 41 +++ service/redshiftdata/snapshot_test.go | 24 ++ service/redshiftdata/types/enums.go | 19 ++ service/redshiftdata/types/types.go | 24 +- .../redshiftdata/types/types_exported_test.go | 18 ++ service/redshiftdata/validators.go | 39 +++ service/sagemaker/api_op_CreateDomain.go | 2 +- .../api_op_CreateNotebookInstance.go | 8 +- service/sagemaker/api_op_DescribeDomain.go | 2 +- .../api_op_DescribeNotebookInstance.go | 8 +- service/sagemaker/api_op_UpdateDomain.go | 2 +- .../api_op_UpdateNotebookInstance.go | 17 +- service/sagemaker/types/enums.go | 6 + service/sagemaker/types/types.go | 68 +++-- .../textract/internal/endpoints/endpoints.go | 3 + 73 files changed, 2682 insertions(+), 194 deletions(-) create mode 100644 .changelog/19f55fd9f72d4fbeb8871e730edf88fe.json create mode 100644 .changelog/34e7e629c6b64b4bb5c06abde33a7537.json create mode 100644 .changelog/390ae55c65584a0ca1c5aab76acf2f51.json create mode 100644 .changelog/9e300e8375914fdca3f0281e75e765de.json create mode 100644 .changelog/bc32758c5c424079963e1357287e9c89.json create mode 100644 .changelog/e36a67b15cc8407fa7d67c05c29f0320.json create mode 100644 .changelog/e4a01c5cafd64f3c8e82640add5968e8.json create mode 100644 service/bedrock/api_op_CreateInferenceProfile.go create mode 100644 service/bedrock/api_op_DeleteInferenceProfile.go create mode 100644 service/bedrock/snapshot/api_op_CreateInferenceProfile.go.snap create mode 100644 service/bedrock/snapshot/api_op_DeleteInferenceProfile.go.snap create mode 100644 service/redshiftdata/api_op_GetStatementResultV2.go create mode 100644 service/redshiftdata/snapshot/api_op_GetStatementResultV2.go.snap diff --git a/.changelog/19f55fd9f72d4fbeb8871e730edf88fe.json b/.changelog/19f55fd9f72d4fbeb8871e730edf88fe.json new file mode 100644 index 00000000000..6e03044a9bf --- /dev/null +++ b/.changelog/19f55fd9f72d4fbeb8871e730edf88fe.json @@ -0,0 +1,8 @@ +{ + "id": "19f55fd9-f72d-4fbe-b887-1e730edf88fe", + "type": "feature", + "description": "Adding `notebook-al2-v3` as allowed value to SageMaker NotebookInstance PlatformIdentifier attribute", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/34e7e629c6b64b4bb5c06abde33a7537.json b/.changelog/34e7e629c6b64b4bb5c06abde33a7537.json new file mode 100644 index 00000000000..669050700cd --- /dev/null +++ b/.changelog/34e7e629c6b64b4bb5c06abde33a7537.json @@ -0,0 +1,8 @@ +{ + "id": "34e7e629-c6b6-4b4b-b5c0-6abde33a7537", + "type": "feature", + "description": "Updated BatchCreateVehicle and BatchUpdateVehicle APIs: LimitExceededException has been added and the maximum number of vehicles in a batch has been set to 10 explicitly", + "modules": [ + "service/iotfleetwise" + ] +} \ No newline at end of file diff --git a/.changelog/390ae55c65584a0ca1c5aab76acf2f51.json b/.changelog/390ae55c65584a0ca1c5aab76acf2f51.json new file mode 100644 index 00000000000..489d0ba21fa --- /dev/null +++ b/.changelog/390ae55c65584a0ca1c5aab76acf2f51.json @@ -0,0 +1,8 @@ +{ + "id": "390ae55c-6558-4a0c-a1c5-aab76acf2f51", + "type": "feature", + "description": "Update Application Inference Profile", + "modules": [ + "service/bedrockruntime" + ] +} \ No newline at end of file diff --git a/.changelog/9e300e8375914fdca3f0281e75e765de.json b/.changelog/9e300e8375914fdca3f0281e75e765de.json new file mode 100644 index 00000000000..f7f6a682e6d --- /dev/null +++ b/.changelog/9e300e8375914fdca3f0281e75e765de.json @@ -0,0 +1,8 @@ +{ + "id": "9e300e83-7591-4fdc-a3f0-281e75e765de", + "type": "feature", + "description": "Added support for new optional baseline parameter in the UpdateAnomaly API. For UpdateAnomaly requests with baseline set to True, The anomaly behavior is then treated as baseline behavior. However, more severe occurrences of this behavior will still be reported as anomalies.", + "modules": [ + "service/cloudwatchlogs" + ] +} \ No newline at end of file diff --git a/.changelog/bc32758c5c424079963e1357287e9c89.json b/.changelog/bc32758c5c424079963e1357287e9c89.json new file mode 100644 index 00000000000..a28c5e83d35 --- /dev/null +++ b/.changelog/bc32758c5c424079963e1357287e9c89.json @@ -0,0 +1,8 @@ +{ + "id": "bc32758c-5c42-4079-963e-1357287e9c89", + "type": "feature", + "description": "Adding a new API GetStatementResultV2 that supports CSV formatted results from ExecuteStatement and BatchExecuteStatement calls.", + "modules": [ + "service/redshiftdata" + ] +} \ No newline at end of file diff --git a/.changelog/e36a67b15cc8407fa7d67c05c29f0320.json b/.changelog/e36a67b15cc8407fa7d67c05c29f0320.json new file mode 100644 index 00000000000..9ad78263111 --- /dev/null +++ b/.changelog/e36a67b15cc8407fa7d67c05c29f0320.json @@ -0,0 +1,8 @@ +{ + "id": "e36a67b1-5cc8-407f-a7d6-7c05c29f0320", + "type": "feature", + "description": "This release adds the option for customers to configure analytics engine when creating a collaboration, and introduces the new SPARK analytics engine type in addition to maintaining the legacy CLEAN_ROOMS_SQL engine type.", + "modules": [ + "service/cleanrooms" + ] +} \ No newline at end of file diff --git a/.changelog/e4a01c5cafd64f3c8e82640add5968e8.json b/.changelog/e4a01c5cafd64f3c8e82640add5968e8.json new file mode 100644 index 00000000000..33f5393d381 --- /dev/null +++ b/.changelog/e4a01c5cafd64f3c8e82640add5968e8.json @@ -0,0 +1,8 @@ +{ + "id": "e4a01c5c-afd6-4f3c-8e82-640add5968e8", + "type": "feature", + "description": "Update Application Inference Profile", + "modules": [ + "service/bedrock" + ] +} \ No newline at end of file diff --git a/feature/dynamodbstreams/attributevalue/go_module_metadata.go b/feature/dynamodbstreams/attributevalue/go_module_metadata.go index 937c45b1679..04358c081d7 100644 --- a/feature/dynamodbstreams/attributevalue/go_module_metadata.go +++ b/feature/dynamodbstreams/attributevalue/go_module_metadata.go @@ -3,4 +3,4 @@ package attributevalue // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.14.44" +const goModuleVersion = "1.15.13" diff --git a/service/bedrock/api_op_CreateInferenceProfile.go b/service/bedrock/api_op_CreateInferenceProfile.go new file mode 100644 index 00000000000..609d393f199 --- /dev/null +++ b/service/bedrock/api_op_CreateInferenceProfile.go @@ -0,0 +1,230 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bedrock + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bedrock/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an application inference profile to track metrics and costs when +// invoking a model. To create an application inference profile for a foundation +// model in one region, specify the ARN of the model in that region. To create an +// application inference profile for a foundation model across multiple regions, +// specify the ARN of the system-defined inference profile that contains the +// regions that you want to route requests to. For more information, see [Increase throughput and resilience with cross-region inference in Amazon Bedrock]. in the +// Amazon Bedrock User Guide. +// +// [Increase throughput and resilience with cross-region inference in Amazon Bedrock]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html +func (c *Client) CreateInferenceProfile(ctx context.Context, params *CreateInferenceProfileInput, optFns ...func(*Options)) (*CreateInferenceProfileOutput, error) { + if params == nil { + params = &CreateInferenceProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateInferenceProfile", params, optFns, c.addOperationCreateInferenceProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateInferenceProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateInferenceProfileInput struct { + + // A name for the inference profile. + // + // This member is required. + InferenceProfileName *string + + // The foundation model or system-defined inference profile that the inference + // profile will track metrics and costs for. + // + // This member is required. + ModelSource types.InferenceProfileModelSource + + // A unique, case-sensitive identifier to ensure that the API request completes no + // more than one time. If this token matches a previous request, Amazon Bedrock + // ignores the request, but does not return an error. For more information, see [Ensuring idempotency]. + // + // [Ensuring idempotency]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html + ClientRequestToken *string + + // A description for the inference profile. + Description *string + + // An array of objects, each of which contains a tag and its value. For more + // information, see [Tagging resources]in the [Amazon Bedrock User Guide]. + // + // [Amazon Bedrock User Guide]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html + // [Tagging resources]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateInferenceProfileOutput struct { + + // The ARN of the inference profile that you created. + // + // This member is required. + InferenceProfileArn *string + + // The status of the inference profile. ACTIVE means that the inference profile is + // ready to be used. + Status types.InferenceProfileStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateInferenceProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateInferenceProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateInferenceProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateInferenceProfile"); 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 = addSpanRetryLoop(stack, options); 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 = addIdempotencyToken_opCreateInferenceProfileMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateInferenceProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateInferenceProfile(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateInferenceProfile struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateInferenceProfile) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateInferenceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateInferenceProfileInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateInferenceProfileInput ") + } + + if input.ClientRequestToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientRequestToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateInferenceProfileMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateInferenceProfile{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateInferenceProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateInferenceProfile", + } +} diff --git a/service/bedrock/api_op_DeleteInferenceProfile.go b/service/bedrock/api_op_DeleteInferenceProfile.go new file mode 100644 index 00000000000..cb88965e329 --- /dev/null +++ b/service/bedrock/api_op_DeleteInferenceProfile.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bedrock + +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 an application inference profile. For more information, see [Increase throughput and resilience with cross-region inference in Amazon Bedrock]. in the +// Amazon Bedrock User Guide. +// +// [Increase throughput and resilience with cross-region inference in Amazon Bedrock]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html +func (c *Client) DeleteInferenceProfile(ctx context.Context, params *DeleteInferenceProfileInput, optFns ...func(*Options)) (*DeleteInferenceProfileOutput, error) { + if params == nil { + params = &DeleteInferenceProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteInferenceProfile", params, optFns, c.addOperationDeleteInferenceProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteInferenceProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteInferenceProfileInput struct { + + // The Amazon Resource Name (ARN) or ID of the application inference profile to + // delete. + // + // This member is required. + InferenceProfileIdentifier *string + + noSmithyDocumentSerde +} + +type DeleteInferenceProfileOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteInferenceProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteInferenceProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteInferenceProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteInferenceProfile"); 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 = addSpanRetryLoop(stack, options); 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 = addOpDeleteInferenceProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteInferenceProfile(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteInferenceProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteInferenceProfile", + } +} diff --git a/service/bedrock/api_op_GetInferenceProfile.go b/service/bedrock/api_op_GetInferenceProfile.go index 20409f788ff..7af098ff924 100644 --- a/service/bedrock/api_op_GetInferenceProfile.go +++ b/service/bedrock/api_op_GetInferenceProfile.go @@ -12,8 +12,10 @@ import ( "time" ) -// Gets information about an inference profile. For more information, see the +// Gets information about an inference profile. For more information, see [Increase throughput and resilience with cross-region inference in Amazon Bedrock]. in the // Amazon Bedrock User Guide. +// +// [Increase throughput and resilience with cross-region inference in Amazon Bedrock]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html func (c *Client) GetInferenceProfile(ctx context.Context, params *GetInferenceProfileInput, optFns ...func(*Options)) (*GetInferenceProfileOutput, error) { if params == nil { params = &GetInferenceProfileInput{} @@ -31,7 +33,7 @@ func (c *Client) GetInferenceProfile(ctx context.Context, params *GetInferencePr type GetInferenceProfileInput struct { - // The unique identifier of the inference profile. + // The ID or Amazon Resource Name (ARN) of the inference profile. // // This member is required. InferenceProfileIdentifier *string @@ -62,13 +64,19 @@ type GetInferenceProfileOutput struct { Models []types.InferenceProfileModel // The status of the inference profile. ACTIVE means that the inference profile is - // available to use. + // ready to be used. // // This member is required. Status types.InferenceProfileStatus - // The type of the inference profile. SYSTEM_DEFINED means that the inference - // profile is defined by Amazon Bedrock. + // The type of the inference profile. The following types are possible: + // + // - SYSTEM_DEFINED – The inference profile is defined by Amazon Bedrock. You can + // route inference requests across regions with these inference profiles. + // + // - APPLICATION – The inference profile was created by a user. This type of + // inference profile can track metrics and costs when invoking the model in it. The + // inference profile may route requests to one or multiple regions. // // This member is required. Type types.InferenceProfileType diff --git a/service/bedrock/api_op_ListInferenceProfiles.go b/service/bedrock/api_op_ListInferenceProfiles.go index 47864951b93..5feedc00fa6 100644 --- a/service/bedrock/api_op_ListInferenceProfiles.go +++ b/service/bedrock/api_op_ListInferenceProfiles.go @@ -11,7 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns a list of inference profiles that you can use. +// Returns a list of inference profiles that you can use. For more information, +// see [Increase throughput and resilience with cross-region inference in Amazon Bedrock]. in the Amazon Bedrock User Guide. +// +// [Increase throughput and resilience with cross-region inference in Amazon Bedrock]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html func (c *Client) ListInferenceProfiles(ctx context.Context, params *ListInferenceProfilesInput, optFns ...func(*Options)) (*ListInferenceProfilesOutput, error) { if params == nil { params = &ListInferenceProfilesInput{} @@ -40,6 +43,16 @@ type ListInferenceProfilesInput struct { // this field to return the next batch of results. NextToken *string + // Filters for inference profiles that match the type you specify. + // + // - SYSTEM_DEFINED – The inference profile is defined by Amazon Bedrock. You can + // route inference requests across regions with these inference profiles. + // + // - APPLICATION – The inference profile was created by a user. This type of + // inference profile can track metrics and costs when invoking the model in it. The + // inference profile may route requests to one or multiple regions. + TypeEquals types.InferenceProfileType + noSmithyDocumentSerde } diff --git a/service/bedrock/api_op_ListTagsForResource.go b/service/bedrock/api_op_ListTagsForResource.go index bed56a7f333..f54e62ce980 100644 --- a/service/bedrock/api_op_ListTagsForResource.go +++ b/service/bedrock/api_op_ListTagsForResource.go @@ -16,7 +16,7 @@ import ( // For more information, see [Tagging resources] in the [Amazon Bedrock User Guide]. // // [Amazon Bedrock User Guide]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html -// [Tagging resources]: https://docs.aws.amazon.com/bedrock/latest/userguide/tagging.html +// [Tagging resources]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if params == nil { params = &ListTagsForResourceInput{} diff --git a/service/bedrock/api_op_TagResource.go b/service/bedrock/api_op_TagResource.go index e364fadb8bd..2c08d5c7350 100644 --- a/service/bedrock/api_op_TagResource.go +++ b/service/bedrock/api_op_TagResource.go @@ -14,7 +14,7 @@ import ( // Associate tags with a resource. For more information, see [Tagging resources] in the [Amazon Bedrock User Guide]. // // [Amazon Bedrock User Guide]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html -// [Tagging resources]: https://docs.aws.amazon.com/bedrock/latest/userguide/tagging.html +// [Tagging resources]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} diff --git a/service/bedrock/api_op_UntagResource.go b/service/bedrock/api_op_UntagResource.go index 7318b26acb9..ff6580fdba4 100644 --- a/service/bedrock/api_op_UntagResource.go +++ b/service/bedrock/api_op_UntagResource.go @@ -13,7 +13,7 @@ import ( // Remove one or more tags from a resource. For more information, see [Tagging resources] in the [Amazon Bedrock User Guide]. // // [Amazon Bedrock User Guide]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html -// [Tagging resources]: https://docs.aws.amazon.com/bedrock/latest/userguide/tagging.html +// [Tagging resources]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} diff --git a/service/bedrock/deserializers.go b/service/bedrock/deserializers.go index b787dcdf58b..68388449ade 100644 --- a/service/bedrock/deserializers.go +++ b/service/bedrock/deserializers.go @@ -767,6 +767,192 @@ func awsRestjson1_deserializeOpDocumentCreateGuardrailVersionOutput(v **CreateGu return nil } +type awsRestjson1_deserializeOpCreateInferenceProfile struct { +} + +func (*awsRestjson1_deserializeOpCreateInferenceProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateInferenceProfile) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateInferenceProfile(response, &metadata) + } + output := &CreateInferenceProfileOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateInferenceProfileOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateInferenceProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("TooManyTagsException", errorCode): + return awsRestjson1_deserializeErrorTooManyTagsException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateInferenceProfileOutput(v **CreateInferenceProfileOutput, 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 *CreateInferenceProfileOutput + if *v == nil { + sv = &CreateInferenceProfileOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "inferenceProfileArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InferenceProfileArn to be of type string, got %T instead", value) + } + sv.InferenceProfileArn = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InferenceProfileStatus to be of type string, got %T instead", value) + } + sv.Status = types.InferenceProfileStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpCreateModelCopyJob struct { } @@ -1943,6 +2129,109 @@ func awsRestjson1_deserializeOpErrorDeleteImportedModel(response *smithyhttp.Res } } +type awsRestjson1_deserializeOpDeleteInferenceProfile struct { +} + +func (*awsRestjson1_deserializeOpDeleteInferenceProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteInferenceProfile) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteInferenceProfile(response, &metadata) + } + output := &DeleteInferenceProfileOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteInferenceProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpDeleteModelInvocationLoggingConfiguration struct { } diff --git a/service/bedrock/generated.json b/service/bedrock/generated.json index b65748c1ee0..fde255b2f44 100644 --- a/service/bedrock/generated.json +++ b/service/bedrock/generated.json @@ -12,6 +12,7 @@ "api_op_CreateEvaluationJob.go", "api_op_CreateGuardrail.go", "api_op_CreateGuardrailVersion.go", + "api_op_CreateInferenceProfile.go", "api_op_CreateModelCopyJob.go", "api_op_CreateModelCustomizationJob.go", "api_op_CreateModelImportJob.go", @@ -20,6 +21,7 @@ "api_op_DeleteCustomModel.go", "api_op_DeleteGuardrail.go", "api_op_DeleteImportedModel.go", + "api_op_DeleteInferenceProfile.go", "api_op_DeleteModelInvocationLoggingConfiguration.go", "api_op_DeleteProvisionedModelThroughput.go", "api_op_GetCustomModel.go", diff --git a/service/bedrock/serializers.go b/service/bedrock/serializers.go index f53658e8e21..59d35eae754 100644 --- a/service/bedrock/serializers.go +++ b/service/bedrock/serializers.go @@ -476,6 +476,111 @@ func awsRestjson1_serializeOpDocumentCreateGuardrailVersionInput(v *CreateGuardr return nil } +type awsRestjson1_serializeOpCreateInferenceProfile struct { +} + +func (*awsRestjson1_serializeOpCreateInferenceProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateInferenceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CreateInferenceProfileInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/inference-profiles") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateInferenceProfileInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateInferenceProfileInput(v *CreateInferenceProfileInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateInferenceProfileInput(v *CreateInferenceProfileInput, 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.InferenceProfileName != nil { + ok := object.Key("inferenceProfileName") + ok.String(*v.InferenceProfileName) + } + + if v.ModelSource != nil { + ok := object.Key("modelSource") + if err := awsRestjson1_serializeDocumentInferenceProfileModelSource(v.ModelSource, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateModelCopyJob struct { } @@ -1322,6 +1427,77 @@ func awsRestjson1_serializeOpHttpBindingsDeleteImportedModelInput(v *DeleteImpor return nil } +type awsRestjson1_serializeOpDeleteInferenceProfile struct { +} + +func (*awsRestjson1_serializeOpDeleteInferenceProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteInferenceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteInferenceProfileInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/inference-profiles/{inferenceProfileIdentifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteInferenceProfileInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteInferenceProfileInput(v *DeleteInferenceProfileInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.InferenceProfileIdentifier == nil || len(*v.InferenceProfileIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member inferenceProfileIdentifier must not be empty")} + } + if v.InferenceProfileIdentifier != nil { + if err := encoder.SetURI("inferenceProfileIdentifier").String(*v.InferenceProfileIdentifier); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteModelInvocationLoggingConfiguration struct { } @@ -2799,6 +2975,10 @@ func awsRestjson1_serializeOpHttpBindingsListInferenceProfilesInput(v *ListInfer encoder.SetQuery("nextToken").String(*v.NextToken) } + if len(v.TypeEquals) > 0 { + encoder.SetQuery("type").String(string(v.TypeEquals)) + } + return nil } @@ -4739,6 +4919,22 @@ func awsRestjson1_serializeDocumentHumanWorkflowConfig(v *types.HumanWorkflowCon return nil } +func awsRestjson1_serializeDocumentInferenceProfileModelSource(v types.InferenceProfileModelSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.InferenceProfileModelSourceMemberCopyFrom: + av := object.Key("copyFrom") + av.String(uv.Value) + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + func awsRestjson1_serializeDocumentLoggingConfig(v *types.LoggingConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/bedrock/snapshot/api_op_CreateInferenceProfile.go.snap b/service/bedrock/snapshot/api_op_CreateInferenceProfile.go.snap new file mode 100644 index 00000000000..8958f057619 --- /dev/null +++ b/service/bedrock/snapshot/api_op_CreateInferenceProfile.go.snap @@ -0,0 +1,42 @@ +CreateInferenceProfile + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/bedrock/snapshot/api_op_DeleteInferenceProfile.go.snap b/service/bedrock/snapshot/api_op_DeleteInferenceProfile.go.snap new file mode 100644 index 00000000000..26c83e70cd7 --- /dev/null +++ b/service/bedrock/snapshot/api_op_DeleteInferenceProfile.go.snap @@ -0,0 +1,41 @@ +DeleteInferenceProfile + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/bedrock/snapshot_test.go b/service/bedrock/snapshot_test.go index 911bbd5547c..0df32470f73 100644 --- a/service/bedrock/snapshot_test.go +++ b/service/bedrock/snapshot_test.go @@ -110,6 +110,18 @@ func TestCheckSnapshot_CreateGuardrailVersion(t *testing.T) { } } +func TestCheckSnapshot_CreateInferenceProfile(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateInferenceProfile(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateInferenceProfile") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateModelCopyJob(t *testing.T) { svc := New(Options{}) _, err := svc.CreateModelCopyJob(context.Background(), nil, func(o *Options) { @@ -206,6 +218,18 @@ func TestCheckSnapshot_DeleteImportedModel(t *testing.T) { } } +func TestCheckSnapshot_DeleteInferenceProfile(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteInferenceProfile(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteInferenceProfile") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteModelInvocationLoggingConfiguration(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteModelInvocationLoggingConfiguration(context.Background(), nil, func(o *Options) { @@ -661,6 +685,18 @@ func TestUpdateSnapshot_CreateGuardrailVersion(t *testing.T) { } } +func TestUpdateSnapshot_CreateInferenceProfile(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateInferenceProfile(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateInferenceProfile") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateModelCopyJob(t *testing.T) { svc := New(Options{}) _, err := svc.CreateModelCopyJob(context.Background(), nil, func(o *Options) { @@ -757,6 +793,18 @@ func TestUpdateSnapshot_DeleteImportedModel(t *testing.T) { } } +func TestUpdateSnapshot_DeleteInferenceProfile(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteInferenceProfile(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteInferenceProfile") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteModelInvocationLoggingConfiguration(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteModelInvocationLoggingConfiguration(context.Background(), nil, func(o *Options) { diff --git a/service/bedrock/types/enums.go b/service/bedrock/types/enums.go index 307b0ab3d96..5da43f7cdc1 100644 --- a/service/bedrock/types/enums.go +++ b/service/bedrock/types/enums.go @@ -406,6 +406,7 @@ type InferenceProfileType string // Enum values for InferenceProfileType const ( InferenceProfileTypeSystemDefined InferenceProfileType = "SYSTEM_DEFINED" + InferenceProfileTypeApplication InferenceProfileType = "APPLICATION" ) // Values returns all known values for InferenceProfileType. Note that this can be @@ -415,6 +416,7 @@ const ( func (InferenceProfileType) Values() []InferenceProfileType { return []InferenceProfileType{ "SYSTEM_DEFINED", + "APPLICATION", } } diff --git a/service/bedrock/types/types.go b/service/bedrock/types/types.go index d07ef631d64..0a56b7aebc9 100644 --- a/service/bedrock/types/types.go +++ b/service/bedrock/types/types.go @@ -1240,6 +1240,26 @@ type InferenceProfileModel struct { noSmithyDocumentSerde } +// Contains information about the model or system-defined inference profile that +// is the source for an inference profile.. +// +// The following types satisfy this interface: +// +// InferenceProfileModelSourceMemberCopyFrom +type InferenceProfileModelSource interface { + isInferenceProfileModelSource() +} + +// The ARN of the model or system-defined inference profile that is the source for +// the inference profile. +type InferenceProfileModelSourceMemberCopyFrom struct { + Value string + + noSmithyDocumentSerde +} + +func (*InferenceProfileModelSourceMemberCopyFrom) isInferenceProfileModelSource() {} + // Contains information about an inference profile. type InferenceProfileSummary struct { @@ -1264,13 +1284,19 @@ type InferenceProfileSummary struct { Models []InferenceProfileModel // The status of the inference profile. ACTIVE means that the inference profile is - // available to use. + // ready to be used. // // This member is required. Status InferenceProfileStatus - // The type of the inference profile. SYSTEM_DEFINED means that the inference - // profile is defined by Amazon Bedrock. + // The type of the inference profile. The following types are possible: + // + // - SYSTEM_DEFINED – The inference profile is defined by Amazon Bedrock. You can + // route inference requests across regions with these inference profiles. + // + // - APPLICATION – The inference profile was created by a user. This type of + // inference profile can track metrics and costs when invoking the model in it. The + // inference profile may route requests to one or multiple regions. // // This member is required. Type InferenceProfileType @@ -1835,6 +1861,7 @@ func (*UnknownUnionMember) isEvaluationConfig() {} func (*UnknownUnionMember) isEvaluationDatasetLocation() {} func (*UnknownUnionMember) isEvaluationInferenceConfig() {} func (*UnknownUnionMember) isEvaluationModelConfig() {} +func (*UnknownUnionMember) isInferenceProfileModelSource() {} func (*UnknownUnionMember) isModelDataSource() {} func (*UnknownUnionMember) isModelInvocationJobInputDataConfig() {} func (*UnknownUnionMember) isModelInvocationJobOutputDataConfig() {} diff --git a/service/bedrock/types/types_exported_test.go b/service/bedrock/types/types_exported_test.go index 56831691dde..0dc189398fc 100644 --- a/service/bedrock/types/types_exported_test.go +++ b/service/bedrock/types/types_exported_test.go @@ -83,6 +83,24 @@ func ExampleEvaluationModelConfig_outputUsage() { var _ *types.EvaluationBedrockModel +func ExampleInferenceProfileModelSource_outputUsage() { + var union types.InferenceProfileModelSource + // type switches can be used to check the union value + switch v := union.(type) { + case *types.InferenceProfileModelSourceMemberCopyFrom: + _ = v.Value // Value is string + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *string + func ExampleModelDataSource_outputUsage() { var union types.ModelDataSource // type switches can be used to check the union value diff --git a/service/bedrock/validators.go b/service/bedrock/validators.go index d507a74bc96..44bd93e201f 100644 --- a/service/bedrock/validators.go +++ b/service/bedrock/validators.go @@ -90,6 +90,26 @@ func (m *validateOpCreateGuardrailVersion) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpCreateInferenceProfile struct { +} + +func (*validateOpCreateInferenceProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateInferenceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateInferenceProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateInferenceProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateModelCopyJob struct { } @@ -250,6 +270,26 @@ func (m *validateOpDeleteImportedModel) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpDeleteInferenceProfile struct { +} + +func (*validateOpDeleteInferenceProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteInferenceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteInferenceProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteInferenceProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteProvisionedModelThroughput struct { } @@ -686,6 +726,10 @@ func addOpCreateGuardrailVersionValidationMiddleware(stack *middleware.Stack) er return stack.Initialize.Add(&validateOpCreateGuardrailVersion{}, middleware.After) } +func addOpCreateInferenceProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateInferenceProfile{}, middleware.After) +} + func addOpCreateModelCopyJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateModelCopyJob{}, middleware.After) } @@ -718,6 +762,10 @@ func addOpDeleteImportedModelValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpDeleteImportedModel{}, middleware.After) } +func addOpDeleteInferenceProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteInferenceProfile{}, middleware.After) +} + func addOpDeleteProvisionedModelThroughputValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteProvisionedModelThroughput{}, middleware.After) } @@ -1839,6 +1887,29 @@ func validateOpCreateGuardrailVersionInput(v *CreateGuardrailVersionInput) error } } +func validateOpCreateInferenceProfileInput(v *CreateInferenceProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateInferenceProfileInput"} + if v.InferenceProfileName == nil { + invalidParams.Add(smithy.NewErrParamRequired("InferenceProfileName")) + } + if v.ModelSource == nil { + invalidParams.Add(smithy.NewErrParamRequired("ModelSource")) + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateModelCopyJobInput(v *CreateModelCopyJobInput) error { if v == nil { return nil @@ -2082,6 +2153,21 @@ func validateOpDeleteImportedModelInput(v *DeleteImportedModelInput) error { } } +func validateOpDeleteInferenceProfileInput(v *DeleteInferenceProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteInferenceProfileInput"} + if v.InferenceProfileIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("InferenceProfileIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteProvisionedModelThroughputInput(v *DeleteProvisionedModelThroughputInput) error { if v == nil { return nil diff --git a/service/cleanrooms/api_op_CreateCollaboration.go b/service/cleanrooms/api_op_CreateCollaboration.go index 367a17e036c..b1edd42ce7e 100644 --- a/service/cleanrooms/api_op_CreateCollaboration.go +++ b/service/cleanrooms/api_op_CreateCollaboration.go @@ -60,6 +60,9 @@ type CreateCollaborationInput struct { // This member is required. QueryLogStatus types.CollaborationQueryLogStatus + // The analytics engine. + AnalyticsEngine types.AnalyticsEngine + // The collaboration creator's payment responsibilities set by the collaboration // creator. // diff --git a/service/cleanrooms/api_op_ListAnalysisTemplates.go b/service/cleanrooms/api_op_ListAnalysisTemplates.go index 56ae9b83ed7..1735b65a80e 100644 --- a/service/cleanrooms/api_op_ListAnalysisTemplates.go +++ b/service/cleanrooms/api_op_ListAnalysisTemplates.go @@ -34,11 +34,12 @@ type ListAnalysisTemplatesInput struct { // This member is required. MembershipIdentifier *string - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -51,8 +52,7 @@ type ListAnalysisTemplatesOutput struct { // This member is required. AnalysisTemplateSummaries []types.AnalysisTemplateSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -164,7 +164,9 @@ func (c *Client) addOperationListAnalysisTemplatesMiddlewares(stack *middleware. // ListAnalysisTemplatesPaginatorOptions is the paginator options for // ListAnalysisTemplates type ListAnalysisTemplatesPaginatorOptions struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListCollaborationAnalysisTemplates.go b/service/cleanrooms/api_op_ListCollaborationAnalysisTemplates.go index 597debee008..6c7b451fe8b 100644 --- a/service/cleanrooms/api_op_ListCollaborationAnalysisTemplates.go +++ b/service/cleanrooms/api_op_ListCollaborationAnalysisTemplates.go @@ -35,11 +35,12 @@ type ListCollaborationAnalysisTemplatesInput struct { // This member is required. CollaborationIdentifier *string - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -52,8 +53,7 @@ type ListCollaborationAnalysisTemplatesOutput struct { // This member is required. CollaborationAnalysisTemplateSummaries []types.CollaborationAnalysisTemplateSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -165,7 +165,9 @@ func (c *Client) addOperationListCollaborationAnalysisTemplatesMiddlewares(stack // ListCollaborationAnalysisTemplatesPaginatorOptions is the paginator options for // ListCollaborationAnalysisTemplates type ListCollaborationAnalysisTemplatesPaginatorOptions struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListCollaborationConfiguredAudienceModelAssociations.go b/service/cleanrooms/api_op_ListCollaborationConfiguredAudienceModelAssociations.go index 24b6c8e075c..b12f4dc43ec 100644 --- a/service/cleanrooms/api_op_ListCollaborationConfiguredAudienceModelAssociations.go +++ b/service/cleanrooms/api_op_ListCollaborationConfiguredAudienceModelAssociations.go @@ -35,11 +35,12 @@ type ListCollaborationConfiguredAudienceModelAssociationsInput struct { // This member is required. CollaborationIdentifier *string - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -53,8 +54,7 @@ type ListCollaborationConfiguredAudienceModelAssociationsOutput struct { // This member is required. CollaborationConfiguredAudienceModelAssociationSummaries []types.CollaborationConfiguredAudienceModelAssociationSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -166,7 +166,9 @@ func (c *Client) addOperationListCollaborationConfiguredAudienceModelAssociation // ListCollaborationConfiguredAudienceModelAssociationsPaginatorOptions is the // paginator options for ListCollaborationConfiguredAudienceModelAssociations type ListCollaborationConfiguredAudienceModelAssociationsPaginatorOptions struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListCollaborationPrivacyBudgetTemplates.go b/service/cleanrooms/api_op_ListCollaborationPrivacyBudgetTemplates.go index 99b3b10abc4..5624b680676 100644 --- a/service/cleanrooms/api_op_ListCollaborationPrivacyBudgetTemplates.go +++ b/service/cleanrooms/api_op_ListCollaborationPrivacyBudgetTemplates.go @@ -35,13 +35,12 @@ type ListCollaborationPrivacyBudgetTemplatesInput struct { // This member is required. CollaborationIdentifier *string - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -56,8 +55,7 @@ type ListCollaborationPrivacyBudgetTemplatesOutput struct { // This member is required. CollaborationPrivacyBudgetTemplateSummaries []types.CollaborationPrivacyBudgetTemplateSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -169,9 +167,9 @@ func (c *Client) addOperationListCollaborationPrivacyBudgetTemplatesMiddlewares( // ListCollaborationPrivacyBudgetTemplatesPaginatorOptions is the paginator // options for ListCollaborationPrivacyBudgetTemplates type ListCollaborationPrivacyBudgetTemplatesPaginatorOptions struct { - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListCollaborationPrivacyBudgets.go b/service/cleanrooms/api_op_ListCollaborationPrivacyBudgets.go index 9d666d74150..3d49a483357 100644 --- a/service/cleanrooms/api_op_ListCollaborationPrivacyBudgets.go +++ b/service/cleanrooms/api_op_ListCollaborationPrivacyBudgets.go @@ -41,13 +41,12 @@ type ListCollaborationPrivacyBudgetsInput struct { // This member is required. PrivacyBudgetType types.PrivacyBudgetType - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -60,8 +59,7 @@ type ListCollaborationPrivacyBudgetsOutput struct { // This member is required. CollaborationPrivacyBudgetSummaries []types.CollaborationPrivacyBudgetSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -173,9 +171,9 @@ func (c *Client) addOperationListCollaborationPrivacyBudgetsMiddlewares(stack *m // ListCollaborationPrivacyBudgetsPaginatorOptions is the paginator options for // ListCollaborationPrivacyBudgets type ListCollaborationPrivacyBudgetsPaginatorOptions struct { - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListCollaborations.go b/service/cleanrooms/api_op_ListCollaborations.go index 712d1ca6cbd..4fdedc6deb4 100644 --- a/service/cleanrooms/api_op_ListCollaborations.go +++ b/service/cleanrooms/api_op_ListCollaborations.go @@ -29,16 +29,15 @@ func (c *Client) ListCollaborations(ctx context.Context, params *ListCollaborati type ListCollaborationsInput struct { - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 // The caller's status in a collaboration. MemberStatus types.FilterableMemberStatus - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -51,8 +50,7 @@ type ListCollaborationsOutput struct { // This member is required. CollaborationList []types.CollaborationSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -161,9 +159,9 @@ func (c *Client) addOperationListCollaborationsMiddlewares(stack *middleware.Sta // ListCollaborationsPaginatorOptions is the paginator options for // ListCollaborations type ListCollaborationsPaginatorOptions struct { - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListConfiguredAudienceModelAssociations.go b/service/cleanrooms/api_op_ListConfiguredAudienceModelAssociations.go index d1503ac5a6e..d73b0e5f34b 100644 --- a/service/cleanrooms/api_op_ListConfiguredAudienceModelAssociations.go +++ b/service/cleanrooms/api_op_ListConfiguredAudienceModelAssociations.go @@ -35,13 +35,12 @@ type ListConfiguredAudienceModelAssociationsInput struct { // This member is required. MembershipIdentifier *string - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -166,9 +165,9 @@ func (c *Client) addOperationListConfiguredAudienceModelAssociationsMiddlewares( // ListConfiguredAudienceModelAssociationsPaginatorOptions is the paginator // options for ListConfiguredAudienceModelAssociations type ListConfiguredAudienceModelAssociationsPaginatorOptions struct { - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListConfiguredTableAssociations.go b/service/cleanrooms/api_op_ListConfiguredTableAssociations.go index e239753084c..718ff9c112a 100644 --- a/service/cleanrooms/api_op_ListConfiguredTableAssociations.go +++ b/service/cleanrooms/api_op_ListConfiguredTableAssociations.go @@ -35,11 +35,12 @@ type ListConfiguredTableAssociationsInput struct { // This member is required. MembershipIdentifier *string - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -52,8 +53,7 @@ type ListConfiguredTableAssociationsOutput struct { // This member is required. ConfiguredTableAssociationSummaries []types.ConfiguredTableAssociationSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -165,7 +165,9 @@ func (c *Client) addOperationListConfiguredTableAssociationsMiddlewares(stack *m // ListConfiguredTableAssociationsPaginatorOptions is the paginator options for // ListConfiguredTableAssociations type ListConfiguredTableAssociationsPaginatorOptions struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListConfiguredTables.go b/service/cleanrooms/api_op_ListConfiguredTables.go index 456c3bbcb30..889b2fc8279 100644 --- a/service/cleanrooms/api_op_ListConfiguredTables.go +++ b/service/cleanrooms/api_op_ListConfiguredTables.go @@ -29,11 +29,12 @@ func (c *Client) ListConfiguredTables(ctx context.Context, params *ListConfigure type ListConfiguredTablesInput struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -46,8 +47,7 @@ type ListConfiguredTablesOutput struct { // This member is required. ConfiguredTableSummaries []types.ConfiguredTableSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -156,7 +156,9 @@ func (c *Client) addOperationListConfiguredTablesMiddlewares(stack *middleware.S // ListConfiguredTablesPaginatorOptions is the paginator options for // ListConfiguredTables type ListConfiguredTablesPaginatorOptions struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListMembers.go b/service/cleanrooms/api_op_ListMembers.go index 310508db201..a7389c28b8e 100644 --- a/service/cleanrooms/api_op_ListMembers.go +++ b/service/cleanrooms/api_op_ListMembers.go @@ -34,11 +34,12 @@ type ListMembersInput struct { // This member is required. CollaborationIdentifier *string - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -51,8 +52,7 @@ type ListMembersOutput struct { // This member is required. MemberSummaries []types.MemberSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -163,7 +163,9 @@ func (c *Client) addOperationListMembersMiddlewares(stack *middleware.Stack, opt // ListMembersPaginatorOptions is the paginator options for ListMembers type ListMembersPaginatorOptions struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListMemberships.go b/service/cleanrooms/api_op_ListMemberships.go index ede62d70995..39a3982c1dd 100644 --- a/service/cleanrooms/api_op_ListMemberships.go +++ b/service/cleanrooms/api_op_ListMemberships.go @@ -29,11 +29,12 @@ func (c *Client) ListMemberships(ctx context.Context, params *ListMembershipsInp type ListMembershipsInput struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // A filter which will return only memberships in the specified status. @@ -49,8 +50,7 @@ type ListMembershipsOutput struct { // This member is required. MembershipSummaries []types.MembershipSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -158,7 +158,9 @@ func (c *Client) addOperationListMembershipsMiddlewares(stack *middleware.Stack, // ListMembershipsPaginatorOptions is the paginator options for ListMemberships type ListMembershipsPaginatorOptions struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListPrivacyBudgetTemplates.go b/service/cleanrooms/api_op_ListPrivacyBudgetTemplates.go index 218dd989a96..51ef347e316 100644 --- a/service/cleanrooms/api_op_ListPrivacyBudgetTemplates.go +++ b/service/cleanrooms/api_op_ListPrivacyBudgetTemplates.go @@ -37,13 +37,12 @@ type ListPrivacyBudgetTemplatesInput struct { // This member is required. MembershipIdentifier *string - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -57,8 +56,7 @@ type ListPrivacyBudgetTemplatesOutput struct { // This member is required. PrivacyBudgetTemplateSummaries []types.PrivacyBudgetTemplateSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -170,9 +168,9 @@ func (c *Client) addOperationListPrivacyBudgetTemplatesMiddlewares(stack *middle // ListPrivacyBudgetTemplatesPaginatorOptions is the paginator options for // ListPrivacyBudgetTemplates type ListPrivacyBudgetTemplatesPaginatorOptions struct { - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListPrivacyBudgets.go b/service/cleanrooms/api_op_ListPrivacyBudgets.go index 0bbd76b33e9..efd47879f7e 100644 --- a/service/cleanrooms/api_op_ListPrivacyBudgets.go +++ b/service/cleanrooms/api_op_ListPrivacyBudgets.go @@ -42,13 +42,12 @@ type ListPrivacyBudgetsInput struct { // This member is required. PrivacyBudgetType types.PrivacyBudgetType - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -63,8 +62,7 @@ type ListPrivacyBudgetsOutput struct { // This member is required. PrivacyBudgetSummaries []types.PrivacyBudgetSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -176,9 +174,9 @@ func (c *Client) addOperationListPrivacyBudgetsMiddlewares(stack *middleware.Sta // ListPrivacyBudgetsPaginatorOptions is the paginator options for // ListPrivacyBudgets type ListPrivacyBudgetsPaginatorOptions struct { - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListProtectedQueries.go b/service/cleanrooms/api_op_ListProtectedQueries.go index 9c0ef3df277..7565d5fe88a 100644 --- a/service/cleanrooms/api_op_ListProtectedQueries.go +++ b/service/cleanrooms/api_op_ListProtectedQueries.go @@ -34,13 +34,12 @@ type ListProtectedQueriesInput struct { // This member is required. MembershipIdentifier *string - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service can return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // A filter on the status of the protected query. @@ -56,8 +55,7 @@ type ListProtectedQueriesOutput struct { // This member is required. ProtectedQueries []types.ProtectedQuerySummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -169,9 +167,9 @@ func (c *Client) addOperationListProtectedQueriesMiddlewares(stack *middleware.S // ListProtectedQueriesPaginatorOptions is the paginator options for // ListProtectedQueries type ListProtectedQueriesPaginatorOptions struct { - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service can return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListSchemas.go b/service/cleanrooms/api_op_ListSchemas.go index 132630a7cce..b4136963ec3 100644 --- a/service/cleanrooms/api_op_ListSchemas.go +++ b/service/cleanrooms/api_op_ListSchemas.go @@ -35,15 +35,15 @@ type ListSchemasInput struct { // This member is required. CollaborationIdentifier *string - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string - // If present, filter schemas by schema type. The only valid schema type is - // currently `TABLE`. + // If present, filter schemas by schema type. SchemaType types.SchemaType noSmithyDocumentSerde @@ -56,8 +56,7 @@ type ListSchemasOutput struct { // This member is required. SchemaSummaries []types.SchemaSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -168,7 +167,9 @@ func (c *Client) addOperationListSchemasMiddlewares(stack *middleware.Stack, opt // ListSchemasPaginatorOptions is the paginator options for ListSchemas type ListSchemasPaginatorOptions struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_StartProtectedQuery.go b/service/cleanrooms/api_op_StartProtectedQuery.go index fc342fbd029..79e775e8587 100644 --- a/service/cleanrooms/api_op_StartProtectedQuery.go +++ b/service/cleanrooms/api_op_StartProtectedQuery.go @@ -45,6 +45,9 @@ type StartProtectedQueryInput struct { // This member is required. Type types.ProtectedQueryType + // The compute configuration for the protected query. + ComputeConfiguration types.ComputeConfiguration + // The details needed to write the query results. ResultConfiguration *types.ProtectedQueryResultConfiguration diff --git a/service/cleanrooms/deserializers.go b/service/cleanrooms/deserializers.go index 085479a2da4..d85f920bb7d 100644 --- a/service/cleanrooms/deserializers.go +++ b/service/cleanrooms/deserializers.go @@ -9933,6 +9933,9 @@ func awsRestjson1_deserializeOpErrorPopulateIdMappingTable(response *smithyhttp. case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -14645,6 +14648,71 @@ func awsRestjson1_deserializeDocumentBatchGetSchemaErrorList(v *[]types.BatchGet return nil } +func awsRestjson1_deserializeDocumentBilledResourceUtilization(v **types.BilledResourceUtilization, 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.BilledResourceUtilization + if *v == nil { + sv = &types.BilledResourceUtilization{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "units": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Units = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Units = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentCollaboration(v **types.Collaboration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -14667,6 +14735,15 @@ func awsRestjson1_deserializeDocumentCollaboration(v **types.Collaboration, valu for key, value := range shape { switch key { + case "analyticsEngine": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AnalyticsEngine to be of type string, got %T instead", value) + } + sv.AnalyticsEngine = types.AnalyticsEngine(jtv) + } + case "arn": if value != nil { jtv, ok := value.(string) @@ -16227,6 +16304,15 @@ func awsRestjson1_deserializeDocumentCollaborationSummary(v **types.Collaboratio for key, value := range shape { switch key { + case "analyticsEngine": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AnalyticsEngine to be of type string, got %T instead", value) + } + sv.AnalyticsEngine = types.AnalyticsEngine(jtv) + } + case "arn": if value != nil { jtv, ok := value.(string) @@ -16457,6 +16543,46 @@ func awsRestjson1_deserializeDocumentColumnList(v *[]types.Column, value interfa return nil } +func awsRestjson1_deserializeDocumentComputeConfiguration(v *types.ComputeConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.ComputeConfiguration +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "worker": + var mv types.WorkerComputeConfiguration + destAddr := &mv + if err := awsRestjson1_deserializeDocumentWorkerComputeConfiguration(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.ComputeConfigurationMemberWorker{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + func awsRestjson1_deserializeDocumentConfigurationDetails(v *types.ConfigurationDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -21355,6 +21481,11 @@ func awsRestjson1_deserializeDocumentProtectedQuery(v **types.ProtectedQuery, va for key, value := range shape { switch key { + case "computeConfiguration": + if err := awsRestjson1_deserializeDocumentComputeConfiguration(&sv.ComputeConfiguration, value); err != nil { + return err + } + case "createTime": if value != nil { switch jtv := value.(type) { @@ -21828,6 +21959,15 @@ func awsRestjson1_deserializeDocumentProtectedQueryS3OutputConfiguration(v **typ sv.ResultFormat = types.ResultFormat(jtv) } + case "singleFileOutput": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.SingleFileOutput = ptr.Bool(jtv) + } + default: _, _ = key, value @@ -21953,6 +22093,11 @@ func awsRestjson1_deserializeDocumentProtectedQueryStatistics(v **types.Protecte for key, value := range shape { switch key { + case "billedResourceUtilization": + if err := awsRestjson1_deserializeDocumentBilledResourceUtilization(&sv.BilledResourceUtilization, value); err != nil { + return err + } + case "totalDurationInMillis": if value != nil { jtv, ok := value.(json.Number) @@ -23462,6 +23607,59 @@ func awsRestjson1_deserializeDocumentValidationExceptionFieldList(v *[]types.Val return nil } +func awsRestjson1_deserializeDocumentWorkerComputeConfiguration(v **types.WorkerComputeConfiguration, 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.WorkerComputeConfiguration + if *v == nil { + sv = &types.WorkerComputeConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "number": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Number = ptr.Int32(int32(i64)) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkerComputeType to be of type string, got %T instead", value) + } + sv.Type = types.WorkerComputeType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentDocument(v *document.Interface, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/cleanrooms/serializers.go b/service/cleanrooms/serializers.go index 1edb6f48ba2..cfc0df05191 100644 --- a/service/cleanrooms/serializers.go +++ b/service/cleanrooms/serializers.go @@ -501,6 +501,11 @@ func awsRestjson1_serializeOpDocumentCreateCollaborationInput(v *CreateCollabora object := value.Object() defer object.Close() + if len(v.AnalyticsEngine) > 0 { + ok := object.Key("analyticsEngine") + ok.String(string(v.AnalyticsEngine)) + } + if v.CreatorDisplayName != nil { ok := object.Key("creatorDisplayName") ok.String(*v.CreatorDisplayName) @@ -5697,6 +5702,13 @@ func awsRestjson1_serializeOpDocumentStartProtectedQueryInput(v *StartProtectedQ object := value.Object() defer object.Close() + if v.ComputeConfiguration != nil { + ok := object.Key("computeConfiguration") + if err := awsRestjson1_serializeDocumentComputeConfiguration(v.ComputeConfiguration, ok); err != nil { + return err + } + } + if v.ResultConfiguration != nil { ok := object.Key("resultConfiguration") if err := awsRestjson1_serializeDocumentProtectedQueryResultConfiguration(v.ResultConfiguration, ok); err != nil { @@ -7503,6 +7515,24 @@ func awsRestjson1_serializeDocumentAnalysisTemplateArnList(v []string, value smi return nil } +func awsRestjson1_serializeDocumentComputeConfiguration(v types.ComputeConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.ComputeConfigurationMemberWorker: + av := object.Key("worker") + if err := awsRestjson1_serializeDocumentWorkerComputeConfiguration(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + func awsRestjson1_serializeDocumentConfiguredTableAnalysisRulePolicy(v types.ConfiguredTableAnalysisRulePolicy, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -8119,6 +8149,11 @@ func awsRestjson1_serializeDocumentProtectedQueryS3OutputConfiguration(v *types. ok.String(string(v.ResultFormat)) } + if v.SingleFileOutput != nil { + ok := object.Key("singleFileOutput") + ok.Boolean(*v.SingleFileOutput) + } + return nil } @@ -8238,3 +8273,20 @@ func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson. } return nil } + +func awsRestjson1_serializeDocumentWorkerComputeConfiguration(v *types.WorkerComputeConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Number != nil { + ok := object.Key("number") + ok.Integer(*v.Number) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} diff --git a/service/cleanrooms/types/enums.go b/service/cleanrooms/types/enums.go index 3004b8cdc96..52585d33f8a 100644 --- a/service/cleanrooms/types/enums.go +++ b/service/cleanrooms/types/enums.go @@ -198,6 +198,25 @@ func (AnalysisType) Values() []AnalysisType { } } +type AnalyticsEngine string + +// Enum values for AnalyticsEngine +const ( + AnalyticsEngineSpark AnalyticsEngine = "SPARK" + AnalyticsEngineCleanRoomsSql AnalyticsEngine = "CLEAN_ROOMS_SQL" +) + +// Values returns all known values for AnalyticsEngine. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AnalyticsEngine) Values() []AnalyticsEngine { + return []AnalyticsEngine{ + "SPARK", + "CLEAN_ROOMS_SQL", + } +} + type CollaborationQueryLogStatus string // Enum values for CollaborationQueryLogStatus @@ -483,6 +502,19 @@ const ( ParameterTypeTime ParameterType = "TIME" ParameterTypeTimetz ParameterType = "TIMETZ" ParameterTypeVarbyte ParameterType = "VARBYTE" + ParameterTypeBinary ParameterType = "BINARY" + ParameterTypeByte ParameterType = "BYTE" + ParameterTypeCharacter ParameterType = "CHARACTER" + ParameterTypeDouble ParameterType = "DOUBLE" + ParameterTypeFloat ParameterType = "FLOAT" + ParameterTypeInt ParameterType = "INT" + ParameterTypeLong ParameterType = "LONG" + ParameterTypeNumeric ParameterType = "NUMERIC" + ParameterTypeShort ParameterType = "SHORT" + ParameterTypeString ParameterType = "STRING" + ParameterTypeTimestampLtz ParameterType = "TIMESTAMP_LTZ" + ParameterTypeTimestampNtz ParameterType = "TIMESTAMP_NTZ" + ParameterTypeTinyint ParameterType = "TINYINT" ) // Values returns all known values for ParameterType. Note that this can be @@ -506,6 +538,19 @@ func (ParameterType) Values() []ParameterType { "TIME", "TIMETZ", "VARBYTE", + "BINARY", + "BYTE", + "CHARACTER", + "DOUBLE", + "FLOAT", + "INT", + "LONG", + "NUMERIC", + "SHORT", + "STRING", + "TIMESTAMP_LTZ", + "TIMESTAMP_NTZ", + "TINYINT", } } @@ -828,3 +873,22 @@ func (ValidationExceptionReason) Values() []ValidationExceptionReason { "IAM_SYNCHRONIZATION_DELAY", } } + +type WorkerComputeType string + +// Enum values for WorkerComputeType +const ( + WorkerComputeTypeCr1x WorkerComputeType = "CR.1X" + WorkerComputeTypeCr4x WorkerComputeType = "CR.4X" +) + +// Values returns all known values for WorkerComputeType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (WorkerComputeType) Values() []WorkerComputeType { + return []WorkerComputeType{ + "CR.1X", + "CR.4X", + } +} diff --git a/service/cleanrooms/types/types.go b/service/cleanrooms/types/types.go index abc6ffd8e8c..fcd3c5242f2 100644 --- a/service/cleanrooms/types/types.go +++ b/service/cleanrooms/types/types.go @@ -560,6 +560,19 @@ type BatchGetSchemaError struct { noSmithyDocumentSerde } +// Information related to the utilization of resources that have been billed or +// +// charged for in a given context, such as a protected query. +type BilledResourceUtilization struct { + + // The number of Clean Rooms Processing Unit (CRPU) hours that have been billed. + // + // This member is required. + Units *float64 + + noSmithyDocumentSerde +} + // The multi-party data share environment. The collaboration contains metadata // about its purpose and participants. type Collaboration struct { @@ -612,6 +625,9 @@ type Collaboration struct { // This member is required. UpdateTime *time.Time + // The analytics engine for the collaboration. + AnalyticsEngine AnalyticsEngine + // The settings for client-side encryption for cryptographic computing. DataEncryptionMetadata *DataEncryptionMetadata @@ -782,7 +798,7 @@ type CollaborationConfiguredAudienceModelAssociation struct { CreateTime *time.Time // The identifier used to reference members of the collaboration. Only supports - // AWS account ID. + // Amazon Web Services account ID. // // This member is required. CreatorAccountId *string @@ -834,7 +850,7 @@ type CollaborationConfiguredAudienceModelAssociationSummary struct { CreateTime *time.Time // The identifier used to reference members of the collaboration. Only supports - // AWS account ID. + // Amazon Web Services account ID. // // This member is required. CreatorAccountId *string @@ -1216,6 +1232,9 @@ type CollaborationSummary struct { // This member is required. UpdateTime *time.Time + // The analytics engine. + AnalyticsEngine AnalyticsEngine + // The ARN of a member in a collaboration. MembershipArn *string @@ -1241,6 +1260,26 @@ type Column struct { noSmithyDocumentSerde } +// The configuration of the compute resources for an analysis with the Spark +// +// analytics engine. +// +// The following types satisfy this interface: +// +// ComputeConfigurationMemberWorker +type ComputeConfiguration interface { + isComputeConfiguration() +} + +// The worker configuration for the compute environment. +type ComputeConfigurationMemberWorker struct { + Value WorkerComputeConfiguration + + noSmithyDocumentSerde +} + +func (*ComputeConfigurationMemberWorker) isComputeConfiguration() {} + // The configuration details. // // The following types satisfy this interface: @@ -3171,6 +3210,9 @@ type ProtectedQuery struct { // This member is required. Status ProtectedQueryStatus + // The compute configuration for the protected query. + ComputeConfiguration ComputeConfiguration + // The sensitivity parameters of the differential privacy results of the protected // query. DifferentialPrivacy *DifferentialPrivacyParameters @@ -3326,6 +3368,11 @@ type ProtectedQueryS3OutputConfiguration struct { // The S3 prefix to unload the protected query results. KeyPrefix *string + // Indicates whether files should be output as a single file ( TRUE ) or output as + // multiple files ( FALSE ). This parameter is only supported for analyses with the + // Spark analytics engine. + SingleFileOutput *bool + noSmithyDocumentSerde } @@ -3360,6 +3407,9 @@ type ProtectedQuerySQLParameters struct { // Contains statistics about the execution of the protected query. type ProtectedQueryStatistics struct { + // The billed resource utilization. + BilledResourceUtilization *BilledResourceUtilization + // The duration of the protected query, from creation until query completion. TotalDurationInMillis *int64 @@ -3394,8 +3444,7 @@ type ProtectedQuerySummary struct { // This member is required. ReceiverConfigurations []ReceiverConfiguration - // The status of the protected query. Value values are `SUBMITTED`, `STARTED`, - // `CANCELLED`, `CANCELLING`, `FAILED`, `SUCCESS`, `TIMED_OUT`. + // The status of the protected query. // // This member is required. Status ProtectedQueryStatus @@ -3473,13 +3522,14 @@ type ReceiverConfiguration struct { // A schema is a relation within a collaboration. type Schema struct { - // The analysis rule types associated with the schema. Currently, only one entry - // is present. + // The analysis rule types that are associated with the schema. Currently, only + // one entry is present. // // This member is required. AnalysisRuleTypes []AnalysisRuleType - // The unique ARN for the collaboration that the schema belongs to. + // The unique Amazon Resource Name (ARN) for the collaboration that the schema + // belongs to. // // This member is required. CollaborationArn *string @@ -3489,12 +3539,12 @@ type Schema struct { // This member is required. CollaborationId *string - // The columns for the relation this schema represents. + // The columns for the relation that this schema represents. // // This member is required. Columns []Column - // The time the schema was created. + // The time at which the schema was created. // // This member is required. CreateTime *time.Time @@ -3525,18 +3575,18 @@ type Schema struct { // This member is required. SchemaStatusDetails []SchemaStatusDetail - // The type of schema. The only valid value is currently `TABLE`. + // The type of schema. // // This member is required. Type SchemaType - // The time the schema was last updated. + // The most recent time at which the schema was updated. // // This member is required. UpdateTime *time.Time // The analysis method for the schema. The only valid value is currently - // DIRECT_QUERY. + // DIRECT_QUERY . AnalysisMethod AnalysisMethod // The schema type properties. @@ -3643,7 +3693,7 @@ type SchemaSummary struct { // This member is required. Name *string - // The type of schema object. The only valid schema type is currently `TABLE`. + // The type of schema object. // // This member is required. Type SchemaType @@ -3713,6 +3763,20 @@ type ValidationExceptionField struct { noSmithyDocumentSerde } +// The configuration of the compute resources for workers running an analysis +// +// with the Clean Rooms SQL analytics engine. +type WorkerComputeConfiguration struct { + + // The number of workers. + Number *int32 + + // The worker compute configuration type. + Type WorkerComputeType + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde // UnknownUnionMember is returned when a union member is returned over the wire, @@ -3727,6 +3791,7 @@ type UnknownUnionMember struct { func (*UnknownUnionMember) isAnalysisRulePolicy() {} func (*UnknownUnionMember) isAnalysisRulePolicyV1() {} func (*UnknownUnionMember) isAnalysisSource() {} +func (*UnknownUnionMember) isComputeConfiguration() {} func (*UnknownUnionMember) isConfigurationDetails() {} func (*UnknownUnionMember) isConfiguredTableAnalysisRulePolicy() {} func (*UnknownUnionMember) isConfiguredTableAnalysisRulePolicyV1() {} diff --git a/service/cleanrooms/types/types_exported_test.go b/service/cleanrooms/types/types_exported_test.go index e0d447161d5..dfc2a19e162 100644 --- a/service/cleanrooms/types/types_exported_test.go +++ b/service/cleanrooms/types/types_exported_test.go @@ -73,6 +73,24 @@ func ExampleAnalysisSource_outputUsage() { var _ *string +func ExampleComputeConfiguration_outputUsage() { + var union types.ComputeConfiguration + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ComputeConfigurationMemberWorker: + _ = v.Value // Value is types.WorkerComputeConfiguration + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.WorkerComputeConfiguration + func ExampleConfigurationDetails_outputUsage() { var union types.ConfigurationDetails // type switches can be used to check the union value diff --git a/service/cloudwatchlogs/api_op_UpdateAnomaly.go b/service/cloudwatchlogs/api_op_UpdateAnomaly.go index 32674926935..0856bc957ab 100644 --- a/service/cloudwatchlogs/api_op_UpdateAnomaly.go +++ b/service/cloudwatchlogs/api_op_UpdateAnomaly.go @@ -53,6 +53,14 @@ type UpdateAnomalyInput struct { // [ListAnomalies]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListAnomalies.html AnomalyId *string + // Set this to true to prevent CloudWatch Logs from displaying this behavior as an + // anomaly in the future. The behavior is then treated as baseline behavior. + // However, if similar but more severe occurrences of this behavior occur in the + // future, those will still be reported as anomalies. + // + // The default is false + Baseline *bool + // If you are suppressing or unsuppressing an pattern, specify its unique ID here. // You can find pattern IDs by using the [ListAnomalies]operation. // diff --git a/service/cloudwatchlogs/serializers.go b/service/cloudwatchlogs/serializers.go index ff67197b26d..1e56ba05f5e 100644 --- a/service/cloudwatchlogs/serializers.go +++ b/service/cloudwatchlogs/serializers.go @@ -6671,6 +6671,11 @@ func awsAwsjson11_serializeOpDocumentUpdateAnomalyInput(v *UpdateAnomalyInput, v ok.String(*v.AnomalyId) } + if v.Baseline != nil { + ok := object.Key("baseline") + ok.Boolean(*v.Baseline) + } + if v.PatternId != nil { ok := object.Key("patternId") ok.String(*v.PatternId) diff --git a/service/iotfleetwise/deserializers.go b/service/iotfleetwise/deserializers.go index d51774c88be..7264ad76419 100644 --- a/service/iotfleetwise/deserializers.go +++ b/service/iotfleetwise/deserializers.go @@ -383,6 +383,9 @@ func awsAwsjson10_deserializeOpErrorBatchUpdateVehicle(response *smithyhttp.Resp case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson10_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -6494,6 +6497,9 @@ func awsAwsjson10_deserializeOpErrorUpdateVehicle(response *smithyhttp.Response, case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson10_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) diff --git a/service/redshiftdata/api_op_BatchExecuteStatement.go b/service/redshiftdata/api_op_BatchExecuteStatement.go index 859bce7c9e4..63dc34729fc 100644 --- a/service/redshiftdata/api_op_BatchExecuteStatement.go +++ b/service/redshiftdata/api_op_BatchExecuteStatement.go @@ -6,6 +6,7 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/redshiftdata/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" @@ -89,6 +90,10 @@ type BatchExecuteStatementInput struct { // as a database user and authenticating using temporary credentials. DbUser *string + // The data format of the result of the SQL statement. If no format is specified, + // the default is JSON. + ResultFormat types.ResultFormatString + // The name or ARN of the secret that enables access to the database. This // parameter is required when authenticating using Secrets Manager. SecretArn *string diff --git a/service/redshiftdata/api_op_DescribeStatement.go b/service/redshiftdata/api_op_DescribeStatement.go index 91e4e6659aa..714f81678a5 100644 --- a/service/redshiftdata/api_op_DescribeStatement.go +++ b/service/redshiftdata/api_op_DescribeStatement.go @@ -96,6 +96,9 @@ type DescribeStatementOutput struct { // also available in the query column of the STL_QUERY system view. RedshiftQueryId int64 + // The data format of the result of the SQL statement. + ResultFormat types.ResultFormatString + // Either the number of rows returned from the SQL statement or the number of rows // affected. If result size is greater than zero, the result rows can be the number // of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, and diff --git a/service/redshiftdata/api_op_ExecuteStatement.go b/service/redshiftdata/api_op_ExecuteStatement.go index 31f881ca88c..4357ad87531 100644 --- a/service/redshiftdata/api_op_ExecuteStatement.go +++ b/service/redshiftdata/api_op_ExecuteStatement.go @@ -89,6 +89,10 @@ type ExecuteStatementInput struct { // The parameters for the SQL statement. Parameters []types.SqlParameter + // The data format of the result of the SQL statement. If no format is specified, + // the default is JSON. + ResultFormat types.ResultFormatString + // The name or ARN of the secret that enables access to the database. This // parameter is required when authenticating using Secrets Manager. SecretArn *string diff --git a/service/redshiftdata/api_op_GetStatementResult.go b/service/redshiftdata/api_op_GetStatementResult.go index 7582133956d..afbdd72d15a 100644 --- a/service/redshiftdata/api_op_GetStatementResult.go +++ b/service/redshiftdata/api_op_GetStatementResult.go @@ -11,8 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Fetches the temporarily cached result of an SQL statement. A token is returned -// to page through the statement results. +// Fetches the temporarily cached result of an SQL statement in JSON format. The +// ExecuteStatement or BatchExecuteStatement operation that ran the SQL statement +// must have specified ResultFormat as JSON , or let the format default to JSON. A +// token is returned to page through the statement results. // // For more information about the Amazon Redshift Data API and CLI usage examples, // see [Using the Amazon Redshift Data API]in the Amazon Redshift Management Guide. @@ -57,7 +59,7 @@ type GetStatementResultInput struct { type GetStatementResultOutput struct { - // The results of the SQL statement. + // The results of the SQL statement in JSON format. // // This member is required. Records [][]types.Field diff --git a/service/redshiftdata/api_op_GetStatementResultV2.go b/service/redshiftdata/api_op_GetStatementResultV2.go new file mode 100644 index 00000000000..d4f5f841f04 --- /dev/null +++ b/service/redshiftdata/api_op_GetStatementResultV2.go @@ -0,0 +1,279 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package redshiftdata + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/redshiftdata/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Fetches the temporarily cached result of an SQL statement in CSV format. The +// ExecuteStatement or BatchExecuteStatement operation that ran the SQL statement +// must have specified ResultFormat as CSV . A token is returned to page through +// the statement results. +// +// For more information about the Amazon Redshift Data API and CLI usage examples, +// see [Using the Amazon Redshift Data API]in the Amazon Redshift Management Guide. +// +// [Using the Amazon Redshift Data API]: https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html +func (c *Client) GetStatementResultV2(ctx context.Context, params *GetStatementResultV2Input, optFns ...func(*Options)) (*GetStatementResultV2Output, error) { + if params == nil { + params = &GetStatementResultV2Input{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetStatementResultV2", params, optFns, c.addOperationGetStatementResultV2Middlewares) + if err != nil { + return nil, err + } + + out := result.(*GetStatementResultV2Output) + out.ResultMetadata = metadata + return out, nil +} + +type GetStatementResultV2Input struct { + + // The identifier of the SQL statement whose results are to be fetched. This value + // is a universally unique identifier (UUID) generated by Amazon Redshift Data API. + // A suffix indicates then number of the SQL statement. For example, + // d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the + // second SQL statement of a batch query. This identifier is returned by + // BatchExecuteStatment , ExecuteStatment , and ListStatements . + // + // This member is required. + Id *string + + // A value that indicates the starting point for the next set of response records + // in a subsequent request. If a value is returned in a response, you can retrieve + // the next set of records by providing this returned NextToken value in the next + // NextToken parameter and retrying the command. If the NextToken field is empty, + // all response records have been retrieved for the request. + NextToken *string + + noSmithyDocumentSerde +} + +type GetStatementResultV2Output struct { + + // The results of the SQL statement in CSV format. + // + // This member is required. + Records []types.QueryRecords + + // The properties (metadata) of a column. + ColumnMetadata []types.ColumnMetadata + + // A value that indicates the starting point for the next set of response records + // in a subsequent request. If a value is returned in a response, you can retrieve + // the next set of records by providing this returned NextToken value in the next + // NextToken parameter and retrying the command. If the NextToken field is empty, + // all response records have been retrieved for the request. + NextToken *string + + // The data format of the result of the SQL statement. + ResultFormat types.ResultFormatString + + // The total number of rows in the result set returned from a query. You can use + // this number to estimate the number of calls to the GetStatementResultV2 + // operation needed to page through the results. + TotalNumRows int64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetStatementResultV2Middlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetStatementResultV2{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetStatementResultV2{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetStatementResultV2"); 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 = addSpanRetryLoop(stack, options); 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 = addOpGetStatementResultV2ValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetStatementResultV2(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// GetStatementResultV2PaginatorOptions is the paginator options for +// GetStatementResultV2 +type GetStatementResultV2PaginatorOptions struct { + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// GetStatementResultV2Paginator is a paginator for GetStatementResultV2 +type GetStatementResultV2Paginator struct { + options GetStatementResultV2PaginatorOptions + client GetStatementResultV2APIClient + params *GetStatementResultV2Input + nextToken *string + firstPage bool +} + +// NewGetStatementResultV2Paginator returns a new GetStatementResultV2Paginator +func NewGetStatementResultV2Paginator(client GetStatementResultV2APIClient, params *GetStatementResultV2Input, optFns ...func(*GetStatementResultV2PaginatorOptions)) *GetStatementResultV2Paginator { + if params == nil { + params = &GetStatementResultV2Input{} + } + + options := GetStatementResultV2PaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &GetStatementResultV2Paginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetStatementResultV2Paginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetStatementResultV2 page. +func (p *GetStatementResultV2Paginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetStatementResultV2Output, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.GetStatementResultV2(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// GetStatementResultV2APIClient is a client that implements the +// GetStatementResultV2 operation. +type GetStatementResultV2APIClient interface { + GetStatementResultV2(context.Context, *GetStatementResultV2Input, ...func(*Options)) (*GetStatementResultV2Output, error) +} + +var _ GetStatementResultV2APIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opGetStatementResultV2(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetStatementResultV2", + } +} diff --git a/service/redshiftdata/deserializers.go b/service/redshiftdata/deserializers.go index b6a23314009..f7f4f0543db 100644 --- a/service/redshiftdata/deserializers.go +++ b/service/redshiftdata/deserializers.go @@ -751,6 +751,123 @@ func awsAwsjson11_deserializeOpErrorGetStatementResult(response *smithyhttp.Resp } } +type awsAwsjson11_deserializeOpGetStatementResultV2 struct { +} + +func (*awsAwsjson11_deserializeOpGetStatementResultV2) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetStatementResultV2) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorGetStatementResultV2(response, &metadata) + } + output := &GetStatementResultV2Output{} + 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_deserializeOpDocumentGetStatementResultV2Output(&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_deserializeOpErrorGetStatementResultV2(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("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpListDatabases struct { } @@ -2229,6 +2346,38 @@ func awsAwsjson11_deserializeDocumentFieldList(v *[]types.Field, value interface return nil } +func awsAwsjson11_deserializeDocumentFormattedSqlRecords(v *[]types.QueryRecords, 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.QueryRecords + if *v == nil { + cv = []types.QueryRecords{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.QueryRecords + if err := awsAwsjson11_deserializeDocumentQueryRecords(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2269,6 +2418,48 @@ func awsAwsjson11_deserializeDocumentInternalServerException(v **types.InternalS return nil } +func awsAwsjson11_deserializeDocumentQueryRecords(v *types.QueryRecords, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.QueryRecords +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "CSVRecords": + var mv string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + mv = jtv + } + uv = &types.QueryRecordsMemberCSVRecords{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + func awsAwsjson11_deserializeDocumentQueryTimeoutException(v **types.QueryTimeoutException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2584,6 +2775,15 @@ func awsAwsjson11_deserializeDocumentStatementData(v **types.StatementData, valu return err } + case "ResultFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResultFormatString to be of type string, got %T instead", value) + } + sv.ResultFormat = types.ResultFormatString(jtv) + } + case "SecretArn": if value != nil { jtv, ok := value.(string) @@ -3341,6 +3541,15 @@ func awsAwsjson11_deserializeOpDocumentDescribeStatementOutput(v **DescribeState sv.RedshiftQueryId = i64 } + case "ResultFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResultFormatString to be of type string, got %T instead", value) + } + sv.ResultFormat = types.ResultFormatString(jtv) + } + case "ResultRows": if value != nil { jtv, ok := value.(json.Number) @@ -3665,6 +3874,78 @@ func awsAwsjson11_deserializeOpDocumentGetStatementResultOutput(v **GetStatement return nil } +func awsAwsjson11_deserializeOpDocumentGetStatementResultV2Output(v **GetStatementResultV2Output, 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 *GetStatementResultV2Output + if *v == nil { + sv = &GetStatementResultV2Output{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ColumnMetadata": + if err := awsAwsjson11_deserializeDocumentColumnMetadataList(&sv.ColumnMetadata, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Records": + if err := awsAwsjson11_deserializeDocumentFormattedSqlRecords(&sv.Records, value); err != nil { + return err + } + + case "ResultFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResultFormatString to be of type string, got %T instead", value) + } + sv.ResultFormat = types.ResultFormatString(jtv) + } + + case "TotalNumRows": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TotalNumRows = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListDatabasesOutput(v **ListDatabasesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/redshiftdata/generated.json b/service/redshiftdata/generated.json index 1a406a12ed9..25883a53124 100644 --- a/service/redshiftdata/generated.json +++ b/service/redshiftdata/generated.json @@ -14,6 +14,7 @@ "api_op_DescribeTable.go", "api_op_ExecuteStatement.go", "api_op_GetStatementResult.go", + "api_op_GetStatementResultV2.go", "api_op_ListDatabases.go", "api_op_ListSchemas.go", "api_op_ListStatements.go", diff --git a/service/redshiftdata/serializers.go b/service/redshiftdata/serializers.go index 313b01973b6..55862870d50 100644 --- a/service/redshiftdata/serializers.go +++ b/service/redshiftdata/serializers.go @@ -382,6 +382,67 @@ func (m *awsAwsjson11_serializeOpGetStatementResult) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpGetStatementResultV2 struct { +} + +func (*awsAwsjson11_serializeOpGetStatementResultV2) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetStatementResultV2) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetStatementResultV2Input) + _ = 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("RedshiftData.GetStatementResultV2") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetStatementResultV2Input(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpListDatabases struct { } @@ -690,6 +751,11 @@ func awsAwsjson11_serializeOpDocumentBatchExecuteStatementInput(v *BatchExecuteS ok.String(*v.DbUser) } + if len(v.ResultFormat) > 0 { + ok := object.Key("ResultFormat") + ok.String(string(v.ResultFormat)) + } + if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) @@ -842,6 +908,11 @@ func awsAwsjson11_serializeOpDocumentExecuteStatementInput(v *ExecuteStatementIn } } + if len(v.ResultFormat) > 0 { + ok := object.Key("ResultFormat") + ok.String(string(v.ResultFormat)) + } + if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) @@ -897,6 +968,23 @@ func awsAwsjson11_serializeOpDocumentGetStatementResultInput(v *GetStatementResu return nil } +func awsAwsjson11_serializeOpDocumentGetStatementResultV2Input(v *GetStatementResultV2Input, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Id != nil { + ok := object.Key("Id") + ok.String(*v.Id) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListDatabasesInput(v *ListDatabasesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/redshiftdata/snapshot/api_op_GetStatementResultV2.go.snap b/service/redshiftdata/snapshot/api_op_GetStatementResultV2.go.snap new file mode 100644 index 00000000000..917b8d90c22 --- /dev/null +++ b/service/redshiftdata/snapshot/api_op_GetStatementResultV2.go.snap @@ -0,0 +1,41 @@ +GetStatementResultV2 + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/redshiftdata/snapshot_test.go b/service/redshiftdata/snapshot_test.go index d5e64157592..04cd52aa912 100644 --- a/service/redshiftdata/snapshot_test.go +++ b/service/redshiftdata/snapshot_test.go @@ -134,6 +134,18 @@ func TestCheckSnapshot_GetStatementResult(t *testing.T) { } } +func TestCheckSnapshot_GetStatementResultV2(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetStatementResultV2(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetStatementResultV2") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListDatabases(t *testing.T) { svc := New(Options{}) _, err := svc.ListDatabases(context.Background(), nil, func(o *Options) { @@ -253,6 +265,18 @@ func TestUpdateSnapshot_GetStatementResult(t *testing.T) { } } +func TestUpdateSnapshot_GetStatementResultV2(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetStatementResultV2(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetStatementResultV2") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListDatabases(t *testing.T) { svc := New(Options{}) _, err := svc.ListDatabases(context.Background(), nil, func(o *Options) { diff --git a/service/redshiftdata/types/enums.go b/service/redshiftdata/types/enums.go index dce58f5a3d5..b9baf7cebda 100644 --- a/service/redshiftdata/types/enums.go +++ b/service/redshiftdata/types/enums.go @@ -2,6 +2,25 @@ package types +type ResultFormatString string + +// Enum values for ResultFormatString +const ( + ResultFormatStringJson ResultFormatString = "JSON" + ResultFormatStringCsv ResultFormatString = "CSV" +) + +// Values returns all known values for ResultFormatString. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ResultFormatString) Values() []ResultFormatString { + return []ResultFormatString{ + "JSON", + "CSV", + } +} + type StatementStatusString string // Enum values for StatementStatusString diff --git a/service/redshiftdata/types/types.go b/service/redshiftdata/types/types.go index dc2c977ab9f..4ebf7167877 100644 --- a/service/redshiftdata/types/types.go +++ b/service/redshiftdata/types/types.go @@ -120,6 +120,24 @@ type FieldMemberStringValue struct { func (*FieldMemberStringValue) isField() {} +// The results of the SQL statement. +// +// The following types satisfy this interface: +// +// QueryRecordsMemberCSVRecords +type QueryRecords interface { + isQueryRecords() +} + +// The results of the SQL statement in CSV format. +type QueryRecordsMemberCSVRecords struct { + Value string + + noSmithyDocumentSerde +} + +func (*QueryRecordsMemberCSVRecords) isQueryRecords() {} + // A parameter used in a SQL statement. type SqlParameter struct { @@ -165,6 +183,9 @@ type StatementData struct { // of the queries in a batch query request. QueryStrings []string + // The data format of the result of the SQL statement. + ResultFormat ResultFormatString + // The name or Amazon Resource Name (ARN) of the secret that enables access to the // database. SecretArn *string @@ -263,4 +284,5 @@ type UnknownUnionMember struct { noSmithyDocumentSerde } -func (*UnknownUnionMember) isField() {} +func (*UnknownUnionMember) isField() {} +func (*UnknownUnionMember) isQueryRecords() {} diff --git a/service/redshiftdata/types/types_exported_test.go b/service/redshiftdata/types/types_exported_test.go index 17bad46c893..2c957ad6ef6 100644 --- a/service/redshiftdata/types/types_exported_test.go +++ b/service/redshiftdata/types/types_exported_test.go @@ -43,3 +43,21 @@ var _ *bool var _ *int64 var _ *float64 var _ []byte + +func ExampleQueryRecords_outputUsage() { + var union types.QueryRecords + // type switches can be used to check the union value + switch v := union.(type) { + case *types.QueryRecordsMemberCSVRecords: + _ = v.Value // Value is string + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *string diff --git a/service/redshiftdata/validators.go b/service/redshiftdata/validators.go index ead72ce8591..304596f1ab7 100644 --- a/service/redshiftdata/validators.go +++ b/service/redshiftdata/validators.go @@ -130,6 +130,26 @@ func (m *validateOpGetStatementResult) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpGetStatementResultV2 struct { +} + +func (*validateOpGetStatementResultV2) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetStatementResultV2) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetStatementResultV2Input) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetStatementResultV2Input(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListDatabases struct { } @@ -214,6 +234,10 @@ func addOpGetStatementResultValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpGetStatementResult{}, middleware.After) } +func addOpGetStatementResultV2ValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetStatementResultV2{}, middleware.After) +} + func addOpListDatabasesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListDatabases{}, middleware.After) } @@ -356,6 +380,21 @@ func validateOpGetStatementResultInput(v *GetStatementResultInput) error { } } +func validateOpGetStatementResultV2Input(v *GetStatementResultV2Input) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetStatementResultV2Input"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListDatabasesInput(v *ListDatabasesInput) error { if v == nil { return nil diff --git a/service/sagemaker/api_op_CreateDomain.go b/service/sagemaker/api_op_CreateDomain.go index c0f7b47811c..fcd7f0a8bb0 100644 --- a/service/sagemaker/api_op_CreateDomain.go +++ b/service/sagemaker/api_op_CreateDomain.go @@ -120,7 +120,7 @@ type CreateDomainInput struct { // to Service . AppSecurityGroupManagement types.AppSecurityGroupManagement - // The default settings used to create a space. + // The default settings for shared spaces that users create in the domain. DefaultSpaceSettings *types.DefaultSpaceSettings // A collection of Domain settings. diff --git a/service/sagemaker/api_op_CreateNotebookInstance.go b/service/sagemaker/api_op_CreateNotebookInstance.go index 4d82f13f7fd..fd2d063b633 100644 --- a/service/sagemaker/api_op_CreateNotebookInstance.go +++ b/service/sagemaker/api_op_CreateNotebookInstance.go @@ -92,11 +92,11 @@ type CreateNotebookInstanceInput struct { // This member is required. RoleArn *string - // A list of Elastic Inference (EI) instance types to associate with this notebook - // instance. Currently, only one instance type can be associated with a notebook - // instance. For more information, see [Using Elastic Inference in Amazon SageMaker]. + // This parameter is no longer supported. Elastic Inference (EI) is no longer + // available. // - // [Using Elastic Inference in Amazon SageMaker]: https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html + // This parameter was used to specify a list of EI instance types to associate + // with this notebook instance. AcceleratorTypes []types.NotebookInstanceAcceleratorType // An array of up to three Git repositories to associate with the notebook diff --git a/service/sagemaker/api_op_DescribeDomain.go b/service/sagemaker/api_op_DescribeDomain.go index 93d4c217d5a..bcf5d553556 100644 --- a/service/sagemaker/api_op_DescribeDomain.go +++ b/service/sagemaker/api_op_DescribeDomain.go @@ -61,7 +61,7 @@ type DescribeDomainOutput struct { // The creation time. CreationTime *time.Time - // The default settings used to create a space. + // The default settings for shared spaces that users create in the domain. DefaultSpaceSettings *types.DefaultSpaceSettings // Settings which are applied to UserProfiles in this domain if settings are not diff --git a/service/sagemaker/api_op_DescribeNotebookInstance.go b/service/sagemaker/api_op_DescribeNotebookInstance.go index 7a744ff2b78..292f9468898 100644 --- a/service/sagemaker/api_op_DescribeNotebookInstance.go +++ b/service/sagemaker/api_op_DescribeNotebookInstance.go @@ -45,11 +45,11 @@ type DescribeNotebookInstanceInput struct { type DescribeNotebookInstanceOutput struct { - // A list of the Elastic Inference (EI) instance types associated with this - // notebook instance. Currently only one EI instance type can be associated with a - // notebook instance. For more information, see [Using Elastic Inference in Amazon SageMaker]. + // This parameter is no longer supported. Elastic Inference (EI) is no longer + // available. // - // [Using Elastic Inference in Amazon SageMaker]: https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html + // This parameter was used to specify a list of the EI instance types associated + // with this notebook instance. AcceleratorTypes []types.NotebookInstanceAcceleratorType // An array of up to three Git repositories associated with the notebook instance. diff --git a/service/sagemaker/api_op_UpdateDomain.go b/service/sagemaker/api_op_UpdateDomain.go index bb787c99aa8..bc15cdbec9c 100644 --- a/service/sagemaker/api_op_UpdateDomain.go +++ b/service/sagemaker/api_op_UpdateDomain.go @@ -56,7 +56,7 @@ type UpdateDomainInput struct { // to Service . AppSecurityGroupManagement types.AppSecurityGroupManagement - // The default settings used to create a space within the domain. + // The default settings for shared spaces that users create in the domain. DefaultSpaceSettings *types.DefaultSpaceSettings // A collection of settings. diff --git a/service/sagemaker/api_op_UpdateNotebookInstance.go b/service/sagemaker/api_op_UpdateNotebookInstance.go index 1e7a237ffd3..c3bff5feddc 100644 --- a/service/sagemaker/api_op_UpdateNotebookInstance.go +++ b/service/sagemaker/api_op_UpdateNotebookInstance.go @@ -36,11 +36,11 @@ type UpdateNotebookInstanceInput struct { // This member is required. NotebookInstanceName *string - // A list of the Elastic Inference (EI) instance types to associate with this - // notebook instance. Currently only one EI instance type can be associated with a - // notebook instance. For more information, see [Using Elastic Inference in Amazon SageMaker]. + // This parameter is no longer supported. Elastic Inference (EI) is no longer + // available. // - // [Using Elastic Inference in Amazon SageMaker]: https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html + // This parameter was used to specify a list of the EI instance types to associate + // with this notebook instance. AcceleratorTypes []types.NotebookInstanceAcceleratorType // An array of up to three Git repositories to associate with the notebook @@ -63,10 +63,11 @@ type UpdateNotebookInstanceInput struct { // [Associating Git Repositories with SageMaker Notebook Instances]: https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html DefaultCodeRepository *string - // A list of the Elastic Inference (EI) instance types to remove from this - // notebook instance. This operation is idempotent. If you specify an accelerator - // type that is not associated with the notebook instance when you call this - // method, it does not throw an error. + // This parameter is no longer supported. Elastic Inference (EI) is no longer + // available. + // + // This parameter was used to specify a list of the EI instance types to remove + // from this notebook instance. DisassociateAcceleratorTypes *bool // A list of names or URLs of the default Git repositories to remove from this diff --git a/service/sagemaker/types/enums.go b/service/sagemaker/types/enums.go index 9cfcd14c4c5..017e5089287 100644 --- a/service/sagemaker/types/enums.go +++ b/service/sagemaker/types/enums.go @@ -7355,6 +7355,8 @@ const ( TrainingInstanceTypeMlP4d24xlarge TrainingInstanceType = "ml.p4d.24xlarge" TrainingInstanceTypeMlP4de24xlarge TrainingInstanceType = "ml.p4de.24xlarge" TrainingInstanceTypeMlP548xlarge TrainingInstanceType = "ml.p5.48xlarge" + TrainingInstanceTypeMlP5e48xlarge TrainingInstanceType = "ml.p5e.48xlarge" + TrainingInstanceTypeMlP5en48xlarge TrainingInstanceType = "ml.p5en.48xlarge" TrainingInstanceTypeMlC5Xlarge TrainingInstanceType = "ml.c5.xlarge" TrainingInstanceTypeMlC52xlarge TrainingInstanceType = "ml.c5.2xlarge" TrainingInstanceTypeMlC54xlarge TrainingInstanceType = "ml.c5.4xlarge" @@ -7376,6 +7378,7 @@ const ( TrainingInstanceTypeMlTrn12xlarge TrainingInstanceType = "ml.trn1.2xlarge" TrainingInstanceTypeMlTrn132xlarge TrainingInstanceType = "ml.trn1.32xlarge" TrainingInstanceTypeMlTrn1n32xlarge TrainingInstanceType = "ml.trn1n.32xlarge" + TrainingInstanceTypeMlTrn248xlarge TrainingInstanceType = "ml.trn2.48xlarge" TrainingInstanceTypeMlM6iLarge TrainingInstanceType = "ml.m6i.large" TrainingInstanceTypeMlM6iXlarge TrainingInstanceType = "ml.m6i.xlarge" TrainingInstanceTypeMlM6i2xlarge TrainingInstanceType = "ml.m6i.2xlarge" @@ -7452,6 +7455,8 @@ func (TrainingInstanceType) Values() []TrainingInstanceType { "ml.p4d.24xlarge", "ml.p4de.24xlarge", "ml.p5.48xlarge", + "ml.p5e.48xlarge", + "ml.p5en.48xlarge", "ml.c5.xlarge", "ml.c5.2xlarge", "ml.c5.4xlarge", @@ -7473,6 +7478,7 @@ func (TrainingInstanceType) Values() []TrainingInstanceType { "ml.trn1.2xlarge", "ml.trn1.32xlarge", "ml.trn1n.32xlarge", + "ml.trn2.48xlarge", "ml.m6i.large", "ml.m6i.xlarge", "ml.m6i.2xlarge", diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index e9a84675c6d..46191b926a5 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -408,9 +408,8 @@ type AnnotationConsolidationConfig struct { // The Amazon Resource Name (ARN) of a Lambda function implements the logic for [annotation consolidation] // and to process output data. // - // This parameter is required for all labeling jobs. For [built-in task types], use one of the - // following Amazon SageMaker Ground Truth Lambda function ARNs for - // AnnotationConsolidationLambdaArn . For custom labeling workflows, see [Post-annotation Lambda]. + // For [built-in task types], use one of the following Amazon SageMaker Ground Truth Lambda function + // ARNs for AnnotationConsolidationLambdaArn . For custom labeling workflows, see [Post-annotation Lambda]. // // Bounding box - Finds the most similar boxes from different workers based on the // Jaccard index of the boxes. @@ -4434,7 +4433,10 @@ type DefaultEbsStorageSettings struct { noSmithyDocumentSerde } -// A collection of settings that apply to spaces created in the domain. +// The default settings for shared spaces that users create in the domain. +// +// SageMaker applies these settings only to shared spaces. It doesn't apply them +// to private spaces. type DefaultSpaceSettings struct { // The settings for assigning a custom file system to a domain. Permitted users @@ -13003,21 +13005,6 @@ type OutputConfig struct { // tar.gz file. For example, {"class_labels": "imagenet_labels_1000.txt"} . // Labels inside the txt file should be separated by newlines. // - // - EIA : Compilation for the Elastic Inference Accelerator supports the - // following compiler options: - // - // - precision_mode : Specifies the precision of compiled artifacts. Supported - // values are "FP16" and "FP32" . Default is "FP32" . - // - // - signature_def_key : Specifies the signature to use for models in SavedModel - // format. Defaults is TensorFlow's default signature def key. - // - // - output_names : Specifies a list of output tensor names for models in - // FrozenGraph format. Set at most one API field, either: signature_def_key or - // output_names . - // - // For example: {"precision_mode": "FP32", "output_names": ["output:0"]} - // // [OutputConfig]: https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_OutputConfig.html // [Neuron Compiler CLI Reference Guide]: https://awsdocs-neuron.readthedocs-hosted.com/en/latest/compiler/neuronx-cc/api-reference-guide/neuron-compiler-cli-reference-guide.html CompilerOptions *string @@ -13342,11 +13329,11 @@ type PendingProductionVariantSummary struct { // This member is required. VariantName *string - // The size of the Elastic Inference (EI) instance to use for the production - // variant. EI instances provide on-demand GPU computing for inference. For more - // information, see [Using Elastic Inference in Amazon SageMaker]. + // This parameter is no longer supported. Elastic Inference (EI) is no longer + // available. // - // [Using Elastic Inference in Amazon SageMaker]: https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html + // This parameter was used to specify the size of the EI instance to use for the + // production variant. AcceleratorType ProductionVariantAcceleratorType // The number of instances associated with the variant. @@ -14147,11 +14134,11 @@ type ProductionVariant struct { // This member is required. VariantName *string - // The size of the Elastic Inference (EI) instance to use for the production - // variant. EI instances provide on-demand GPU computing for inference. For more - // information, see [Using Elastic Inference in Amazon SageMaker]. + // This parameter is no longer supported. Elastic Inference (EI) is no longer + // available. // - // [Using Elastic Inference in Amazon SageMaker]: https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html + // This parameter was used to specify the size of the EI instance to use for the + // production variant. AcceleratorType ProductionVariantAcceleratorType // The timeout value, in seconds, for your inference container to pass health @@ -19135,19 +19122,34 @@ type UserSettings struct { // Indicates whether auto-mounting of an EFS volume is supported for the user // profile. The DefaultAsDomain value is only supported for user profiles. Do not // use the DefaultAsDomain value when setting this parameter for a domain. + // + // SageMaker applies this setting only to private spaces that the user creates in + // the domain. SageMaker doesn't apply this setting to shared spaces. AutoMountHomeEFS AutoMountHomeEFS // The Canvas app settings. + // + // SageMaker applies these settings only to private spaces that SageMaker creates + // for the Canvas app. CanvasAppSettings *CanvasAppSettings // The Code Editor application settings. + // + // SageMaker applies these settings only to private spaces that the user creates + // in the domain. SageMaker doesn't apply these settings to shared spaces. CodeEditorAppSettings *CodeEditorAppSettings // The settings for assigning a custom file system to a user profile. Permitted // users can access this file system in Amazon SageMaker Studio. + // + // SageMaker applies these settings only to private spaces that the user creates + // in the domain. SageMaker doesn't apply these settings to shared spaces. CustomFileSystemConfigs []CustomFileSystemConfig // Details about the POSIX identity that is used for file system operations. + // + // SageMaker applies these settings only to private spaces that the user creates + // in the domain. SageMaker doesn't apply these settings to shared spaces. CustomPosixUserConfig *CustomPosixUserConfig // The default experience that the user is directed to when accessing the domain. @@ -19160,9 +19162,15 @@ type UserSettings struct { DefaultLandingUri *string // The execution role for the user. + // + // SageMaker applies this setting only to private spaces that the user creates in + // the domain. SageMaker doesn't apply this setting to shared spaces. ExecutionRole *string // The settings for the JupyterLab application. + // + // SageMaker applies these settings only to private spaces that the user creates + // in the domain. SageMaker doesn't apply these settings to shared spaces. JupyterLabAppSettings *JupyterLabAppSettings // The Jupyter server's app settings. @@ -19190,12 +19198,18 @@ type UserSettings struct { // Amazon SageMaker adds a security group to allow NFS traffic from Amazon // SageMaker Studio. Therefore, the number of security groups that you can specify // is one less than the maximum number shown. + // + // SageMaker applies these settings only to private spaces that the user creates + // in the domain. SageMaker doesn't apply these settings to shared spaces. SecurityGroups []string // Specifies options for sharing Amazon SageMaker Studio notebooks. SharingSettings *SharingSettings // The storage settings for a space. + // + // SageMaker applies these settings only to private spaces that the user creates + // in the domain. SageMaker doesn't apply these settings to shared spaces. SpaceStorageSettings *DefaultSpaceStorageSettings // Whether the user can access Studio. If this value is set to DISABLED , the user diff --git a/service/textract/internal/endpoints/endpoints.go b/service/textract/internal/endpoints/endpoints.go index 885165e11a8..fbeaaec9620 100644 --- a/service/textract/internal/endpoints/endpoints.go +++ b/service/textract/internal/endpoints/endpoints.go @@ -205,6 +205,9 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "textract.eu-central-1.api.aws", }, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, From dd22e01d109b829e95d404051d40d96cff8aef40 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Tue, 29 Oct 2024 18:29:42 +0000 Subject: [PATCH 4/9] Release 2024-10-29 --- .changelog/19f55fd9f72d4fbeb8871e730edf88fe.json | 8 -------- .changelog/34e7e629c6b64b4bb5c06abde33a7537.json | 8 -------- .changelog/390ae55c65584a0ca1c5aab76acf2f51.json | 8 -------- .changelog/9e300e8375914fdca3f0281e75e765de.json | 8 -------- .changelog/bc32758c5c424079963e1357287e9c89.json | 8 -------- .changelog/e36a67b15cc8407fa7d67c05c29f0320.json | 8 -------- .changelog/e4a01c5cafd64f3c8e82640add5968e8.json | 8 -------- CHANGELOG.md | 16 ++++++++++++++++ .../dynamodbstreams/attributevalue/CHANGELOG.md | 4 ++++ .../attributevalue/go_module_metadata.go | 2 +- service/bedrock/CHANGELOG.md | 4 ++++ service/bedrock/go_module_metadata.go | 2 +- service/cleanrooms/CHANGELOG.md | 4 ++++ service/cleanrooms/go_module_metadata.go | 2 +- service/cloudwatchlogs/CHANGELOG.md | 4 ++++ service/cloudwatchlogs/go_module_metadata.go | 2 +- service/iotfleetwise/CHANGELOG.md | 4 ++++ service/iotfleetwise/go_module_metadata.go | 2 +- service/redshiftdata/CHANGELOG.md | 4 ++++ service/redshiftdata/go_module_metadata.go | 2 +- service/sagemaker/CHANGELOG.md | 4 ++++ service/sagemaker/go_module_metadata.go | 2 +- service/textract/CHANGELOG.md | 4 ++++ service/textract/go_module_metadata.go | 2 +- 24 files changed, 56 insertions(+), 64 deletions(-) delete mode 100644 .changelog/19f55fd9f72d4fbeb8871e730edf88fe.json delete mode 100644 .changelog/34e7e629c6b64b4bb5c06abde33a7537.json delete mode 100644 .changelog/390ae55c65584a0ca1c5aab76acf2f51.json delete mode 100644 .changelog/9e300e8375914fdca3f0281e75e765de.json delete mode 100644 .changelog/bc32758c5c424079963e1357287e9c89.json delete mode 100644 .changelog/e36a67b15cc8407fa7d67c05c29f0320.json delete mode 100644 .changelog/e4a01c5cafd64f3c8e82640add5968e8.json diff --git a/.changelog/19f55fd9f72d4fbeb8871e730edf88fe.json b/.changelog/19f55fd9f72d4fbeb8871e730edf88fe.json deleted file mode 100644 index 6e03044a9bf..00000000000 --- a/.changelog/19f55fd9f72d4fbeb8871e730edf88fe.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "19f55fd9-f72d-4fbe-b887-1e730edf88fe", - "type": "feature", - "description": "Adding `notebook-al2-v3` as allowed value to SageMaker NotebookInstance PlatformIdentifier attribute", - "modules": [ - "service/sagemaker" - ] -} \ No newline at end of file diff --git a/.changelog/34e7e629c6b64b4bb5c06abde33a7537.json b/.changelog/34e7e629c6b64b4bb5c06abde33a7537.json deleted file mode 100644 index 669050700cd..00000000000 --- a/.changelog/34e7e629c6b64b4bb5c06abde33a7537.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "34e7e629-c6b6-4b4b-b5c0-6abde33a7537", - "type": "feature", - "description": "Updated BatchCreateVehicle and BatchUpdateVehicle APIs: LimitExceededException has been added and the maximum number of vehicles in a batch has been set to 10 explicitly", - "modules": [ - "service/iotfleetwise" - ] -} \ No newline at end of file diff --git a/.changelog/390ae55c65584a0ca1c5aab76acf2f51.json b/.changelog/390ae55c65584a0ca1c5aab76acf2f51.json deleted file mode 100644 index 489d0ba21fa..00000000000 --- a/.changelog/390ae55c65584a0ca1c5aab76acf2f51.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "390ae55c-6558-4a0c-a1c5-aab76acf2f51", - "type": "feature", - "description": "Update Application Inference Profile", - "modules": [ - "service/bedrockruntime" - ] -} \ No newline at end of file diff --git a/.changelog/9e300e8375914fdca3f0281e75e765de.json b/.changelog/9e300e8375914fdca3f0281e75e765de.json deleted file mode 100644 index f7f6a682e6d..00000000000 --- a/.changelog/9e300e8375914fdca3f0281e75e765de.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "9e300e83-7591-4fdc-a3f0-281e75e765de", - "type": "feature", - "description": "Added support for new optional baseline parameter in the UpdateAnomaly API. For UpdateAnomaly requests with baseline set to True, The anomaly behavior is then treated as baseline behavior. However, more severe occurrences of this behavior will still be reported as anomalies.", - "modules": [ - "service/cloudwatchlogs" - ] -} \ No newline at end of file diff --git a/.changelog/bc32758c5c424079963e1357287e9c89.json b/.changelog/bc32758c5c424079963e1357287e9c89.json deleted file mode 100644 index a28c5e83d35..00000000000 --- a/.changelog/bc32758c5c424079963e1357287e9c89.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "bc32758c-5c42-4079-963e-1357287e9c89", - "type": "feature", - "description": "Adding a new API GetStatementResultV2 that supports CSV formatted results from ExecuteStatement and BatchExecuteStatement calls.", - "modules": [ - "service/redshiftdata" - ] -} \ No newline at end of file diff --git a/.changelog/e36a67b15cc8407fa7d67c05c29f0320.json b/.changelog/e36a67b15cc8407fa7d67c05c29f0320.json deleted file mode 100644 index 9ad78263111..00000000000 --- a/.changelog/e36a67b15cc8407fa7d67c05c29f0320.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "e36a67b1-5cc8-407f-a7d6-7c05c29f0320", - "type": "feature", - "description": "This release adds the option for customers to configure analytics engine when creating a collaboration, and introduces the new SPARK analytics engine type in addition to maintaining the legacy CLEAN_ROOMS_SQL engine type.", - "modules": [ - "service/cleanrooms" - ] -} \ No newline at end of file diff --git a/.changelog/e4a01c5cafd64f3c8e82640add5968e8.json b/.changelog/e4a01c5cafd64f3c8e82640add5968e8.json deleted file mode 100644 index 33f5393d381..00000000000 --- a/.changelog/e4a01c5cafd64f3c8e82640add5968e8.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "e4a01c5c-afd6-4f3c-8e82-640add5968e8", - "type": "feature", - "description": "Update Application Inference Profile", - "modules": [ - "service/bedrock" - ] -} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d7d61994599..937f2e9908d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +# Release (2024-10-29) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/bedrock`: [v1.22.0](service/bedrock/CHANGELOG.md#v1220-2024-10-29) + * **Feature**: Update Application Inference Profile +* `github.com/aws/aws-sdk-go-v2/service/cleanrooms`: [v1.19.0](service/cleanrooms/CHANGELOG.md#v1190-2024-10-29) + * **Feature**: This release adds the option for customers to configure analytics engine when creating a collaboration, and introduces the new SPARK analytics engine type in addition to maintaining the legacy CLEAN_ROOMS_SQL engine type. +* `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs`: [v1.43.0](service/cloudwatchlogs/CHANGELOG.md#v1430-2024-10-29) + * **Feature**: Added support for new optional baseline parameter in the UpdateAnomaly API. For UpdateAnomaly requests with baseline set to True, The anomaly behavior is then treated as baseline behavior. However, more severe occurrences of this behavior will still be reported as anomalies. +* `github.com/aws/aws-sdk-go-v2/service/iotfleetwise`: [v1.21.0](service/iotfleetwise/CHANGELOG.md#v1210-2024-10-29) + * **Feature**: Updated BatchCreateVehicle and BatchUpdateVehicle APIs: LimitExceededException has been added and the maximum number of vehicles in a batch has been set to 10 explicitly +* `github.com/aws/aws-sdk-go-v2/service/redshiftdata`: [v1.31.0](service/redshiftdata/CHANGELOG.md#v1310-2024-10-29) + * **Feature**: Adding a new API GetStatementResultV2 that supports CSV formatted results from ExecuteStatement and BatchExecuteStatement calls. +* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.164.0](service/sagemaker/CHANGELOG.md#v11640-2024-10-29) + * **Feature**: Adding `notebook-al2-v3` as allowed value to SageMaker NotebookInstance PlatformIdentifier attribute + # Release (2024-10-28) ## General Highlights diff --git a/feature/dynamodbstreams/attributevalue/CHANGELOG.md b/feature/dynamodbstreams/attributevalue/CHANGELOG.md index 61d83796859..2ba3e00a04f 100644 --- a/feature/dynamodbstreams/attributevalue/CHANGELOG.md +++ b/feature/dynamodbstreams/attributevalue/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.14.45 (2024-10-29) + +* No change notes available for this release. + # v1.14.44 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/feature/dynamodbstreams/attributevalue/go_module_metadata.go b/feature/dynamodbstreams/attributevalue/go_module_metadata.go index 04358c081d7..d2c5ca8ee08 100644 --- a/feature/dynamodbstreams/attributevalue/go_module_metadata.go +++ b/feature/dynamodbstreams/attributevalue/go_module_metadata.go @@ -3,4 +3,4 @@ package attributevalue // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.15.13" +const goModuleVersion = "1.14.45" diff --git a/service/bedrock/CHANGELOG.md b/service/bedrock/CHANGELOG.md index 1822b6ba2fb..4f9c2ed68be 100644 --- a/service/bedrock/CHANGELOG.md +++ b/service/bedrock/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.22.0 (2024-10-29) + +* **Feature**: Update Application Inference Profile + # v1.21.2 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/bedrock/go_module_metadata.go b/service/bedrock/go_module_metadata.go index 05b33d30bf1..530cd55b801 100644 --- a/service/bedrock/go_module_metadata.go +++ b/service/bedrock/go_module_metadata.go @@ -3,4 +3,4 @@ package bedrock // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.21.2" +const goModuleVersion = "1.22.0" diff --git a/service/cleanrooms/CHANGELOG.md b/service/cleanrooms/CHANGELOG.md index d53a21b73cb..18342759fed 100644 --- a/service/cleanrooms/CHANGELOG.md +++ b/service/cleanrooms/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.19.0 (2024-10-29) + +* **Feature**: This release adds the option for customers to configure analytics engine when creating a collaboration, and introduces the new SPARK analytics engine type in addition to maintaining the legacy CLEAN_ROOMS_SQL engine type. + # v1.18.3 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/cleanrooms/go_module_metadata.go b/service/cleanrooms/go_module_metadata.go index b0099c0b74d..3add6265e4b 100644 --- a/service/cleanrooms/go_module_metadata.go +++ b/service/cleanrooms/go_module_metadata.go @@ -3,4 +3,4 @@ package cleanrooms // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.18.3" +const goModuleVersion = "1.19.0" diff --git a/service/cloudwatchlogs/CHANGELOG.md b/service/cloudwatchlogs/CHANGELOG.md index 1d8dcab15c2..0cf7a16bddf 100644 --- a/service/cloudwatchlogs/CHANGELOG.md +++ b/service/cloudwatchlogs/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.43.0 (2024-10-29) + +* **Feature**: Added support for new optional baseline parameter in the UpdateAnomaly API. For UpdateAnomaly requests with baseline set to True, The anomaly behavior is then treated as baseline behavior. However, more severe occurrences of this behavior will still be reported as anomalies. + # v1.42.1 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/cloudwatchlogs/go_module_metadata.go b/service/cloudwatchlogs/go_module_metadata.go index ac39126d606..ae08b828d24 100644 --- a/service/cloudwatchlogs/go_module_metadata.go +++ b/service/cloudwatchlogs/go_module_metadata.go @@ -3,4 +3,4 @@ package cloudwatchlogs // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.42.1" +const goModuleVersion = "1.43.0" diff --git a/service/iotfleetwise/CHANGELOG.md b/service/iotfleetwise/CHANGELOG.md index 6f98a643217..f3857c239ec 100644 --- a/service/iotfleetwise/CHANGELOG.md +++ b/service/iotfleetwise/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.21.0 (2024-10-29) + +* **Feature**: Updated BatchCreateVehicle and BatchUpdateVehicle APIs: LimitExceededException has been added and the maximum number of vehicles in a batch has been set to 10 explicitly + # v1.20.1 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/iotfleetwise/go_module_metadata.go b/service/iotfleetwise/go_module_metadata.go index 5f2df03e7da..d2489921cb0 100644 --- a/service/iotfleetwise/go_module_metadata.go +++ b/service/iotfleetwise/go_module_metadata.go @@ -3,4 +3,4 @@ package iotfleetwise // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.20.1" +const goModuleVersion = "1.21.0" diff --git a/service/redshiftdata/CHANGELOG.md b/service/redshiftdata/CHANGELOG.md index 8aa4815d06b..9e71050a46a 100644 --- a/service/redshiftdata/CHANGELOG.md +++ b/service/redshiftdata/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.31.0 (2024-10-29) + +* **Feature**: Adding a new API GetStatementResultV2 that supports CSV formatted results from ExecuteStatement and BatchExecuteStatement calls. + # v1.30.3 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/redshiftdata/go_module_metadata.go b/service/redshiftdata/go_module_metadata.go index f8775c00cf8..cf122d2fb62 100644 --- a/service/redshiftdata/go_module_metadata.go +++ b/service/redshiftdata/go_module_metadata.go @@ -3,4 +3,4 @@ package redshiftdata // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.30.3" +const goModuleVersion = "1.31.0" diff --git a/service/sagemaker/CHANGELOG.md b/service/sagemaker/CHANGELOG.md index c1f2a12eccd..2d3a6fa4fd0 100644 --- a/service/sagemaker/CHANGELOG.md +++ b/service/sagemaker/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.164.0 (2024-10-29) + +* **Feature**: Adding `notebook-al2-v3` as allowed value to SageMaker NotebookInstance PlatformIdentifier attribute + # v1.163.3 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/sagemaker/go_module_metadata.go b/service/sagemaker/go_module_metadata.go index 0866948963c..023a48008a1 100644 --- a/service/sagemaker/go_module_metadata.go +++ b/service/sagemaker/go_module_metadata.go @@ -3,4 +3,4 @@ package sagemaker // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.163.3" +const goModuleVersion = "1.164.0" diff --git a/service/textract/CHANGELOG.md b/service/textract/CHANGELOG.md index 47f8d3ccc95..82b851798a2 100644 --- a/service/textract/CHANGELOG.md +++ b/service/textract/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.34.4 (2024-10-29) + +* No change notes available for this release. + # v1.34.3 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/textract/go_module_metadata.go b/service/textract/go_module_metadata.go index d305b7352b4..cc08bc3bdbe 100644 --- a/service/textract/go_module_metadata.go +++ b/service/textract/go_module_metadata.go @@ -3,4 +3,4 @@ package textract // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.34.3" +const goModuleVersion = "1.34.4" From 22e0bf1b515ed98a6d5e004a44fe56d087427130 Mon Sep 17 00:00:00 2001 From: Luc Talatinian <102624213+lucix-aws@users.noreply.github.com> Date: Wed, 30 Oct 2024 13:31:24 -0400 Subject: [PATCH 5/9] Update PULL_REQUEST_TEMPLATE.md --- .github/PULL_REQUEST_TEMPLATE.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 3f818468b2f..dc9ec69cf05 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,18 @@ -For changes to files under the `/codegen/aws-models` folder, and manual edits to autogenerated code (e.g. `/service/s3/api.go`) please create an Issue instead of a PR for those type of changes. +# **PLEASE READ BEFORE CONTINUING** + +Do not submit pull requests that directly modify generated source files, e.g. `/service/s3/api_client.go`. Generated source files will always include an identifying header: + +``` +// Code generated by smithy-go-codegen DO NOT EDIT. +``` + +Manual changes to these files will be overwritten by code generation that occurs as part of the daily SDK release process. + +Do not submit pull requests that directly modify files in the `/codegen/aws-models` folder. These are API model files, owned by each AWS service team, that are updated automatically as part of the daily SDK release process. Local changes to these files will not persist. + +If you believe the contents of any of these files need to be changed, please [open an issue](https://github.com/aws/aws-sdk-go-v2/issues/new/choose). + +# If the PR addresses an existing bug or feature, please reference it here. From c94ed0867319b8f9a3f8ce3625d4f1130ef8be13 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Wed, 30 Oct 2024 18:10:26 +0000 Subject: [PATCH 6/9] Update API model --- codegen/sdk-codegen/aws-models/appsync.json | 1658 ++- codegen/sdk-codegen/aws-models/connect.json | 10 +- codegen/sdk-codegen/aws-models/datasync.json | 256 +- codegen/sdk-codegen/aws-models/ec2.json | 483 +- codegen/sdk-codegen/aws-models/ecs.json | 858 +- codegen/sdk-codegen/aws-models/geo-maps.json | 2181 +++ .../sdk-codegen/aws-models/geo-places.json | 5840 ++++++++ .../sdk-codegen/aws-models/geo-routes.json | 11353 ++++++++++++++++ codegen/sdk-codegen/aws-models/keyspaces.json | 477 +- .../aws-models/network-firewall.json | 25 +- .../sdk-codegen/aws-models/opensearch.json | 1102 +- .../aws-models/opensearchserverless.json | 173 + .../aws-models/redshift-serverless.json | 57 + codegen/sdk-codegen/aws-models/redshift.json | 60 +- codegen/sdk-codegen/aws-models/route-53.json | 40 +- codegen/sdk-codegen/aws-models/sagemaker.json | 118 +- codegen/sdk-codegen/aws-models/workmail.json | 931 +- 17 files changed, 25122 insertions(+), 500 deletions(-) create mode 100644 codegen/sdk-codegen/aws-models/geo-maps.json create mode 100644 codegen/sdk-codegen/aws-models/geo-places.json create mode 100644 codegen/sdk-codegen/aws-models/geo-routes.json diff --git a/codegen/sdk-codegen/aws-models/appsync.json b/codegen/sdk-codegen/aws-models/appsync.json index eba63524f88..67302678221 100644 --- a/codegen/sdk-codegen/aws-models/appsync.json +++ b/codegen/sdk-codegen/aws-models/appsync.json @@ -42,12 +42,18 @@ { "target": "com.amazonaws.appsync#AssociateSourceGraphqlApi" }, + { + "target": "com.amazonaws.appsync#CreateApi" + }, { "target": "com.amazonaws.appsync#CreateApiCache" }, { "target": "com.amazonaws.appsync#CreateApiKey" }, + { + "target": "com.amazonaws.appsync#CreateChannelNamespace" + }, { "target": "com.amazonaws.appsync#CreateDataSource" }, @@ -66,12 +72,18 @@ { "target": "com.amazonaws.appsync#CreateType" }, + { + "target": "com.amazonaws.appsync#DeleteApi" + }, { "target": "com.amazonaws.appsync#DeleteApiCache" }, { "target": "com.amazonaws.appsync#DeleteApiKey" }, + { + "target": "com.amazonaws.appsync#DeleteChannelNamespace" + }, { "target": "com.amazonaws.appsync#DeleteDataSource" }, @@ -108,12 +120,18 @@ { "target": "com.amazonaws.appsync#FlushApiCache" }, + { + "target": "com.amazonaws.appsync#GetApi" + }, { "target": "com.amazonaws.appsync#GetApiAssociation" }, { "target": "com.amazonaws.appsync#GetApiCache" }, + { + "target": "com.amazonaws.appsync#GetChannelNamespace" + }, { "target": "com.amazonaws.appsync#GetDataSource" }, @@ -150,6 +168,12 @@ { "target": "com.amazonaws.appsync#ListApiKeys" }, + { + "target": "com.amazonaws.appsync#ListApis" + }, + { + "target": "com.amazonaws.appsync#ListChannelNamespaces" + }, { "target": "com.amazonaws.appsync#ListDataSources" }, @@ -198,12 +222,18 @@ { "target": "com.amazonaws.appsync#UntagResource" }, + { + "target": "com.amazonaws.appsync#UpdateApi" + }, { "target": "com.amazonaws.appsync#UpdateApiCache" }, { "target": "com.amazonaws.appsync#UpdateApiKey" }, + { + "target": "com.amazonaws.appsync#UpdateChannelNamespace" + }, { "target": "com.amazonaws.appsync#UpdateDataSource" }, @@ -238,7 +268,7 @@ "name": "appsync" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

AppSync provides API actions for creating and interacting with data sources using GraphQL\n from your application.

", + "smithy.api#documentation": "

AppSync provides API actions for creating and interacting with data\n sources using GraphQL from your application.

", "smithy.api#title": "AWS AppSync", "smithy.api#xmlNamespace": { "uri": "http://appsync.amazonaws.com" @@ -1152,7 +1182,7 @@ "authenticationType": { "target": "com.amazonaws.appsync#AuthenticationType", "traits": { - "smithy.api#documentation": "

The authentication type: API key, Identity and Access Management (IAM), OpenID Connect (OIDC),\n Amazon Cognito user pools, or Lambda.

" + "smithy.api#documentation": "

The authentication type: API key, Identity and Access Management (IAM), OpenID\n Connect (OIDC), Amazon Cognito user pools, or Lambda.

" } }, "openIDConnectConfig": { @@ -1184,6 +1214,72 @@ "target": "com.amazonaws.appsync#AdditionalAuthenticationProvider" } }, + "com.amazonaws.appsync#Api": { + "type": "structure", + "members": { + "apiId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Api ID.

" + } + }, + "name": { + "target": "com.amazonaws.appsync#ApiName", + "traits": { + "smithy.api#documentation": "

The name of the Api.

" + } + }, + "ownerContact": { + "target": "com.amazonaws.appsync#OwnerContact", + "traits": { + "smithy.api#documentation": "

The owner contact information for the Api\n

" + } + }, + "tags": { + "target": "com.amazonaws.appsync#TagMap" + }, + "dns": { + "target": "com.amazonaws.appsync#MapOfStringToString", + "traits": { + "smithy.api#documentation": "

The DNS records for the API. This will include an HTTP and a real-time endpoint.

" + } + }, + "apiArn": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for the Api.

" + } + }, + "created": { + "target": "com.amazonaws.appsync#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time that the Api was created.

" + } + }, + "xrayEnabled": { + "target": "com.amazonaws.appsync#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

A flag indicating whether to use X-Ray tracing for this\n Api.

" + } + }, + "wafWebAclArn": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the WAF web access control list (web\n ACL) associated with this Api, if one exists.

" + } + }, + "eventConfig": { + "target": "com.amazonaws.appsync#EventConfig", + "traits": { + "smithy.api#documentation": "

The Event API configuration. This includes the default authorization configuration for\n connecting, publishing, and subscribing to an Event API.

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

Describes an AppSync API. You can use Api for an AppSync\n API with your preferred configuration, such as an Event API that provides real-time message\n publishing and message subscriptions over WebSockets.

" + } + }, "com.amazonaws.appsync#ApiAssociation": { "type": "structure", "members": { @@ -1202,7 +1298,7 @@ "associationStatus": { "target": "com.amazonaws.appsync#AssociationStatus", "traits": { - "smithy.api#documentation": "

Identifies the status of an association.

\n
    \n
  • \n

    \n PROCESSING: The API association is being created. You cannot\n modify association requests during processing.

    \n
  • \n
  • \n

    \n SUCCESS: The API association was successful. You can modify\n associations after success.

    \n
  • \n
  • \n

    \n FAILED: The API association has failed. You can modify\n associations after failure.

    \n
  • \n
" + "smithy.api#documentation": "

Identifies the status of an association.

\n
    \n
  • \n

    \n PROCESSING: The API association is being\n created. You cannot modify association requests during processing.

    \n
  • \n
  • \n

    \n SUCCESS: The API association was successful.\n You can modify associations after success.

    \n
  • \n
  • \n

    \n FAILED: The API association has failed. You\n can modify associations after failure.

    \n
  • \n
" } }, "deploymentDetail": { @@ -1229,14 +1325,14 @@ "apiCachingBehavior": { "target": "com.amazonaws.appsync#ApiCachingBehavior", "traits": { - "smithy.api#documentation": "

Caching behavior.

\n
    \n
  • \n

    \n FULL_REQUEST_CACHING: All requests are fully cached.

    \n
  • \n
  • \n

    \n PER_RESOLVER_CACHING: Individual resolvers that you specify are\n cached.

    \n
  • \n
" + "smithy.api#documentation": "

Caching behavior.

\n
    \n
  • \n

    \n FULL_REQUEST_CACHING: All requests are fully\n cached.

    \n
  • \n
  • \n

    \n PER_RESOLVER_CACHING: Individual resolvers\n that you specify are cached.

    \n
  • \n
" } }, "transitEncryptionEnabled": { "target": "com.amazonaws.appsync#Boolean", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Transit encryption flag when connecting to cache. You cannot update this setting after creation.

" + "smithy.api#documentation": "

Transit encryption flag when connecting to cache. You cannot update this setting after\n creation.

" } }, "atRestEncryptionEnabled": { @@ -1255,13 +1351,13 @@ "status": { "target": "com.amazonaws.appsync#ApiCacheStatus", "traits": { - "smithy.api#documentation": "

The cache instance status.

\n
    \n
  • \n

    \n AVAILABLE: The instance is available for use.

    \n
  • \n
  • \n

    \n CREATING: The instance is currently creating.

    \n
  • \n
  • \n

    \n DELETING: The instance is currently deleting.

    \n
  • \n
  • \n

    \n MODIFYING: The instance is currently modifying.

    \n
  • \n
  • \n

    \n FAILED: The instance has failed creation.

    \n
  • \n
" + "smithy.api#documentation": "

The cache instance status.

\n
    \n
  • \n

    \n AVAILABLE: The instance is available for\n use.

    \n
  • \n
  • \n

    \n CREATING: The instance is currently\n creating.

    \n
  • \n
  • \n

    \n DELETING: The instance is currently\n deleting.

    \n
  • \n
  • \n

    \n MODIFYING: The instance is currently\n modifying.

    \n
  • \n
  • \n

    \n FAILED: The instance has failed\n creation.

    \n
  • \n
" } }, "healthMetricsConfig": { "target": "com.amazonaws.appsync#CacheHealthMetricsConfig", "traits": { - "smithy.api#documentation": "

Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include:

\n
    \n
  • \n

    NetworkBandwidthOutAllowanceExceeded: The network packets dropped because the throughput exceeded\n the aggregated bandwidth limit. This is useful for diagnosing bottlenecks in a cache\n configuration.

    \n
  • \n
  • \n

    EngineCPUUtilization: The CPU utilization (percentage) allocated to the Redis process. This is\n useful for diagnosing bottlenecks in a cache configuration.

    \n
  • \n
\n

Metrics will be recorded by API ID. You can set the value to ENABLED or\n DISABLED.

" + "smithy.api#documentation": "

Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics\n include:

\n
    \n
  • \n

    NetworkBandwidthOutAllowanceExceeded: The network packets dropped because the\n throughput exceeded the aggregated bandwidth limit. This is useful for diagnosing\n bottlenecks in a cache configuration.

    \n
  • \n
  • \n

    EngineCPUUtilization: The CPU utilization (percentage) allocated to the Redis\n process. This is useful for diagnosing bottlenecks in a cache\n configuration.

    \n
  • \n
\n

Metrics will be recorded by API ID. You can set the value to ENABLED or\n DISABLED.

" } } }, @@ -1435,19 +1531,19 @@ "target": "com.amazonaws.appsync#Long", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The time after which the API key expires. The date is represented as seconds since the epoch, rounded down\n to the nearest hour.

" + "smithy.api#documentation": "

The time after which the API key expires. The date is represented as seconds since the\n epoch, rounded down to the nearest hour.

" } }, "deletes": { "target": "com.amazonaws.appsync#Long", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The time after which the API key is deleted. The date is represented as seconds since the epoch, rounded\n down to the nearest hour.

" + "smithy.api#documentation": "

The time after which the API key is deleted. The date is represented as seconds since\n the epoch, rounded down to the nearest hour.

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

Describes an API key.

\n

Customers invoke AppSync GraphQL API operations with API keys as an identity mechanism.\n There are two key versions:

\n

\n da1: We introduced this version at launch in November 2017. These keys\n always expire after 7 days. Amazon DynamoDB TTL manages key expiration. These keys ceased to be valid\n after February 21, 2018, and they should no longer be used.

\n
    \n
  • \n

    \n ListApiKeys returns the expiration time in milliseconds.

    \n
  • \n
  • \n

    \n CreateApiKey returns the expiration time in milliseconds.

    \n
  • \n
  • \n

    \n UpdateApiKey is not available for this key version.

    \n
  • \n
  • \n

    \n DeleteApiKey deletes the item from the table.

    \n
  • \n
  • \n

    Expiration is stored in DynamoDB as milliseconds. This results in a bug where keys are\n not automatically deleted because DynamoDB expects the TTL to be stored in seconds. As a\n one-time action, we deleted these keys from the table on February 21, 2018.

    \n
  • \n
\n

\n da2: We introduced this version in February 2018 when AppSync added support to extend key expiration.

\n
    \n
  • \n

    \n ListApiKeys returns the expiration time and deletion time in seconds.

    \n
  • \n
  • \n

    \n CreateApiKey returns the expiration time and deletion time in seconds and accepts a\n user-provided expiration time in seconds.

    \n
  • \n
  • \n

    \n UpdateApiKey returns the expiration time and and deletion time in seconds and accepts\n a user-provided expiration time in seconds. Expired API keys are kept for 60 days after the expiration\n time. You can update the key expiration time as long as the key isn't deleted.

    \n
  • \n
  • \n

    \n DeleteApiKey deletes the item from the table.

    \n
  • \n
  • \n

    Expiration is stored in DynamoDB as seconds. After the expiration time, using the key to\n authenticate will fail. However, you can reinstate the key before deletion.

    \n
  • \n
  • \n

    Deletion is stored in DynamoDB as seconds. The key is deleted after deletion\n time.

    \n
  • \n
" + "smithy.api#documentation": "

Describes an API key.

\n

Customers invoke AppSync GraphQL API operations with API keys as an\n identity mechanism. There are two key versions:

\n

\n da1: We introduced this version at launch in November\n 2017. These keys always expire after 7 days. Amazon DynamoDB TTL manages key\n expiration. These keys ceased to be valid after February 21, 2018, and they should no\n longer be used.

\n
    \n
  • \n

    \n ListApiKeys returns the expiration time in milliseconds.

    \n
  • \n
  • \n

    \n CreateApiKey returns the expiration time in\n milliseconds.

    \n
  • \n
  • \n

    \n UpdateApiKey is not available for this key version.

    \n
  • \n
  • \n

    \n DeleteApiKey deletes the item from the table.

    \n
  • \n
  • \n

    Expiration is stored in DynamoDB as milliseconds. This results in a\n bug where keys are not automatically deleted because DynamoDB expects the\n TTL to be stored in seconds. As a one-time action, we deleted these keys from the\n table on February 21, 2018.

    \n
  • \n
\n

\n da2: We introduced this version in February 2018 when\n AppSync added support to extend key expiration.

\n
    \n
  • \n

    \n ListApiKeys returns the expiration time and deletion time in\n seconds.

    \n
  • \n
  • \n

    \n CreateApiKey returns the expiration time and deletion time in\n seconds and accepts a user-provided expiration time in seconds.

    \n
  • \n
  • \n

    \n UpdateApiKey returns the expiration time and and deletion time in\n seconds and accepts a user-provided expiration time in seconds. Expired API keys are\n kept for 60 days after the expiration time. You can update the key expiration time as\n long as the key isn't deleted.

    \n
  • \n
  • \n

    \n DeleteApiKey deletes the item from the table.

    \n
  • \n
  • \n

    Expiration is stored in DynamoDB as seconds. After the expiration\n time, using the key to authenticate will fail. However, you can reinstate the key\n before deletion.

    \n
  • \n
  • \n

    Deletion is stored in DynamoDB as seconds. The key is deleted after\n deletion time.

    \n
  • \n
" } }, "com.amazonaws.appsync#ApiKeyLimitExceededException": { @@ -1495,26 +1591,42 @@ "smithy.api#httpError": 400 } }, + "com.amazonaws.appsync#ApiName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + }, + "smithy.api#pattern": "^[A-Za-z0-9_\\-\\ ]+$" + } + }, + "com.amazonaws.appsync#Apis": { + "type": "list", + "member": { + "target": "com.amazonaws.appsync#Api" + } + }, "com.amazonaws.appsync#AppSyncRuntime": { "type": "structure", "members": { "name": { "target": "com.amazonaws.appsync#RuntimeName", "traits": { - "smithy.api#documentation": "

The name of the runtime to use. Currently, the only allowed value is\n APPSYNC_JS.

", + "smithy.api#documentation": "

The name of the runtime to use. Currently, the only allowed value is\n APPSYNC_JS.

", "smithy.api#required": {} } }, "runtimeVersion": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The version of the runtime to use. Currently, the only allowed version is\n 1.0.0.

", + "smithy.api#documentation": "

The version of the runtime to use. Currently, the only allowed version is\n 1.0.0.

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

Describes a runtime used by an Amazon Web Services AppSync pipeline resolver or Amazon Web Services AppSync\n function. Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must\n also be specified.

" + "smithy.api#documentation": "

Describes a runtime used by an Amazon Web Services AppSync pipeline resolver or Amazon Web Services AppSync function. Specifies the name and version of the runtime to use. Note\n that if a runtime is specified, code must also be specified.

" } }, "com.amazonaws.appsync#AssociateApi": { @@ -1614,7 +1726,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an association between a Merged API and source API using the source API's identifier.

", + "smithy.api#documentation": "

Creates an association between a Merged API and source API using the source API's\n identifier.

", "smithy.api#http": { "method": "POST", "uri": "/v1/sourceApis/{sourceApiIdentifier}/mergedApiAssociations", @@ -1628,7 +1740,7 @@ "sourceApiIdentifier": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The identifier of the AppSync Source API. This is generated by the AppSync service. In most cases, source\n APIs (especially in your account) only require the API ID value or ARN of the source API. However, source APIs\n from other accounts (cross-account use cases) strictly require the full resource ARN of the source API.

", + "smithy.api#documentation": "

The identifier of the AppSync Source API. This is generated by the AppSync service. In\n most cases, source APIs (especially in your account) only require the API ID value or ARN\n of the source API. However, source APIs from other accounts (cross-account use cases)\n strictly require the full resource ARN of the source API.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1636,7 +1748,7 @@ "mergedApiIdentifier": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged\n APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs\n in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

", + "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In\n most cases, Merged APIs (especially in your account) only require the API ID value or ARN\n of the merged API. However, Merged APIs in other accounts (cross-account use cases)\n strictly require the full resource ARN of the merged API.

", "smithy.api#required": {} } }, @@ -1700,7 +1812,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an association between a Merged API and source API using the Merged API's identifier.

", + "smithy.api#documentation": "

Creates an association between a Merged API and source API using the Merged API's\n identifier.

", "smithy.api#http": { "method": "POST", "uri": "/v1/mergedApis/{mergedApiIdentifier}/sourceApiAssociations", @@ -1714,7 +1826,7 @@ "mergedApiIdentifier": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged\n APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs\n in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

", + "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In\n most cases, Merged APIs (especially in your account) only require the API ID value or ARN\n of the merged API. However, Merged APIs in other accounts (cross-account use cases)\n strictly require the full resource ARN of the merged API.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1722,7 +1834,7 @@ "sourceApiIdentifier": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The identifier of the AppSync Source API. This is generated by the AppSync service. In most cases, source\n APIs (especially in your account) only require the API ID value or ARN of the source API. However, source APIs\n from other accounts (cross-account use cases) strictly require the full resource ARN of the source API.

", + "smithy.api#documentation": "

The identifier of the AppSync Source API. This is generated by the AppSync service. In\n most cases, source APIs (especially in your account) only require the API ID value or ARN\n of the source API. However, source APIs from other accounts (cross-account use cases)\n strictly require the full resource ARN of the source API.

", "smithy.api#required": {} } }, @@ -1780,6 +1892,60 @@ } } }, + "com.amazonaws.appsync#AuthMode": { + "type": "structure", + "members": { + "authType": { + "target": "com.amazonaws.appsync#AuthenticationType", + "traits": { + "smithy.api#documentation": "

The authorization type.

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

Describes an authorization configuration. Use AuthMode to specify the\n publishing and subscription authorization configuration for an Event API.

" + } + }, + "com.amazonaws.appsync#AuthModes": { + "type": "list", + "member": { + "target": "com.amazonaws.appsync#AuthMode" + } + }, + "com.amazonaws.appsync#AuthProvider": { + "type": "structure", + "members": { + "authType": { + "target": "com.amazonaws.appsync#AuthenticationType", + "traits": { + "smithy.api#documentation": "

The authorization type.

", + "smithy.api#required": {} + } + }, + "cognitoConfig": { + "target": "com.amazonaws.appsync#CognitoConfig", + "traits": { + "smithy.api#documentation": "

Describes an Amazon Cognito user pool configuration.

" + } + }, + "openIDConnectConfig": { + "target": "com.amazonaws.appsync#OpenIDConnectConfig" + }, + "lambdaAuthorizerConfig": { + "target": "com.amazonaws.appsync#LambdaAuthorizerConfig" + } + }, + "traits": { + "smithy.api#documentation": "

Describes an authorization provider.

" + } + }, + "com.amazonaws.appsync#AuthProviders": { + "type": "list", + "member": { + "target": "com.amazonaws.appsync#AuthProvider" + } + }, "com.amazonaws.appsync#AuthenticationType": { "type": "enum", "members": { @@ -1821,7 +1987,7 @@ "authorizationType": { "target": "com.amazonaws.appsync#AuthorizationType", "traits": { - "smithy.api#documentation": "

The authorization type that the HTTP endpoint requires.

\n
    \n
  • \n

    \n AWS_IAM: The authorization type is Signature Version 4\n (SigV4).

    \n
  • \n
", + "smithy.api#documentation": "

The authorization type that the HTTP endpoint requires.

\n
    \n
  • \n

    \n AWS_IAM: The authorization type is Signature\n Version 4 (SigV4).

    \n
  • \n
", "smithy.api#required": {} } }, @@ -1878,7 +2044,7 @@ } }, "traits": { - "smithy.api#documentation": "

Provides further details for the reason behind the bad request. For reason type CODE_ERROR, the\n detail will contain a list of code errors.

" + "smithy.api#documentation": "

Provides further details for the reason behind the bad request. For reason type\n CODE_ERROR, the detail will contain a list of code errors.

" } }, "com.amazonaws.appsync#BadRequestException": { @@ -1895,7 +2061,7 @@ } }, "traits": { - "smithy.api#documentation": "

The request is not well formed. For example, a value is invalid or a required field is missing. Check the\n field values, and then try again.

", + "smithy.api#documentation": "

The request is not well formed. For example, a value is invalid or a required field is\n missing. Check the field values, and then try again.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -1911,7 +2077,7 @@ } }, "traits": { - "smithy.api#documentation": "

Provides context for the cause of the bad request. The only supported value is\n CODE_ERROR.

" + "smithy.api#documentation": "

Provides context for the cause of the bad request. The only supported value is\n CODE_ERROR.

" } }, "com.amazonaws.appsync#Blob": { @@ -1957,7 +2123,7 @@ "cachingKeys": { "target": "com.amazonaws.appsync#CachingKeys", "traits": { - "smithy.api#documentation": "

The caching keys for a resolver that has caching activated.

\n

Valid values are entries from the $context.arguments, $context.source, and\n $context.identity maps.

" + "smithy.api#documentation": "

The caching keys for a resolver that has caching activated.

\n

Valid values are entries from the $context.arguments,\n $context.source, and $context.identity maps.

" } } }, @@ -1981,6 +2147,71 @@ "smithy.api#pattern": "^arn:[a-z-]*:(acm|iam):[a-z0-9-]*:\\d{12}:(certificate|server-certificate)/[0-9A-Za-z_/-]*$" } }, + "com.amazonaws.appsync#ChannelNamespace": { + "type": "structure", + "members": { + "apiId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Api ID.

" + } + }, + "name": { + "target": "com.amazonaws.appsync#Namespace", + "traits": { + "smithy.api#documentation": "

The name of the channel namespace. This name must be unique within the\n Api.

" + } + }, + "subscribeAuthModes": { + "target": "com.amazonaws.appsync#AuthModes", + "traits": { + "smithy.api#documentation": "

The authorization mode to use for subscribing to messages on the channel namespace. This\n configuration overrides the default Apiauthorization configuration.

" + } + }, + "publishAuthModes": { + "target": "com.amazonaws.appsync#AuthModes", + "traits": { + "smithy.api#documentation": "

The authorization mode to use for publishing messages on the channel namespace. This\n configuration overrides the default Apiauthorization configuration.

" + } + }, + "codeHandlers": { + "target": "com.amazonaws.appsync#Code", + "traits": { + "smithy.api#documentation": "

The event handler functions that run custom business logic to process published events\n and subscribe requests.

" + } + }, + "tags": { + "target": "com.amazonaws.appsync#TagMap" + }, + "channelNamespaceArn": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for the ChannelNamespace.

" + } + }, + "created": { + "target": "com.amazonaws.appsync#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time that the ChannelNamespace was created.

" + } + }, + "lastModified": { + "target": "com.amazonaws.appsync#Timestamp", + "traits": { + "smithy.api#documentation": "

The date and time that the ChannelNamespace was last changed.

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

Describes a channel namespace associated with an Api. The ChannelNamespace contains the definitions for code handlers for the Api.

" + } + }, + "com.amazonaws.appsync#ChannelNamespaces": { + "type": "list", + "member": { + "target": "com.amazonaws.appsync#ChannelNamespace" + } + }, "com.amazonaws.appsync#Code": { "type": "string", "traits": { @@ -1996,13 +2227,13 @@ "errorType": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The type of code error.

\n

Examples include, but aren't limited to: LINT_ERROR, PARSER_ERROR.

" + "smithy.api#documentation": "

The type of code error.

\n

Examples include, but aren't limited to: LINT_ERROR,\n PARSER_ERROR.

" } }, "value": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

A user presentable error.

\n

Examples include, but aren't limited to: Parsing error: Unterminated string literal.

" + "smithy.api#documentation": "

A user presentable error.

\n

Examples include, but aren't limited to: Parsing error: Unterminated string\n literal.

" } }, "location": { @@ -2069,6 +2300,34 @@ "target": "com.amazonaws.appsync#CodeError" } }, + "com.amazonaws.appsync#CognitoConfig": { + "type": "structure", + "members": { + "userPoolId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The user pool ID.

", + "smithy.api#required": {} + } + }, + "awsRegion": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services Region in which the user pool was created.

", + "smithy.api#required": {} + } + }, + "appIdClientRegex": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

A regular expression for validating the incoming Amazon Cognito user pool app client\n ID. If this value isn't set, no filtering is applied.

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

Describes an Amazon Cognito configuration.

" + } + }, "com.amazonaws.appsync#CognitoUserPoolConfig": { "type": "structure", "members": { @@ -2089,7 +2348,7 @@ "appIdClientRegex": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

A regular expression for validating the incoming Amazon Cognito user pool app client ID. If this value\n isn't set, no filtering is applied.

" + "smithy.api#documentation": "

A regular expression for validating the incoming Amazon Cognito user pool app client\n ID. If this value isn't set, no filtering is applied.

" } } }, @@ -2105,7 +2364,7 @@ } }, "traits": { - "smithy.api#documentation": "

Another modification is in progress at this time and it must complete before you can make your\n change.

", + "smithy.api#documentation": "

Another modification is in progress at this time and it must complete before you can\n make your change.

", "smithy.api#error": "client", "smithy.api#httpError": 409 } @@ -2127,6 +2386,19 @@ } } }, + "com.amazonaws.appsync#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.appsync#String" + } + }, + "traits": { + "smithy.api#documentation": "

A conflict with a previous successful update is detected. This typically\n occurs when the previous update did not have time to propagate before the next update was\n made. A retry (with appropriate backoff logic) is the recommended response to this\n exception.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, "com.amazonaws.appsync#ConflictHandlerType": { "type": "enum", "members": { @@ -2166,6 +2438,40 @@ "smithy.api#pattern": "^[\\s\\S]*$" } }, + "com.amazonaws.appsync#CreateApi": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#CreateApiRequest" + }, + "output": { + "target": "com.amazonaws.appsync#CreateApiResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#BadRequestException" + }, + { + "target": "com.amazonaws.appsync#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates an Api object. Use this operation to create an AppSync\n API with your preferred configuration, such as an Event API that provides real-time message\n publishing and message subscriptions over WebSockets.

", + "smithy.api#http": { + "method": "POST", + "uri": "/v2/apis", + "code": 200 + } + } + }, "com.amazonaws.appsync#CreateApiCache": { "type": "operation", "input": { @@ -2223,7 +2529,7 @@ "target": "com.amazonaws.appsync#Boolean", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Transit encryption flag when connecting to cache. You cannot update this setting after creation.

" + "smithy.api#documentation": "

Transit encryption flag when connecting to cache. You cannot update this setting after\n creation.

" } }, "atRestEncryptionEnabled": { @@ -2236,7 +2542,7 @@ "apiCachingBehavior": { "target": "com.amazonaws.appsync#ApiCachingBehavior", "traits": { - "smithy.api#documentation": "

Caching behavior.

\n
    \n
  • \n

    \n FULL_REQUEST_CACHING: All requests are fully cached.

    \n
  • \n
  • \n

    \n PER_RESOLVER_CACHING: Individual resolvers that you specify are\n cached.

    \n
  • \n
", + "smithy.api#documentation": "

Caching behavior.

\n
    \n
  • \n

    \n FULL_REQUEST_CACHING: All requests are fully\n cached.

    \n
  • \n
  • \n

    \n PER_RESOLVER_CACHING: Individual resolvers\n that you specify are cached.

    \n
  • \n
", "smithy.api#required": {} } }, @@ -2250,7 +2556,7 @@ "healthMetricsConfig": { "target": "com.amazonaws.appsync#CacheHealthMetricsConfig", "traits": { - "smithy.api#documentation": "

Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include:

\n
    \n
  • \n

    NetworkBandwidthOutAllowanceExceeded: The network packets dropped because the throughput exceeded\n the aggregated bandwidth limit. This is useful for diagnosing bottlenecks in a cache\n configuration.

    \n
  • \n
  • \n

    EngineCPUUtilization: The CPU utilization (percentage) allocated to the Redis process. This is\n useful for diagnosing bottlenecks in a cache configuration.

    \n
  • \n
\n

Metrics will be recorded by API ID. You can set the value to ENABLED or\n DISABLED.

" + "smithy.api#documentation": "

Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics\n include:

\n
    \n
  • \n

    NetworkBandwidthOutAllowanceExceeded: The network packets dropped because the\n throughput exceeded the aggregated bandwidth limit. This is useful for diagnosing\n bottlenecks in a cache configuration.

    \n
  • \n
  • \n

    EngineCPUUtilization: The CPU utilization (percentage) allocated to the Redis\n process. This is useful for diagnosing bottlenecks in a cache\n configuration.

    \n
  • \n
\n

Metrics will be recorded by API ID. You can set the value to ENABLED or\n DISABLED.

" } } }, @@ -2335,7 +2641,7 @@ "target": "com.amazonaws.appsync#Long", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

From the creation time, the time after which the API key expires. The date is represented as seconds since\n the epoch, rounded down to the nearest hour. The default value for this parameter is 7 days from creation time.\n For more information, see .

" + "smithy.api#documentation": "

From the creation time, the time after which the API key expires. The date is\n represented as seconds since the epoch, rounded down to the nearest hour. The default value\n for this parameter is 7 days from creation time. For more information, see .

" } } }, @@ -2357,13 +2663,155 @@ "smithy.api#output": {} } }, - "com.amazonaws.appsync#CreateDataSource": { + "com.amazonaws.appsync#CreateApiRequest": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.appsync#ApiName", + "traits": { + "smithy.api#documentation": "

The name for the Api.

", + "smithy.api#required": {} + } + }, + "ownerContact": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The owner contact information for the Api.

" + } + }, + "tags": { + "target": "com.amazonaws.appsync#TagMap" + }, + "eventConfig": { + "target": "com.amazonaws.appsync#EventConfig", + "traits": { + "smithy.api#documentation": "

The Event API configuration. This includes the default authorization configuration for\n connecting, publishing, and subscribing to an Event API.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.appsync#CreateApiResponse": { + "type": "structure", + "members": { + "api": { + "target": "com.amazonaws.appsync#Api", + "traits": { + "smithy.api#documentation": "

The Api object.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.appsync#CreateChannelNamespace": { "type": "operation", "input": { - "target": "com.amazonaws.appsync#CreateDataSourceRequest" + "target": "com.amazonaws.appsync#CreateChannelNamespaceRequest" }, "output": { - "target": "com.amazonaws.appsync#CreateDataSourceResponse" + "target": "com.amazonaws.appsync#CreateChannelNamespaceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#BadRequestException" + }, + { + "target": "com.amazonaws.appsync#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.appsync#ConflictException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" + }, + { + "target": "com.amazonaws.appsync#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a ChannelNamespace for an Api.

", + "smithy.api#http": { + "method": "POST", + "uri": "/v2/apis/{apiId}/channelNamespaces", + "code": 200 + } + } + }, + "com.amazonaws.appsync#CreateChannelNamespaceRequest": { + "type": "structure", + "members": { + "apiId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Api ID.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.appsync#Namespace", + "traits": { + "smithy.api#documentation": "

The name of the ChannelNamespace. This name must be unique within the\n Api\n

", + "smithy.api#required": {} + } + }, + "subscribeAuthModes": { + "target": "com.amazonaws.appsync#AuthModes", + "traits": { + "smithy.api#documentation": "

The authorization mode to use for subscribing to messages on the channel namespace. This\n configuration overrides the default Api authorization configuration.

" + } + }, + "publishAuthModes": { + "target": "com.amazonaws.appsync#AuthModes", + "traits": { + "smithy.api#documentation": "

The authorization mode to use for publishing messages on the channel namespace. This\n configuration overrides the default Api authorization configuration.

" + } + }, + "codeHandlers": { + "target": "com.amazonaws.appsync#Code", + "traits": { + "smithy.api#documentation": "

The event handler functions that run custom business logic to process published events\n and subscribe requests.

" + } + }, + "tags": { + "target": "com.amazonaws.appsync#TagMap" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.appsync#CreateChannelNamespaceResponse": { + "type": "structure", + "members": { + "channelNamespace": { + "target": "com.amazonaws.appsync#ChannelNamespace", + "traits": { + "smithy.api#documentation": "

The ChannelNamespace object.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.appsync#CreateDataSource": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#CreateDataSourceRequest" + }, + "output": { + "target": "com.amazonaws.appsync#CreateDataSourceResponse" }, "errors": [ { @@ -2425,7 +2873,7 @@ "serviceRoleArn": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The Identity and Access Management (IAM) service role Amazon Resource Name (ARN) for the data source.\n The system assumes this role when accessing the data source.

" + "smithy.api#documentation": "

The Identity and Access Management (IAM) service role Amazon Resource Name (ARN)\n for the data source. The system assumes this role when accessing the data source.

" } }, "dynamodbConfig": { @@ -2443,7 +2891,7 @@ "elasticsearchConfig": { "target": "com.amazonaws.appsync#ElasticsearchDataSourceConfig", "traits": { - "smithy.api#documentation": "

Amazon OpenSearch Service settings.

\n

As of September 2021, Amazon Elasticsearch service is Amazon OpenSearch Service. This configuration is\n deprecated. For new data sources, use CreateDataSourceRequest$openSearchServiceConfig to\n create an OpenSearch data source.

" + "smithy.api#documentation": "

Amazon OpenSearch Service settings.

\n

As of September 2021, Amazon Elasticsearch service is Amazon OpenSearch Service. This\n configuration is deprecated. For new data sources, use CreateDataSourceRequest$openSearchServiceConfig to create an OpenSearch data source.

" } }, "openSearchServiceConfig": { @@ -2473,7 +2921,7 @@ "metricsConfig": { "target": "com.amazonaws.appsync#DataSourceLevelMetricsConfig", "traits": { - "smithy.api#documentation": "

Enables or disables enhanced data source metrics for specified data sources. Note that\n metricsConfig won't be used unless the dataSourceLevelMetricsBehavior value is set\n to PER_DATA_SOURCE_METRICS. If the dataSourceLevelMetricsBehavior is set to\n FULL_REQUEST_DATA_SOURCE_METRICS instead, metricsConfig will be ignored. However,\n you can still set its value.

\n

\n metricsConfig can be ENABLED or DISABLED.

" + "smithy.api#documentation": "

Enables or disables enhanced data source metrics for specified data sources. Note that\n metricsConfig won't be used unless the\n dataSourceLevelMetricsBehavior value is set to\n PER_DATA_SOURCE_METRICS. If the dataSourceLevelMetricsBehavior\n is set to FULL_REQUEST_DATA_SOURCE_METRICS instead, metricsConfig\n will be ignored. However, you can still set its value.

\n

\n metricsConfig can be ENABLED or DISABLED.

" } } }, @@ -2536,7 +2984,7 @@ "certificateArn": { "target": "com.amazonaws.appsync#CertificateArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the certificate. This can be an Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server certificate.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the certificate. This can be an Certificate Manager\n (ACM) certificate or an Identity and Access Management (IAM)\n server certificate.

", "smithy.api#required": {} } }, @@ -2591,7 +3039,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a Function object.

\n

A function is a reusable entity. You can use multiple functions to compose the resolver logic.

", + "smithy.api#documentation": "

Creates a Function object.

\n

A function is a reusable entity. You can use multiple functions to compose the resolver\n logic.

", "smithy.api#http": { "method": "POST", "uri": "/v1/apis/{apiId}/functions", @@ -2633,7 +3081,7 @@ "requestMappingTemplate": { "target": "com.amazonaws.appsync#MappingTemplate", "traits": { - "smithy.api#documentation": "

The Function request mapping template. Functions support only the 2018-05-29 version of the\n request mapping template.

" + "smithy.api#documentation": "

The Function request mapping template. Functions support only the\n 2018-05-29 version of the request mapping template.

" } }, "responseMappingTemplate": { @@ -2645,7 +3093,7 @@ "functionVersion": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The version of the request mapping template. Currently, the supported value is 2018-05-29. Note\n that when using VTL and mapping templates, the functionVersion is required.

" + "smithy.api#documentation": "

The version of the request mapping template. Currently, the supported value\n is 2018-05-29. Note that when using VTL and mapping templates, the\n functionVersion is required.

" } }, "syncConfig": { @@ -2664,7 +3112,7 @@ "code": { "target": "com.amazonaws.appsync#Code", "traits": { - "smithy.api#documentation": "

The function code that contains the request and response functions. When code is used, the\n runtime is required. The runtime value must be APPSYNC_JS.

" + "smithy.api#documentation": "

The function code that contains the request and response functions. When\n code is used, the runtime is required. The runtime value must be\n APPSYNC_JS.

" } } }, @@ -2742,7 +3190,7 @@ "authenticationType": { "target": "com.amazonaws.appsync#AuthenticationType", "traits": { - "smithy.api#documentation": "

The authentication type: API key, Identity and Access Management (IAM), OpenID Connect (OIDC),\n Amazon Cognito user pools, or Lambda.

", + "smithy.api#documentation": "

The authentication type: API key, Identity and Access Management (IAM), OpenID\n Connect (OIDC), Amazon Cognito user pools, or Lambda.

", "smithy.api#required": {} } }, @@ -2767,14 +3215,14 @@ "additionalAuthenticationProviders": { "target": "com.amazonaws.appsync#AdditionalAuthenticationProviders", "traits": { - "smithy.api#documentation": "

A list of additional authentication providers for the GraphqlApi API.

" + "smithy.api#documentation": "

A list of additional authentication providers for the GraphqlApi\n API.

" } }, "xrayEnabled": { "target": "com.amazonaws.appsync#Boolean", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

A flag indicating whether to use X-Ray tracing for the GraphqlApi.

" + "smithy.api#documentation": "

A flag indicating whether to use X-Ray tracing for the\n GraphqlApi.

" } }, "lambdaAuthorizerConfig": { @@ -2783,22 +3231,22 @@ "smithy.api#documentation": "

Configuration for Lambda function authorization.

" } }, - "visibility": { - "target": "com.amazonaws.appsync#GraphQLApiVisibility", - "traits": { - "smithy.api#documentation": "

Sets the value of the GraphQL API to public (GLOBAL) or private (PRIVATE). If no\n value is provided, the visibility will be set to GLOBAL by default. This value cannot be changed\n once the API has been created.

" - } - }, "apiType": { "target": "com.amazonaws.appsync#GraphQLApiType", "traits": { - "smithy.api#documentation": "

The value that indicates whether the GraphQL API is a standard API (GRAPHQL) or merged API\n (MERGED).

" + "smithy.api#documentation": "

The value that indicates whether the GraphQL API is a standard API\n (GRAPHQL) or merged API (MERGED).

" } }, "mergedApiExecutionRoleArn": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The Identity and Access Management service role ARN for a merged API. The AppSync service assumes this role\n on behalf of the Merged API to validate access to source APIs at runtime and to prompt the\n AUTO_MERGE to update the merged API endpoint with the source API changes automatically.

" + "smithy.api#documentation": "

The Identity and Access Management service role ARN for a merged API. The AppSync\n service assumes this role on behalf of the Merged API to validate access to source APIs at\n runtime and to prompt the AUTO_MERGE to update the merged API endpoint with\n the source API changes automatically.

" + } + }, + "visibility": { + "target": "com.amazonaws.appsync#GraphQLApiVisibility", + "traits": { + "smithy.api#documentation": "

Sets the value of the GraphQL API to public (GLOBAL) or private\n (PRIVATE). If no value is provided, the visibility will be set to\n GLOBAL by default. This value cannot be changed once the API has been\n created.

" } }, "ownerContact": { @@ -2810,21 +3258,21 @@ "introspectionConfig": { "target": "com.amazonaws.appsync#GraphQLApiIntrospectionConfig", "traits": { - "smithy.api#documentation": "

Sets the value of the GraphQL API to enable (ENABLED) or disable (DISABLED)\n introspection. If no value is provided, the introspection configuration will be set to ENABLED by\n default. This field will produce an error if the operation attempts to use the introspection feature while this\n field is disabled.

\n

For more information about introspection, see GraphQL\n introspection.

" + "smithy.api#documentation": "

Sets the value of the GraphQL API to enable (ENABLED) or disable\n (DISABLED) introspection. If no value is provided, the introspection\n configuration will be set to ENABLED by default. This field will produce an\n error if the operation attempts to use the introspection feature while this field is\n disabled.

\n

For more information about introspection, see GraphQL introspection.

" } }, "queryDepthLimit": { "target": "com.amazonaws.appsync#QueryDepthLimit", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The maximum depth a query can have in a single request. Depth refers to the amount of nested levels allowed\n in the body of query. The default value is 0 (or unspecified), which indicates there's no depth\n limit. If you set a limit, it can be between 1 and 75 nested levels. This field will\n produce a limit error if the operation falls out of bounds.

\n

Note that fields can still be set to nullable or non-nullable. If a non-nullable field produces an error,\n the error will be thrown upwards to the first nullable field available.

" + "smithy.api#documentation": "

The maximum depth a query can have in a single request. Depth refers to the amount of\n nested levels allowed in the body of query. The default value is 0 (or\n unspecified), which indicates there's no depth limit. If you set a limit, it can be between\n 1 and 75 nested levels. This field will produce a limit error\n if the operation falls out of bounds.

\n

Note that fields can still be set to nullable or non-nullable. If a non-nullable field\n produces an error, the error will be thrown upwards to the first nullable field\n available.

" } }, "resolverCountLimit": { "target": "com.amazonaws.appsync#ResolverCountLimit", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The maximum number of resolvers that can be invoked in a single request. The default value is 0\n (or unspecified), which will set the limit to 10000. When specified, the limit value can be\n between 1 and 10000. This field will produce a limit error if the operation falls out\n of bounds.

" + "smithy.api#documentation": "

The maximum number of resolvers that can be invoked in a single request. The default\n value is 0 (or unspecified), which will set the limit to 10000.\n When specified, the limit value can be between 1 and 10000. This\n field will produce a limit error if the operation falls out of bounds.

" } }, "enhancedMetricsConfig": { @@ -2878,7 +3326,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a Resolver object.

\n

A resolver converts incoming requests into a format that a data source can understand, and converts the data\n source's responses into GraphQL.

", + "smithy.api#documentation": "

Creates a Resolver object.

\n

A resolver converts incoming requests into a format that a data source can understand,\n and converts the data source's responses into GraphQL.

", "smithy.api#http": { "method": "POST", "uri": "/v1/apis/{apiId}/types/{typeName}/resolvers", @@ -2921,7 +3369,7 @@ "requestMappingTemplate": { "target": "com.amazonaws.appsync#MappingTemplate", "traits": { - "smithy.api#documentation": "

The mapping template to use for requests.

\n

A resolver uses a request mapping template to convert a GraphQL expression into a format that a data source\n can understand. Mapping templates are written in Apache Velocity Template Language (VTL).

\n

VTL request mapping templates are optional when using an Lambda data source. For all other\n data sources, VTL request and response mapping templates are required.

" + "smithy.api#documentation": "

The mapping template to use for requests.

\n

A resolver uses a request mapping template to convert a GraphQL expression into a format\n that a data source can understand. Mapping templates are written in Apache Velocity\n Template Language (VTL).

\n

VTL request mapping templates are optional when using an Lambda data\n source. For all other data sources, VTL request and response mapping templates are\n required.

" } }, "responseMappingTemplate": { @@ -2933,7 +3381,7 @@ "kind": { "target": "com.amazonaws.appsync#ResolverKind", "traits": { - "smithy.api#documentation": "

The resolver type.

\n
    \n
  • \n

    \n UNIT: A UNIT resolver type. A UNIT resolver is the default\n resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.

    \n
  • \n
  • \n

    \n PIPELINE: A PIPELINE resolver type. You can use a PIPELINE\n resolver to invoke a series of Function objects in a serial manner. You can use a pipeline\n resolver to run a GraphQL query against multiple data sources.

    \n
  • \n
" + "smithy.api#documentation": "

The resolver type.

\n
    \n
  • \n

    \n UNIT: A UNIT resolver type. A UNIT resolver is\n the default resolver type. You can use a UNIT resolver to run a GraphQL query against\n a single data source.

    \n
  • \n
  • \n

    \n PIPELINE: A PIPELINE resolver type. You can\n use a PIPELINE resolver to invoke a series of Function objects in a\n serial manner. You can use a pipeline resolver to run a GraphQL query against\n multiple data sources.

    \n
  • \n
" } }, "pipelineConfig": { @@ -2967,13 +3415,13 @@ "code": { "target": "com.amazonaws.appsync#Code", "traits": { - "smithy.api#documentation": "

The resolver code that contains the request and response functions. When code is used, the\n runtime is required. The runtime value must be APPSYNC_JS.

" + "smithy.api#documentation": "

The resolver code that contains the request and response functions. When\n code is used, the runtime is required. The runtime value must be\n APPSYNC_JS.

" } }, "metricsConfig": { "target": "com.amazonaws.appsync#ResolverLevelMetricsConfig", "traits": { - "smithy.api#documentation": "

Enables or disables enhanced resolver metrics for specified resolvers. Note that metricsConfig\n won't be used unless the resolverLevelMetricsBehavior value is set to\n PER_RESOLVER_METRICS. If the resolverLevelMetricsBehavior is set to\n FULL_REQUEST_RESOLVER_METRICS instead, metricsConfig will be ignored. However, you\n can still set its value.

\n

\n metricsConfig can be ENABLED or DISABLED.

" + "smithy.api#documentation": "

Enables or disables enhanced resolver metrics for specified resolvers. Note that\n metricsConfig won't be used unless the\n resolverLevelMetricsBehavior value is set to\n PER_RESOLVER_METRICS. If the resolverLevelMetricsBehavior is\n set to FULL_REQUEST_RESOLVER_METRICS instead, metricsConfig will\n be ignored. However, you can still set its value.

\n

\n metricsConfig can be ENABLED or DISABLED.

" } } }, @@ -3097,13 +3545,13 @@ "type": { "target": "com.amazonaws.appsync#DataSourceType", "traits": { - "smithy.api#documentation": "

The type of the data source.

\n
    \n
  • \n

    \n AWS_LAMBDA: The data source is an Lambda\n function.

    \n
  • \n
  • \n

    \n AMAZON_DYNAMODB: The data source is an Amazon DynamoDB\n table.

    \n
  • \n
  • \n

    \n AMAZON_ELASTICSEARCH: The data source is an Amazon OpenSearch Service\n domain.

    \n
  • \n
  • \n

    \n AMAZON_OPENSEARCH_SERVICE: The data source is an Amazon OpenSearch Service domain.

    \n
  • \n
  • \n

    \n AMAZON_EVENTBRIDGE: The data source is an Amazon EventBridge\n configuration.

    \n
  • \n
  • \n

    \n NONE: There is no data source. Use this type when you want to\n invoke a GraphQL operation without connecting to a data source, such as when you're performing data\n transformation with resolvers or invoking a subscription from a mutation.

    \n
  • \n
  • \n

    \n HTTP: The data source is an HTTP endpoint.

    \n
  • \n
  • \n

    \n RELATIONAL_DATABASE: The data source is a relational\n database.

    \n
  • \n
" + "smithy.api#documentation": "

The type of the data source.

\n
    \n
  • \n

    \n AWS_LAMBDA: The data source is an Lambda function.

    \n
  • \n
  • \n

    \n AMAZON_DYNAMODB: The data source is an Amazon DynamoDB table.

    \n
  • \n
  • \n

    \n AMAZON_ELASTICSEARCH: The data source is an\n Amazon OpenSearch Service domain.

    \n
  • \n
  • \n

    \n AMAZON_OPENSEARCH_SERVICE: The data source is\n an Amazon OpenSearch Service domain.

    \n
  • \n
  • \n

    \n AMAZON_EVENTBRIDGE: The data source is an\n Amazon EventBridge configuration.

    \n
  • \n
  • \n

    \n NONE: There is no data source. Use this type\n when you want to invoke a GraphQL operation without connecting to a data source, such\n as when you're performing data transformation with resolvers or invoking a\n subscription from a mutation.

    \n
  • \n
  • \n

    \n HTTP: The data source is an HTTP\n endpoint.

    \n
  • \n
  • \n

    \n RELATIONAL_DATABASE: The data source is a\n relational database.

    \n
  • \n
" } }, "serviceRoleArn": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The Identity and Access Management (IAM) service role Amazon Resource Name (ARN) for the data source.\n The system assumes this role when accessing the data source.

" + "smithy.api#documentation": "

The Identity and Access Management (IAM) service role Amazon Resource Name (ARN)\n for the data source. The system assumes this role when accessing the data source.

" } }, "dynamodbConfig": { @@ -3151,7 +3599,7 @@ "metricsConfig": { "target": "com.amazonaws.appsync#DataSourceLevelMetricsConfig", "traits": { - "smithy.api#documentation": "

Enables or disables enhanced data source metrics for specified data sources. Note that\n metricsConfig won't be used unless the dataSourceLevelMetricsBehavior value is set\n to PER_DATA_SOURCE_METRICS. If the dataSourceLevelMetricsBehavior is set to\n FULL_REQUEST_DATA_SOURCE_METRICS instead, metricsConfig will be ignored. However,\n you can still set its value.

\n

\n metricsConfig can be ENABLED or DISABLED.

" + "smithy.api#documentation": "

Enables or disables enhanced data source metrics for specified data sources. Note that\n metricsConfig won't be used unless the\n dataSourceLevelMetricsBehavior value is set to\n PER_DATA_SOURCE_METRICS. If the dataSourceLevelMetricsBehavior\n is set to FULL_REQUEST_DATA_SOURCE_METRICS instead, metricsConfig\n will be ignored. However, you can still set its value.

\n

\n metricsConfig can be ENABLED or DISABLED.

" } } }, @@ -3165,7 +3613,7 @@ "name": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The name of the model. For example, this could be the name of a single table in a database.

" + "smithy.api#documentation": "

The name of the model. For example, this could be the name of a single table in a\n database.

" } }, "fields": { @@ -3177,7 +3625,7 @@ "primaryKey": { "target": "com.amazonaws.appsync#DataSourceIntrospectionModelIndex", "traits": { - "smithy.api#documentation": "

The primary key stored as a DataSourceIntrospectionModelIndex object.

" + "smithy.api#documentation": "

The primary key stored as a DataSourceIntrospectionModelIndex\n object.

" } }, "indexes": { @@ -3189,7 +3637,7 @@ "sdl": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

Contains the output of the SDL that was generated from the introspected types. This is controlled by the\n includeModelsSDL parameter of the GetDataSourceIntrospection operation.

" + "smithy.api#documentation": "

Contains the output of the SDL that was generated from the introspected types. This is\n controlled by the includeModelsSDL parameter of the\n GetDataSourceIntrospection operation.

" } } }, @@ -3230,25 +3678,25 @@ "kind": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

Specifies the classification of data. For example, this could be set to values like Scalar or\n NonNull to indicate a fundamental property of the field.

\n

Valid values include:

\n
    \n
  • \n

    \n Scalar: Indicates the value is a primitive type (scalar).

    \n
  • \n
  • \n

    \n NonNull: Indicates the field cannot be null.

    \n
  • \n
  • \n

    \n List: Indicates the field contains a list.

    \n
  • \n
" + "smithy.api#documentation": "

Specifies the classification of data. For example, this could be set to values like\n Scalar or NonNull to indicate a fundamental property of the\n field.

\n

Valid values include:

\n
    \n
  • \n

    \n Scalar: Indicates the value is a primitive type\n (scalar).

    \n
  • \n
  • \n

    \n NonNull: Indicates the field cannot be\n null.

    \n
  • \n
  • \n

    \n List: Indicates the field contains a list.

    \n
  • \n
" } }, "name": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The name of the data type that represents the field. For example, String is a valid\n name value.

" + "smithy.api#documentation": "

The name of the data type that represents the field. For example, String is\n a valid name value.

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

The DataSourceIntrospectionModelFieldType object data. The type is only present if\n DataSourceIntrospectionModelFieldType.kind is set to NonNull or List.

\n

The type typically contains its own kind and name fields to represent\n the actual type data. For instance, type could contain a kind value of\n Scalar with a name value of String. The values Scalar\n and String will be collectively stored in the values field.

" + "smithy.api#documentation": "

The DataSourceIntrospectionModelFieldType object data. The\n type is only present if\n DataSourceIntrospectionModelFieldType.kind is set to NonNull\n or List.

\n

The type typically contains its own kind and name\n fields to represent the actual type data. For instance, type could contain a\n kind value of Scalar with a name value of\n String. The values Scalar and String will be\n collectively stored in the values field.

" } }, "values": { "target": "com.amazonaws.appsync#DataSourceIntrospectionModelFieldTypeValues", "traits": { - "smithy.api#documentation": "

The values of the type field. This field represents the AppSync data type equivalent of the\n introspected field.

" + "smithy.api#documentation": "

The values of the type field. This field represents the AppSync data type\n equivalent of the introspected field.

" } } }, @@ -3318,12 +3766,12 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

Determines the number of types to be returned in a single response before paginating. This value is\n typically taken from nextToken value from the previous response.

" + "smithy.api#documentation": "

Determines the number of types to be returned in a single response before paginating.\n This value is typically taken from nextToken value from the previous\n response.

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

Represents the output of a DataSourceIntrospectionResult. This is the populated result of a\n GetDataSourceIntrospection operation.

" + "smithy.api#documentation": "

Represents the output of a DataSourceIntrospectionResult. This is the\n populated result of a GetDataSourceIntrospection operation.

" } }, "com.amazonaws.appsync#DataSourceIntrospectionStatus": { @@ -3462,6 +3910,44 @@ } } }, + "com.amazonaws.appsync#DeleteApi": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#DeleteApiRequest" + }, + "output": { + "target": "com.amazonaws.appsync#DeleteApiResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#AccessDeniedException" + }, + { + "target": "com.amazonaws.appsync#BadRequestException" + }, + { + "target": "com.amazonaws.appsync#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes an Api object

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/v2/apis/{apiId}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, "com.amazonaws.appsync#DeleteApiCache": { "type": "operation", "input": { @@ -3583,6 +4069,98 @@ "smithy.api#output": {} } }, + "com.amazonaws.appsync#DeleteApiRequest": { + "type": "structure", + "members": { + "apiId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Api ID.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.appsync#DeleteApiResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.appsync#DeleteChannelNamespace": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#DeleteChannelNamespaceRequest" + }, + "output": { + "target": "com.amazonaws.appsync#DeleteChannelNamespaceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#AccessDeniedException" + }, + { + "target": "com.amazonaws.appsync#BadRequestException" + }, + { + "target": "com.amazonaws.appsync#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a ChannelNamespace.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/v2/apis/{apiId}/channelNamespaces/{name}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.appsync#DeleteChannelNamespaceRequest": { + "type": "structure", + "members": { + "apiId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The ID of the Api associated with the ChannelNamespace.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.appsync#Namespace", + "traits": { + "smithy.api#documentation": "

The name of the ChannelNamespace.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.appsync#DeleteChannelNamespaceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.appsync#DeleteDataSource": { "type": "operation", "input": { @@ -3988,7 +4566,7 @@ "target": "com.amazonaws.appsync#Long", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The number of minutes that a Delta Sync log entry is stored in the Delta Sync table.

" + "smithy.api#documentation": "

The number of minutes that a Delta Sync log entry is stored in the Delta Sync\n table.

" } } }, @@ -4089,7 +4667,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes an association between a Merged API and source API using the source API's identifier and the\n association ID.

", + "smithy.api#documentation": "

Deletes an association between a Merged API and source API using the source API's\n identifier and the association ID.

", "smithy.api#http": { "method": "DELETE", "uri": "/v1/sourceApis/{sourceApiIdentifier}/mergedApiAssociations/{associationId}", @@ -4103,7 +4681,7 @@ "sourceApiIdentifier": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The identifier of the AppSync Source API. This is generated by the AppSync service. In most cases, source\n APIs (especially in your account) only require the API ID value or ARN of the source API. However, source APIs\n from other accounts (cross-account use cases) strictly require the full resource ARN of the source API.

", + "smithy.api#documentation": "

The identifier of the AppSync Source API. This is generated by the AppSync service. In\n most cases, source APIs (especially in your account) only require the API ID value or ARN\n of the source API. However, source APIs from other accounts (cross-account use cases)\n strictly require the full resource ARN of the source API.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4161,7 +4739,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes an association between a Merged API and source API using the Merged API's identifier and the\n association ID.

", + "smithy.api#documentation": "

Deletes an association between a Merged API and source API using the Merged API's\n identifier and the association ID.

", "smithy.api#http": { "method": "DELETE", "uri": "/v1/mergedApis/{mergedApiIdentifier}/sourceApiAssociations/{associationId}", @@ -4175,7 +4753,7 @@ "mergedApiIdentifier": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged\n APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs\n in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

", + "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In\n most cases, Merged APIs (especially in your account) only require the API ID value or ARN\n of the merged API. However, Merged APIs in other accounts (cross-account use cases)\n strictly require the full resource ARN of the merged API.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4235,7 +4813,7 @@ "certificateArn": { "target": "com.amazonaws.appsync#CertificateArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the certificate. This can be an Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server certificate.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the certificate. This can be an Certificate Manager\n (ACM) certificate or an Identity and Access Management (IAM)\n server certificate.

" } }, "appsyncDomainName": { @@ -4322,7 +4900,7 @@ } }, "traits": { - "smithy.api#documentation": "

Describes an OpenSearch data source configuration.

\n

As of September 2021, Amazon Elasticsearch service is Amazon OpenSearch Service. This configuration is\n deprecated. For new data sources, use OpenSearchServiceDataSourceConfig to specify an OpenSearch data source.

" + "smithy.api#documentation": "

Describes an OpenSearch data source configuration.

\n

As of September 2021, Amazon Elasticsearch service is Amazon OpenSearch Service. This\n configuration is deprecated. For new data sources, use OpenSearchServiceDataSourceConfig to specify an OpenSearch data\n source.

" } }, "com.amazonaws.appsync#EnhancedMetricsConfig": { @@ -4331,27 +4909,27 @@ "resolverLevelMetricsBehavior": { "target": "com.amazonaws.appsync#ResolverLevelMetricsBehavior", "traits": { - "smithy.api#documentation": "

Controls how resolver metrics will be emitted to CloudWatch. Resolver metrics include:

\n
    \n
  • \n

    GraphQL errors: The number of GraphQL errors that occurred.

    \n
  • \n
  • \n

    Requests: The number of invocations that occurred during a request.

    \n
  • \n
  • \n

    Latency: The time to complete a resolver invocation.

    \n
  • \n
  • \n

    Cache hits: The number of cache hits during a request.

    \n
  • \n
  • \n

    Cache misses: The number of cache misses during a request.

    \n
  • \n
\n

These metrics can be emitted to CloudWatch per resolver or for all resolvers in the request. Metrics will be\n recorded by API ID and resolver name. resolverLevelMetricsBehavior accepts one of these values at\n a time:

\n
    \n
  • \n

    \n FULL_REQUEST_RESOLVER_METRICS: Records and emits metric data for all resolvers in the\n request.

    \n
  • \n
  • \n

    \n PER_RESOLVER_METRICS: Records and emits metric data for resolvers that have the\n metricsConfig value set to ENABLED.

    \n
  • \n
", + "smithy.api#documentation": "

Controls how resolver metrics will be emitted to CloudWatch. Resolver metrics\n include:

\n
    \n
  • \n

    GraphQL errors: The number of GraphQL errors that occurred.

    \n
  • \n
  • \n

    Requests: The number of invocations that occurred during a request.

    \n
  • \n
  • \n

    Latency: The time to complete a resolver invocation.

    \n
  • \n
  • \n

    Cache hits: The number of cache hits during a request.

    \n
  • \n
  • \n

    Cache misses: The number of cache misses during a request.

    \n
  • \n
\n

These metrics can be emitted to CloudWatch per resolver or for all resolvers in the\n request. Metrics will be recorded by API ID and resolver name.\n resolverLevelMetricsBehavior accepts one of these values at a time:

\n
    \n
  • \n

    \n FULL_REQUEST_RESOLVER_METRICS: Records and emits metric data for\n all resolvers in the request.

    \n
  • \n
  • \n

    \n PER_RESOLVER_METRICS: Records and emits metric data for resolvers\n that have the metricsConfig value set to ENABLED.

    \n
  • \n
", "smithy.api#required": {} } }, "dataSourceLevelMetricsBehavior": { "target": "com.amazonaws.appsync#DataSourceLevelMetricsBehavior", "traits": { - "smithy.api#documentation": "

Controls how data source metrics will be emitted to CloudWatch. Data source metrics include:

\n
    \n
  • \n

    Requests: The number of invocations that occured during a request.

    \n
  • \n
  • \n

    Latency: The time to complete a data source invocation.

    \n
  • \n
  • \n

    Errors: The number of errors that occurred during a data source invocation.

    \n
  • \n
\n

These metrics can be emitted to CloudWatch per data source or for all data sources in the request. Metrics\n will be recorded by API ID and data source name. dataSourceLevelMetricsBehavior accepts one of\n these values at a time:

\n
    \n
  • \n

    \n FULL_REQUEST_DATA_SOURCE_METRICS: Records and emits metric data for all data sources\n in the request.

    \n
  • \n
  • \n

    \n PER_DATA_SOURCE_METRICS: Records and emits metric data for data sources that have the\n metricsConfig value set to ENABLED.

    \n
  • \n
", + "smithy.api#documentation": "

Controls how data source metrics will be emitted to CloudWatch. Data source metrics\n include:

\n
    \n
  • \n

    Requests: The number of invocations that occured during a request.

    \n
  • \n
  • \n

    Latency: The time to complete a data source invocation.

    \n
  • \n
  • \n

    Errors: The number of errors that occurred during a data source\n invocation.

    \n
  • \n
\n

These metrics can be emitted to CloudWatch per data source or for all data sources in\n the request. Metrics will be recorded by API ID and data source name.\n dataSourceLevelMetricsBehavior accepts one of these values at a\n time:

\n
    \n
  • \n

    \n FULL_REQUEST_DATA_SOURCE_METRICS: Records and emits metric data\n for all data sources in the request.

    \n
  • \n
  • \n

    \n PER_DATA_SOURCE_METRICS: Records and emits metric data for data\n sources that have the metricsConfig value set to\n ENABLED.

    \n
  • \n
", "smithy.api#required": {} } }, "operationLevelMetricsConfig": { "target": "com.amazonaws.appsync#OperationLevelMetricsConfig", "traits": { - "smithy.api#documentation": "

Controls how operation metrics will be emitted to CloudWatch. Operation metrics include:

\n
    \n
  • \n

    Requests: The number of times a specified GraphQL operation was called.

    \n
  • \n
  • \n

    GraphQL errors: The number of GraphQL errors that occurred during a specified GraphQL\n operation.

    \n
  • \n
\n

Metrics will be recorded by API ID and operation name. You can set the value to ENABLED or\n DISABLED.

", + "smithy.api#documentation": "

Controls how operation metrics will be emitted to CloudWatch. Operation metrics\n include:

\n
    \n
  • \n

    Requests: The number of times a specified GraphQL operation was\n called.

    \n
  • \n
  • \n

    GraphQL errors: The number of GraphQL errors that occurred during a specified\n GraphQL operation.

    \n
  • \n
\n

Metrics will be recorded by API ID and operation name. You can set the value to\n ENABLED or DISABLED.

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

Enables and controls the enhanced metrics feature. Enhanced metrics emit granular data on API usage and\n performance such as AppSync request and error counts, latency, and cache hits/misses. All enhanced metric data\n is sent to your CloudWatch account, and you can configure the types of data that will be sent.

\n

Enhanced metrics can be configured at the resolver, data source, and operation levels.\n EnhancedMetricsConfig contains three required parameters, each controlling one of these\n categories:

\n
    \n
  1. \n

    \n resolverLevelMetricsBehavior: Controls how resolver metrics will be emitted to\n CloudWatch. Resolver metrics include:

    \n
      \n
    • \n

      GraphQL errors: The number of GraphQL errors that occurred.

      \n
    • \n
    • \n

      Requests: The number of invocations that occurred during a request.

      \n
    • \n
    • \n

      Latency: The time to complete a resolver invocation.

      \n
    • \n
    • \n

      Cache hits: The number of cache hits during a request.

      \n
    • \n
    • \n

      Cache misses: The number of cache misses during a request.

      \n
    • \n
    \n

    These metrics can be emitted to CloudWatch per resolver or for all resolvers in the request. Metrics\n will be recorded by API ID and resolver name. resolverLevelMetricsBehavior accepts one of\n these values at a time:

    \n
      \n
    • \n

      \n FULL_REQUEST_RESOLVER_METRICS: Records and emits metric data for all resolvers\n in the request.

      \n
    • \n
    • \n

      \n PER_RESOLVER_METRICS: Records and emits metric data for resolvers that have the\n metricsConfig value set to ENABLED.

      \n
    • \n
    \n
  2. \n
  3. \n

    \n dataSourceLevelMetricsBehavior: Controls how data source metrics will be emitted to\n CloudWatch. Data source metrics include:

    \n
      \n
    • \n

      Requests: The number of invocations that occured during a request.

      \n
    • \n
    • \n

      Latency: The time to complete a data source invocation.

      \n
    • \n
    • \n

      Errors: The number of errors that occurred during a data source invocation.

      \n
    • \n
    \n

    These metrics can be emitted to CloudWatch per data source or for all data sources in the request.\n Metrics will be recorded by API ID and data source name. dataSourceLevelMetricsBehavior\n accepts one of these values at a time:

    \n
      \n
    • \n

      \n FULL_REQUEST_DATA_SOURCE_METRICS: Records and emits metric data for all data\n sources in the request.

      \n
    • \n
    • \n

      \n PER_DATA_SOURCE_METRICS: Records and emits metric data for data sources that\n have the metricsConfig value set to ENABLED.

      \n
    • \n
    \n
  4. \n
  5. \n

    \n operationLevelMetricsConfig: Controls how operation metrics will be emitted to\n CloudWatch. Operation metrics include:

    \n
      \n
    • \n

      Requests: The number of times a specified GraphQL operation was called.

      \n
    • \n
    • \n

      GraphQL errors: The number of GraphQL errors that occurred during a specified GraphQL\n operation.

      \n
    • \n
    \n

    Metrics will be recorded by API ID and operation name. You can set the value to ENABLED\n or DISABLED.

    \n
  6. \n
" + "smithy.api#documentation": "

Enables and controls the enhanced metrics feature. Enhanced metrics emit granular data\n on API usage and performance such as AppSync request and error counts, latency, and cache\n hits/misses. All enhanced metric data is sent to your CloudWatch account, and you can\n configure the types of data that will be sent.

\n

Enhanced metrics can be configured at the resolver, data source, and operation levels.\n EnhancedMetricsConfig contains three required parameters, each controlling\n one of these categories:

\n
    \n
  1. \n

    \n resolverLevelMetricsBehavior: Controls how resolver metrics will\n be emitted to CloudWatch. Resolver metrics include:

    \n
      \n
    • \n

      GraphQL errors: The number of GraphQL errors that occurred.

      \n
    • \n
    • \n

      Requests: The number of invocations that occurred during a request.\n

      \n
    • \n
    • \n

      Latency: The time to complete a resolver invocation.

      \n
    • \n
    • \n

      Cache hits: The number of cache hits during a request.

      \n
    • \n
    • \n

      Cache misses: The number of cache misses during a request.

      \n
    • \n
    \n

    These metrics can be emitted to CloudWatch per resolver or for all resolvers in\n the request. Metrics will be recorded by API ID and resolver name.\n resolverLevelMetricsBehavior accepts one of these values at a\n time:

    \n
      \n
    • \n

      \n FULL_REQUEST_RESOLVER_METRICS: Records and emits metric data\n for all resolvers in the request.

      \n
    • \n
    • \n

      \n PER_RESOLVER_METRICS: Records and emits metric data for\n resolvers that have the metricsConfig value set to\n ENABLED.

      \n
    • \n
    \n
  2. \n
  3. \n

    \n dataSourceLevelMetricsBehavior: Controls how data source metrics\n will be emitted to CloudWatch. Data source metrics include:

    \n
      \n
    • \n

      Requests: The number of invocations that occured during a\n request.

      \n
    • \n
    • \n

      Latency: The time to complete a data source invocation.

      \n
    • \n
    • \n

      Errors: The number of errors that occurred during a data source\n invocation.

      \n
    • \n
    \n

    These metrics can be emitted to CloudWatch per data source or for all data sources\n in the request. Metrics will be recorded by API ID and data source name.\n dataSourceLevelMetricsBehavior accepts one of these values at a\n time:

    \n
      \n
    • \n

      \n FULL_REQUEST_DATA_SOURCE_METRICS: Records and emits metric\n data for all data sources in the request.

      \n
    • \n
    • \n

      \n PER_DATA_SOURCE_METRICS: Records and emits metric data for\n data sources that have the metricsConfig value set to\n ENABLED.

      \n
    • \n
    \n
  4. \n
  5. \n

    \n operationLevelMetricsConfig: Controls how operation metrics will\n be emitted to CloudWatch. Operation metrics include:

    \n
      \n
    • \n

      Requests: The number of times a specified GraphQL operation was\n called.

      \n
    • \n
    • \n

      GraphQL errors: The number of GraphQL errors that occurred during a\n specified GraphQL operation.

      \n
    • \n
    \n

    Metrics will be recorded by API ID and operation name. You can set the value to\n ENABLED or DISABLED.

    \n
  6. \n
" } }, "com.amazonaws.appsync#EnvironmentVariableKey": { @@ -4399,7 +4977,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the list of errors generated. When using JavaScript, this will apply to the request or response\n function evaluation.

" + "smithy.api#documentation": "

Contains the list of errors generated. When using JavaScript, this will apply to the\n request or response function evaluation.

" } }, "com.amazonaws.appsync#ErrorMessage": { @@ -4425,7 +5003,7 @@ } ], "traits": { - "smithy.api#documentation": "

Evaluates the given code and returns the response. The code definition requirements depend on the specified\n runtime. For APPSYNC_JS runtimes, the code defines the request and response functions. The request\n function takes the incoming request after a GraphQL operation is parsed and converts it into a request\n configuration for the selected data source operation. The response function interprets responses from the data\n source and maps it to the shape of the GraphQL field output type.

", + "smithy.api#documentation": "

Evaluates the given code and returns the response. The code definition requirements\n depend on the specified runtime. For APPSYNC_JS runtimes, the code defines the\n request and response functions. The request function takes the incoming request after a\n GraphQL operation is parsed and converts it into a request configuration for the selected\n data source operation. The response function interprets responses from the data source and\n maps it to the shape of the GraphQL field output type.

", "smithy.api#http": { "method": "POST", "uri": "/v1/dataplane-evaluatecode", @@ -4459,28 +5037,28 @@ "runtime": { "target": "com.amazonaws.appsync#AppSyncRuntime", "traits": { - "smithy.api#documentation": "

The runtime to be used when evaluating the code. Currently, only the APPSYNC_JS runtime is\n supported.

", + "smithy.api#documentation": "

The runtime to be used when evaluating the code. Currently, only the\n APPSYNC_JS runtime is supported.

", "smithy.api#required": {} } }, "code": { "target": "com.amazonaws.appsync#Code", "traits": { - "smithy.api#documentation": "

The code definition to be evaluated. Note that code and runtime are both required\n for this action. The runtime value must be APPSYNC_JS.

", + "smithy.api#documentation": "

The code definition to be evaluated. Note that code and\n runtime are both required for this action. The runtime value\n must be APPSYNC_JS.

", "smithy.api#required": {} } }, "context": { "target": "com.amazonaws.appsync#Context", "traits": { - "smithy.api#documentation": "

The map that holds all of the contextual information for your resolver invocation. A context is\n required for this action.

", + "smithy.api#documentation": "

The map that holds all of the contextual information for your resolver invocation. A\n context is required for this action.

", "smithy.api#required": {} } }, "function": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The function within the code to be evaluated. If provided, the valid values are request and\n response.

" + "smithy.api#documentation": "

The function within the code to be evaluated. If provided, the valid values are\n request and response.

" } } }, @@ -4506,7 +5084,7 @@ "logs": { "target": "com.amazonaws.appsync#Logs", "traits": { - "smithy.api#documentation": "

A list of logs that were generated by calls to util.log.info and util.log.error in\n the evaluated code.

" + "smithy.api#documentation": "

A list of logs that were generated by calls to util.log.info and\n util.log.error in the evaluated code.

" } } }, @@ -4534,7 +5112,7 @@ } ], "traits": { - "smithy.api#documentation": "

Evaluates a given template and returns the response. The mapping template can be a request or response\n template.

\n

Request templates take the incoming request after a GraphQL operation is parsed and convert it into a\n request configuration for the selected data source operation. Response templates interpret responses from the\n data source and map it to the shape of the GraphQL field output type.

\n

Mapping templates are written in the Apache Velocity Template Language (VTL).

", + "smithy.api#documentation": "

Evaluates a given template and returns the response. The mapping template can be a\n request or response template.

\n

Request templates take the incoming request after a GraphQL operation is parsed and\n convert it into a request configuration for the selected data source operation. Response\n templates interpret responses from the data source and map it to the shape of the GraphQL\n field output type.

\n

Mapping templates are written in the Apache Velocity Template Language (VTL).

", "smithy.api#http": { "method": "POST", "uri": "/v1/dataplane-evaluatetemplate", @@ -4548,14 +5126,14 @@ "template": { "target": "com.amazonaws.appsync#Template", "traits": { - "smithy.api#documentation": "

The mapping template; this can be a request or response template. A template is required for\n this action.

", + "smithy.api#documentation": "

The mapping template; this can be a request or response template. A\n template is required for this action.

", "smithy.api#required": {} } }, "context": { "target": "com.amazonaws.appsync#Context", "traits": { - "smithy.api#documentation": "

The map that holds all of the contextual information for your resolver invocation. A context is\n required for this action.

", + "smithy.api#documentation": "

The map that holds all of the contextual information for your resolver invocation. A\n context is required for this action.

", "smithy.api#required": {} } } @@ -4582,7 +5160,7 @@ "logs": { "target": "com.amazonaws.appsync#Logs", "traits": { - "smithy.api#documentation": "

A list of logs that were generated by calls to util.log.info and util.log.error in\n the evaluated code.

" + "smithy.api#documentation": "

A list of logs that were generated by calls to util.log.info and\n util.log.error in the evaluated code.

" } } }, @@ -4606,7 +5184,7 @@ "eventBusArn": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The ARN of the event bus. For more information about event buses, see Amazon EventBridge event\n buses.

", + "smithy.api#documentation": "

The ARN of the event bus. For more information about event buses, see Amazon\n EventBridge event buses.

", "smithy.api#required": {} } } @@ -4615,6 +5193,105 @@ "smithy.api#documentation": "

Describes an Amazon EventBridge bus data source configuration.

" } }, + "com.amazonaws.appsync#EventConfig": { + "type": "structure", + "members": { + "authProviders": { + "target": "com.amazonaws.appsync#AuthProviders", + "traits": { + "smithy.api#documentation": "

A list of authorization providers.

", + "smithy.api#required": {} + } + }, + "connectionAuthModes": { + "target": "com.amazonaws.appsync#AuthModes", + "traits": { + "smithy.api#documentation": "

A list of valid authorization modes for the Event API connections.

", + "smithy.api#required": {} + } + }, + "defaultPublishAuthModes": { + "target": "com.amazonaws.appsync#AuthModes", + "traits": { + "smithy.api#documentation": "

A list of valid authorization modes for the Event API publishing.

", + "smithy.api#required": {} + } + }, + "defaultSubscribeAuthModes": { + "target": "com.amazonaws.appsync#AuthModes", + "traits": { + "smithy.api#documentation": "

A list of valid authorization modes for the Event API subscriptions.

", + "smithy.api#required": {} + } + }, + "logConfig": { + "target": "com.amazonaws.appsync#EventLogConfig", + "traits": { + "smithy.api#documentation": "

The CloudWatch Logs configuration for the Event API.

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

Describes the authorization configuration for connections, message publishing, message\n subscriptions, and logging for an Event API.

" + } + }, + "com.amazonaws.appsync#EventLogConfig": { + "type": "structure", + "members": { + "logLevel": { + "target": "com.amazonaws.appsync#EventLogLevel", + "traits": { + "smithy.api#documentation": "

The type of information to log for the Event API.

", + "smithy.api#required": {} + } + }, + "cloudWatchLogsRoleArn": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The IAM service role that AppSync assumes to publish CloudWatch Logs in your account.

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

Describes the CloudWatch Logs configuration for the Event API.

" + } + }, + "com.amazonaws.appsync#EventLogLevel": { + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" + } + }, + "ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ERROR" + } + }, + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ALL" + } + }, + "INFO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INFO" + } + }, + "DEBUG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEBUG" + } + } + } + }, "com.amazonaws.appsync#FieldLogLevel": { "type": "enum", "members": { @@ -4745,7 +5422,7 @@ "requestMappingTemplate": { "target": "com.amazonaws.appsync#MappingTemplate", "traits": { - "smithy.api#documentation": "

The Function request mapping template. Functions support only the 2018-05-29 version of the\n request mapping template.

" + "smithy.api#documentation": "

The Function request mapping template. Functions support only the\n 2018-05-29 version of the request mapping template.

" } }, "responseMappingTemplate": { @@ -4757,7 +5434,7 @@ "functionVersion": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The version of the request mapping template. Currently, only the 2018-05-29 version of the template is\n supported.

" + "smithy.api#documentation": "

The version of the request mapping template. Currently, only the 2018-05-29 version of\n the template is supported.

" } }, "syncConfig": { @@ -4776,12 +5453,12 @@ "code": { "target": "com.amazonaws.appsync#Code", "traits": { - "smithy.api#documentation": "

The function code that contains the request and response functions. When code is used, the\n runtime is required. The runtime value must be APPSYNC_JS.

" + "smithy.api#documentation": "

The function code that contains the request and response functions. When\n code is used, the runtime is required. The runtime value must be\n APPSYNC_JS.

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

A function is a reusable entity. You can use multiple functions to compose the resolver logic.

" + "smithy.api#documentation": "

A function is a reusable entity. You can use multiple functions to compose the resolver\n logic.

" } }, "com.amazonaws.appsync#Functions": { @@ -4796,6 +5473,40 @@ "target": "com.amazonaws.appsync#String" } }, + "com.amazonaws.appsync#GetApi": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#GetApiRequest" + }, + "output": { + "target": "com.amazonaws.appsync#GetApiResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#AccessDeniedException" + }, + { + "target": "com.amazonaws.appsync#BadRequestException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves an Api object.

", + "smithy.api#http": { + "method": "GET", + "uri": "/v2/apis/{apiId}", + "code": 200 + } + } + }, "com.amazonaws.appsync#GetApiAssociation": { "type": "operation", "input": { @@ -4923,6 +5634,108 @@ "smithy.api#output": {} } }, + "com.amazonaws.appsync#GetApiRequest": { + "type": "structure", + "members": { + "apiId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Api ID.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.appsync#GetApiResponse": { + "type": "structure", + "members": { + "api": { + "target": "com.amazonaws.appsync#Api", + "traits": { + "smithy.api#documentation": "

The Api object.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.appsync#GetChannelNamespace": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#GetChannelNamespaceRequest" + }, + "output": { + "target": "com.amazonaws.appsync#GetChannelNamespaceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#AccessDeniedException" + }, + { + "target": "com.amazonaws.appsync#BadRequestException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves the channel namespace for a specified Api.

", + "smithy.api#http": { + "method": "GET", + "uri": "/v2/apis/{apiId}/channelNamespaces/{name}", + "code": 200 + } + } + }, + "com.amazonaws.appsync#GetChannelNamespaceRequest": { + "type": "structure", + "members": { + "apiId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Api ID.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.appsync#Namespace", + "traits": { + "smithy.api#documentation": "

The name of the ChannelNamespace.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.appsync#GetChannelNamespaceResponse": { + "type": "structure", + "members": { + "channelNamespace": { + "target": "com.amazonaws.appsync#ChannelNamespace", + "traits": { + "smithy.api#documentation": "

The ChannelNamespace object.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.appsync#GetDataSource": { "type": "operation", "input": { @@ -4977,7 +5790,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves the record of an existing introspection. If the retrieval is successful, the result of the\n instrospection will also be returned. If the retrieval fails the operation, an error message will be returned\n instead.

", + "smithy.api#documentation": "

Retrieves the record of an existing introspection. If the retrieval is successful, the\n result of the instrospection will also be returned. If the retrieval fails the operation,\n an error message will be returned instead.

", "smithy.api#http": { "method": "GET", "uri": "/v1/datasources/introspections/{introspectionId}", @@ -4991,7 +5804,7 @@ "introspectionId": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The introspection ID. Each introspection contains a unique ID that can be used to reference the\n instrospection record.

", + "smithy.api#documentation": "

The introspection ID. Each introspection contains a unique ID that can be used to\n reference the instrospection record.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5000,14 +5813,14 @@ "target": "com.amazonaws.appsync#Boolean", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

A boolean flag that determines whether SDL should be generated for introspected types or not. If set to\n true, each model will contain an sdl property that contains the SDL for that type.\n The SDL only contains the type data and no additional metadata or directives.

", + "smithy.api#documentation": "

A boolean flag that determines whether SDL should be generated for introspected types.\n If set to true, each model will contain an sdl property that\n contains the SDL for that type. The SDL only contains the type data and no additional\n metadata or directives.

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

Determines the number of types to be returned in a single response before paginating. This value is\n typically taken from nextToken value from the previous response.

", + "smithy.api#documentation": "

Determines the number of types to be returned in a single response before paginating.\n This value is typically taken from nextToken value from the previous\n response.

", "smithy.api#httpQuery": "nextToken" } }, @@ -5015,7 +5828,7 @@ "target": "com.amazonaws.appsync#MaxResults", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The maximum number of introspected types that will be returned in a single response.

", + "smithy.api#documentation": "

The maximum number of introspected types that will be returned in a single\n response.

", "smithy.api#httpQuery": "maxResults" } } @@ -5030,19 +5843,19 @@ "introspectionId": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The introspection ID. Each introspection contains a unique ID that can be used to reference the\n instrospection record.

" + "smithy.api#documentation": "

The introspection ID. Each introspection contains a unique ID that can be used to\n reference the instrospection record.

" } }, "introspectionStatus": { "target": "com.amazonaws.appsync#DataSourceIntrospectionStatus", "traits": { - "smithy.api#documentation": "

The status of the introspection during retrieval. By default, when a new instrospection is being retrieved,\n the status will be set to PROCESSING. Once the operation has been completed, the status will\n change to SUCCESS or FAILED depending on how the data was parsed. A\n FAILED operation will return an error and its details as an\n introspectionStatusDetail.

" + "smithy.api#documentation": "

The status of the introspection during retrieval. By default, when a new instrospection\n is being retrieved, the status will be set to PROCESSING. Once the operation\n has been completed, the status will change to SUCCESS or FAILED\n depending on how the data was parsed. A FAILED operation will return an error\n and its details as an introspectionStatusDetail.

" } }, "introspectionStatusDetail": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The error detail field. When a FAILED\n introspectionStatus is returned, the introspectionStatusDetail will also return the\n exact error that was generated during the operation.

" + "smithy.api#documentation": "

The error detail field. When a FAILED\n introspectionStatus is returned, the introspectionStatusDetail\n will also return the exact error that was generated during the operation.

" } }, "introspectionResult": { @@ -5281,7 +6094,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves the list of environmental variable key-value pairs associated with an API by its ID value.

", + "smithy.api#documentation": "

Retrieves the list of environmental variable key-value pairs associated with an API by\n its ID value.

", "smithy.api#http": { "method": "GET", "uri": "/v1/apis/{apiId}/environmentVariables", @@ -5311,7 +6124,7 @@ "environmentVariables": { "target": "com.amazonaws.appsync#EnvironmentVariableMap", "traits": { - "smithy.api#documentation": "

The payload containing each environmental variable in the \"key\" : \"value\" format.

" + "smithy.api#documentation": "

The payload containing each environmental variable in the \"key\" : \"value\"\n format.

" } } }, @@ -5553,7 +6366,7 @@ "status": { "target": "com.amazonaws.appsync#SchemaStatus", "traits": { - "smithy.api#documentation": "

The current state of the schema (PROCESSING, FAILED, SUCCESS, or NOT_APPLICABLE). When the schema is in the\n ACTIVE state, you can add data.

" + "smithy.api#documentation": "

The current state of the schema (PROCESSING, FAILED, SUCCESS, or NOT_APPLICABLE). When\n the schema is in the ACTIVE state, you can add data.

" } }, "details": { @@ -5604,7 +6417,7 @@ "mergedApiIdentifier": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged\n APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs\n in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

", + "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In\n most cases, Merged APIs (especially in your account) only require the API ID value or ARN\n of the merged API. However, Merged APIs in other accounts (cross-account use cases)\n strictly require the full resource ARN of the merged API.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5840,20 +6653,20 @@ "additionalAuthenticationProviders": { "target": "com.amazonaws.appsync#AdditionalAuthenticationProviders", "traits": { - "smithy.api#documentation": "

A list of additional authentication providers for the GraphqlApi API.

" + "smithy.api#documentation": "

A list of additional authentication providers for the GraphqlApi\n API.

" } }, "xrayEnabled": { "target": "com.amazonaws.appsync#Boolean", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

A flag indicating whether to use X-Ray tracing for this GraphqlApi.

" + "smithy.api#documentation": "

A flag indicating whether to use X-Ray tracing for this\n GraphqlApi.

" } }, "wafWebAclArn": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The ARN of the WAF access control list (ACL) associated with this\n GraphqlApi, if one exists.

" + "smithy.api#documentation": "

The ARN of the WAF access control list (ACL) associated with this\n GraphqlApi, if one exists.

" } }, "lambdaAuthorizerConfig": { @@ -5871,19 +6684,19 @@ "visibility": { "target": "com.amazonaws.appsync#GraphQLApiVisibility", "traits": { - "smithy.api#documentation": "

Sets the value of the GraphQL API to public (GLOBAL) or private (PRIVATE). If no\n value is provided, the visibility will be set to GLOBAL by default. This value cannot be changed\n once the API has been created.

" + "smithy.api#documentation": "

Sets the value of the GraphQL API to public (GLOBAL) or private\n (PRIVATE). If no value is provided, the visibility will be set to\n GLOBAL by default. This value cannot be changed once the API has been\n created.

" } }, "apiType": { "target": "com.amazonaws.appsync#GraphQLApiType", "traits": { - "smithy.api#documentation": "

The value that indicates whether the GraphQL API is a standard API (GRAPHQL) or merged API\n (MERGED).

" + "smithy.api#documentation": "

The value that indicates whether the GraphQL API is a standard API\n (GRAPHQL) or merged API (MERGED).

" } }, "mergedApiExecutionRoleArn": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The Identity and Access Management service role ARN for a merged API. The AppSync service assumes this role\n on behalf of the Merged API to validate access to source APIs at runtime and to prompt the\n AUTO_MERGE to update the merged API endpoint with the source API changes automatically.

" + "smithy.api#documentation": "

The Identity and Access Management service role ARN for a merged API. The AppSync\n service assumes this role on behalf of the Merged API to validate access to source APIs at\n runtime and to prompt the AUTO_MERGE to update the merged API endpoint with\n the source API changes automatically.

" } }, "owner": { @@ -5901,21 +6714,21 @@ "introspectionConfig": { "target": "com.amazonaws.appsync#GraphQLApiIntrospectionConfig", "traits": { - "smithy.api#documentation": "

Sets the value of the GraphQL API to enable (ENABLED) or disable (DISABLED)\n introspection. If no value is provided, the introspection configuration will be set to ENABLED by\n default. This field will produce an error if the operation attempts to use the introspection feature while this\n field is disabled.

\n

For more information about introspection, see GraphQL\n introspection.

" + "smithy.api#documentation": "

Sets the value of the GraphQL API to enable (ENABLED) or disable\n (DISABLED) introspection. If no value is provided, the introspection\n configuration will be set to ENABLED by default. This field will produce an\n error if the operation attempts to use the introspection feature while this field is\n disabled.

\n

For more information about introspection, see GraphQL introspection.

" } }, "queryDepthLimit": { "target": "com.amazonaws.appsync#QueryDepthLimit", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The maximum depth a query can have in a single request. Depth refers to the amount of nested levels allowed\n in the body of query. The default value is 0 (or unspecified), which indicates there's no depth\n limit. If you set a limit, it can be between 1 and 75 nested levels. This field will\n produce a limit error if the operation falls out of bounds.

\n

Note that fields can still be set to nullable or non-nullable. If a non-nullable field produces an error,\n the error will be thrown upwards to the first nullable field available.

" + "smithy.api#documentation": "

The maximum depth a query can have in a single request. Depth refers to the amount of\n nested levels allowed in the body of query. The default value is 0 (or\n unspecified), which indicates there's no depth limit. If you set a limit, it can be between\n 1 and 75 nested levels. This field will produce a limit error\n if the operation falls out of bounds.

\n

Note that fields can still be set to nullable or non-nullable. If a non-nullable field\n produces an error, the error will be thrown upwards to the first nullable field\n available.

" } }, "resolverCountLimit": { "target": "com.amazonaws.appsync#ResolverCountLimit", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The maximum number of resolvers that can be invoked in a single request. The default value is 0\n (or unspecified), which will set the limit to 10000. When specified, the limit value can be\n between 1 and 10000. This field will produce a limit error if the operation falls out\n of bounds.

" + "smithy.api#documentation": "

The maximum number of resolvers that can be invoked in a single request. The default\n value is 0 (or unspecified), which will set the limit to 10000.\n When specified, the limit value can be between 1 and 10000. This\n field will produce a limit error if the operation falls out of bounds.

" } }, "enhancedMetricsConfig": { @@ -5941,7 +6754,7 @@ "endpoint": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The HTTP URL endpoint. You can specify either the domain name or IP, and port combination, and the URL\n scheme must be HTTP or HTTPS. If you don't specify the port, AppSync uses the default port 80\n for the HTTP endpoint and port 443 for HTTPS endpoints.

" + "smithy.api#documentation": "

The HTTP URL endpoint. You can specify either the domain name or IP, and port\n combination, and the URL scheme must be HTTP or HTTPS. If you don't specify the port,\n AppSync uses the default port 80 for the HTTP endpoint and port 443 for\n HTTPS endpoints.

" } }, "authorizationConfig": { @@ -5975,76 +6788,241 @@ "target": "com.amazonaws.appsync#TTL", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The number of seconds a response should be cached for. The default is 0 seconds, which disables caching. If\n you don't specify a value for authorizerResultTtlInSeconds, the default value is used. The maximum\n value is one hour (3600 seconds). The Lambda function can override this by returning a\n ttlOverride key in its response.

" + "smithy.api#documentation": "

The number of seconds a response should be cached for. The default is 0 seconds, which\n disables caching. If you don't specify a value for\n authorizerResultTtlInSeconds, the default value is used. The maximum value\n is one hour (3600 seconds). The Lambda function can override this by returning\n a ttlOverride key in its response.

" } }, "authorizerUri": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can\n be a standard Lambda ARN, a version ARN (.../v3), or an alias ARN.

\n

\n Note: This Lambda function must have the following\n resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is\n done for you. To use the Command Line Interface (CLI), run the following:

\n

\n aws lambda add-permission --function-name\n \"arn:aws:lambda:us-east-2:111122223333:function:my-function\" --statement-id \"appsync\" --principal\n appsync.amazonaws.com --action lambda:InvokeFunction\n

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Lambda function to be called for\n authorization. This can be a standard Lambda ARN, a version ARN\n (.../v3), or an alias ARN.

\n

\n Note: This Lambda function must have the\n following resource-based policy assigned to it. When configuring Lambda\n authorizers in the console, this is done for you. To use the Command Line Interface\n (CLI), run the following:

\n

\n aws lambda add-permission --function-name\n \"arn:aws:lambda:us-east-2:111122223333:function:my-function\" --statement-id \"appsync\"\n --principal appsync.amazonaws.com --action lambda:InvokeFunction\n

", "smithy.api#required": {} } }, "identityValidationExpression": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

A regular expression for validation of tokens before the Lambda function is called.

" + "smithy.api#documentation": "

A regular expression for validation of tokens before the Lambda function is\n called.

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

A LambdaAuthorizerConfig specifies how to authorize AppSync\n API access when using the AWS_LAMBDA authorizer mode. Be aware that an AppSync API can have only one Lambda authorizer configured at a\n time.

" + } + }, + "com.amazonaws.appsync#LambdaConflictHandlerConfig": { + "type": "structure", + "members": { + "lambdaConflictHandlerArn": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for the Lambda function to use as the\n Conflict Handler.

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

The LambdaConflictHandlerConfig object when configuring LAMBDA\n as the Conflict Handler.

" + } + }, + "com.amazonaws.appsync#LambdaDataSourceConfig": { + "type": "structure", + "members": { + "lambdaFunctionArn": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for the Lambda function.

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

Describes an Lambda data source configuration.

" + } + }, + "com.amazonaws.appsync#LimitExceededException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.appsync#String" + } + }, + "traits": { + "smithy.api#documentation": "

The request exceeded a limit. Try your request again.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.appsync#ListApiKeys": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#ListApiKeysRequest" + }, + "output": { + "target": "com.amazonaws.appsync#ListApiKeysResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#BadRequestException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists the API keys for a given API.

\n \n

API keys are deleted automatically 60 days after they expire. However, they may still\n be included in the response until they have actually been deleted. You can safely call\n DeleteApiKey to manually delete a key before it's automatically\n deleted.

\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/v1/apis/{apiId}/apikeys", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "apiKeys", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.appsync#ListApiKeysRequest": { + "type": "structure", + "members": { + "apiId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The API ID.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.appsync#PaginationToken", + "traits": { + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can\n use to return the next set of items in the list.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.appsync#MaxResults", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The maximum number of results that you want the request to return.

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

A LambdaAuthorizerConfig specifies how to authorize AppSync API access when\n using the AWS_LAMBDA authorizer mode. Be aware that an AppSync API can have only\n one Lambda authorizer configured at a time.

" + "smithy.api#input": {} } }, - "com.amazonaws.appsync#LambdaConflictHandlerConfig": { + "com.amazonaws.appsync#ListApiKeysResponse": { "type": "structure", "members": { - "lambdaConflictHandlerArn": { - "target": "com.amazonaws.appsync#String", + "apiKeys": { + "target": "com.amazonaws.appsync#ApiKeys", + "traits": { + "smithy.api#documentation": "

The ApiKey objects.

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

The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

" + "smithy.api#documentation": "

An identifier to pass in the next request to this operation to return the next set of\n items in the list.

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

The LambdaConflictHandlerConfig object when configuring LAMBDA as the Conflict\n Handler.

" + "smithy.api#output": {} } }, - "com.amazonaws.appsync#LambdaDataSourceConfig": { + "com.amazonaws.appsync#ListApis": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#ListApisRequest" + }, + "output": { + "target": "com.amazonaws.appsync#ListApisResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#BadRequestException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists the APIs in your AppSync account.

\n

\n ListApis returns only the high level API details. For more detailed\n information about an API, use GetApi.

", + "smithy.api#http": { + "method": "GET", + "uri": "/v2/apis", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "apis", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.appsync#ListApisRequest": { "type": "structure", "members": { - "lambdaFunctionArn": { - "target": "com.amazonaws.appsync#String", + "nextToken": { + "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) for the Lambda function.

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

An identifier that was returned from the previous call to this operation, which you can\n use to return the next set of items in the list.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.appsync#MaxResults", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The maximum number of results that you want the request to return.

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

Describes an Lambda data source configuration.

" + "smithy.api#input": {} } }, - "com.amazonaws.appsync#LimitExceededException": { + "com.amazonaws.appsync#ListApisResponse": { "type": "structure", "members": { - "message": { - "target": "com.amazonaws.appsync#String" + "apis": { + "target": "com.amazonaws.appsync#Apis", + "traits": { + "smithy.api#documentation": "

The Api objects.

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

An identifier that was returned from the previous call to this operation, which you can\n use to return the next set of items in the list.

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

The request exceeded a limit. Try your request again.

", - "smithy.api#error": "client", - "smithy.api#httpError": 429 + "smithy.api#output": {} } }, - "com.amazonaws.appsync#ListApiKeys": { + "com.amazonaws.appsync#ListChannelNamespaces": { "type": "operation", "input": { - "target": "com.amazonaws.appsync#ListApiKeysRequest" + "target": "com.amazonaws.appsync#ListChannelNamespacesRequest" }, "output": { - "target": "com.amazonaws.appsync#ListApiKeysResponse" + "target": "com.amazonaws.appsync#ListChannelNamespacesResponse" }, "errors": [ { @@ -6061,27 +7039,27 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the API keys for a given API.

\n \n

API keys are deleted automatically 60 days after they expire. However, they may still be included in the\n response until they have actually been deleted. You can safely call DeleteApiKey to manually\n delete a key before it's automatically deleted.

\n
", + "smithy.api#documentation": "

Lists the channel namespaces for a specified Api.

\n

\n ListChannelNamespaces returns only high level details for the channel\n namespace. To retrieve code handlers, use\n GetChannelNamespace.

", "smithy.api#http": { "method": "GET", - "uri": "/v1/apis/{apiId}/apikeys", + "uri": "/v2/apis/{apiId}/channelNamespaces", "code": 200 }, "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", - "items": "apiKeys", + "items": "channelNamespaces", "pageSize": "maxResults" } } }, - "com.amazonaws.appsync#ListApiKeysRequest": { + "com.amazonaws.appsync#ListChannelNamespacesRequest": { "type": "structure", "members": { "apiId": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The API ID.

", + "smithy.api#documentation": "

The Api ID.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6089,7 +7067,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

", + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can\n use to return the next set of items in the list.

", "smithy.api#httpQuery": "nextToken" } }, @@ -6106,19 +7084,19 @@ "smithy.api#input": {} } }, - "com.amazonaws.appsync#ListApiKeysResponse": { + "com.amazonaws.appsync#ListChannelNamespacesResponse": { "type": "structure", "members": { - "apiKeys": { - "target": "com.amazonaws.appsync#ApiKeys", + "channelNamespaces": { + "target": "com.amazonaws.appsync#ChannelNamespaces", "traits": { - "smithy.api#documentation": "

The ApiKey objects.

" + "smithy.api#documentation": "

The ChannelNamespace objects.

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

An identifier to pass in the next request to this operation to return the next set of items in the\n list.

" + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can\n use to return the next set of items in the list.

" } } }, @@ -6177,7 +7155,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

", + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can\n use to return the next set of items in the list.

", "smithy.api#httpQuery": "nextToken" } }, @@ -6206,7 +7184,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

An identifier to pass in the next request to this operation to return the next set of items in the\n list.

" + "smithy.api#documentation": "

An identifier to pass in the next request to this operation to return the next set of\n items in the list.

" } } }, @@ -6254,7 +7232,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

", + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can\n use to return the next set of items in the list.

", "smithy.api#httpQuery": "nextToken" } }, @@ -6283,7 +7261,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

" + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can\n use to return the next set of items in the list.

" } } }, @@ -6342,7 +7320,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

", + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can\n use to return the next set of items in the list.

", "smithy.api#httpQuery": "nextToken" } }, @@ -6371,7 +7349,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

" + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can\n use to return the next set of items in the list.

" } } }, @@ -6419,7 +7397,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

", + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can\n use to return the next set of items in the list.

", "smithy.api#httpQuery": "nextToken" } }, @@ -6434,7 +7412,7 @@ "apiType": { "target": "com.amazonaws.appsync#GraphQLApiType", "traits": { - "smithy.api#documentation": "

The value that indicates whether the GraphQL API is a standard API (GRAPHQL) or merged API\n (MERGED).

", + "smithy.api#documentation": "

The value that indicates whether the GraphQL API is a standard API\n (GRAPHQL) or merged API (MERGED).

", "smithy.api#httpQuery": "apiType" } }, @@ -6462,7 +7440,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

An identifier to pass in the next request to this operation to return the next set of items in the\n list.

" + "smithy.api#documentation": "

An identifier to pass in the next request to this operation to return the next set of\n items in the list.

" } } }, @@ -6566,7 +7544,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

", + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can\n use to return the next set of items in the list.

", "smithy.api#httpQuery": "nextToken" } }, @@ -6625,7 +7603,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

", + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can\n use to return the next set of items in the list.

", "smithy.api#httpQuery": "nextToken" } }, @@ -6654,7 +7632,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

An identifier to pass in the next request to this operation to return the next set of items in the\n list.

" + "smithy.api#documentation": "

An identifier to pass in the next request to this operation to return the next set of\n items in the list.

" } } }, @@ -6713,7 +7691,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

", + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can\n use to return the next set of items in the list.

", "smithy.api#httpQuery": "nextToken" } }, @@ -6742,7 +7720,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

" + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can\n use to return the next set of items in the list.

" } } }, @@ -6903,7 +7881,7 @@ "mergedApiIdentifier": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged\n APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs\n in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

", + "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In\n most cases, Merged APIs (especially in your account) only require the API ID value or ARN\n of the merged API. However, Merged APIs in other accounts (cross-account use cases)\n strictly require the full resource ARN of the merged API.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6927,7 +7905,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

", + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can\n use to return the next set of items in the list.

", "smithy.api#httpQuery": "nextToken" } }, @@ -6956,7 +7934,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

" + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can\n use to return the next set of items in the list.

" } } }, @@ -6986,7 +7964,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can use to return the\n next set of items in the list.

", + "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which you can\n use to return the next set of items in the list.

", "smithy.api#httpQuery": "nextToken" } }, @@ -7015,7 +7993,7 @@ "nextToken": { "target": "com.amazonaws.appsync#PaginationToken", "traits": { - "smithy.api#documentation": "

An identifier to pass in the next request to this operation to return the next set of items in the\n list.

" + "smithy.api#documentation": "

An identifier to pass in the next request to this operation to return the next set of\n items in the list.

" } } }, @@ -7029,14 +8007,14 @@ "fieldLogLevel": { "target": "com.amazonaws.appsync#FieldLogLevel", "traits": { - "smithy.api#documentation": "

The field logging level. Values can be NONE, ERROR, INFO, DEBUG, or ALL.

\n
    \n
  • \n

    \n NONE: No field-level logs are captured.

    \n
  • \n
  • \n

    \n ERROR: Logs the following information\n only for the fields that are in the error\n category:

    \n
      \n
    • \n

      The error section in the server response.

      \n
    • \n
    • \n

      Field-level errors.

      \n
    • \n
    • \n

      The generated request/response functions that got resolved for error fields.

      \n
    • \n
    \n
  • \n
  • \n

    \n INFO: Logs the following information only for the fields that are in the info and error\n categories:

    \n
      \n
    • \n

      Info-level messages.

      \n
    • \n
    • \n

      The user messages sent through $util.log.info and\n console.log.

      \n
    • \n
    • \n

      Field-level tracing and mapping logs are not shown.

      \n
    • \n
    \n
  • \n
  • \n

    \n DEBUG: Logs the following information\n only for the fields that are in the debug, info,\n and error categories:

    \n
      \n
    • \n

      Debug-level messages.

      \n
    • \n
    • \n

      The user messages sent through $util.log.info,\n $util.log.debug, console.log, and\n console.debug.

      \n
    • \n
    • \n

      Field-level tracing and mapping logs are not shown.

      \n
    • \n
    \n
  • \n
  • \n

    \n ALL: The following information is logged for all fields in the\n query:

    \n
      \n
    • \n

      Field-level tracing information.

      \n
    • \n
    • \n

      The generated request/response functions that were resolved for each\n field.

      \n
    • \n
    \n
  • \n
", + "smithy.api#documentation": "

The field logging level. Values can be NONE, ERROR, or ALL.

\n
    \n
  • \n

    \n NONE: No field-level logs are\n captured.

    \n
  • \n
  • \n

    \n ERROR: Logs the following information only for\n the fields that are in error:

    \n
      \n
    • \n

      The error section in the server response.

      \n
    • \n
    • \n

      Field-level errors.

      \n
    • \n
    • \n

      The generated request/response functions that got resolved for error\n fields.

      \n
    • \n
    \n
  • \n
  • \n

    \n ALL: The following information is logged for\n all fields in the query:

    \n
      \n
    • \n

      Field-level tracing information.

      \n
    • \n
    • \n

      The generated request/response functions that got resolved for each\n field.

      \n
    • \n
    \n
  • \n
", "smithy.api#required": {} } }, "cloudWatchLogsRoleArn": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The service role that AppSync assumes to publish to CloudWatch logs in your\n account.

", + "smithy.api#documentation": "

The service role that AppSync assumes to publish to CloudWatch\n logs in your account.

", "smithy.api#required": {} } }, @@ -7044,7 +8022,7 @@ "target": "com.amazonaws.appsync#Boolean", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Set to TRUE to exclude sections that contain information such as headers, context, and evaluated mapping\n templates, regardless of logging level.

" + "smithy.api#documentation": "

Set to TRUE to exclude sections that contain information such as headers, context, and\n evaluated mapping templates, regardless of logging level.

" } } }, @@ -7120,6 +8098,16 @@ } } }, + "com.amazonaws.appsync#Namespace": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + }, + "smithy.api#pattern": "^([A-Za-z0-9](?:[A-Za-z0-9\\-]{0,48}[A-Za-z0-9])?)$" + } + }, "com.amazonaws.appsync#NotFoundException": { "type": "structure", "members": { @@ -7128,7 +8116,7 @@ } }, "traits": { - "smithy.api#documentation": "

The resource specified in the request was not found. Check the resource, and then try again.

", + "smithy.api#documentation": "

The resource specified in the request was not found. Check the resource, and then try\n again.

", "smithy.api#error": "client", "smithy.api#httpError": 404 } @@ -7139,14 +8127,14 @@ "issuer": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value of\n iss in the ID token.

", + "smithy.api#documentation": "

The issuer for the OIDC configuration. The issuer returned by discovery must exactly\n match the value of iss in the ID token.

", "smithy.api#required": {} } }, "clientId": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The client identifier of the relying party at the OpenID identity provider. This identifier is typically\n obtained when the relying party is registered with the OpenID identity provider. You can specify a regular\n expression so that AppSync can validate against multiple client identifiers at a time.

" + "smithy.api#documentation": "

The client identifier of the relying party at the OpenID identity provider. This\n identifier is typically obtained when the relying party is registered with the OpenID\n identity provider. You can specify a regular expression so that AppSync can\n validate against multiple client identifiers at a time.

" } }, "iatTTL": { @@ -7224,6 +8212,16 @@ } } }, + "com.amazonaws.appsync#OwnerContact": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 250 + }, + "smithy.api#pattern": "^[A-Za-z0-9_\\-\\ \\.]+$" + } + }, "com.amazonaws.appsync#Ownership": { "type": "enum", "members": { @@ -7248,7 +8246,7 @@ "min": 1, "max": 65536 }, - "smithy.api#pattern": "^[\\\\S]+$" + "smithy.api#pattern": "^[\\S]+$" } }, "com.amazonaws.appsync#PipelineConfig": { @@ -7294,7 +8292,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a list of environmental variables in an API by its ID value.

\n

When creating an environmental variable, it must follow the constraints below:

\n
    \n
  • \n

    Both JavaScript and VTL templates support environmental variables.

    \n
  • \n
  • \n

    Environmental variables are not evaluated before function invocation.

    \n
  • \n
  • \n

    Environmental variables only support string values.

    \n
  • \n
  • \n

    Any defined value in an environmental variable is considered a string literal and not\n expanded.

    \n
  • \n
  • \n

    Variable evaluations should ideally be performed in the function code.

    \n
  • \n
\n

When creating an environmental variable key-value pair, it must follow the additional constraints\n below:

\n
    \n
  • \n

    Keys must begin with a letter.

    \n
  • \n
  • \n

    Keys must be at least two characters long.

    \n
  • \n
  • \n

    Keys can only contain letters, numbers, and the underscore character (_).

    \n
  • \n
  • \n

    Values can be up to 512 characters long.

    \n
  • \n
  • \n

    You can configure up to 50 key-value pairs in a GraphQL API.

    \n
  • \n
\n

You can create a list of environmental variables by adding it to the environmentVariables\n payload as a list in the format {\"key1\":\"value1\",\"key2\":\"value2\", …}. Note that each call of the\n PutGraphqlApiEnvironmentVariables action will result in the overwriting of the existing\n environmental variable list of that API. This means the existing environmental variables will be lost. To avoid\n this, you must include all existing and new environmental variables in the list each time you call this\n action.

", + "smithy.api#documentation": "

Creates a list of environmental variables in an API by its ID value.

\n

When creating an environmental variable, it must follow the constraints below:

\n
    \n
  • \n

    Both JavaScript and VTL templates support environmental variables.

    \n
  • \n
  • \n

    Environmental variables are not evaluated before function invocation.

    \n
  • \n
  • \n

    Environmental variables only support string values.

    \n
  • \n
  • \n

    Any defined value in an environmental variable is considered a string literal\n and not expanded.

    \n
  • \n
  • \n

    Variable evaluations should ideally be performed in the function\n code.

    \n
  • \n
\n

When creating an environmental variable key-value pair, it must follow the additional\n constraints below:

\n
    \n
  • \n

    Keys must begin with a letter.

    \n
  • \n
  • \n

    Keys must be at least two characters long.

    \n
  • \n
  • \n

    Keys can only contain letters, numbers, and the underscore character\n (_).

    \n
  • \n
  • \n

    Values can be up to 512 characters long.

    \n
  • \n
  • \n

    You can configure up to 50 key-value pairs in a GraphQL API.

    \n
  • \n
\n

You can create a list of environmental variables by adding it to the\n environmentVariables payload as a list in the format\n {\"key1\":\"value1\",\"key2\":\"value2\", …}. Note that each call of the\n PutGraphqlApiEnvironmentVariables action will result in the overwriting of\n the existing environmental variable list of that API. This means the existing environmental\n variables will be lost. To avoid this, you must include all existing and new environmental\n variables in the list each time you call this action.

", "smithy.api#http": { "method": "PUT", "uri": "/v1/apis/{apiId}/environmentVariables", @@ -7316,7 +8314,7 @@ "environmentVariables": { "target": "com.amazonaws.appsync#EnvironmentVariableMap", "traits": { - "smithy.api#documentation": "

The list of environmental variables to add to the API.

\n

When creating an environmental variable key-value pair, it must follow the additional constraints\n below:

\n
    \n
  • \n

    Keys must begin with a letter.

    \n
  • \n
  • \n

    Keys must be at least two characters long.

    \n
  • \n
  • \n

    Keys can only contain letters, numbers, and the underscore character (_).

    \n
  • \n
  • \n

    Values can be up to 512 characters long.

    \n
  • \n
  • \n

    You can configure up to 50 key-value pairs in a GraphQL API.

    \n
  • \n
\n

You can create a list of environmental variables by adding it to the environmentVariables\n payload as a list in the format {\"key1\":\"value1\",\"key2\":\"value2\", …}. Note that each call of the\n PutGraphqlApiEnvironmentVariables action will result in the overwriting of the existing\n environmental variable list of that API. This means the existing environmental variables will be lost. To avoid\n this, you must include all existing and new environmental variables in the list each time you call this\n action.

", + "smithy.api#documentation": "

The list of environmental variables to add to the API.

\n

When creating an environmental variable key-value pair, it must follow the additional\n constraints below:

\n
    \n
  • \n

    Keys must begin with a letter.

    \n
  • \n
  • \n

    Keys must be at least two characters long.

    \n
  • \n
  • \n

    Keys can only contain letters, numbers, and the underscore character\n (_).

    \n
  • \n
  • \n

    Values can be up to 512 characters long.

    \n
  • \n
  • \n

    You can configure up to 50 key-value pairs in a GraphQL API.

    \n
  • \n
\n

You can create a list of environmental variables by adding it to the\n environmentVariables payload as a list in the format\n {\"key1\":\"value1\",\"key2\":\"value2\", …}. Note that each call of the\n PutGraphqlApiEnvironmentVariables action will result in the overwriting of\n the existing environmental variable list of that API. This means the existing environmental\n variables will be lost. To avoid this, you must include all existing and new environmental\n variables in the list each time you call this action.

", "smithy.api#required": {} } } @@ -7331,7 +8329,7 @@ "environmentVariables": { "target": "com.amazonaws.appsync#EnvironmentVariableMap", "traits": { - "smithy.api#documentation": "

The payload containing each environmental variable in the \"key\" : \"value\" format.

" + "smithy.api#documentation": "

The payload containing each environmental variable in the \"key\" : \"value\"\n format.

" } } }, @@ -7362,7 +8360,7 @@ "secretArn": { "target": "com.amazonaws.appsync#RdsDataApiConfigSecretArn", "traits": { - "smithy.api#documentation": "

The secret's ARN that was obtained from Secrets Manager. A secret consists of secret information, the secret\n value, plus metadata about the secret. A secret value can be a string or binary. It typically includes the ARN,\n secret name and description, policies, tags, encryption key from the Key Management Service, and key rotation\n data.

", + "smithy.api#documentation": "

The secret's ARN that was obtained from Secrets Manager. A secret consists of secret\n information, the secret value, plus metadata about the secret. A secret value can be a\n string or binary. It typically includes the ARN, secret name and description, policies,\n tags, encryption key from the Key Management Service, and key rotation data.

", "smithy.api#required": {} } }, @@ -7437,7 +8435,7 @@ "awsSecretStoreArn": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

Amazon Web Services secret store Amazon Resource Name (ARN) for database credentials.

" + "smithy.api#documentation": "

Amazon Web Services secret store Amazon Resource Name (ARN) for database\n credentials.

" } } }, @@ -7451,7 +8449,7 @@ "relationalDatabaseSourceType": { "target": "com.amazonaws.appsync#RelationalDatabaseSourceType", "traits": { - "smithy.api#documentation": "

Source type for the relational database.

\n
    \n
  • \n

    \n RDS_HTTP_ENDPOINT: The relational database source type is an\n Amazon Relational Database Service (Amazon RDS) HTTP endpoint.

    \n
  • \n
" + "smithy.api#documentation": "

Source type for the relational database.

\n
    \n
  • \n

    \n RDS_HTTP_ENDPOINT: The relational database\n source type is an Amazon Relational Database Service (Amazon RDS) HTTP\n endpoint.

    \n
  • \n
" } }, "rdsHttpEndpointConfig": { @@ -7518,7 +8516,7 @@ "kind": { "target": "com.amazonaws.appsync#ResolverKind", "traits": { - "smithy.api#documentation": "

The resolver type.

\n
    \n
  • \n

    \n UNIT: A UNIT resolver type. A UNIT resolver is the default\n resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.

    \n
  • \n
  • \n

    \n PIPELINE: A PIPELINE resolver type. You can use a PIPELINE\n resolver to invoke a series of Function objects in a serial manner. You can use a pipeline\n resolver to run a GraphQL query against multiple data sources.

    \n
  • \n
" + "smithy.api#documentation": "

The resolver type.

\n
    \n
  • \n

    \n UNIT: A UNIT resolver type. A UNIT resolver is\n the default resolver type. You can use a UNIT resolver to run a GraphQL query against\n a single data source.

    \n
  • \n
  • \n

    \n PIPELINE: A PIPELINE resolver type. You can\n use a PIPELINE resolver to invoke a series of Function objects in a\n serial manner. You can use a pipeline resolver to run a GraphQL query against\n multiple data sources.

    \n
  • \n
" } }, "pipelineConfig": { @@ -7552,13 +8550,13 @@ "code": { "target": "com.amazonaws.appsync#Code", "traits": { - "smithy.api#documentation": "

The resolver code that contains the request and response functions. When code is used, the\n runtime is required. The runtime value must be APPSYNC_JS.

" + "smithy.api#documentation": "

The resolver code that contains the request and response functions. When\n code is used, the runtime is required. The runtime value must be\n APPSYNC_JS.

" } }, "metricsConfig": { "target": "com.amazonaws.appsync#ResolverLevelMetricsConfig", "traits": { - "smithy.api#documentation": "

Enables or disables enhanced resolver metrics for specified resolvers. Note that metricsConfig\n won't be used unless the resolverLevelMetricsBehavior value is set to\n PER_RESOLVER_METRICS. If the resolverLevelMetricsBehavior is set to\n FULL_REQUEST_RESOLVER_METRICS instead, metricsConfig will be ignored. However, you\n can still set its value.

\n

\n metricsConfig can be ENABLED or DISABLED.

" + "smithy.api#documentation": "

Enables or disables enhanced resolver metrics for specified resolvers. Note that\n metricsConfig won't be used unless the\n resolverLevelMetricsBehavior value is set to\n PER_RESOLVER_METRICS. If the resolverLevelMetricsBehavior is\n set to FULL_REQUEST_RESOLVER_METRICS instead, metricsConfig will\n be ignored. However, you can still set its value.

\n

\n metricsConfig can be ENABLED or DISABLED.

" } } }, @@ -7705,6 +8703,19 @@ } } }, + "com.amazonaws.appsync#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.appsync#String" + } + }, + "traits": { + "smithy.api#documentation": "

The operation exceeded the service quota for this resource.

", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, "com.amazonaws.appsync#SourceApiAssociation": { "type": "structure", "members": { @@ -7771,12 +8782,12 @@ "lastSuccessfulMergeDate": { "target": "com.amazonaws.appsync#Date", "traits": { - "smithy.api#documentation": "

The datetime value of the last successful merge of the source API association. The result will be in UTC\n format and your local time zone.

" + "smithy.api#documentation": "

The datetime value of the last successful merge of the source API association. The\n result will be in UTC format and your local time zone.

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

Describes the configuration of a source API. A source API is a GraphQL API that is linked to a merged API.\n There can be multiple source APIs attached to each merged API. When linked to a merged API, the source API's\n schema, data sources, and resolvers will be combined with other linked source API data to form a new, singular\n API.

\n

Source APIs can originate from your account or from other accounts via Amazon Web Services Resource Access\n Manager. For more information about sharing resources from other accounts, see What is Amazon Web Services Resource\n Access Manager? in the Amazon Web Services Resource Access Manager guide.

" + "smithy.api#documentation": "

Describes the configuration of a source API. A source API is a GraphQL API that is\n linked to a merged API. There can be multiple source APIs attached to each merged API. When\n linked to a merged API, the source API's schema, data sources, and resolvers will be\n combined with other linked source API data to form a new, singular API.

\n

Source APIs can originate from your account or from other accounts via Amazon Web Services Resource Access Manager. For more information about sharing resources from other\n accounts, see What is Amazon Web Services Resource Access Manager? in the Amazon Web Services Resource Access Manager guide.

" } }, "com.amazonaws.appsync#SourceApiAssociationConfig": { @@ -7785,7 +8796,7 @@ "mergeType": { "target": "com.amazonaws.appsync#MergeType", "traits": { - "smithy.api#documentation": "

The property that indicates which merging option is enabled in the source API association.

\n

Valid merge types are MANUAL_MERGE (default) and AUTO_MERGE. Manual merges are the\n default behavior and require the user to trigger any changes from the source APIs to the merged API manually.\n Auto merges subscribe the merged API to the changes performed on the source APIs so that any change in the\n source APIs are also made to the merged API. Auto merges use MergedApiExecutionRoleArn to perform\n merge operations.

" + "smithy.api#documentation": "

The property that indicates which merging option is enabled in the source API\n association.

\n

Valid merge types are MANUAL_MERGE (default) and AUTO_MERGE.\n Manual merges are the default behavior and require the user to trigger any changes from the\n source APIs to the merged API manually. Auto merges subscribe the merged API to the changes\n performed on the source APIs so that any change in the source APIs are also made to the\n merged API. Auto merges use MergedApiExecutionRoleArn to perform merge\n operations.

" } } }, @@ -7925,7 +8936,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new introspection. Returns the introspectionId of the new introspection after its\n creation.

", + "smithy.api#documentation": "

Creates a new introspection. Returns the introspectionId of the new\n introspection after its creation.

", "smithy.api#http": { "method": "POST", "uri": "/v1/datasources/introspections", @@ -7953,19 +8964,19 @@ "introspectionId": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The introspection ID. Each introspection contains a unique ID that can be used to reference the\n instrospection record.

" + "smithy.api#documentation": "

The introspection ID. Each introspection contains a unique ID that can be used to\n reference the instrospection record.

" } }, "introspectionStatus": { "target": "com.amazonaws.appsync#DataSourceIntrospectionStatus", "traits": { - "smithy.api#documentation": "

The status of the introspection during creation. By default, when a new instrospection has been created, the\n status will be set to PROCESSING. Once the operation has been completed, the status will change to\n SUCCESS or FAILED depending on how the data was parsed. A FAILED\n operation will return an error and its details as an introspectionStatusDetail.

" + "smithy.api#documentation": "

The status of the introspection during creation. By default, when a new instrospection\n has been created, the status will be set to PROCESSING. Once the operation has\n been completed, the status will change to SUCCESS or FAILED\n depending on how the data was parsed. A FAILED operation will return an error\n and its details as an introspectionStatusDetail.

" } }, "introspectionStatusDetail": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The error detail field. When a FAILED\n introspectionStatus is returned, the introspectionStatusDetail will also return the\n exact error that was generated during the operation.

" + "smithy.api#documentation": "

The error detail field. When a FAILED\n introspectionStatus is returned, the introspectionStatusDetail\n will also return the exact error that was generated during the operation.

" } } }, @@ -7999,7 +9010,7 @@ } ], "traits": { - "smithy.api#documentation": "

Adds a new schema to your GraphQL API.

\n

This operation is asynchronous. Use to determine when it has\n completed.

", + "smithy.api#documentation": "

Adds a new schema to your GraphQL API.

\n

This operation is asynchronous. Use to\n determine when it has completed.

", "smithy.api#http": { "method": "POST", "uri": "/v1/apis/{apiId}/schemacreation", @@ -8036,7 +9047,7 @@ "status": { "target": "com.amazonaws.appsync#SchemaStatus", "traits": { - "smithy.api#documentation": "

The current state of the schema (PROCESSING, FAILED, SUCCESS, or NOT_APPLICABLE). When the schema is in the\n ACTIVE state, you can add data.

" + "smithy.api#documentation": "

The current state of the schema (PROCESSING, FAILED, SUCCESS, or NOT_APPLICABLE). When\n the schema is in the ACTIVE state, you can add data.

" } } }, @@ -8070,7 +9081,7 @@ } ], "traits": { - "smithy.api#documentation": "

Initiates a merge operation. Returns a status that shows the result of the merge operation.

", + "smithy.api#documentation": "

Initiates a merge operation. Returns a status that shows the result of the merge\n operation.

", "smithy.api#http": { "method": "POST", "uri": "/v1/mergedApis/{mergedApiIdentifier}/sourceApiAssociations/{associationId}/merge", @@ -8092,7 +9103,7 @@ "mergedApiIdentifier": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged\n APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs\n in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

", + "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In\n most cases, Merged APIs (especially in your account) only require the API ID value or ARN\n of the merged API. However, Merged APIs in other accounts (cross-account use cases)\n strictly require the full resource ARN of the merged API.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -8125,24 +9136,24 @@ "conflictHandler": { "target": "com.amazonaws.appsync#ConflictHandlerType", "traits": { - "smithy.api#documentation": "

The Conflict Resolution strategy to perform in the event of a conflict.

\n
    \n
  • \n

    \n OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations\n when versions don't match the latest version at the server.

    \n
  • \n
  • \n

    \n AUTOMERGE: Resolve conflicts with the Automerge conflict\n resolution strategy.

    \n
  • \n
  • \n

    \n LAMBDA: Resolve conflicts with an Lambda function\n supplied in the LambdaConflictHandlerConfig.

    \n
  • \n
" + "smithy.api#documentation": "

The Conflict Resolution strategy to perform in the event of a conflict.

\n
    \n
  • \n

    \n OPTIMISTIC_CONCURRENCY: Resolve conflicts by\n rejecting mutations when versions don't match the latest version at the\n server.

    \n
  • \n
  • \n

    \n AUTOMERGE: Resolve conflicts with the\n Automerge conflict resolution strategy.

    \n
  • \n
  • \n

    \n LAMBDA: Resolve conflicts with an Lambda function supplied in the\n LambdaConflictHandlerConfig.

    \n
  • \n
" } }, "conflictDetection": { "target": "com.amazonaws.appsync#ConflictDetectionType", "traits": { - "smithy.api#documentation": "

The Conflict Detection strategy to use.

\n
    \n
  • \n

    \n VERSION: Detect conflicts based on object versions for this\n resolver.

    \n
  • \n
  • \n

    \n NONE: Do not detect conflicts when invoking this\n resolver.

    \n
  • \n
" + "smithy.api#documentation": "

The Conflict Detection strategy to use.

\n
    \n
  • \n

    \n VERSION: Detect conflicts based on object\n versions for this resolver.

    \n
  • \n
  • \n

    \n NONE: Do not detect conflicts when invoking\n this resolver.

    \n
  • \n
" } }, "lambdaConflictHandlerConfig": { "target": "com.amazonaws.appsync#LambdaConflictHandlerConfig", "traits": { - "smithy.api#documentation": "

The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict\n Handler.

" + "smithy.api#documentation": "

The LambdaConflictHandlerConfig when configuring LAMBDA as the\n Conflict Handler.

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

Describes a Sync configuration for a resolver.

\n

Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is\n invoked.

" + "smithy.api#documentation": "

Describes a Sync configuration for a resolver.

\n

Specifies which Conflict Detection strategy and Resolution strategy to use when the\n resolver is invoked.

" } }, "com.amazonaws.appsync#TTL": { @@ -8187,7 +9198,7 @@ "target": "com.amazonaws.appsync#TagValue" }, "traits": { - "smithy.api#documentation": "

A map with keys of TagKey objects and values of TagValue objects.

", + "smithy.api#documentation": "

A map with keys of TagKey objects and values of TagValue\n objects.

", "smithy.api#length": { "min": 1, "max": 50 @@ -8282,6 +9293,9 @@ "smithy.api#pattern": "^[\\s\\S]*$" } }, + "com.amazonaws.appsync#Timestamp": { + "type": "timestamp" + }, "com.amazonaws.appsync#Type": { "type": "structure", "members": { @@ -8424,6 +9438,43 @@ "smithy.api#output": {} } }, + "com.amazonaws.appsync#UpdateApi": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#UpdateApiRequest" + }, + "output": { + "target": "com.amazonaws.appsync#UpdateApiResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#AccessDeniedException" + }, + { + "target": "com.amazonaws.appsync#BadRequestException" + }, + { + "target": "com.amazonaws.appsync#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates an Api.

", + "smithy.api#http": { + "method": "POST", + "uri": "/v2/apis/{apiId}", + "code": 200 + } + } + }, "com.amazonaws.appsync#UpdateApiCache": { "type": "operation", "input": { @@ -8480,7 +9531,7 @@ "apiCachingBehavior": { "target": "com.amazonaws.appsync#ApiCachingBehavior", "traits": { - "smithy.api#documentation": "

Caching behavior.

\n
    \n
  • \n

    \n FULL_REQUEST_CACHING: All requests are fully cached.

    \n
  • \n
  • \n

    \n PER_RESOLVER_CACHING: Individual resolvers that you specify are\n cached.

    \n
  • \n
", + "smithy.api#documentation": "

Caching behavior.

\n
    \n
  • \n

    \n FULL_REQUEST_CACHING: All requests are fully\n cached.

    \n
  • \n
  • \n

    \n PER_RESOLVER_CACHING: Individual resolvers\n that you specify are cached.

    \n
  • \n
", "smithy.api#required": {} } }, @@ -8494,7 +9545,7 @@ "healthMetricsConfig": { "target": "com.amazonaws.appsync#CacheHealthMetricsConfig", "traits": { - "smithy.api#documentation": "

Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include:

\n
    \n
  • \n

    NetworkBandwidthOutAllowanceExceeded: The network packets dropped because the throughput exceeded\n the aggregated bandwidth limit. This is useful for diagnosing bottlenecks in a cache\n configuration.

    \n
  • \n
  • \n

    EngineCPUUtilization: The CPU utilization (percentage) allocated to the Redis process. This is\n useful for diagnosing bottlenecks in a cache configuration.

    \n
  • \n
\n

Metrics will be recorded by API ID. You can set the value to ENABLED or\n DISABLED.

" + "smithy.api#documentation": "

Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics\n include:

\n
    \n
  • \n

    NetworkBandwidthOutAllowanceExceeded: The network packets dropped because the\n throughput exceeded the aggregated bandwidth limit. This is useful for diagnosing\n bottlenecks in a cache configuration.

    \n
  • \n
  • \n

    EngineCPUUtilization: The CPU utilization (percentage) allocated to the Redis\n process. This is useful for diagnosing bottlenecks in a cache\n configuration.

    \n
  • \n
\n

Metrics will be recorded by API ID. You can set the value to ENABLED or\n DISABLED.

" } } }, @@ -8584,7 +9635,7 @@ "target": "com.amazonaws.appsync#Long", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

From the update time, the time after which the API key expires. The date is represented as seconds since the\n epoch. For more information, see .

" + "smithy.api#documentation": "

From the update time, the time after which the API key expires. The date is represented\n as seconds since the epoch. For more information, see .

" } } }, @@ -8606,6 +9657,148 @@ "smithy.api#output": {} } }, + "com.amazonaws.appsync#UpdateApiRequest": { + "type": "structure", + "members": { + "apiId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Api ID.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.appsync#ApiName", + "traits": { + "smithy.api#documentation": "

The name of the Api.

", + "smithy.api#required": {} + } + }, + "ownerContact": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The owner contact information for the Api.

" + } + }, + "eventConfig": { + "target": "com.amazonaws.appsync#EventConfig", + "traits": { + "smithy.api#documentation": "

The new event configuration. This includes the default authorization configuration for\n connecting, publishing, and subscribing to an Event API.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.appsync#UpdateApiResponse": { + "type": "structure", + "members": { + "api": { + "target": "com.amazonaws.appsync#Api", + "traits": { + "smithy.api#documentation": "

The Api object.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.appsync#UpdateChannelNamespace": { + "type": "operation", + "input": { + "target": "com.amazonaws.appsync#UpdateChannelNamespaceRequest" + }, + "output": { + "target": "com.amazonaws.appsync#UpdateChannelNamespaceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appsync#AccessDeniedException" + }, + { + "target": "com.amazonaws.appsync#BadRequestException" + }, + { + "target": "com.amazonaws.appsync#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.appsync#InternalFailureException" + }, + { + "target": "com.amazonaws.appsync#NotFoundException" + }, + { + "target": "com.amazonaws.appsync#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates a ChannelNamespace associated with an Api.

", + "smithy.api#http": { + "method": "POST", + "uri": "/v2/apis/{apiId}/channelNamespaces/{name}", + "code": 200 + } + } + }, + "com.amazonaws.appsync#UpdateChannelNamespaceRequest": { + "type": "structure", + "members": { + "apiId": { + "target": "com.amazonaws.appsync#String", + "traits": { + "smithy.api#documentation": "

The Api ID.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.appsync#Namespace", + "traits": { + "smithy.api#documentation": "

The name of the ChannelNamespace.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "subscribeAuthModes": { + "target": "com.amazonaws.appsync#AuthModes", + "traits": { + "smithy.api#documentation": "

The authorization mode to use for subscribing to messages on the channel namespace. This\n configuration overrides the default Api authorization configuration.

" + } + }, + "publishAuthModes": { + "target": "com.amazonaws.appsync#AuthModes", + "traits": { + "smithy.api#documentation": "

The authorization mode to use for publishing messages on the channel namespace. This\n configuration overrides the default Api authorization configuration.

" + } + }, + "codeHandlers": { + "target": "com.amazonaws.appsync#Code", + "traits": { + "smithy.api#documentation": "

The event handler functions that run custom business logic to process published events\n and subscribe requests.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.appsync#UpdateChannelNamespaceResponse": { + "type": "structure", + "members": { + "channelNamespace": { + "target": "com.amazonaws.appsync#ChannelNamespace", + "traits": { + "smithy.api#documentation": "

The ChannelNamespace object.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.appsync#UpdateDataSource": { "type": "operation", "input": { @@ -8693,7 +9886,7 @@ "elasticsearchConfig": { "target": "com.amazonaws.appsync#ElasticsearchDataSourceConfig", "traits": { - "smithy.api#documentation": "

The new OpenSearch configuration.

\n

As of September 2021, Amazon Elasticsearch service is Amazon OpenSearch Service. This configuration is\n deprecated. Instead, use UpdateDataSourceRequest$openSearchServiceConfig to update an OpenSearch data source.

" + "smithy.api#documentation": "

The new OpenSearch configuration.

\n

As of September 2021, Amazon Elasticsearch service is Amazon OpenSearch Service. This\n configuration is deprecated. Instead, use UpdateDataSourceRequest$openSearchServiceConfig to update an OpenSearch data source.

" } }, "openSearchServiceConfig": { @@ -8723,7 +9916,7 @@ "metricsConfig": { "target": "com.amazonaws.appsync#DataSourceLevelMetricsConfig", "traits": { - "smithy.api#documentation": "

Enables or disables enhanced data source metrics for specified data sources. Note that\n metricsConfig won't be used unless the dataSourceLevelMetricsBehavior value is set\n to PER_DATA_SOURCE_METRICS. If the dataSourceLevelMetricsBehavior is set to\n FULL_REQUEST_DATA_SOURCE_METRICS instead, metricsConfig will be ignored. However,\n you can still set its value.

\n

\n metricsConfig can be ENABLED or DISABLED.

" + "smithy.api#documentation": "

Enables or disables enhanced data source metrics for specified data sources. Note that\n metricsConfig won't be used unless the\n dataSourceLevelMetricsBehavior value is set to\n PER_DATA_SOURCE_METRICS. If the dataSourceLevelMetricsBehavior\n is set to FULL_REQUEST_DATA_SOURCE_METRICS instead, metricsConfig\n will be ignored. However, you can still set its value.

\n

\n metricsConfig can be ENABLED or DISABLED.

" } } }, @@ -8891,7 +10084,7 @@ "requestMappingTemplate": { "target": "com.amazonaws.appsync#MappingTemplate", "traits": { - "smithy.api#documentation": "

The Function request mapping template. Functions support only the 2018-05-29 version of the\n request mapping template.

" + "smithy.api#documentation": "

The Function request mapping template. Functions support only the\n 2018-05-29 version of the request mapping template.

" } }, "responseMappingTemplate": { @@ -8903,7 +10096,7 @@ "functionVersion": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The version of the request mapping template. Currently, the supported value is 2018-05-29. Note\n that when using VTL and mapping templates, the functionVersion is required.

" + "smithy.api#documentation": "

The version of the request mapping template. Currently, the supported value\n is 2018-05-29. Note that when using VTL and mapping templates, the\n functionVersion is required.

" } }, "syncConfig": { @@ -8922,7 +10115,7 @@ "code": { "target": "com.amazonaws.appsync#Code", "traits": { - "smithy.api#documentation": "

The function code that contains the request and response functions. When code is used, the\n runtime is required. The runtime value must be APPSYNC_JS.

" + "smithy.api#documentation": "

The function code that contains the request and response functions. When\n code is used, the runtime is required. The runtime value must be\n APPSYNC_JS.

" } } }, @@ -9008,14 +10201,13 @@ "authenticationType": { "target": "com.amazonaws.appsync#AuthenticationType", "traits": { - "smithy.api#documentation": "

The new authentication type for the GraphqlApi object.

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

The new authentication type for the GraphqlApi object.

" } }, "userPoolConfig": { "target": "com.amazonaws.appsync#UserPoolConfig", "traits": { - "smithy.api#documentation": "

The new Amazon Cognito user pool configuration for the ~GraphqlApi object.

" + "smithy.api#documentation": "

The new Amazon Cognito user pool configuration for the ~GraphqlApi\n object.

" } }, "openIDConnectConfig": { @@ -9027,14 +10219,14 @@ "additionalAuthenticationProviders": { "target": "com.amazonaws.appsync#AdditionalAuthenticationProviders", "traits": { - "smithy.api#documentation": "

A list of additional authentication providers for the GraphqlApi API.

" + "smithy.api#documentation": "

A list of additional authentication providers for the GraphqlApi\n API.

" } }, "xrayEnabled": { "target": "com.amazonaws.appsync#Boolean", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

A flag indicating whether to use X-Ray tracing for the GraphqlApi.

" + "smithy.api#documentation": "

A flag indicating whether to use X-Ray tracing for the\n GraphqlApi.

" } }, "lambdaAuthorizerConfig": { @@ -9046,7 +10238,7 @@ "mergedApiExecutionRoleArn": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The Identity and Access Management service role ARN for a merged API. The AppSync service assumes this role\n on behalf of the Merged API to validate access to source APIs at runtime and to prompt the\n AUTO_MERGE to update the merged API endpoint with the source API changes automatically.

" + "smithy.api#documentation": "

The Identity and Access Management service role ARN for a merged API. The AppSync\n service assumes this role on behalf of the Merged API to validate access to source APIs at\n runtime and to prompt the AUTO_MERGE to update the merged API endpoint with\n the source API changes automatically.

" } }, "ownerContact": { @@ -9058,21 +10250,21 @@ "introspectionConfig": { "target": "com.amazonaws.appsync#GraphQLApiIntrospectionConfig", "traits": { - "smithy.api#documentation": "

Sets the value of the GraphQL API to enable (ENABLED) or disable (DISABLED)\n introspection. If no value is provided, the introspection configuration will be set to ENABLED by\n default. This field will produce an error if the operation attempts to use the introspection feature while this\n field is disabled.

\n

For more information about introspection, see GraphQL\n introspection.

" + "smithy.api#documentation": "

Sets the value of the GraphQL API to enable (ENABLED) or disable\n (DISABLED) introspection. If no value is provided, the introspection\n configuration will be set to ENABLED by default. This field will produce an\n error if the operation attempts to use the introspection feature while this field is\n disabled.

\n

For more information about introspection, see GraphQL introspection.

" } }, "queryDepthLimit": { "target": "com.amazonaws.appsync#QueryDepthLimit", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The maximum depth a query can have in a single request. Depth refers to the amount of nested levels allowed\n in the body of query. The default value is 0 (or unspecified), which indicates there's no depth\n limit. If you set a limit, it can be between 1 and 75 nested levels. This field will\n produce a limit error if the operation falls out of bounds.

\n

Note that fields can still be set to nullable or non-nullable. If a non-nullable field produces an error,\n the error will be thrown upwards to the first nullable field available.

" + "smithy.api#documentation": "

The maximum depth a query can have in a single request. Depth refers to the amount of\n nested levels allowed in the body of query. The default value is 0 (or\n unspecified), which indicates there's no depth limit. If you set a limit, it can be between\n 1 and 75 nested levels. This field will produce a limit error\n if the operation falls out of bounds.

\n

Note that fields can still be set to nullable or non-nullable. If a non-nullable field\n produces an error, the error will be thrown upwards to the first nullable field\n available.

" } }, "resolverCountLimit": { "target": "com.amazonaws.appsync#ResolverCountLimit", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The maximum number of resolvers that can be invoked in a single request. The default value is 0\n (or unspecified), which will set the limit to 10000. When specified, the limit value can be\n between 1 and 10000. This field will produce a limit error if the operation falls out\n of bounds.

" + "smithy.api#documentation": "

The maximum number of resolvers that can be invoked in a single request. The default\n value is 0 (or unspecified), which will set the limit to 10000.\n When specified, the limit value can be between 1 and 10000. This\n field will produce a limit error if the operation falls out of bounds.

" } }, "enhancedMetricsConfig": { @@ -9170,7 +10362,7 @@ "requestMappingTemplate": { "target": "com.amazonaws.appsync#MappingTemplate", "traits": { - "smithy.api#documentation": "

The new request mapping template.

\n

A resolver uses a request mapping template to convert a GraphQL expression into a format that a data source\n can understand. Mapping templates are written in Apache Velocity Template Language (VTL).

\n

VTL request mapping templates are optional when using an Lambda data source. For all other\n data sources, VTL request and response mapping templates are required.

" + "smithy.api#documentation": "

The new request mapping template.

\n

A resolver uses a request mapping template to convert a GraphQL expression into a format\n that a data source can understand. Mapping templates are written in Apache Velocity\n Template Language (VTL).

\n

VTL request mapping templates are optional when using an Lambda data\n source. For all other data sources, VTL request and response mapping templates are\n required.

" } }, "responseMappingTemplate": { @@ -9182,7 +10374,7 @@ "kind": { "target": "com.amazonaws.appsync#ResolverKind", "traits": { - "smithy.api#documentation": "

The resolver type.

\n
    \n
  • \n

    \n UNIT: A UNIT resolver type. A UNIT resolver is the default\n resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.

    \n
  • \n
  • \n

    \n PIPELINE: A PIPELINE resolver type. You can use a PIPELINE\n resolver to invoke a series of Function objects in a serial manner. You can use a pipeline\n resolver to run a GraphQL query against multiple data sources.

    \n
  • \n
" + "smithy.api#documentation": "

The resolver type.

\n
    \n
  • \n

    \n UNIT: A UNIT resolver type. A UNIT resolver is\n the default resolver type. You can use a UNIT resolver to run a GraphQL query against\n a single data source.

    \n
  • \n
  • \n

    \n PIPELINE: A PIPELINE resolver type. You can\n use a PIPELINE resolver to invoke a series of Function objects in a\n serial manner. You can use a pipeline resolver to run a GraphQL query against\n multiple data sources.

    \n
  • \n
" } }, "pipelineConfig": { @@ -9216,13 +10408,13 @@ "code": { "target": "com.amazonaws.appsync#Code", "traits": { - "smithy.api#documentation": "

The resolver code that contains the request and response functions. When code is used, the\n runtime is required. The runtime value must be APPSYNC_JS.

" + "smithy.api#documentation": "

The resolver code that contains the request and response functions. When\n code is used, the runtime is required. The runtime value must be\n APPSYNC_JS.

" } }, "metricsConfig": { "target": "com.amazonaws.appsync#ResolverLevelMetricsConfig", "traits": { - "smithy.api#documentation": "

Enables or disables enhanced resolver metrics for specified resolvers. Note that metricsConfig\n won't be used unless the resolverLevelMetricsBehavior value is set to\n PER_RESOLVER_METRICS. If the resolverLevelMetricsBehavior is set to\n FULL_REQUEST_RESOLVER_METRICS instead, metricsConfig will be ignored. However, you\n can still set its value.

\n

\n metricsConfig can be ENABLED or DISABLED.

" + "smithy.api#documentation": "

Enables or disables enhanced resolver metrics for specified resolvers. Note that\n metricsConfig won't be used unless the\n resolverLevelMetricsBehavior value is set to\n PER_RESOLVER_METRICS. If the resolverLevelMetricsBehavior is\n set to FULL_REQUEST_RESOLVER_METRICS instead, metricsConfig will\n be ignored. However, you can still set its value.

\n

\n metricsConfig can be ENABLED or DISABLED.

" } } }, @@ -9292,7 +10484,7 @@ "mergedApiIdentifier": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged\n APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs\n in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.

", + "smithy.api#documentation": "

The identifier of the AppSync Merged API. This is generated by the AppSync service. In\n most cases, Merged APIs (especially in your account) only require the API ID value or ARN\n of the merged API. However, Merged APIs in other accounts (cross-account use cases)\n strictly require the full resource ARN of the merged API.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -9433,14 +10625,14 @@ "defaultAction": { "target": "com.amazonaws.appsync#DefaultAction", "traits": { - "smithy.api#documentation": "

The action that you want your GraphQL API to take when a request that uses Amazon Cognito user pool\n authentication doesn't match the Amazon Cognito user pool configuration.

", + "smithy.api#documentation": "

The action that you want your GraphQL API to take when a request that uses Amazon Cognito user pool authentication doesn't match the Amazon Cognito user pool\n configuration.

", "smithy.api#required": {} } }, "appIdClientRegex": { "target": "com.amazonaws.appsync#String", "traits": { - "smithy.api#documentation": "

A regular expression for validating the incoming Amazon Cognito user pool app client ID. If this value\n isn't set, no filtering is applied.

" + "smithy.api#documentation": "

A regular expression for validating the incoming Amazon Cognito user pool app client\n ID. If this value isn't set, no filtering is applied.

" } } }, diff --git a/codegen/sdk-codegen/aws-models/connect.json b/codegen/sdk-codegen/aws-models/connect.json index d1f25a58ddd..d43b6a499e5 100644 --- a/codegen/sdk-codegen/aws-models/connect.json +++ b/codegen/sdk-codegen/aws-models/connect.json @@ -329,8 +329,8 @@ "type": "string", "traits": { "smithy.api#length": { - "min": 1, - "max": 100 + "min": 0, + "max": 255 }, "smithy.api#sensitive": {} } @@ -447,8 +447,8 @@ "type": "string", "traits": { "smithy.api#length": { - "min": 1, - "max": 100 + "min": 0, + "max": 300 }, "smithy.api#sensitive": {} } @@ -40511,7 +40511,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains information about the identity of a user.

\n \n

For Amazon Connect instances that are created with the EXISTING_DIRECTORY\n identity management type, FirstName, LastName, and Email\n cannot be updated from within Amazon Connect because they are managed by the\n directory.

\n
" + "smithy.api#documentation": "

Contains information about the identity of a user.

\n \n

For Amazon Connect instances that are created with the EXISTING_DIRECTORY\n identity management type, FirstName, LastName, and Email\n cannot be updated from within Amazon Connect because they are managed by the\n directory.

\n
\n \n

The FirstName and LastName length constraints below apply only to\n instances using SAML for identity management. If you are using Amazon Connect for identity\n management, the length constraints are 1-255 for FirstName, and 1-256 for\n LastName.

\n
" } }, "com.amazonaws.connect#UserIdentityInfoLite": { diff --git a/codegen/sdk-codegen/aws-models/datasync.json b/codegen/sdk-codegen/aws-models/datasync.json index 19d7ae436a2..8773a174609 100644 --- a/codegen/sdk-codegen/aws-models/datasync.json +++ b/codegen/sdk-codegen/aws-models/datasync.json @@ -443,7 +443,7 @@ } ], "traits": { - "smithy.api#documentation": "

Activates an DataSync agent that you've deployed in your storage\n environment. The activation process associates the agent with your Amazon Web Services account.

\n

If you haven't deployed an agent yet, see the following topics to learn more:

\n \n \n

If you're transferring between Amazon Web Services storage services, you don't need a\n DataSync agent.

\n
" + "smithy.api#documentation": "

Activates an DataSync agent that you deploy in your storage environment.\n The activation process associates the agent with your Amazon Web Services account.

\n

If you haven't deployed an agent yet, see Do I need a DataSync agent?\n

" } }, "com.amazonaws.datasync#CreateAgentRequest": { @@ -452,14 +452,14 @@ "ActivationKey": { "target": "com.amazonaws.datasync#ActivationKey", "traits": { - "smithy.api#documentation": "

Specifies your DataSync agent's activation key. If you don't have an\n activation key, see Activate your agent.

", + "smithy.api#documentation": "

Specifies your DataSync agent's activation key. If you don't have an\n activation key, see Activating your agent.

", "smithy.api#required": {} } }, "AgentName": { "target": "com.amazonaws.datasync#TagValue", "traits": { - "smithy.api#documentation": "

Specifies a name for your agent. You can see this name in the DataSync\n console.

" + "smithy.api#documentation": "

Specifies a name for your agent. We recommend specifying a name that you can\n remember.

" } }, "Tags": { @@ -471,19 +471,19 @@ "VpcEndpointId": { "target": "com.amazonaws.datasync#VpcEndpointId", "traits": { - "smithy.api#documentation": "

Specifies the ID of the VPC endpoint that you want your agent to connect to. For example,\n a VPC endpoint ID looks like vpce-01234d5aff67890e1.

\n \n

The VPC endpoint you use must include the DataSync service name (for example,\n com.amazonaws.us-east-2.datasync).

\n
" + "smithy.api#documentation": "

Specifies the ID of the VPC service endpoint that you're using. For\n example, a VPC endpoint ID looks like vpce-01234d5aff67890e1.

\n \n

The VPC service endpoint you use must include the DataSync service name (for\n example, com.amazonaws.us-east-2.datasync).

\n
" } }, "SubnetArns": { "target": "com.amazonaws.datasync#PLSubnetArnList", "traits": { - "smithy.api#documentation": "

Specifies the ARN of the subnet where you want to run your DataSync task when\n using a VPC endpoint. This is the subnet where DataSync creates and manages the\n network\n interfaces for your transfer. You can only specify one ARN.

" + "smithy.api#documentation": "

Specifies the ARN of the subnet where your VPC service endpoint is located. You can only\n specify one ARN.

" } }, "SecurityGroupArns": { "target": "com.amazonaws.datasync#PLSecurityGroupArnList", "traits": { - "smithy.api#documentation": "

Specifies the Amazon Resource Name (ARN) of the security group that protects your task's\n network\n interfaces when using a virtual private cloud (VPC) endpoint. You can only specify one ARN.

" + "smithy.api#documentation": "

Specifies the Amazon Resource Name (ARN) of the security group that allows traffic between\n your agent and VPC service endpoint. You can only specify one ARN.

" } } }, @@ -626,20 +626,20 @@ "Subdirectory": { "target": "com.amazonaws.datasync#EfsSubdirectory", "traits": { - "smithy.api#documentation": "

Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data (depending on if this is a source or destination location).\n By default, DataSync uses the root directory, but you can also include\n subdirectories.

\n \n

You must specify a value with forward slashes (for example,\n /path/to/folder).

\n
" + "smithy.api#documentation": "

Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data (depending on if this is a source or destination location)\n on your file system.

\n

By default, DataSync uses the root directory (or access point if you provide one by using\n AccessPointArn). You can also include subdirectories using forward slashes (for\n example, /path/to/folder).

" } }, "EfsFilesystemArn": { "target": "com.amazonaws.datasync#EfsFilesystemArn", "traits": { - "smithy.api#documentation": "

Specifies the ARN for the Amazon EFS file system.

", + "smithy.api#documentation": "

Specifies the ARN for your Amazon EFS file system.

", "smithy.api#required": {} } }, "Ec2Config": { "target": "com.amazonaws.datasync#Ec2Config", "traits": { - "smithy.api#documentation": "

Specifies the subnet and security groups DataSync uses to access your Amazon EFS file system.

", + "smithy.api#documentation": "

Specifies the subnet and security groups DataSync uses to connect to one of\n your Amazon EFS file system's mount targets.

", "smithy.api#required": {} } }, @@ -652,19 +652,19 @@ "AccessPointArn": { "target": "com.amazonaws.datasync#EfsAccessPointArn", "traits": { - "smithy.api#documentation": "

Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses\n to access the Amazon EFS file system.

" + "smithy.api#documentation": "

Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses\n to mount your Amazon EFS file system.

\n

For more information, see Accessing restricted file systems.

" } }, "FileSystemAccessRoleArn": { "target": "com.amazonaws.datasync#IamRoleArn", "traits": { - "smithy.api#documentation": "

Specifies an Identity and Access Management (IAM) role that DataSync\n assumes when mounting the Amazon EFS file system.

" + "smithy.api#documentation": "

Specifies an Identity and Access Management (IAM) role that allows DataSync to access your Amazon EFS file system.

\n

For information on creating this role, see Creating a DataSync IAM role for file system access.

" } }, "InTransitEncryption": { "target": "com.amazonaws.datasync#EfsInTransitEncryption", "traits": { - "smithy.api#documentation": "

Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2\n encryption when it copies data to or from the Amazon EFS file system.

\n

If you specify an access point using AccessPointArn or an IAM\n role using FileSystemAccessRoleArn, you must set this parameter to\n TLS1_2.

" + "smithy.api#documentation": "

Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2\n encryption when it transfers data to or from your Amazon EFS file system.

\n

If you specify an access point using AccessPointArn or an IAM\n role using FileSystemAccessRoleArn, you must set this parameter to\n TLS1_2.

" } } }, @@ -944,7 +944,7 @@ "SecurityGroupArns": { "target": "com.amazonaws.datasync#Ec2SecurityGroupArnList", "traits": { - "smithy.api#documentation": "

Specifies the ARNs of the security groups that provide access to your file system's\n preferred subnet.

\n \n

If you choose a security group that doesn't allow connections from within itself, do one\n of the following:

\n
    \n
  • \n

    Configure the security group to allow it to communicate within itself.

    \n
  • \n
  • \n

    Choose a different security group that can communicate with the mount target's\n security group.

    \n
  • \n
\n
", + "smithy.api#documentation": "

Specifies the ARNs of the Amazon EC2 security groups that provide access to your file system's preferred subnet.

\n

The security groups that you specify must be able to communicate with your file system's\n security groups. For information about configuring security groups for file system access, see\n the \n Amazon FSx for Windows File Server User Guide\n .

\n \n

If you choose a security group that doesn't allow connections from within itself, do one\n of the following:

\n
    \n
  • \n

    Configure the security group to allow it to communicate within itself.

    \n
  • \n
  • \n

    Choose a different security group that can communicate with the mount target's\n security group.

    \n
  • \n
\n
", "smithy.api#required": {} } }, @@ -1087,7 +1087,7 @@ "AgentArns": { "target": "com.amazonaws.datasync#AgentArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of the agents that are used to connect to the HDFS\n cluster.

", + "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of the DataSync agents that can connect to your HDFS cluster.

", "smithy.api#required": {} } }, @@ -1108,7 +1108,7 @@ "LocationArn": { "target": "com.amazonaws.datasync#LocationArn", "traits": { - "smithy.api#documentation": "

The ARN of the source HDFS cluster location that's created.

" + "smithy.api#documentation": "

The ARN of the source HDFS cluster location that you create.

" } } }, @@ -1156,7 +1156,7 @@ "OnPremConfig": { "target": "com.amazonaws.datasync#OnPremConfig", "traits": { - "smithy.api#documentation": "

Specifies the Amazon Resource Name (ARN) of the DataSync agent that want to\n connect to your NFS file server.

\n

You can specify more than one agent. For more information, see Using multiple\n agents for transfers.

", + "smithy.api#documentation": "

Specifies the Amazon Resource Name (ARN) of the DataSync agent that can\n connect to your NFS file server.

\n

You can specify more than one agent. For more information, see Using multiple DataSync\n agents.

", "smithy.api#required": {} } }, @@ -1263,7 +1263,7 @@ "AgentArns": { "target": "com.amazonaws.datasync#AgentArnList", "traits": { - "smithy.api#documentation": "

Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can\n securely connect with your location.

", + "smithy.api#documentation": "

Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can\n connect with your object storage system.

", "smithy.api#required": {} } }, @@ -1441,7 +1441,7 @@ "AgentArns": { "target": "com.amazonaws.datasync#AgentArnList", "traits": { - "smithy.api#documentation": "

Specifies the DataSync agent (or agents) which you want to connect to your SMB\n file server. You specify an agent by using its Amazon Resource Name (ARN).

", + "smithy.api#documentation": "

Specifies the DataSync agent (or agents) that can connect to your SMB file\n server. You specify an agent by using its Amazon Resource Name (ARN).

", "smithy.api#required": {} } }, @@ -1518,7 +1518,7 @@ "CloudWatchLogGroupArn": { "target": "com.amazonaws.datasync#LogGroupArn", "traits": { - "smithy.api#documentation": "

Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for\n monitoring your task.

" + "smithy.api#documentation": "

Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for\n monitoring your task.

\n

For Enhanced mode tasks, you don't need to specify anything. DataSync\n automatically sends logs to a CloudWatch log group named /aws/datasync.

" } }, "Name": { @@ -1554,7 +1554,7 @@ "Includes": { "target": "com.amazonaws.datasync#FilterList", "traits": { - "smithy.api#documentation": "

Specifies include filters define the files, objects, and folders in your source location\n that you want DataSync to transfer. For more information and examples, see Specifying what DataSync transfers by using filters.

" + "smithy.api#documentation": "

Specifies include filters that define the files, objects, and folders in your source\n location that you want DataSync to transfer. For more information and examples, see\n Specifying what\n DataSync transfers by using filters.

" } }, "ManifestConfig": { @@ -1568,6 +1568,12 @@ "traits": { "smithy.api#documentation": "

Specifies how you want to configure a task report, which provides detailed information\n about your DataSync transfer. For more information, see Monitoring your DataSync\n transfers with task reports.

\n

When using this parameter, your caller identity (the role that you're using DataSync with) must have the iam:PassRole permission. The AWSDataSyncFullAccess policy includes this permission.

" } + }, + "TaskMode": { + "target": "com.amazonaws.datasync#TaskMode", + "traits": { + "smithy.api#documentation": "

Specifies one of the following task modes for your data transfer:

\n
    \n
  • \n

    \n ENHANCED - Transfer virtually unlimited numbers of objects with enhanced metrics, more detailed logs, and higher performance than Basic mode. Currently available for transfers between Amazon S3 locations.

    \n \n

    To create an Enhanced mode task, the IAM role that you use to call\n the CreateTask operation must have the\n iam:CreateServiceLinkedRole permission.

    \n
    \n
  • \n
  • \n

    \n BASIC (default) - Transfer files or objects between Amazon Web Services\n storage and on-premises, edge, or other cloud storage. DataSync\n quotas apply.

    \n
  • \n
\n

For more information, see Understanding task mode differences.

" + } } }, "traits": { @@ -2064,19 +2070,19 @@ "AccessPointArn": { "target": "com.amazonaws.datasync#EfsAccessPointArn", "traits": { - "smithy.api#documentation": "

The ARN of the access point that DataSync uses to access the Amazon EFS\n file system.

" + "smithy.api#documentation": "

The ARN of the access point that DataSync uses to access the Amazon EFS\n file system.

\n

For more information, see Accessing restricted file systems.

" } }, "FileSystemAccessRoleArn": { "target": "com.amazonaws.datasync#IamRoleArn", "traits": { - "smithy.api#documentation": "

The Identity and Access Management (IAM) role that DataSync assumes when\n mounting the Amazon EFS file system.

" + "smithy.api#documentation": "

The Identity and Access Management (IAM) role that allows DataSync to\n access your Amazon EFS file system.

\n

For more information, see Creating a DataSync IAM role for file system access.

" } }, "InTransitEncryption": { "target": "com.amazonaws.datasync#EfsInTransitEncryption", "traits": { - "smithy.api#documentation": "

Describes whether DataSync uses Transport Layer Security (TLS) encryption when\n copying data to or from the Amazon EFS file system.

" + "smithy.api#documentation": "

Indicates whether DataSync uses Transport Layer Security (TLS) encryption when\n transferring data to or from the Amazon EFS file system.

" } } }, @@ -2360,7 +2366,7 @@ "SecurityGroupArns": { "target": "com.amazonaws.datasync#Ec2SecurityGroupArnList", "traits": { - "smithy.api#documentation": "

The ARNs of the security groups that are configured for the FSx for Windows File Server file\n system.

" + "smithy.api#documentation": "

The ARNs of the Amazon EC2 security groups that provide access to your file\n system's preferred subnet.

\n

For information about configuring security groups for file system access, see the \n Amazon FSx for Windows File Server User Guide\n .

" } }, "CreationTime": { @@ -3170,7 +3176,7 @@ } ], "traits": { - "smithy.api#documentation": "

Provides information about an execution of your DataSync task. You can\n use this operation to help monitor the progress of an ongoing transfer or check the results of\n the transfer.

" + "smithy.api#documentation": "

Provides information about an execution of your DataSync task. You can\n use this operation to help monitor the progress of an ongoing data transfer or check the\n results of the transfer.

\n \n

Some DescribeTaskExecution response elements are only relevant to a\n specific task mode. For information, see Understanding task mode differences and Understanding data\n transfer performance metrics.

\n
" } }, "com.amazonaws.datasync#DescribeTaskExecutionRequest": { @@ -3235,42 +3241,42 @@ "target": "com.amazonaws.datasync#long", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The expected number of files, objects, and directories that DataSync will\n transfer over the network. This value is calculated during the task execution's\n PREPARING phase before the TRANSFERRING phase. The calculation is\n based on comparing the content of the source and destination locations and finding the\n difference that needs to be transferred.

" + "smithy.api#documentation": "

The number of files, objects, and directories that DataSync expects to\n transfer over the network. This value is calculated during the task execution's\n PREPARING\n step before the TRANSFERRING step.

\n

How this gets calculated depends primarily on your task’s transfer\n mode configuration:

\n
    \n
  • \n

    If TranserMode is set to CHANGED - The calculation is based\n on comparing the content of the source and destination locations and determining the\n difference that needs to be transferred. The difference can include:

    \n
      \n
    • \n

      Anything that's added or modified at the source location.

      \n
    • \n
    • \n

      Anything that's in both locations and modified at the destination after an initial\n transfer (unless OverwriteMode is set to NEVER).

      \n
    • \n
    • \n

      \n (Basic task mode only) The number of items that\n DataSync expects to delete (if PreserveDeletedFiles is set to\n REMOVE).

      \n
    • \n
    \n
  • \n
  • \n

    If TranserMode is set to ALL - The calculation is based only\n on the items that DataSync finds at the source location.

    \n
  • \n
" } }, "EstimatedBytesToTransfer": { "target": "com.amazonaws.datasync#long", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The estimated physical number of bytes that will transfer over the network.

" + "smithy.api#documentation": "

The number of logical bytes that DataSync expects to write to the destination\n location.

" } }, "FilesTransferred": { "target": "com.amazonaws.datasync#long", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The actual number of files, objects, and directories that DataSync\n transferred over the network. This value is updated periodically during the task execution's\n TRANSFERRING phase when something is read from the source and sent over the\n network.

\n

If DataSync fails to transfer something, this value can be less than\n EstimatedFilesToTransfer. In some cases, this value can also be greater than\n EstimatedFilesToTransfer. This element is implementation-specific for some\n location types, so don't use it as an exact indication of what transferred or to monitor your task execution.

" + "smithy.api#documentation": "

The number of files, objects, and directories that DataSync actually\n transfers over the network. This value is updated periodically during the task execution's\n TRANSFERRING\n step when something is read from the source and sent over the network.

\n

If DataSync fails to transfer something, this value can be less than\n EstimatedFilesToTransfer. In some cases, this value can also be greater than\n EstimatedFilesToTransfer. This element is implementation-specific for some\n location types, so don't use it as an exact indication of what's transferring or to monitor\n your task execution.

" } }, "BytesWritten": { "target": "com.amazonaws.datasync#long", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The number of logical bytes written to the destination location.

" + "smithy.api#documentation": "

The number of logical bytes that DataSync actually writes to the destination\n location.

" } }, "BytesTransferred": { "target": "com.amazonaws.datasync#long", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The total number of bytes that are involved in the transfer. For the number of bytes\n sent over the network, see BytesCompressed.

" + "smithy.api#documentation": "

The number of bytes that DataSync sends to the network before compression (if\n compression is possible). For the number of bytes transferred over the network, see BytesCompressed.

" } }, "BytesCompressed": { "target": "com.amazonaws.datasync#long", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The physical number of bytes transferred over the network after compression was applied.\n In most cases, this number is less than BytesTransferred unless the data isn't\n compressible.

" + "smithy.api#documentation": "

The number of physical bytes that DataSync transfers over the network after\n compression (if compression is possible). This number is typically less than BytesTransferred unless the data isn't compressible.

\n \n

Not currently supported with Enhanced mode\n tasks.

\n
" } }, "Result": { @@ -3289,21 +3295,21 @@ "target": "com.amazonaws.datasync#long", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The number of files, objects, and directories that DataSync deleted in your\n destination location. If you don't configure your task to\n delete data in the destination that isn't in the source, the value is always\n 0.

" + "smithy.api#documentation": "

The number of files, objects, and directories that DataSync actually deletes in\n your destination location. If you don't configure your task to\n delete data in the destination that isn't in the source, the value is always\n 0.

" } }, "FilesSkipped": { "target": "com.amazonaws.datasync#long", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The number of files, objects, and directories that DataSync skipped during your\n transfer.

" + "smithy.api#documentation": "

The number of files, objects, and directories that DataSync skips during your\n transfer.

" } }, "FilesVerified": { "target": "com.amazonaws.datasync#long", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The number of files, objects, and directories that DataSync verified during your\n transfer.

\n \n

When you configure your task to verify only the\n data that's transferred, DataSync doesn't verify directories in some\n situations or files that fail to transfer.

\n
" + "smithy.api#documentation": "

The number of files, objects, and directories that DataSync verifies during your\n transfer.

\n \n

When you configure your task to verify only the\n data that's transferred, DataSync doesn't verify directories in some\n situations or files that fail to transfer.

\n
" } }, "ReportResult": { @@ -3316,7 +3322,32 @@ "target": "com.amazonaws.datasync#long", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The expected number of files, objects, and directories that DataSync will delete\n in your destination location. If you don't configure your task to\n delete data in the destination that isn't in the source, the value is always\n 0.

" + "smithy.api#documentation": "

The number of files, objects, and directories that DataSync expects to delete in\n your destination location. If you don't configure your task to\n delete data in the destination that isn't in the source, the value is always\n 0.

" + } + }, + "TaskMode": { + "target": "com.amazonaws.datasync#TaskMode", + "traits": { + "smithy.api#documentation": "

The task mode that you're using. For more information, see Choosing a task mode for your data transfer.

" + } + }, + "FilesPrepared": { + "target": "com.amazonaws.datasync#long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The number of objects that DataSync will attempt to transfer after comparing\n your source and destination locations.

\n \n

Applies only to Enhanced mode\n tasks.

\n
\n

This metric isn't applicable if you configure your task to transfer all data. In that scenario, DataSync copies everything from the source to the destination without comparing differences between the locations.

" + } + }, + "FilesListed": { + "target": "com.amazonaws.datasync#TaskExecutionFilesListedDetail", + "traits": { + "smithy.api#documentation": "

The number of\n objects\n that DataSync\n finds\n at your locations.

\n \n

Applies only to Enhanced mode\n tasks.

\n
" + } + }, + "FilesFailed": { + "target": "com.amazonaws.datasync#TaskExecutionFilesFailedDetail", + "traits": { + "smithy.api#documentation": "

The number of objects that DataSync fails to prepare, transfer, verify, and\n delete during your task execution.

\n \n

Applies only to Enhanced mode\n tasks.

\n
" } } }, @@ -3383,7 +3414,7 @@ "CloudWatchLogGroupArn": { "target": "com.amazonaws.datasync#LogGroupArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your\n task.

\n

For more information, see Monitoring DataSync with\n Amazon CloudWatch.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your\n task.

\n

For more information, see Monitoring data transfers with\n CloudWatch Logs.

" } }, "SourceNetworkInterfaceArns": { @@ -3457,6 +3488,12 @@ "traits": { "smithy.api#documentation": "

The details about your task schedule.

" } + }, + "TaskMode": { + "target": "com.amazonaws.datasync#TaskMode", + "traits": { + "smithy.api#documentation": "

The task mode that you're using. For more information, see Choosing a task mode for your data transfer.

" + } } }, "traits": { @@ -3699,7 +3736,7 @@ } }, "traits": { - "smithy.api#documentation": "

The subnet and security groups that DataSync uses to access your Amazon EFS file system.

" + "smithy.api#documentation": "

The subnet and security groups that DataSync uses to connect to one of your\n Amazon EFS file system's mount targets.

" } }, "com.amazonaws.datasync#Ec2SecurityGroupArn": { @@ -6902,13 +6939,13 @@ "AgentArns": { "target": "com.amazonaws.datasync#AgentArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of the agents connecting to a transfer\n location.

", + "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of the DataSync agents that can connect to your NFS file server.

\n

You can specify more than one agent. For more information, see Using multiple DataSync\n agents.

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

The DataSync agents that are connecting to a Network File System (NFS)\n location.

" + "smithy.api#documentation": "

The DataSync agents that can connect to your Network File System (NFS)\n file server.

" } }, "com.amazonaws.datasync#Operator": { @@ -6982,7 +7019,7 @@ "VerifyMode": { "target": "com.amazonaws.datasync#VerifyMode", "traits": { - "smithy.api#documentation": "

Specifies how and when DataSync checks the integrity of your data during a\n transfer.

\n
    \n
  • \n

    \n ONLY_FILES_TRANSFERRED (recommended) - DataSync calculates\n the checksum of transferred files and metadata at the source location. At the end of the\n transfer, DataSync then compares this checksum to the checksum calculated on\n those files at the destination.

    \n

    We recommend this option when transferring to S3 Glacier Flexible Retrieval\n or S3 Glacier Deep Archive storage classes. For more information, see\n Storage\n class considerations with Amazon S3 locations.

    \n
  • \n
  • \n

    \n POINT_IN_TIME_CONSISTENT (default) - At the end of the transfer,\n DataSync scans the entire source and destination to verify that both locations\n are fully synchronized.

    \n

    If you use a manifest, DataSync only scans and\n verifies what's listed in the manifest.

    \n

    You can't use this option when transferring to S3 Glacier Flexible Retrieval\n or S3 Glacier Deep Archive storage classes. For more information, see\n Storage\n class considerations with Amazon S3 locations.

    \n
  • \n
  • \n

    \n NONE - DataSync doesn't run additional verification at the\n end of the transfer. All data transmissions are still integrity-checked with checksum\n verification during the transfer.

    \n
  • \n
" + "smithy.api#documentation": "

Specifies if and how DataSync checks the integrity of your data at the end of\n your transfer.

\n
    \n
  • \n

    \n ONLY_FILES_TRANSFERRED (recommended) - DataSync calculates\n the checksum of transferred data (including metadata) at the source location. At the end\n of the transfer, DataSync then compares this checksum to the checksum calculated\n on that data at the destination.

    \n \n

    This is the default option for Enhanced mode\n tasks.

    \n
    \n

    We recommend this option when transferring to S3 Glacier Flexible Retrieval\n or S3 Glacier Deep Archive storage classes. For more information, see\n Storage\n class considerations with Amazon S3 locations.

    \n
  • \n
  • \n

    \n POINT_IN_TIME_CONSISTENT - At the end of the transfer, DataSync checks the entire source and destination to verify that both locations are\n fully synchronized.

    \n \n

    The is the default option for Basic mode tasks and\n isn't currently supported with Enhanced mode tasks.

    \n
    \n

    If you use a manifest, DataSync only scans and\n verifies what's listed in the manifest.

    \n

    You can't use this option when transferring to S3 Glacier Flexible Retrieval\n or S3 Glacier Deep Archive storage classes. For more information, see\n Storage\n class considerations with Amazon S3 locations.

    \n
  • \n
  • \n

    \n NONE - DataSync performs data integrity checks only during\n your transfer. Unlike other options, there's no additional verification at the end of your\n transfer.

    \n
  • \n
" } }, "OverwriteMode": { @@ -6994,13 +7031,13 @@ "Atime": { "target": "com.amazonaws.datasync#Atime", "traits": { - "smithy.api#documentation": "

Specifies whether to preserve metadata indicating the last time a file was read or\n written to.

\n \n

The behavior of Atime isn't fully standard across platforms, so DataSync can only do this on a best-effort basis.

\n
\n
    \n
  • \n

    \n BEST_EFFORT (default) - DataSync attempts to preserve the\n original Atime attribute on all source files (that is, the version before the\n PREPARING phase of the task execution). This option is\n recommended.

    \n
  • \n
  • \n

    \n NONE - Ignores Atime.

    \n
  • \n
\n \n

If Atime is set to BEST_EFFORT, Mtime must be set\n to PRESERVE.

\n

If Atime is set to NONE, Mtime must also be\n NONE.

\n
" + "smithy.api#documentation": "

Specifies whether to preserve metadata indicating the last time a file was read or\n written to.

\n \n

The behavior of Atime isn't fully standard across platforms, so DataSync can only do this on a best-effort basis.

\n
\n
    \n
  • \n

    \n BEST_EFFORT (default) - DataSync attempts to preserve the\n original Atime attribute on all source files (that is, the version before the\n PREPARING steps of the task execution). This option is\n recommended.

    \n
  • \n
  • \n

    \n NONE - Ignores Atime.

    \n
  • \n
\n \n

If Atime is set to BEST_EFFORT, Mtime must be set\n to PRESERVE.

\n

If Atime is set to NONE, Mtime must also be\n NONE.

\n
" } }, "Mtime": { "target": "com.amazonaws.datasync#Mtime", "traits": { - "smithy.api#documentation": "

Specifies whether to preserve metadata indicating the last time that a file was written\n to before the PREPARING phase of your task execution. This option is required\n when you need to run the a task more than once.

\n
    \n
  • \n

    \n PRESERVE (default) - Preserves original Mtime, which is\n recommended.

    \n
  • \n
  • \n

    \n NONE - Ignores Mtime.

    \n
  • \n
\n \n

If Mtime is set to PRESERVE, Atime must be set to\n BEST_EFFORT.

\n

If Mtime is set to NONE, Atime must also be set\n to NONE.

\n
" + "smithy.api#documentation": "

Specifies whether to preserve metadata indicating the last time that a file was written\n to before the PREPARING step of your task execution. This option is required when\n you need to run the a task more than once.

\n
    \n
  • \n

    \n PRESERVE (default) - Preserves original Mtime, which is\n recommended.

    \n
  • \n
  • \n

    \n NONE - Ignores Mtime.

    \n
  • \n
\n \n

If Mtime is set to PRESERVE, Atime must be set to\n BEST_EFFORT.

\n

If Mtime is set to NONE, Atime must also be set\n to NONE.

\n
" } }, "Uid": { @@ -7012,7 +7049,7 @@ "Gid": { "target": "com.amazonaws.datasync#Gid", "traits": { - "smithy.api#documentation": "

Specifies the POSIX group ID (GID) of the file's owners.

\n
    \n
  • \n

    \n INT_VALUE (default) - Preserves the integer value of user ID (UID) and\n GID, which is recommended.

    \n
  • \n
  • \n

    \n NONE - Ignores UID and GID.

    \n
  • \n
\n

For more information, see Metadata copied by DataSync.

" + "smithy.api#documentation": "

Specifies the POSIX group ID (GID) of the file's owners.

\n
    \n
  • \n

    \n INT_VALUE (default) - Preserves the integer value of user ID (UID) and\n GID, which is recommended.

    \n
  • \n
  • \n

    \n NONE - Ignores UID and GID.

    \n
  • \n
\n

For more information, see Understanding how DataSync handles file and object metadata.

" } }, "PreserveDeletedFiles": { @@ -7030,13 +7067,13 @@ "PosixPermissions": { "target": "com.amazonaws.datasync#PosixPermissions", "traits": { - "smithy.api#documentation": "

Specifies which users or groups can access a file for a specific purpose such as reading,\n writing, or execution of the file.

\n

For more information, see Metadata copied by DataSync.

\n
    \n
  • \n

    \n PRESERVE (default) - Preserves POSIX-style permissions, which is\n recommended.

    \n
  • \n
  • \n

    \n NONE - Ignores POSIX-style permissions.

    \n
  • \n
\n \n

DataSync can preserve extant permissions of a source location.

\n
" + "smithy.api#documentation": "

Specifies which users or groups can access a file for a specific purpose such as reading,\n writing, or execution of the file.

\n

For more information, see Understanding how DataSync handles file and object metadata.

\n
    \n
  • \n

    \n PRESERVE (default) - Preserves POSIX-style permissions, which is\n recommended.

    \n
  • \n
  • \n

    \n NONE - Ignores POSIX-style permissions.

    \n
  • \n
\n \n

DataSync can preserve extant permissions of a source location.

\n
" } }, "BytesPerSecond": { "target": "com.amazonaws.datasync#BytesPerSecond", "traits": { - "smithy.api#documentation": "

Limits the bandwidth used by a DataSync task. For example, if you want\n DataSync to use a maximum of 1 MB, set this value to 1048576\n (=1024*1024).

" + "smithy.api#documentation": "

Limits the bandwidth used by a DataSync task. For example, if you want\n DataSync to use a maximum of 1 MB, set this value to 1048576\n (=1024*1024).

\n \n

Not applicable to Enhanced mode\n tasks.

\n
" } }, "TaskQueueing": { @@ -7054,13 +7091,13 @@ "TransferMode": { "target": "com.amazonaws.datasync#TransferMode", "traits": { - "smithy.api#documentation": "

Determines whether DataSync transfers only the data and metadata that differ\n between the source and the destination location or transfers all the content from the source\n (without comparing what's in the destination).

\n
    \n
  • \n

    \n CHANGED (default) - DataSync copies only data or metadata that\n is new or different content from the source location to the destination location.

    \n
  • \n
  • \n

    \n ALL - DataSync copies everything in the source to the\n destination without comparing differences between the locations.

    \n
  • \n
" + "smithy.api#documentation": "

Specifies whether DataSync transfers only the data (including metadata) that\n differs between locations following an initial copy or transfers all data every time you run\n the task. If you're planning on recurring transfers, you might only want to transfer what's\n changed since your previous task execution.

\n
    \n
  • \n

    \n CHANGED (default) - After your initial full transfer, DataSync\n copies only the data and metadata that differs between the source and destination\n location.

    \n
  • \n
  • \n

    \n ALL - DataSync copies everything in the source to the\n destination without comparing differences between the locations.

    \n
  • \n
" } }, "SecurityDescriptorCopyFlags": { "target": "com.amazonaws.datasync#SmbSecurityDescriptorCopyFlags", "traits": { - "smithy.api#documentation": "

Specifies which components of the SMB security descriptor are copied from source to\n destination objects.

\n

This value is only used for transfers between SMB and Amazon FSx for Windows File Server\n locations or between two FSx for Windows File Server locations. For more information, see how DataSync handles metadata.

\n
    \n
  • \n

    \n OWNER_DACL (default) - For each copied object, DataSync copies\n the following metadata:

    \n
      \n
    • \n

      The object owner.

      \n
    • \n
    • \n

      NTFS discretionary access control lists (DACLs), which determine whether to grant\n access to an object.

      \n

      DataSync won't copy NTFS system access control lists (SACLs) with this\n option.

      \n
    • \n
    \n
  • \n
  • \n

    \n OWNER_DACL_SACL - For each copied object, DataSync copies the\n following metadata:

    \n
      \n
    • \n

      The object owner.

      \n
    • \n
    • \n

      NTFS discretionary access control lists (DACLs), which determine whether to grant\n access to an object.

      \n
    • \n
    • \n

      SACLs, which are used by administrators to log attempts to access a secured\n object.

      \n

      Copying SACLs requires granting additional permissions to the Windows user that\n DataSync uses to access your SMB location. For information about choosing\n a user with the right permissions, see required permissions for SMB, FSx for Windows File Server, or FSx for ONTAP (depending\n on the type of location in your transfer).

      \n
    • \n
    \n
  • \n
  • \n

    \n NONE - None of the SMB security descriptor components are copied.\n Destination objects are owned by the user that was provided for accessing the destination\n location. DACLs and SACLs are set based on the destination server’s configuration.

    \n
  • \n
" + "smithy.api#documentation": "

Specifies which components of the SMB security descriptor are copied from source to\n destination objects.

\n

This value is only used for transfers between SMB and Amazon FSx for Windows File Server\n locations or between two FSx for Windows File Server locations. For more information, see Understanding how DataSync handles file and object metadata.

\n
    \n
  • \n

    \n OWNER_DACL (default) - For each copied object, DataSync copies\n the following metadata:

    \n
      \n
    • \n

      The object owner.

      \n
    • \n
    • \n

      NTFS discretionary access control lists (DACLs), which determine whether to grant\n access to an object.

      \n

      DataSync won't copy NTFS system access control lists (SACLs) with this\n option.

      \n
    • \n
    \n
  • \n
  • \n

    \n OWNER_DACL_SACL - For each copied object, DataSync copies the\n following metadata:

    \n
      \n
    • \n

      The object owner.

      \n
    • \n
    • \n

      NTFS discretionary access control lists (DACLs), which determine whether to grant\n access to an object.

      \n
    • \n
    • \n

      SACLs, which are used by administrators to log attempts to access a secured\n object.

      \n

      Copying SACLs requires granting additional permissions to the Windows user that\n DataSync uses to access your SMB location. For information about choosing\n a user with the right permissions, see required permissions for SMB, FSx for Windows File Server, or FSx for ONTAP (depending\n on the type of location in your transfer).

      \n
    • \n
    \n
  • \n
  • \n

    \n NONE - None of the SMB security descriptor components are copied.\n Destination objects are owned by the user that was provided for accessing the destination\n location. DACLs and SACLs are set based on the destination server’s configuration.

    \n
  • \n
" } }, "ObjectTags": { @@ -7253,7 +7290,7 @@ "PrivateLinkEndpoint": { "target": "com.amazonaws.datasync#Endpoint", "traits": { - "smithy.api#documentation": "

Specifies the VPC endpoint provided by Amazon Web Services PrivateLink that\n your agent connects to.

" + "smithy.api#documentation": "

Specifies the VPC endpoint provided by Amazon Web Services PrivateLink that\n your agent connects to.

" } }, "SubnetArns": { @@ -7696,9 +7733,9 @@ "traits": { "smithy.api#length": { "min": 0, - "max": 156 + "max": 268 }, - "smithy.api#pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):(s3|s3-outposts):[a-z\\-0-9]*:[0-9]*:.*$" + "smithy.api#pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):s3:[a-z\\-0-9]*:[0-9]{12}:accesspoint[/:][a-zA-Z0-9\\-.]{1,63}$|^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):s3-outposts:[a-z\\-0-9]+:[0-9]{12}:outpost[/:][a-zA-Z0-9\\-]{1,63}[/:]accesspoint[/:][a-zA-Z0-9\\-]{1,63}$|^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):s3:::[a-zA-Z0-9.\\-_]{1,255}$" } }, "com.amazonaws.datasync#S3Config": { @@ -8122,7 +8159,7 @@ } ], "traits": { - "smithy.api#documentation": "

Starts an DataSync transfer task. For each task, you can only run one task\n execution at a time.

\n

There are several phases to a task execution. For more information, see Task execution statuses.

\n \n

If you're planning to transfer data to or from an Amazon S3 location, review\n how\n DataSync can affect your S3 request charges and the DataSync pricing page before\n you begin.

\n
" + "smithy.api#documentation": "

Starts an DataSync transfer task. For each task, you can only run one task\n execution at a time.

\n

There are several steps to a task execution. For more information, see Task execution statuses.

\n \n

If you're planning to transfer data to or from an Amazon S3 location, review\n how\n DataSync can affect your S3 request charges and the DataSync pricing page before\n you begin.

\n
" } }, "com.amazonaws.datasync#StartTaskExecutionRequest": { @@ -8436,6 +8473,64 @@ "smithy.api#pattern": "^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}/execution/exec-[0-9a-f]{17}$" } }, + "com.amazonaws.datasync#TaskExecutionFilesFailedDetail": { + "type": "structure", + "members": { + "Prepare": { + "target": "com.amazonaws.datasync#long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The number of objects that DataSync fails to prepare during your task\n execution.

" + } + }, + "Transfer": { + "target": "com.amazonaws.datasync#long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The number of objects that DataSync fails to transfer during your task\n execution.

" + } + }, + "Verify": { + "target": "com.amazonaws.datasync#long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The number of objects that DataSync fails to verify during your task\n execution.

" + } + }, + "Delete": { + "target": "com.amazonaws.datasync#long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The number of objects that DataSync fails to delete during your task\n execution.

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

The number of objects that DataSync fails to prepare, transfer, verify, and\n delete during your task execution.

\n \n

Applies only to Enhanced mode\n tasks.

\n
" + } + }, + "com.amazonaws.datasync#TaskExecutionFilesListedDetail": { + "type": "structure", + "members": { + "AtSource": { + "target": "com.amazonaws.datasync#long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The number of objects that DataSync finds at your source location.

\n
    \n
  • \n

    With a manifest, DataSync\n lists only what's in your manifest (and not everything at your source location).

    \n
  • \n
  • \n

    With an include filter, DataSync lists only what\n matches the filter at your source location.

    \n
  • \n
  • \n

    With an exclude filter, DataSync lists everything at your source location before applying\n the filter.

    \n
  • \n
" + } + }, + "AtDestinationForDelete": { + "target": "com.amazonaws.datasync#long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The number of objects that DataSync finds at your destination location. This metric is only applicable if you configure your task to delete data in the destination that isn't in the source.

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

The number of objects that DataSync finds at your locations.

\n \n

Applies only to Enhanced mode\n tasks.

\n
" + } + }, "com.amazonaws.datasync#TaskExecutionList": { "type": "list", "member": { @@ -8456,6 +8551,12 @@ "traits": { "smithy.api#documentation": "

The status of a task execution. For more information, see Task execution statuses.

" } + }, + "TaskMode": { + "target": "com.amazonaws.datasync#TaskMode", + "traits": { + "smithy.api#documentation": "

The task mode that you're using. For more information, see Choosing a task mode for your data transfer.

" + } } }, "traits": { @@ -8468,60 +8569,60 @@ "PrepareDuration": { "target": "com.amazonaws.datasync#Duration", "traits": { - "smithy.api#documentation": "

The total time in milliseconds that DataSync spent in the PREPARING\n phase.

" + "smithy.api#documentation": "

The time in milliseconds that your task execution was in the PREPARING\n step. For more information, see Task\n execution statuses.

\n

For Enhanced mode tasks, the value is always 0. For more information, see\n How DataSync prepares your data transfer.

" } }, "PrepareStatus": { "target": "com.amazonaws.datasync#PhaseStatus", "traits": { - "smithy.api#documentation": "

The status of the PREPARING phase.

" + "smithy.api#documentation": "

The status of the PREPARING step for your task execution. For more\n information, see Task\n execution statuses.

" } }, "TotalDuration": { "target": "com.amazonaws.datasync#Duration", "traits": { - "smithy.api#documentation": "

The total time in milliseconds that DataSync took to transfer the file from\n the source to the destination location.

" + "smithy.api#documentation": "

The time in milliseconds that your task execution ran.

" } }, "TransferDuration": { "target": "com.amazonaws.datasync#Duration", "traits": { - "smithy.api#documentation": "

The total time in milliseconds that DataSync spent in the TRANSFERRING\n phase.

" + "smithy.api#documentation": "

The time in milliseconds that your task execution was in the TRANSFERRING\n step. For more information, see Task\n execution statuses.

\n

For Enhanced mode tasks, the value is always 0. For more information, see\n How DataSync transfers your data.

" } }, "TransferStatus": { "target": "com.amazonaws.datasync#PhaseStatus", "traits": { - "smithy.api#documentation": "

The status of the TRANSFERRING phase.

" + "smithy.api#documentation": "

The status of the TRANSFERRING step for your task execution. For more\n information, see Task\n execution statuses.

" } }, "VerifyDuration": { "target": "com.amazonaws.datasync#Duration", "traits": { - "smithy.api#documentation": "

The total time in milliseconds that DataSync spent in the VERIFYING\n phase.

" + "smithy.api#documentation": "

The time in milliseconds that your task execution was in the VERIFYING\n step. For more information, see Task\n execution statuses.

\n

For Enhanced mode tasks, the value is always 0. For more information, see\n How DataSync verifies your data's integrity.

" } }, "VerifyStatus": { "target": "com.amazonaws.datasync#PhaseStatus", "traits": { - "smithy.api#documentation": "

The status of the VERIFYING phase.

" + "smithy.api#documentation": "

The status of the VERIFYING step for your task execution. For more\n information, see Task\n execution statuses.

" } }, "ErrorCode": { "target": "com.amazonaws.datasync#string", "traits": { - "smithy.api#documentation": "

Errors that DataSync encountered during execution of the task. You can\n use this error code to help troubleshoot issues.

" + "smithy.api#documentation": "

An error that DataSync encountered during your task execution. You can use\n this information to help troubleshoot\n issues.

" } }, "ErrorDetail": { "target": "com.amazonaws.datasync#string", "traits": { - "smithy.api#documentation": "

Detailed description of an error that was encountered during the task execution. You\n can use this information to help troubleshoot issues.

" + "smithy.api#documentation": "

The detailed description of an error that DataSync encountered during your\n task execution. You can use this information to help troubleshoot\n issues.

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

Describes the detailed result of a TaskExecution operation. This result\n includes the time in milliseconds spent in each phase, the status of the task execution, and\n the errors encountered.

" + "smithy.api#documentation": "

Provides detailed information about the result of your DataSync task\n execution.

" } }, "com.amazonaws.datasync#TaskExecutionStatus": { @@ -8655,12 +8756,35 @@ "traits": { "smithy.api#documentation": "

The name of the task.

" } + }, + "TaskMode": { + "target": "com.amazonaws.datasync#TaskMode", + "traits": { + "smithy.api#documentation": "

The task mode that you're using. For more information, see Choosing a task mode for your data transfer.

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

Represents a single entry in a list of tasks. TaskListEntry returns an\n array that contains a list of tasks when the ListTasks operation is called. A\n task includes the source and destination file systems to sync and the options to use for the\n tasks.

" } }, + "com.amazonaws.datasync#TaskMode": { + "type": "enum", + "members": { + "BASIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BASIC" + } + }, + "ENHANCED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENHANCED" + } + } + } + }, "com.amazonaws.datasync#TaskQueueing": { "type": "enum", "members": { @@ -8722,7 +8846,7 @@ "ScheduleExpression": { "target": "com.amazonaws.datasync#ScheduleExpressionCron", "traits": { - "smithy.api#documentation": "

Specifies your task schedule by using a cron expression in UTC time. For information about\n cron expression syntax, see the \n Amazon EventBridge User\n Guide\n .

", + "smithy.api#documentation": "

Specifies your task schedule by using a cron or rate expression.

\n

Use cron expressions for task schedules that run on a specific time and day. For example,\n the following cron expression creates a task schedule that runs at 8 AM on the first Wednesday\n of every month:

\n

\n cron(0 8 * * 3#1)\n

\n

Use rate expressions for task schedules that run on a regular interval. For example, the\n following rate expression creates a task schedule that runs every 12 hours:

\n

\n rate(12 hours)\n

\n

For information about cron and rate expression syntax, see the \n Amazon EventBridge User Guide\n .

", "smithy.api#required": {} } }, @@ -9210,7 +9334,7 @@ "AgentArns": { "target": "com.amazonaws.datasync#AgentArnList", "traits": { - "smithy.api#documentation": "

The ARNs of the agents that are used to connect to the HDFS cluster.

" + "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of the DataSync agents that can connect to your HDFS cluster.

" } } }, @@ -9342,7 +9466,7 @@ "AgentArns": { "target": "com.amazonaws.datasync#AgentArnList", "traits": { - "smithy.api#documentation": "

Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can\n securely connect with your location.

" + "smithy.api#documentation": "

Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can\n connect with your object storage system.

" } }, "ServerCertificate": { @@ -9420,7 +9544,7 @@ "AgentArns": { "target": "com.amazonaws.datasync#AgentArnList", "traits": { - "smithy.api#documentation": "

Specifies the DataSync agent (or agents) which you want to connect to your SMB file server. You specify an agent by using its Amazon Resource Name (ARN).

" + "smithy.api#documentation": "

Specifies the DataSync agent (or agents) that can connect to your SMB file\n server. You specify an agent by using its Amazon Resource Name (ARN).

" } }, "MountOptions": { @@ -9615,7 +9739,7 @@ "CloudWatchLogGroupArn": { "target": "com.amazonaws.datasync#LogGroupArn", "traits": { - "smithy.api#documentation": "

Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for\n monitoring your task.

" + "smithy.api#documentation": "

Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for\n monitoring your task.

\n

For Enhanced mode tasks, you must use /aws/datasync as your log group\n name. For example:

\n

\n arn:aws:logs:us-east-1:111222333444:log-group:/aws/datasync:*\n

\n

For more information, see Monitoring data transfers with\n CloudWatch Logs.

" } }, "Includes": { diff --git a/codegen/sdk-codegen/aws-models/ec2.json b/codegen/sdk-codegen/aws-models/ec2.json index f3c18ebb06c..8c6c006cb04 100644 --- a/codegen/sdk-codegen/aws-models/ec2.json +++ b/codegen/sdk-codegen/aws-models/ec2.json @@ -2282,6 +2282,9 @@ { "target": "com.amazonaws.ec2#AssociateRouteTable" }, + { + "target": "com.amazonaws.ec2#AssociateSecurityGroupVpc" + }, { "target": "com.amazonaws.ec2#AssociateSubnetCidrBlock" }, @@ -3185,6 +3188,9 @@ { "target": "com.amazonaws.ec2#DescribeSecurityGroups" }, + { + "target": "com.amazonaws.ec2#DescribeSecurityGroupVpcAssociations" + }, { "target": "com.amazonaws.ec2#DescribeSnapshotAttribute" }, @@ -3431,6 +3437,9 @@ { "target": "com.amazonaws.ec2#DisassociateRouteTable" }, + { + "target": "com.amazonaws.ec2#DisassociateSecurityGroupVpc" + }, { "target": "com.amazonaws.ec2#DisassociateSubnetCidrBlock" }, @@ -7091,6 +7100,64 @@ "smithy.api#output": {} } }, + "com.amazonaws.ec2#AssociateSecurityGroupVpc": { + "type": "operation", + "input": { + "target": "com.amazonaws.ec2#AssociateSecurityGroupVpcRequest" + }, + "output": { + "target": "com.amazonaws.ec2#AssociateSecurityGroupVpcResult" + }, + "traits": { + "smithy.api#documentation": "

Associates a security group with another VPC in the same Region. This enables you to use the same security group with network interfaces and instances in the specified VPC.

\n \n
    \n
  • \n

    The VPC you want to associate the security group with must be in the same Region.

    \n
  • \n
  • \n

    You can associate the security group with another VPC if your account owns the VPC or if the VPC was shared with you.

    \n
  • \n
  • \n

    You must own the security group and the VPC that it was created in.

    \n
  • \n
  • \n

    You cannot use this feature with default security groups.

    \n
  • \n
  • \n

    You cannot use this feature with the default VPC.

    \n
  • \n
\n
" + } + }, + "com.amazonaws.ec2#AssociateSecurityGroupVpcRequest": { + "type": "structure", + "members": { + "GroupId": { + "target": "com.amazonaws.ec2#SecurityGroupId", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#documentation": "

A security group ID.

", + "smithy.api#required": {} + } + }, + "VpcId": { + "target": "com.amazonaws.ec2#VpcId", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#documentation": "

A VPC ID.

", + "smithy.api#required": {} + } + }, + "DryRun": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "smithy.api#documentation": "

Checks whether you have the required permissions for the action, without actually making the request, \n and provides an error response. If you have the required permissions, the error response is DryRunOperation. \n Otherwise, it is UnauthorizedOperation.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.ec2#AssociateSecurityGroupVpcResult": { + "type": "structure", + "members": { + "State": { + "target": "com.amazonaws.ec2#SecurityGroupVpcAssociationState", + "traits": { + "aws.protocols#ec2QueryName": "State", + "smithy.api#documentation": "

The state of the association.

", + "smithy.api#xmlName": "state" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.ec2#AssociateSubnetCidrBlock": { "type": "operation", "input": { @@ -18091,7 +18158,7 @@ "InterfaceType": { "target": "com.amazonaws.ec2#NetworkInterfaceCreationType", "traits": { - "smithy.api#documentation": "

The type of network interface. The default is interface.

\n

The only supported values are interface, efa, and trunk.

" + "smithy.api#documentation": "

The type of network interface. The default is interface.

\n

If you specify efa-only, do not assign any IP addresses to the network \n interface. EFA-only network interfaces do not support IP addresses.

\n

The only supported values are interface, efa, efa-only, and trunk.

" } }, "TagSpecifications": { @@ -18954,6 +19021,14 @@ "smithy.api#documentation": "

The tags assigned to the security group.

", "smithy.api#xmlName": "tagSet" } + }, + "SecurityGroupArn": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "SecurityGroupArn", + "smithy.api#documentation": "

The security group ARN.

", + "smithy.api#xmlName": "securityGroupArn" + } } }, "traits": { @@ -19753,7 +19828,7 @@ "target": "com.amazonaws.ec2#CreateTrafficMirrorSessionResult" }, "traits": { - "smithy.api#documentation": "

Creates a Traffic Mirror session.

\n

A Traffic Mirror session actively copies packets from a Traffic Mirror source to a Traffic Mirror target. Create a filter, and then assign it\n to the session to define a subset of the traffic to mirror, for example all TCP\n traffic.

\n

The Traffic Mirror source and the Traffic Mirror target (monitoring appliances) can be in the same VPC, or in a different VPC connected via VPC peering or a transit gateway.

\n

By default, no traffic is mirrored. Use CreateTrafficMirrorFilter to\n create filter rules that specify the traffic to mirror.

" + "smithy.api#documentation": "

Creates a Traffic Mirror session.

\n

A Traffic Mirror session actively copies packets from a Traffic Mirror source to a Traffic Mirror target. Create a filter, and then assign it\n to the session to define a subset of the traffic to mirror, for example all TCP\n traffic.

\n

The Traffic Mirror source and the Traffic Mirror target (monitoring appliances) can be in the same VPC, or in a different VPC connected via VPC peering or a transit gateway.

\n

By default, no traffic is mirrored. Use CreateTrafficMirrorFilter to\n create filter rules that specify the traffic to mirror.

" } }, "com.amazonaws.ec2#CreateTrafficMirrorSessionRequest": { @@ -25245,7 +25320,7 @@ "target": "smithy.api#Unit" }, "traits": { - "smithy.api#documentation": "

Deletes a security group.

\n

If you attempt to delete a security group that is associated with an instance or network interface or is\n\t\t\t referenced by another security group in the same VPC, the operation fails with\n\t\t\t\tDependencyViolation.

", + "smithy.api#documentation": "

Deletes a security group.

\n

If you attempt to delete a security group that is associated with an instance or network interface, is\n\t\t\t referenced by another security group in the same VPC, or has a VPC association, the operation fails with\n\t\t\t\tDependencyViolation.

", "smithy.api#examples": [ { "title": "To delete a security group", @@ -32812,7 +32887,7 @@ "Filters": { "target": "com.amazonaws.ec2#FilterList", "traits": { - "smithy.api#documentation": "

One or more filters. Filter names and values are case-sensitive.

\n
    \n
  • \n

    \n auto-recovery-supported - Indicates whether Amazon CloudWatch action\n based recovery is supported (true | false).

    \n
  • \n
  • \n

    \n bare-metal - Indicates whether it is a bare metal instance type\n (true | false).

    \n
  • \n
  • \n

    \n burstable-performance-supported - Indicates whether the instance type is a\n burstable performance T instance type (true | false).

    \n
  • \n
  • \n

    \n current-generation - Indicates whether this instance type is the latest\n generation instance type of an instance family (true | false).

    \n
  • \n
  • \n

    \n ebs-info.ebs-optimized-info.baseline-bandwidth-in-mbps - The baseline\n bandwidth performance for an EBS-optimized instance type, in Mbps.

    \n
  • \n
  • \n

    \n ebs-info.ebs-optimized-info.baseline-iops - The baseline input/output storage\n operations per second for an EBS-optimized instance type.

    \n
  • \n
  • \n

    \n ebs-info.ebs-optimized-info.baseline-throughput-in-mbps - The baseline\n throughput performance for an EBS-optimized instance type, in MB/s.

    \n
  • \n
  • \n

    \n ebs-info.ebs-optimized-info.maximum-bandwidth-in-mbps - The maximum bandwidth\n performance for an EBS-optimized instance type, in Mbps.

    \n
  • \n
  • \n

    \n ebs-info.ebs-optimized-info.maximum-iops - The maximum input/output storage\n operations per second for an EBS-optimized instance type.

    \n
  • \n
  • \n

    \n ebs-info.ebs-optimized-info.maximum-throughput-in-mbps - The maximum\n throughput performance for an EBS-optimized instance type, in MB/s.

    \n
  • \n
  • \n

    \n ebs-info.ebs-optimized-support - Indicates whether the instance type is\n EBS-optimized (supported | unsupported |\n default).

    \n
  • \n
  • \n

    \n ebs-info.encryption-support - Indicates whether EBS encryption is supported\n (supported | unsupported).

    \n
  • \n
  • \n

    \n ebs-info.nvme-support - Indicates whether non-volatile memory express (NVMe)\n is supported for EBS volumes (required | supported |\n unsupported).

    \n
  • \n
  • \n

    \n free-tier-eligible - Indicates whether the instance type is eligible to use\n in the free tier (true | false).

    \n
  • \n
  • \n

    \n hibernation-supported - Indicates whether On-Demand hibernation is supported\n (true | false).

    \n
  • \n
  • \n

    \n hypervisor - The hypervisor (nitro | xen).

    \n
  • \n
  • \n

    \n instance-storage-info.disk.count - The number of local disks.

    \n
  • \n
  • \n

    \n instance-storage-info.disk.size-in-gb - The storage size of each instance\n storage disk, in GB.

    \n
  • \n
  • \n

    \n instance-storage-info.disk.type - The storage technology for the local\n instance storage disks (hdd | ssd).

    \n
  • \n
  • \n

    \n instance-storage-info.encryption-support - Indicates whether data is\n encrypted at rest (required | supported |\n unsupported).

    \n
  • \n
  • \n

    \n instance-storage-info.nvme-support - Indicates whether non-volatile memory\n express (NVMe) is supported for instance store (required | supported\n | unsupported).

    \n
  • \n
  • \n

    \n instance-storage-info.total-size-in-gb - The total amount of storage\n available from all local instance storage, in GB.

    \n
  • \n
  • \n

    \n instance-storage-supported - Indicates whether the instance type has local\n instance storage (true | false).

    \n
  • \n
  • \n

    \n instance-type - The instance type (for example c5.2xlarge or\n c5*).

    \n
  • \n
  • \n

    \n memory-info.size-in-mib - The memory size.

    \n
  • \n
  • \n

    \n network-info.efa-info.maximum-efa-interfaces - The maximum number of Elastic\n Fabric Adapters (EFAs) per instance.

    \n
  • \n
  • \n

    \n network-info.efa-supported - Indicates whether the instance type supports\n Elastic Fabric Adapter (EFA) (true | false).

    \n
  • \n
  • \n

    \n network-info.ena-support - Indicates whether Elastic Network Adapter (ENA) is\n supported or required (required | supported |\n unsupported).

    \n
  • \n
  • \n

    \n network-info.encryption-in-transit-supported - Indicates whether the instance\n type automatically encrypts in-transit traffic between instances (true | false).

    \n
  • \n
  • \n

    \n network-info.ipv4-addresses-per-interface - The maximum number of private\n IPv4 addresses per network interface.

    \n
  • \n
  • \n

    \n network-info.ipv6-addresses-per-interface - The maximum number of private\n IPv6 addresses per network interface.

    \n
  • \n
  • \n

    \n network-info.ipv6-supported - Indicates whether the instance type supports\n IPv6 (true | false).

    \n
  • \n
  • \n

    \n network-info.maximum-network-cards - The maximum number of network cards per\n instance.

    \n
  • \n
  • \n

    \n network-info.maximum-network-interfaces - The maximum number of network\n interfaces per instance.

    \n
  • \n
  • \n

    \n network-info.network-performance - The network performance (for example, \"25\n Gigabit\").

    \n
  • \n
  • \n

    \n nitro-enclaves-support - Indicates whether Nitro Enclaves is supported\n (supported | unsupported).

    \n
  • \n
  • \n

    \n nitro-tpm-support - Indicates whether NitroTPM is supported\n (supported | unsupported).

    \n
  • \n
  • \n

    \n nitro-tpm-info.supported-versions - The supported NitroTPM version\n (2.0).

    \n
  • \n
  • \n

    \n processor-info.supported-architecture - The CPU architecture\n (arm64 | i386 | x86_64).

    \n
  • \n
  • \n

    \n processor-info.sustained-clock-speed-in-ghz - The CPU clock speed, in\n GHz.

    \n
  • \n
  • \n

    \n processor-info.supported-features - The supported CPU features\n (amd-sev-snp).

    \n
  • \n
  • \n

    \n supported-boot-mode - The boot mode (legacy-bios |\n uefi).

    \n
  • \n
  • \n

    \n supported-root-device-type - The root device type (ebs |\n instance-store).

    \n
  • \n
  • \n

    \n supported-usage-class - The usage class (on-demand |\n spot).

    \n
  • \n
  • \n

    \n supported-virtualization-type - The virtualization type (hvm |\n paravirtual).

    \n
  • \n
  • \n

    \n vcpu-info.default-cores - The default number of cores for the instance\n type.

    \n
  • \n
  • \n

    \n vcpu-info.default-threads-per-core - The default number of threads per core\n for the instance type.

    \n
  • \n
  • \n

    \n vcpu-info.default-vcpus - The default number of vCPUs for the instance\n type.

    \n
  • \n
  • \n

    \n vcpu-info.valid-cores - The number of cores that can be configured for the\n instance type.

    \n
  • \n
  • \n

    \n vcpu-info.valid-threads-per-core - The number of threads per core that can be\n configured for the instance type. For example, \"1\" or \"1,2\".

    \n
  • \n
", + "smithy.api#documentation": "

One or more filters. Filter names and values are case-sensitive.

\n
    \n
  • \n

    \n auto-recovery-supported - Indicates whether Amazon CloudWatch action\n based recovery is supported (true | false).

    \n
  • \n
  • \n

    \n bare-metal - Indicates whether it is a bare metal instance type\n (true | false).

    \n
  • \n
  • \n

    \n burstable-performance-supported - Indicates whether the instance type is a\n burstable performance T instance type (true | false).

    \n
  • \n
  • \n

    \n current-generation - Indicates whether this instance type is the latest\n generation instance type of an instance family (true | false).

    \n
  • \n
  • \n

    \n ebs-info.ebs-optimized-info.baseline-bandwidth-in-mbps - The baseline\n bandwidth performance for an EBS-optimized instance type, in Mbps.

    \n
  • \n
  • \n

    \n ebs-info.ebs-optimized-info.baseline-iops - The baseline input/output storage\n operations per second for an EBS-optimized instance type.

    \n
  • \n
  • \n

    \n ebs-info.ebs-optimized-info.baseline-throughput-in-mbps - The baseline\n throughput performance for an EBS-optimized instance type, in MB/s.

    \n
  • \n
  • \n

    \n ebs-info.ebs-optimized-info.maximum-bandwidth-in-mbps - The maximum bandwidth\n performance for an EBS-optimized instance type, in Mbps.

    \n
  • \n
  • \n

    \n ebs-info.ebs-optimized-info.maximum-iops - The maximum input/output storage\n operations per second for an EBS-optimized instance type.

    \n
  • \n
  • \n

    \n ebs-info.ebs-optimized-info.maximum-throughput-in-mbps - The maximum\n throughput performance for an EBS-optimized instance type, in MB/s.

    \n
  • \n
  • \n

    \n ebs-info.ebs-optimized-support - Indicates whether the instance type is\n EBS-optimized (supported | unsupported |\n default).

    \n
  • \n
  • \n

    \n ebs-info.encryption-support - Indicates whether EBS encryption is supported\n (supported | unsupported).

    \n
  • \n
  • \n

    \n ebs-info.nvme-support - Indicates whether non-volatile memory express (NVMe)\n is supported for EBS volumes (required | supported |\n unsupported).

    \n
  • \n
  • \n

    \n free-tier-eligible - Indicates whether the instance type is eligible to use\n in the free tier (true | false).

    \n
  • \n
  • \n

    \n hibernation-supported - Indicates whether On-Demand hibernation is supported\n (true | false).

    \n
  • \n
  • \n

    \n hypervisor - The hypervisor (nitro | xen).

    \n
  • \n
  • \n

    \n instance-storage-info.disk.count - The number of local disks.

    \n
  • \n
  • \n

    \n instance-storage-info.disk.size-in-gb - The storage size of each instance\n storage disk, in GB.

    \n
  • \n
  • \n

    \n instance-storage-info.disk.type - The storage technology for the local\n instance storage disks (hdd | ssd).

    \n
  • \n
  • \n

    \n instance-storage-info.encryption-support - Indicates whether data is\n encrypted at rest (required | supported |\n unsupported).

    \n
  • \n
  • \n

    \n instance-storage-info.nvme-support - Indicates whether non-volatile memory\n express (NVMe) is supported for instance store (required | supported\n | unsupported).

    \n
  • \n
  • \n

    \n instance-storage-info.total-size-in-gb - The total amount of storage\n available from all local instance storage, in GB.

    \n
  • \n
  • \n

    \n instance-storage-supported - Indicates whether the instance type has local\n instance storage (true | false).

    \n
  • \n
  • \n

    \n instance-type - The instance type (for example c5.2xlarge or\n c5*).

    \n
  • \n
  • \n

    \n memory-info.size-in-mib - The memory size.

    \n
  • \n
  • \n

    \n network-info.efa-info.maximum-efa-interfaces - The maximum number of Elastic\n Fabric Adapters (EFAs) per instance.

    \n
  • \n
  • \n

    \n network-info.efa-supported - Indicates whether the instance type supports\n Elastic Fabric Adapter (EFA) (true | false).

    \n
  • \n
  • \n

    \n network-info.ena-support - Indicates whether Elastic Network Adapter (ENA) is\n supported or required (required | supported |\n unsupported).

    \n
  • \n
  • \n

    \n network-info.encryption-in-transit-supported - Indicates whether the instance\n type automatically encrypts in-transit traffic between instances (true | false).

    \n
  • \n
  • \n

    \n network-info.ipv4-addresses-per-interface - The maximum number of private\n IPv4 addresses per network interface.

    \n
  • \n
  • \n

    \n network-info.ipv6-addresses-per-interface - The maximum number of private\n IPv6 addresses per network interface.

    \n
  • \n
  • \n

    \n network-info.ipv6-supported - Indicates whether the instance type supports\n IPv6 (true | false).

    \n
  • \n
  • \n

    \n network-info.maximum-network-cards - The maximum number of network cards per\n instance.

    \n
  • \n
  • \n

    \n network-info.maximum-network-interfaces - The maximum number of network\n interfaces per instance.

    \n
  • \n
  • \n

    \n network-info.network-performance - The network performance (for example, \"25\n Gigabit\").

    \n
  • \n
  • \n

    \n nitro-enclaves-support - Indicates whether Nitro Enclaves is supported\n (supported | unsupported).

    \n
  • \n
  • \n

    \n nitro-tpm-support - Indicates whether NitroTPM is supported\n (supported | unsupported).

    \n
  • \n
  • \n

    \n nitro-tpm-info.supported-versions - The supported NitroTPM version\n (2.0).

    \n
  • \n
  • \n

    \n processor-info.supported-architecture - The CPU architecture\n (arm64 | i386 | x86_64).

    \n
  • \n
  • \n

    \n processor-info.sustained-clock-speed-in-ghz - The CPU clock speed, in\n GHz.

    \n
  • \n
  • \n

    \n processor-info.supported-features - The supported CPU features\n (amd-sev-snp).

    \n
  • \n
  • \n

    \n supported-boot-mode - The boot mode (legacy-bios |\n uefi).

    \n
  • \n
  • \n

    \n supported-root-device-type - The root device type (ebs |\n instance-store).

    \n
  • \n
  • \n

    \n supported-usage-class - The usage class (on-demand | spot | \n capacity-block).

    \n
  • \n
  • \n

    \n supported-virtualization-type - The virtualization type (hvm |\n paravirtual).

    \n
  • \n
  • \n

    \n vcpu-info.default-cores - The default number of cores for the instance\n type.

    \n
  • \n
  • \n

    \n vcpu-info.default-threads-per-core - The default number of threads per core\n for the instance type.

    \n
  • \n
  • \n

    \n vcpu-info.default-vcpus - The default number of vCPUs for the instance\n type.

    \n
  • \n
  • \n

    \n vcpu-info.valid-cores - The number of cores that can be configured for the\n instance type.

    \n
  • \n
  • \n

    \n vcpu-info.valid-threads-per-core - The number of threads per core that can be\n configured for the instance type. For example, \"1\" or \"1,2\".

    \n
  • \n
", "smithy.api#xmlName": "Filter" } }, @@ -36318,7 +36393,7 @@ "target": "com.amazonaws.ec2#FilterList", "traits": { "aws.protocols#ec2QueryName": "Filter", - "smithy.api#documentation": "

One or more filters.

\n
    \n
  • \n

    \n association.allocation-id - The allocation ID returned when you\n\t\t allocated the Elastic IP address (IPv4) for your network interface.

    \n
  • \n
  • \n

    \n association.association-id - The association ID returned when the\n\t\t network interface was associated with an IPv4 address.

    \n
  • \n
  • \n

    \n addresses.association.owner-id - The owner ID of the addresses associated with the network interface.

    \n
  • \n
  • \n

    \n addresses.association.public-ip - The association ID returned when\n\t\t the network interface was associated with the Elastic IP address\n\t\t (IPv4).

    \n
  • \n
  • \n

    \n addresses.primary - Whether the private IPv4 address is the primary\n IP address associated with the network interface.

    \n
  • \n
  • \n

    \n addresses.private-ip-address - The private IPv4 addresses\n\t\t associated with the network interface.

    \n
  • \n
  • \n

    \n association.ip-owner-id - The owner of the Elastic IP address\n (IPv4) associated with the network interface.

    \n
  • \n
  • \n

    \n association.public-ip - The address of the Elastic IP address\n (IPv4) bound to the network interface.

    \n
  • \n
  • \n

    \n association.public-dns-name - The public DNS name for the network\n interface (IPv4).

    \n
  • \n
  • \n

    \n attachment.attach-time - The time that the network interface was attached to an instance.

    \n
  • \n
  • \n

    \n attachment.attachment-id - The ID of the interface attachment.

    \n
  • \n
  • \n

    \n attachment.delete-on-termination - Indicates whether the attachment is deleted when an instance is terminated.

    \n
  • \n
  • \n

    \n attachment.device-index - The device index to which the network interface is attached.

    \n
  • \n
  • \n

    \n attachment.instance-id - The ID of the instance to which the network interface is attached.

    \n
  • \n
  • \n

    \n attachment.instance-owner-id - The owner ID of the instance to which the network interface is attached.

    \n
  • \n
  • \n

    \n attachment.status - The status of the attachment (attaching | attached | detaching | detached).

    \n
  • \n
  • \n

    \n availability-zone - The Availability Zone of the network interface.

    \n
  • \n
  • \n

    \n description - The description of the network interface.

    \n
  • \n
  • \n

    \n group-id - The ID of a security group associated with the network interface.

    \n
  • \n
  • \n

    \n ipv6-addresses.ipv6-address - An IPv6 address associated with\n the network interface.

    \n
  • \n
  • \n

    \n interface-type - The type of network interface (api_gateway_managed | \n\t\t aws_codestar_connections_managed | branch | \n\t\t ec2_instance_connect_endpoint | efa | efs | \n\t\t gateway_load_balancer | gateway_load_balancer_endpoint | \n\t\t global_accelerator_managed | \n\t\t interface | iot_rules_managed | \n\t\t lambda | load_balancer | \n\t\t nat_gateway | network_load_balancer | \n\t\t quicksight | \n\t\t transit_gateway | trunk | \n\t\t vpc_endpoint).

    \n
  • \n
  • \n

    \n mac-address - The MAC address of the network interface.

    \n
  • \n
  • \n

    \n network-interface-id - The ID of the network interface.

    \n
  • \n
  • \n

    \n owner-id - The Amazon Web Services account ID of the network interface owner.

    \n
  • \n
  • \n

    \n private-dns-name - The private DNS name of the network interface (IPv4).

    \n
  • \n
  • \n

    \n private-ip-address - The private IPv4 address or addresses of the\n network interface.

    \n
  • \n
  • \n

    \n requester-id - The alias or Amazon Web Services account ID of the principal or service that created the network interface.

    \n
  • \n
  • \n

    \n requester-managed - Indicates whether the network interface is being managed by an Amazon Web Services \n\t\t service (for example, Amazon Web Services Management Console, Auto Scaling, and so on).

    \n
  • \n
  • \n

    \n source-dest-check - Indicates whether the network interface performs source/destination checking. \n\t\t A value of true means checking is enabled, and false means checking is disabled. \n\t\t The value must be false for the network interface to perform network address translation (NAT) in your VPC.

    \n
  • \n
  • \n

    \n status - The status of the network interface. If the network interface is not attached to an instance, the status is available; \n\t\t if a network interface is attached to an instance the status is in-use.

    \n
  • \n
  • \n

    \n subnet-id - The ID of the subnet for the network interface.

    \n
  • \n
  • \n

    \n tag: - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.\n For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

    \n
  • \n
  • \n

    \n tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

    \n
  • \n
  • \n

    \n vpc-id - The ID of the VPC for the network interface.

    \n
  • \n
", + "smithy.api#documentation": "

One or more filters.

\n
    \n
  • \n

    \n association.allocation-id - The allocation ID returned when you\n\t\t allocated the Elastic IP address (IPv4) for your network interface.

    \n
  • \n
  • \n

    \n association.association-id - The association ID returned when the\n\t\t network interface was associated with an IPv4 address.

    \n
  • \n
  • \n

    \n addresses.association.owner-id - The owner ID of the addresses associated with the network interface.

    \n
  • \n
  • \n

    \n addresses.association.public-ip - The association ID returned when\n\t\t the network interface was associated with the Elastic IP address\n\t\t (IPv4).

    \n
  • \n
  • \n

    \n addresses.primary - Whether the private IPv4 address is the primary\n IP address associated with the network interface.

    \n
  • \n
  • \n

    \n addresses.private-ip-address - The private IPv4 addresses\n\t\t associated with the network interface.

    \n
  • \n
  • \n

    \n association.ip-owner-id - The owner of the Elastic IP address\n (IPv4) associated with the network interface.

    \n
  • \n
  • \n

    \n association.public-ip - The address of the Elastic IP address\n (IPv4) bound to the network interface.

    \n
  • \n
  • \n

    \n association.public-dns-name - The public DNS name for the network\n interface (IPv4).

    \n
  • \n
  • \n

    \n attachment.attach-time - The time that the network interface was attached to an instance.

    \n
  • \n
  • \n

    \n attachment.attachment-id - The ID of the interface attachment.

    \n
  • \n
  • \n

    \n attachment.delete-on-termination - Indicates whether the attachment is deleted when an instance is terminated.

    \n
  • \n
  • \n

    \n attachment.device-index - The device index to which the network interface is attached.

    \n
  • \n
  • \n

    \n attachment.instance-id - The ID of the instance to which the network interface is attached.

    \n
  • \n
  • \n

    \n attachment.instance-owner-id - The owner ID of the instance to which the network interface is attached.

    \n
  • \n
  • \n

    \n attachment.status - The status of the attachment (attaching | attached | detaching | detached).

    \n
  • \n
  • \n

    \n availability-zone - The Availability Zone of the network interface.

    \n
  • \n
  • \n

    \n description - The description of the network interface.

    \n
  • \n
  • \n

    \n group-id - The ID of a security group associated with the network interface.

    \n
  • \n
  • \n

    \n ipv6-addresses.ipv6-address - An IPv6 address associated with\n the network interface.

    \n
  • \n
  • \n

    \n interface-type - The type of network interface (api_gateway_managed | \n\t\t aws_codestar_connections_managed | branch | ec2_instance_connect_endpoint | \n\t\t efa | efa-only | efs | gateway_load_balancer | \n\t\t gateway_load_balancer_endpoint | global_accelerator_managed | interface | \n\t\t iot_rules_managed | lambda | load_balancer | nat_gateway | \n\t\t network_load_balancer | quicksight | transit_gateway | trunk | \n\t\t vpc_endpoint).

    \n
  • \n
  • \n

    \n mac-address - The MAC address of the network interface.

    \n
  • \n
  • \n

    \n network-interface-id - The ID of the network interface.

    \n
  • \n
  • \n

    \n owner-id - The Amazon Web Services account ID of the network interface owner.

    \n
  • \n
  • \n

    \n private-dns-name - The private DNS name of the network interface (IPv4).

    \n
  • \n
  • \n

    \n private-ip-address - The private IPv4 address or addresses of the\n network interface.

    \n
  • \n
  • \n

    \n requester-id - The alias or Amazon Web Services account ID of the principal or service that created the network interface.

    \n
  • \n
  • \n

    \n requester-managed - Indicates whether the network interface is being managed by an Amazon Web Services \n\t\t service (for example, Amazon Web Services Management Console, Auto Scaling, and so on).

    \n
  • \n
  • \n

    \n source-dest-check - Indicates whether the network interface performs source/destination checking. \n\t\t A value of true means checking is enabled, and false means checking is disabled. \n\t\t The value must be false for the network interface to perform network address translation (NAT) in your VPC.

    \n
  • \n
  • \n

    \n status - The status of the network interface. If the network interface is not attached to an instance, the status is available; \n\t\t if a network interface is attached to an instance the status is in-use.

    \n
  • \n
  • \n

    \n subnet-id - The ID of the subnet for the network interface.

    \n
  • \n
  • \n

    \n tag: - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value.\n For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

    \n
  • \n
  • \n

    \n tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

    \n
  • \n
  • \n

    \n vpc-id - The ID of the VPC for the network interface.

    \n
  • \n
", "smithy.api#xmlName": "filter" } } @@ -37586,7 +37661,7 @@ "target": "com.amazonaws.ec2#DescribeSecurityGroupReferencesResult" }, "traits": { - "smithy.api#documentation": "

Describes the VPCs on the other side of a VPC peering connection that are referencing the security groups you've specified in this request.

", + "smithy.api#documentation": "

Describes the VPCs on the other side of a VPC peering or Transit Gateway connection that are referencing the security groups you've specified in this request.

", "smithy.api#examples": [ { "title": "To describe security group references", @@ -37738,6 +37813,90 @@ "smithy.api#output": {} } }, + "com.amazonaws.ec2#DescribeSecurityGroupVpcAssociations": { + "type": "operation", + "input": { + "target": "com.amazonaws.ec2#DescribeSecurityGroupVpcAssociationsRequest" + }, + "output": { + "target": "com.amazonaws.ec2#DescribeSecurityGroupVpcAssociationsResult" + }, + "traits": { + "smithy.api#documentation": "

Describes security group VPC associations made with AssociateSecurityGroupVpc.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "SecurityGroupVpcAssociations", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.ec2#DescribeSecurityGroupVpcAssociationsMaxResults": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 5, + "max": 1000 + } + } + }, + "com.amazonaws.ec2#DescribeSecurityGroupVpcAssociationsRequest": { + "type": "structure", + "members": { + "Filters": { + "target": "com.amazonaws.ec2#FilterList", + "traits": { + "smithy.api#documentation": "

Security group VPC association filters.

\n
    \n
  • \n

    \n group-id: The security group ID.

    \n
  • \n
  • \n

    \n vpc-id: The ID of the associated VPC.

    \n
  • \n
  • \n

    \n vpc-owner-id: The account ID of the VPC owner.

    \n
  • \n
  • \n

    \n state: The state of the association.

    \n
  • \n
  • \n

    \n tag:: The key/value combination of a tag assigned to the resource. Use\n the tag key in the filter name and the tag value as the filter value. For\n example, to find all resources that have a tag with the key Owner\n and the value TeamA, specify tag:Owner for the filter\n name and TeamA for the filter value.

    \n
  • \n
  • \n

    \n tag-key: The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

    \n
  • \n
", + "smithy.api#xmlName": "Filter" + } + }, + "NextToken": { + "target": "com.amazonaws.ec2#String", + "traits": { + "smithy.api#documentation": "

The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.ec2#DescribeSecurityGroupVpcAssociationsMaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of items to return for this request.\n\tTo get the next page of items, make another request with the token returned in the output.\n\tFor more information, see Pagination.

" + } + }, + "DryRun": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "smithy.api#documentation": "

Checks whether you have the required permissions for the action, without actually making the request, \n and provides an error response. If you have the required permissions, the error response is DryRunOperation. \n Otherwise, it is UnauthorizedOperation.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.ec2#DescribeSecurityGroupVpcAssociationsResult": { + "type": "structure", + "members": { + "SecurityGroupVpcAssociations": { + "target": "com.amazonaws.ec2#SecurityGroupVpcAssociationList", + "traits": { + "aws.protocols#ec2QueryName": "SecurityGroupVpcAssociationSet", + "smithy.api#documentation": "

The security group VPC associations.

", + "smithy.api#xmlName": "securityGroupVpcAssociationSet" + } + }, + "NextToken": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "NextToken", + "smithy.api#documentation": "

The token to include in another request to get the next page of items. This value is null when there are no more items to return.

", + "smithy.api#xmlName": "nextToken" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.ec2#DescribeSecurityGroups": { "type": "operation", "input": { @@ -37874,7 +38033,7 @@ "target": "com.amazonaws.ec2#String", "traits": { "aws.protocols#ec2QueryName": "NextToken", - "smithy.api#documentation": "

The token to include in another request to get the next page of items. \n This value is null when there are no more items to return.

", + "smithy.api#documentation": "

The token to include in another request to get the next page of items. This value is null when there are no more items to return.

", "smithy.api#xmlName": "nextToken" } }, @@ -39112,7 +39271,7 @@ "target": "com.amazonaws.ec2#DescribeStaleSecurityGroupsResult" }, "traits": { - "smithy.api#documentation": "

Describes the stale security group rules for security groups in a specified VPC. \n Rules are stale when they reference a deleted security group in a peered VPC. Rules can also be stale if they reference a security group in a peer VPC for which the VPC peering connection has \n been deleted.

", + "smithy.api#documentation": "

Describes the stale security group rules for security groups referenced across a VPC\n peering connection, transit gateway connection, or with a security group VPC\n association. Rules are stale when they reference a deleted security group. Rules can\n also be stale if they reference a security group in a peer VPC for which the VPC peering\n connection has been deleted, across a transit gateway where the transit gateway has been\n deleted (or the transit\n gateway security group referencing feature has been disabled), or if a\n security group VPC association has been disassociated.

", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -39157,7 +39316,7 @@ "NextToken": { "target": "com.amazonaws.ec2#DescribeStaleSecurityGroupsNextToken", "traits": { - "smithy.api#documentation": "

The token returned from a previous paginated request.\n Pagination continues from the end of the items returned by the previous request.

" + "smithy.api#documentation": "

The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

" } }, "VpcId": { @@ -39180,7 +39339,7 @@ "target": "com.amazonaws.ec2#String", "traits": { "aws.protocols#ec2QueryName": "NextToken", - "smithy.api#documentation": "

The token to include in another request to get the next page of items. \n If there are no additional items to return, the string is empty.

", + "smithy.api#documentation": "

The token to include in another request to get the next page of items. This value is null when there are no more items to return.

", "smithy.api#xmlName": "nextToken" } }, @@ -45351,6 +45510,67 @@ "smithy.api#input": {} } }, + "com.amazonaws.ec2#DisassociateSecurityGroupVpc": { + "type": "operation", + "input": { + "target": "com.amazonaws.ec2#DisassociateSecurityGroupVpcRequest" + }, + "output": { + "target": "com.amazonaws.ec2#DisassociateSecurityGroupVpcResult" + }, + "traits": { + "smithy.api#documentation": "

Disassociates a security group from a VPC. You cannot disassociate the security group if any Elastic network interfaces in the associated VPC are still associated with the security group.\n \n Note that the disassociation is asynchronous and you can check the status of the request with DescribeSecurityGroupVpcAssociations.

" + } + }, + "com.amazonaws.ec2#DisassociateSecurityGroupVpcRequest": { + "type": "structure", + "members": { + "GroupId": { + "target": "com.amazonaws.ec2#DisassociateSecurityGroupVpcSecurityGroupId", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#documentation": "

A security group ID.

", + "smithy.api#required": {} + } + }, + "VpcId": { + "target": "com.amazonaws.ec2#String", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#documentation": "

A VPC ID.

", + "smithy.api#required": {} + } + }, + "DryRun": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "smithy.api#documentation": "

Checks whether you have the required permissions for the action, without actually making the request, \n and provides an error response. If you have the required permissions, the error response is DryRunOperation. \n Otherwise, it is UnauthorizedOperation.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.ec2#DisassociateSecurityGroupVpcResult": { + "type": "structure", + "members": { + "State": { + "target": "com.amazonaws.ec2#SecurityGroupVpcAssociationState", + "traits": { + "aws.protocols#ec2QueryName": "State", + "smithy.api#documentation": "

The state of the disassociation.

", + "smithy.api#xmlName": "state" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.ec2#DisassociateSecurityGroupVpcSecurityGroupId": { + "type": "string" + }, "com.amazonaws.ec2#DisassociateSubnetCidrBlock": { "type": "operation", "input": { @@ -61205,7 +61425,7 @@ "target": "com.amazonaws.ec2#String", "traits": { "aws.protocols#ec2QueryName": "InterfaceType", - "smithy.api#documentation": "

The type of network interface.

\n

Valid values: interface | efa | trunk\n

", + "smithy.api#documentation": "

The type of network interface.

\n

Valid values: interface | efa | efa-only | trunk\n

", "smithy.api#xmlName": "interfaceType" } }, @@ -61466,7 +61686,7 @@ "InterfaceType": { "target": "com.amazonaws.ec2#String", "traits": { - "smithy.api#documentation": "

The type of network interface.

\n

Valid values: interface | efa\n

" + "smithy.api#documentation": "

The type of network interface.

\n

If you specify efa-only, do not assign any IP addresses to the network \n\t interface. EFA-only network interfaces do not support IP addresses.

\n

Valid values: interface | efa | efa-only\n

" } }, "NetworkCardIndex": { @@ -67715,7 +67935,7 @@ "target": "com.amazonaws.ec2#UsageClassTypeList", "traits": { "aws.protocols#ec2QueryName": "SupportedUsageClasses", - "smithy.api#documentation": "

Indicates whether the instance type is offered for spot or On-Demand.

", + "smithy.api#documentation": "

Indicates whether the instance type is offered for spot, On-Demand, or Capacity Blocks.

", "smithy.api#xmlName": "supportedUsageClasses" } }, @@ -73207,7 +73427,7 @@ "InterfaceType": { "target": "com.amazonaws.ec2#String", "traits": { - "smithy.api#documentation": "

The type of network interface. To create an Elastic Fabric Adapter (EFA), specify\n efa. For more information, see Elastic Fabric Adapter in the\n Amazon EC2 User Guide.

\n

If you are not creating an EFA, specify interface or omit this\n parameter.

\n

Valid values: interface | efa\n

" + "smithy.api#documentation": "

The type of network interface. To create an Elastic Fabric Adapter (EFA), specify\n efa or efa. For more information, see Elastic Fabric Adapter in the\n Amazon EC2 User Guide.

\n

If you are not creating an EFA, specify interface or omit this\n parameter.

\n

If you specify efa-only, do not assign any IP addresses to the network \n interface. EFA-only network interfaces do not support IP addresses.

\n

Valid values: interface | efa | efa-only\n

" } }, "Ipv6AddressCount": { @@ -93554,6 +93774,14 @@ "smithy.api#documentation": "

The outbound rules that were unknown to the service. In some cases,\n unknownIpPermissionSet might be in a different format from the request\n parameter.

", "smithy.api#xmlName": "unknownIpPermissionSet" } + }, + "RevokedSecurityGroupRules": { + "target": "com.amazonaws.ec2#RevokedSecurityGroupRuleList", + "traits": { + "aws.protocols#ec2QueryName": "RevokedSecurityGroupRuleSet", + "smithy.api#documentation": "

Details about the revoked security group rules.

", + "smithy.api#xmlName": "revokedSecurityGroupRuleSet" + } } }, "traits": { @@ -93667,12 +93895,125 @@ "smithy.api#documentation": "

The inbound rules that were unknown to the service. In some cases,\n unknownIpPermissionSet might be in a different format from the request\n parameter.

", "smithy.api#xmlName": "unknownIpPermissionSet" } + }, + "RevokedSecurityGroupRules": { + "target": "com.amazonaws.ec2#RevokedSecurityGroupRuleList", + "traits": { + "aws.protocols#ec2QueryName": "RevokedSecurityGroupRuleSet", + "smithy.api#documentation": "

Details about the revoked security group rules.

", + "smithy.api#xmlName": "revokedSecurityGroupRuleSet" + } } }, "traits": { "smithy.api#output": {} } }, + "com.amazonaws.ec2#RevokedSecurityGroupRule": { + "type": "structure", + "members": { + "SecurityGroupRuleId": { + "target": "com.amazonaws.ec2#SecurityGroupRuleId", + "traits": { + "aws.protocols#ec2QueryName": "SecurityGroupRuleId", + "smithy.api#documentation": "

A security group rule ID.

", + "smithy.api#xmlName": "securityGroupRuleId" + } + }, + "GroupId": { + "target": "com.amazonaws.ec2#SecurityGroupId", + "traits": { + "aws.protocols#ec2QueryName": "GroupId", + "smithy.api#documentation": "

A security group ID.

", + "smithy.api#xmlName": "groupId" + } + }, + "IsEgress": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "aws.protocols#ec2QueryName": "IsEgress", + "smithy.api#documentation": "

Defines if a security group rule is an outbound rule.

", + "smithy.api#xmlName": "isEgress" + } + }, + "IpProtocol": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "IpProtocol", + "smithy.api#documentation": "

The security group rule's protocol.

", + "smithy.api#xmlName": "ipProtocol" + } + }, + "FromPort": { + "target": "com.amazonaws.ec2#Integer", + "traits": { + "aws.protocols#ec2QueryName": "FromPort", + "smithy.api#documentation": "

The 'from' port number of the security group rule.

", + "smithy.api#xmlName": "fromPort" + } + }, + "ToPort": { + "target": "com.amazonaws.ec2#Integer", + "traits": { + "aws.protocols#ec2QueryName": "ToPort", + "smithy.api#documentation": "

The 'to' port number of the security group rule.

", + "smithy.api#xmlName": "toPort" + } + }, + "CidrIpv4": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "CidrIpv4", + "smithy.api#documentation": "

The IPv4 CIDR of the traffic source.

", + "smithy.api#xmlName": "cidrIpv4" + } + }, + "CidrIpv6": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "CidrIpv6", + "smithy.api#documentation": "

The IPv6 CIDR of the traffic source.

", + "smithy.api#xmlName": "cidrIpv6" + } + }, + "PrefixListId": { + "target": "com.amazonaws.ec2#PrefixListResourceId", + "traits": { + "aws.protocols#ec2QueryName": "PrefixListId", + "smithy.api#documentation": "

The ID of a prefix list that's the traffic source.

", + "smithy.api#xmlName": "prefixListId" + } + }, + "ReferencedGroupId": { + "target": "com.amazonaws.ec2#SecurityGroupId", + "traits": { + "aws.protocols#ec2QueryName": "ReferencedGroupId", + "smithy.api#documentation": "

The ID of a referenced security group.

", + "smithy.api#xmlName": "referencedGroupId" + } + }, + "Description": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "Description", + "smithy.api#documentation": "

A description of the revoked security group rule.

", + "smithy.api#xmlName": "description" + } + } + }, + "traits": { + "smithy.api#documentation": "

A security group rule removed with RevokeSecurityGroupEgress or RevokeSecurityGroupIngress.

" + } + }, + "com.amazonaws.ec2#RevokedSecurityGroupRuleList": { + "type": "list", + "member": { + "target": "com.amazonaws.ec2#RevokedSecurityGroupRule", + "traits": { + "smithy.api#xmlName": "item" + } + } + }, "com.amazonaws.ec2#RoleId": { "type": "string" }, @@ -95764,6 +96105,14 @@ "smithy.api#xmlName": "vpcId" } }, + "SecurityGroupArn": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "SecurityGroupArn", + "smithy.api#documentation": "

The ARN of the security group.

", + "smithy.api#xmlName": "securityGroupArn" + } + }, "OwnerId": { "target": "com.amazonaws.ec2#String", "traits": { @@ -96119,6 +96468,14 @@ "smithy.api#documentation": "

The tags applied to the security group rule.

", "smithy.api#xmlName": "tagSet" } + }, + "SecurityGroupRuleArn": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "SecurityGroupRuleArn", + "smithy.api#documentation": "

The ARN of the security group rule.

", + "smithy.api#xmlName": "securityGroupRuleArn" + } } }, "traits": { @@ -96271,6 +96628,104 @@ } } }, + "com.amazonaws.ec2#SecurityGroupVpcAssociation": { + "type": "structure", + "members": { + "GroupId": { + "target": "com.amazonaws.ec2#SecurityGroupId", + "traits": { + "aws.protocols#ec2QueryName": "GroupId", + "smithy.api#documentation": "

The association's security group ID.

", + "smithy.api#xmlName": "groupId" + } + }, + "VpcId": { + "target": "com.amazonaws.ec2#VpcId", + "traits": { + "aws.protocols#ec2QueryName": "VpcId", + "smithy.api#documentation": "

The association's VPC ID.

", + "smithy.api#xmlName": "vpcId" + } + }, + "VpcOwnerId": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "VpcOwnerId", + "smithy.api#documentation": "

The Amazon Web Services account ID of the owner of the VPC.

", + "smithy.api#xmlName": "vpcOwnerId" + } + }, + "State": { + "target": "com.amazonaws.ec2#SecurityGroupVpcAssociationState", + "traits": { + "aws.protocols#ec2QueryName": "State", + "smithy.api#documentation": "

The association's state.

", + "smithy.api#xmlName": "state" + } + }, + "StateReason": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "StateReason", + "smithy.api#documentation": "

The association's state reason.

", + "smithy.api#xmlName": "stateReason" + } + } + }, + "traits": { + "smithy.api#documentation": "

A security group association with a VPC that you made with AssociateSecurityGroupVpc.

" + } + }, + "com.amazonaws.ec2#SecurityGroupVpcAssociationList": { + "type": "list", + "member": { + "target": "com.amazonaws.ec2#SecurityGroupVpcAssociation", + "traits": { + "smithy.api#xmlName": "item" + } + } + }, + "com.amazonaws.ec2#SecurityGroupVpcAssociationState": { + "type": "enum", + "members": { + "associating": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "associating" + } + }, + "associated": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "associated" + } + }, + "association_failed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "association-failed" + } + }, + "disassociating": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "disassociating" + } + }, + "disassociated": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "disassociated" + } + }, + "disassociation_failed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "disassociation-failed" + } + } + } + }, "com.amazonaws.ec2#SelfServicePortal": { "type": "enum", "members": { diff --git a/codegen/sdk-codegen/aws-models/ecs.json b/codegen/sdk-codegen/aws-models/ecs.json index 8166172c491..d2c2b09a385 100644 --- a/codegen/sdk-codegen/aws-models/ecs.json +++ b/codegen/sdk-codegen/aws-models/ecs.json @@ -137,6 +137,12 @@ { "target": "com.amazonaws.ecs#DescribeContainerInstances" }, + { + "target": "com.amazonaws.ecs#DescribeServiceDeployments" + }, + { + "target": "com.amazonaws.ecs#DescribeServiceRevisions" + }, { "target": "com.amazonaws.ecs#DescribeServices" }, @@ -170,6 +176,9 @@ { "target": "com.amazonaws.ecs#ListContainerInstances" }, + { + "target": "com.amazonaws.ecs#ListServiceDeployments" + }, { "target": "com.amazonaws.ecs#ListServices" }, @@ -1762,7 +1771,7 @@ } }, "traits": { - "smithy.api#documentation": "

These errors are usually caused by a client action. This client action might be using\n\t\t\tan action or resource on behalf of a user that doesn't have permissions to use the\n\t\t\taction or resource. Or, it might be specifying an identifier that isn't valid.

\n

The following list includes additional causes for the error:

\n
    \n
  • \n

    The RunTask could not be processed because you use managed\n\t\t\t\t\tscaling and there is a capacity error because the quota of tasks in the\n\t\t\t\t\t\tPROVISIONING per cluster has been reached. For information\n\t\t\t\t\tabout the service quotas, see Amazon ECS\n\t\t\t\t\t\tservice quotas.

    \n
  • \n
", + "smithy.api#documentation": "

These errors are usually caused by a client action. This client action might be using\n\t\t\tan action or resource on behalf of a user that doesn't have permissions to use the\n\t\t\taction or resource. Or, it might be specifying an identifier that isn't valid.

\n

The following list includes additional causes for the error:

\n
    \n
  • \n

    The RunTask could not be processed because you use managed\n\t\t\t\t\tscaling and there is a capacity error because the quota of tasks in the\n\t\t\t\t\tPROVISIONING per cluster has been reached. For information\n\t\t\t\t\tabout the service quotas, see Amazon ECS\n\t\t\t\t\t\tservice quotas.

    \n
  • \n
", "smithy.api#error": "client" } }, @@ -2562,6 +2571,38 @@ "smithy.api#documentation": "

The dependencies defined for container startup and shutdown. A container can contain\n\t\t\tmultiple dependencies. When a dependency is defined for container startup, for container\n\t\t\tshutdown it is reversed.

\n

Your Amazon ECS container instances require at least version 1.26.0 of the container agent\n\t\t\tto use container dependencies. However, we recommend using the latest container agent\n\t\t\tversion. For information about checking your agent version and updating to the latest\n\t\t\tversion, see Updating the Amazon ECS\n\t\t\t\tContainer Agent in the Amazon Elastic Container Service Developer Guide. If you're using an Amazon ECS-optimized Linux AMI,\n\t\t\tyour instance needs at least version 1.26.0-1 of the ecs-init package. If\n\t\t\tyour container instances are launched from version 20190301 or later, then\n\t\t\tthey contain the required versions of the container agent and ecs-init. For\n\t\t\tmore information, see Amazon ECS-optimized Linux AMI\n\t\t\tin the Amazon Elastic Container Service Developer Guide.

\n \n

For tasks that use the Fargate launch type, the task or service\n\t\t\t\trequires the following platforms:

\n
    \n
  • \n

    Linux platform version 1.3.0 or later.

    \n
  • \n
  • \n

    Windows platform version 1.0.0 or later.

    \n
  • \n
\n
\n

For more information about how to create a container dependency, see Container dependency in the Amazon Elastic Container Service Developer Guide.

" } }, + "com.amazonaws.ecs#ContainerImage": { + "type": "structure", + "members": { + "containerName": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The name of the container.

" + } + }, + "imageDigest": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The container image digest.

" + } + }, + "image": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The container image.

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

The details about the container image a service revision uses.

\n

To ensure that all tasks in a service use the same container image, Amazon ECS resolves\n\t\t\tcontainer image names and any image tags specified in the task definition to container\n\t\t\timage digests.

\n

After the container image digest has been established, Amazon ECS uses the digest to start\n\t\t\tany other desired tasks, and for any future service and service revision updates. This\n\t\t\tleads to all tasks in a service always running identical container images, resulting in\n\t\t\tversion consistency for your software. For more information, see Container image resolution in the Amazon ECS Developer Guide.

" + } + }, + "com.amazonaws.ecs#ContainerImages": { + "type": "list", + "member": { + "target": "com.amazonaws.ecs#ContainerImage" + } + }, "com.amazonaws.ecs#ContainerInstance": { "type": "structure", "members": { @@ -3011,7 +3052,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new Amazon ECS cluster. By default, your account receives a default\n\t\t\tcluster when you launch your first container instance. However, you can create your own\n\t\t\tcluster with a unique name.

\n \n

When you call the CreateCluster API operation, Amazon ECS attempts to\n\t\t\t\tcreate the Amazon ECS service-linked role for your account. This is so that it can manage\n\t\t\t\trequired resources in other Amazon Web Services services on your behalf. However, if the user that\n\t\t\t\tmakes the call doesn't have permissions to create the service-linked role, it isn't\n\t\t\t\tcreated. For more information, see Using\n\t\t\t\t\tservice-linked roles for Amazon ECS in the Amazon Elastic Container Service Developer Guide.

\n
", + "smithy.api#documentation": "

Creates a new Amazon ECS cluster. By default, your account receives a default\n\t\t\tcluster when you launch your first container instance. However, you can create your own\n\t\t\tcluster with a unique name.

\n \n

When you call the CreateCluster API operation, Amazon ECS attempts to\n\t\t\t\tcreate the Amazon ECS service-linked role for your account. This is so that it can manage\n\t\t\t\trequired resources in other Amazon Web Services services on your behalf. However, if the user that\n\t\t\t\tmakes the call doesn't have permissions to create the service-linked role, it isn't\n\t\t\t\tcreated. For more information, see Using\n\t\t\t\t\tservice-linked roles for Amazon ECS in the Amazon Elastic Container Service Developer Guide.

\n
", "smithy.api#examples": [ { "title": "To create a new cluster", @@ -3136,7 +3177,7 @@ } ], "traits": { - "smithy.api#documentation": "

Runs and maintains your desired number of tasks from a specified task definition. If\n\t\t\tthe number of tasks running in a service drops below the desiredCount,\n\t\t\tAmazon ECS runs another copy of the task in the specified cluster. To update an existing\n\t\t\tservice, use UpdateService.

\n \n

On March 21, 2024, a change was made to resolve the task definition revision before authorization. When a task definition revision is not specified, authorization will occur using the latest revision of a task definition.

\n
\n \n

Amazon Elastic Inference (EI) is no longer available to customers.

\n
\n

In addition to maintaining the desired count of tasks in your service, you can\n\t\t\toptionally run your service behind one or more load balancers. The load balancers\n\t\t\tdistribute traffic across the tasks that are associated with the service. For more\n\t\t\tinformation, see Service load balancing in the Amazon Elastic Container Service Developer Guide.

\n

You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the volume when creating or\n\t\t\tupdating a service. volumeConfigurations is only supported for REPLICA\n\t\t\tservice and not DAEMON service. For more infomation, see Amazon EBS volumes in the Amazon Elastic Container Service Developer Guide.

\n

Tasks for services that don't use a load balancer are considered healthy if they're in\n\t\t\tthe RUNNING state. Tasks for services that use a load balancer are\n\t\t\tconsidered healthy if they're in the RUNNING state and are reported as\n\t\t\thealthy by the load balancer.

\n

There are two service scheduler strategies available:

\n
    \n
  • \n

    \n REPLICA - The replica scheduling strategy places and\n\t\t\t\t\tmaintains your desired number of tasks across your cluster. By default, the\n\t\t\t\t\tservice scheduler spreads tasks across Availability Zones. You can use task\n\t\t\t\t\tplacement strategies and constraints to customize task placement decisions. For\n\t\t\t\t\tmore information, see Service scheduler concepts in the Amazon Elastic Container Service Developer Guide.

    \n
  • \n
  • \n

    \n DAEMON - The daemon scheduling strategy deploys exactly one\n\t\t\t\t\ttask on each active container instance that meets all of the task placement\n\t\t\t\t\tconstraints that you specify in your cluster. The service scheduler also\n\t\t\t\t\tevaluates the task placement constraints for running tasks. It also stops tasks\n\t\t\t\t\tthat don't meet the placement constraints. When using this strategy, you don't\n\t\t\t\t\tneed to specify a desired number of tasks, a task placement strategy, or use\n\t\t\t\t\tService Auto Scaling policies. For more information, see Service scheduler concepts in the Amazon Elastic Container Service Developer Guide.

    \n
  • \n
\n

You can optionally specify a deployment configuration for your service. The deployment\n\t\t\tis initiated by changing properties. For example, the deployment might be initiated by\n\t\t\tthe task definition or by your desired count of a service. You can use UpdateService. The default value for a replica service for\n\t\t\t\tminimumHealthyPercent is 100%. The default value for a daemon service\n\t\t\tfor minimumHealthyPercent is 0%.

\n

If a service uses the ECS deployment controller, the minimum healthy\n\t\t\tpercent represents a lower limit on the number of tasks in a service that must remain in\n\t\t\tthe RUNNING state during a deployment. Specifically, it represents it as a\n\t\t\tpercentage of your desired number of tasks (rounded up to the nearest integer). This\n\t\t\thappens when any of your container instances are in the DRAINING state if\n\t\t\tthe service contains tasks using the EC2 launch type. Using this\n\t\t\tparameter, you can deploy without using additional cluster capacity. For example, if you\n\t\t\tset your service to have desired number of four tasks and a minimum healthy percent of\n\t\t\t50%, the scheduler might stop two existing tasks to free up cluster capacity before\n\t\t\tstarting two new tasks. If they're in the RUNNING state, tasks for services\n\t\t\tthat don't use a load balancer are considered healthy . If they're in the\n\t\t\t\tRUNNING state and reported as healthy by the load balancer, tasks for\n\t\t\tservices that do use a load balancer are considered healthy . The\n\t\t\tdefault value for minimum healthy percent is 100%.

\n

If a service uses the ECS deployment controller, the maximum percent parameter represents an upper limit on the\n\t\t\tnumber of tasks in a service that are allowed in the RUNNING or\n\t\t\t\tPENDING state during a deployment. Specifically, it represents it as a\n\t\t\tpercentage of the desired number of tasks (rounded down to the nearest integer). This\n\t\t\thappens when any of your container instances are in the DRAINING state if\n\t\t\tthe service contains tasks using the EC2 launch type. Using this\n\t\t\tparameter, you can define the deployment batch size. For example, if your service has a\n\t\t\tdesired number of four tasks and a maximum percent value of 200%, the scheduler may\n\t\t\tstart four new tasks before stopping the four older tasks (provided that the cluster\n\t\t\tresources required to do this are available). The default value for maximum percent is\n\t\t\t200%.

\n

If a service uses either the CODE_DEPLOY or EXTERNAL\n\t\t\tdeployment controller types and tasks that use the EC2 launch type, the\n\t\t\t\tminimum healthy percent and maximum percent values are used only to define the lower and upper limit\n\t\t\ton the number of the tasks in the service that remain in the RUNNING state.\n\t\t\tThis is while the container instances are in the DRAINING state. If the\n\t\t\ttasks in the service use the Fargate launch type, the minimum healthy\n\t\t\tpercent and maximum percent values aren't used. This is the case even if they're\n\t\t\tcurrently visible when describing your service.

\n

When creating a service that uses the EXTERNAL deployment controller, you\n\t\t\tcan specify only parameters that aren't controlled at the task set level. The only\n\t\t\trequired parameter is the service name. You control your services using the CreateTaskSet. For more information, see Amazon ECS deployment types in the Amazon Elastic Container Service Developer Guide.

\n

When the service scheduler launches new tasks, it determines task placement. For\n\t\t\tinformation about task placement and task placement strategies, see Amazon ECS\n\t\t\t\ttask placement in the Amazon Elastic Container Service Developer Guide\n

", + "smithy.api#documentation": "

Runs and maintains your desired number of tasks from a specified task definition. If\n\t\t\tthe number of tasks running in a service drops below the desiredCount,\n\t\t\tAmazon ECS runs another copy of the task in the specified cluster. To update an existing\n\t\t\tservice, see the UpdateService action.

\n \n

On March 21, 2024, a change was made to resolve the task definition revision before authorization. When a task definition revision is not specified, authorization will occur using the latest revision of a task definition.

\n
\n \n

Amazon Elastic Inference (EI) is no longer available to customers.

\n
\n

In addition to maintaining the desired count of tasks in your service, you can\n\t\t\toptionally run your service behind one or more load balancers. The load balancers\n\t\t\tdistribute traffic across the tasks that are associated with the service. For more\n\t\t\tinformation, see Service load balancing in the Amazon Elastic Container Service Developer Guide.

\n

You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the volume when creating or\n\t\t\tupdating a service. volumeConfigurations is only supported for REPLICA\n\t\t\tservice and not DAEMON service. For more infomation, see Amazon EBS volumes in the Amazon Elastic Container Service Developer Guide.

\n

Tasks for services that don't use a load balancer are considered healthy if they're in\n\t\t\tthe RUNNING state. Tasks for services that use a load balancer are\n\t\t\tconsidered healthy if they're in the RUNNING state and are reported as\n\t\t\thealthy by the load balancer.

\n

There are two service scheduler strategies available:

\n
    \n
  • \n

    \n REPLICA - The replica scheduling strategy places and\n\t\t\t\t\tmaintains your desired number of tasks across your cluster. By default, the\n\t\t\t\t\tservice scheduler spreads tasks across Availability Zones. You can use task\n\t\t\t\t\tplacement strategies and constraints to customize task placement decisions. For\n\t\t\t\t\tmore information, see Service scheduler concepts in the Amazon Elastic Container Service Developer Guide.

    \n
  • \n
  • \n

    \n DAEMON - The daemon scheduling strategy deploys exactly one\n\t\t\t\t\ttask on each active container instance that meets all of the task placement\n\t\t\t\t\tconstraints that you specify in your cluster. The service scheduler also\n\t\t\t\t\tevaluates the task placement constraints for running tasks. It also stops tasks\n\t\t\t\t\tthat don't meet the placement constraints. When using this strategy, you don't\n\t\t\t\t\tneed to specify a desired number of tasks, a task placement strategy, or use\n\t\t\t\t\tService Auto Scaling policies. For more information, see Service scheduler concepts in the Amazon Elastic Container Service Developer Guide.

    \n
  • \n
\n

You can optionally specify a deployment configuration for your service. The deployment\n\t\t\tis initiated by changing properties. For example, the deployment might be initiated by\n\t\t\tthe task definition or by your desired count of a service. You can use UpdateService. The default value for a replica service for\n\t\t\t\tminimumHealthyPercent is 100%. The default value for a daemon service\n\t\t\tfor minimumHealthyPercent is 0%.

\n

If a service uses the ECS deployment controller, the minimum healthy\n\t\t\tpercent represents a lower limit on the number of tasks in a service that must remain in\n\t\t\tthe RUNNING state during a deployment. Specifically, it represents it as a\n\t\t\tpercentage of your desired number of tasks (rounded up to the nearest integer). This\n\t\t\thappens when any of your container instances are in the DRAINING state if\n\t\t\tthe service contains tasks using the EC2 launch type. Using this\n\t\t\tparameter, you can deploy without using additional cluster capacity. For example, if you\n\t\t\tset your service to have desired number of four tasks and a minimum healthy percent of\n\t\t\t50%, the scheduler might stop two existing tasks to free up cluster capacity before\n\t\t\tstarting two new tasks. If they're in the RUNNING state, tasks for services\n\t\t\tthat don't use a load balancer are considered healthy . If they're in the\n\t\t\t\tRUNNING state and reported as healthy by the load balancer, tasks for\n\t\t\tservices that do use a load balancer are considered healthy . The\n\t\t\tdefault value for minimum healthy percent is 100%.

\n

If a service uses the ECS deployment controller, the maximum percent parameter represents an upper limit on the\n\t\t\tnumber of tasks in a service that are allowed in the RUNNING or\n\t\t\t\tPENDING state during a deployment. Specifically, it represents it as a\n\t\t\tpercentage of the desired number of tasks (rounded down to the nearest integer). This\n\t\t\thappens when any of your container instances are in the DRAINING state if\n\t\t\tthe service contains tasks using the EC2 launch type. Using this\n\t\t\tparameter, you can define the deployment batch size. For example, if your service has a\n\t\t\tdesired number of four tasks and a maximum percent value of 200%, the scheduler may\n\t\t\tstart four new tasks before stopping the four older tasks (provided that the cluster\n\t\t\tresources required to do this are available). The default value for maximum percent is\n\t\t\t200%.

\n

If a service uses either the CODE_DEPLOY or EXTERNAL\n\t\t\tdeployment controller types and tasks that use the EC2 launch type, the\n\t\t\t\tminimum healthy percent and maximum percent values are used only to define the lower and upper limit\n\t\t\ton the number of the tasks in the service that remain in the RUNNING state.\n\t\t\tThis is while the container instances are in the DRAINING state. If the\n\t\t\ttasks in the service use the Fargate launch type, the minimum healthy\n\t\t\tpercent and maximum percent values aren't used. This is the case even if they're\n\t\t\tcurrently visible when describing your service.

\n

When creating a service that uses the EXTERNAL deployment controller, you\n\t\t\tcan specify only parameters that aren't controlled at the task set level. The only\n\t\t\trequired parameter is the service name. You control your services using the CreateTaskSet. For more information, see Amazon ECS deployment types in the Amazon Elastic Container Service Developer Guide.

\n

When the service scheduler launches new tasks, it determines task placement. For\n\t\t\tinformation about task placement and task placement strategies, see Amazon ECS\n\t\t\t\ttask placement in the Amazon Elastic Container Service Developer Guide\n

", "smithy.api#examples": [ { "title": "To create a new service", @@ -3319,7 +3360,7 @@ "deploymentConfiguration": { "target": "com.amazonaws.ecs#DeploymentConfiguration", "traits": { - "smithy.api#documentation": "

Optional deployment parameters that control how many tasks run during the deployment\n\t\t\tand the ordering of stopping and starting tasks.

" + "smithy.api#documentation": "

Optional deployment parameters that control how many tasks run during the deployment and the\n\t\t\tfailure detection methods.

" } }, "placementConstraints": { @@ -3343,7 +3384,7 @@ "healthCheckGracePeriodSeconds": { "target": "com.amazonaws.ecs#BoxedInteger", "traits": { - "smithy.api#documentation": "

The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy\n\t\t\tElastic Load Balancing target health checks after a task has first started. This is only used when your\n\t\t\tservice is configured to use a load balancer. If your service has a load balancer\n\t\t\tdefined and you don't specify a health check grace period value, the default value of\n\t\t\t\t0 is used.

\n

If you do not use an Elastic Load Balancing, we recommend that you use the startPeriod in\n\t\t\tthe task definition health check parameters. For more information, see Health\n\t\t\t\tcheck.

\n

If your service's tasks take a while to start and respond to Elastic Load Balancing health checks, you\n\t\t\tcan specify a health check grace period of up to 2,147,483,647 seconds (about 69 years).\n\t\t\tDuring that time, the Amazon ECS service scheduler ignores health check status. This grace\n\t\t\tperiod can prevent the service scheduler from marking tasks as unhealthy and stopping\n\t\t\tthem before they have time to come up.

" + "smithy.api#documentation": "

The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy\n\t\t\tElastic Load Balancing target health checks after a task has first started. This is only used when your\n\t\t\tservice is configured to use a load balancer. If your service has a load balancer\n\t\t\tdefined and you don't specify a health check grace period value, the default value of\n\t\t\t\t0 is used.

\n

If you do not use an Elastic Load Balancing, we recommend that you use the startPeriod in\n\t\t\tthe task definition health check parameters. For more information, see Health\n\t\t\t\tcheck.

\n

If your service's tasks take a while to start and respond to Elastic Load Balancing health checks, you can\n\t\t\tspecify a health check grace period of up to 2,147,483,647 seconds (about 69 years).\n\t\t\tDuring that time, the Amazon ECS service scheduler ignores health check status. This grace\n\t\t\tperiod can prevent the service scheduler from marking tasks as unhealthy and stopping\n\t\t\tthem before they have time to come up.

" } }, "schedulingStrategy": { @@ -3565,6 +3606,26 @@ "smithy.api#output": {} } }, + "com.amazonaws.ecs#CreatedAt": { + "type": "structure", + "members": { + "before": { + "target": "com.amazonaws.ecs#Timestamp", + "traits": { + "smithy.api#documentation": "

Include service deployments in the result that were created before this time. The format is yyyy-MM-dd\n\t\t\tHH:mm:ss.SSSSSS.

" + } + }, + "after": { + "target": "com.amazonaws.ecs#Timestamp", + "traits": { + "smithy.api#documentation": "

Include service deployments in the result that were created after this time. The format is yyyy-MM-dd\n\t\t\tHH:mm:ss.SSSSSS.

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

The optional filter to narrow the ListServiceDeployment results.

\n

If you do not specify a value, service deployments that were created before the current\n\t\t\ttime are included in the result.

" + } + }, "com.amazonaws.ecs#DeleteAccountSetting": { "type": "operation", "input": { @@ -4224,19 +4285,19 @@ "smithy.api#required": {} } }, - "enable": { + "rollback": { "target": "com.amazonaws.ecs#Boolean", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Determines whether to use the CloudWatch alarm option in the service deployment\n\t\t\tprocess.

", + "smithy.api#documentation": "

Determines whether to configure Amazon ECS to roll back the service if a service deployment\n\t\t\tfails. If rollback is used, when a service deployment fails, the service is rolled back\n\t\t\tto the last deployment that completed successfully.

", "smithy.api#required": {} } }, - "rollback": { + "enable": { "target": "com.amazonaws.ecs#Boolean", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Determines whether to configure Amazon ECS to roll back the service if a service deployment\n\t\t\tfails. If rollback is used, when a service deployment fails, the service is rolled back\n\t\t\tto the last deployment that completed successfully.

", + "smithy.api#documentation": "

Determines whether to use the CloudWatch alarm option in the service deployment\n\t\t\tprocess.

", "smithy.api#required": {} } } @@ -4298,7 +4359,7 @@ } }, "traits": { - "smithy.api#documentation": "

Optional deployment parameters that control how many tasks run during a deployment and\n\t\t\tthe ordering of stopping and starting tasks.

" + "smithy.api#documentation": "

Optional deployment parameters that control how many tasks run during the deployment and the\n\t\t\tfailure detection methods.

" } }, "com.amazonaws.ecs#DeploymentController": { @@ -4345,7 +4406,7 @@ "kmsKeyId": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

Specify an Key Management Service key ID to encrypt the ephemeral storage for\n\t\t\tdeployment.

" + "smithy.api#documentation": "

Specify an Amazon Web Services Key Management Service key ID to encrypt the ephemeral storage for\n\t\t\tdeployment.

" } } }, @@ -4835,6 +4896,146 @@ "smithy.api#output": {} } }, + "com.amazonaws.ecs#DescribeServiceDeployments": { + "type": "operation", + "input": { + "target": "com.amazonaws.ecs#DescribeServiceDeploymentsRequest" + }, + "output": { + "target": "com.amazonaws.ecs#DescribeServiceDeploymentsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.ecs#AccessDeniedException" + }, + { + "target": "com.amazonaws.ecs#ClientException" + }, + { + "target": "com.amazonaws.ecs#ClusterNotFoundException" + }, + { + "target": "com.amazonaws.ecs#InvalidParameterException" + }, + { + "target": "com.amazonaws.ecs#ServerException" + }, + { + "target": "com.amazonaws.ecs#ServiceNotFoundException" + }, + { + "target": "com.amazonaws.ecs#UnsupportedFeatureException" + } + ], + "traits": { + "smithy.api#documentation": "

Describes one or more of your service deployments.

\n

A service deployment happens when you release a software update for the service. For more information, see Amazon ECS service deployments.

" + } + }, + "com.amazonaws.ecs#DescribeServiceDeploymentsRequest": { + "type": "structure", + "members": { + "serviceDeploymentArns": { + "target": "com.amazonaws.ecs#StringList", + "traits": { + "smithy.api#documentation": "

The ARN of the service deployment.

\n

You can specify a maximum of 20 ARNs.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.ecs#DescribeServiceDeploymentsResponse": { + "type": "structure", + "members": { + "serviceDeployments": { + "target": "com.amazonaws.ecs#ServiceDeployments", + "traits": { + "smithy.api#documentation": "

The list of service deployments described.

" + } + }, + "failures": { + "target": "com.amazonaws.ecs#Failures", + "traits": { + "smithy.api#documentation": "

Any failures associated with the call.

\n

If you decsribe a deployment with a service revision created before October 25, 2024, the\n\t\t\tcall fails. The failure includes the service revision ARN and the reason set to\n\t\t\t\tMISSING.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.ecs#DescribeServiceRevisions": { + "type": "operation", + "input": { + "target": "com.amazonaws.ecs#DescribeServiceRevisionsRequest" + }, + "output": { + "target": "com.amazonaws.ecs#DescribeServiceRevisionsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.ecs#AccessDeniedException" + }, + { + "target": "com.amazonaws.ecs#ClientException" + }, + { + "target": "com.amazonaws.ecs#ClusterNotFoundException" + }, + { + "target": "com.amazonaws.ecs#InvalidParameterException" + }, + { + "target": "com.amazonaws.ecs#ServerException" + }, + { + "target": "com.amazonaws.ecs#ServiceNotFoundException" + }, + { + "target": "com.amazonaws.ecs#UnsupportedFeatureException" + } + ], + "traits": { + "smithy.api#documentation": "

Describes one or more service revisions.

\n

A service revision is a version of the service that includes the values for the Amazon ECS\n\t\t\tresources (for example, task definition) and the environment resources (for example,\n\t\t\tload balancers, subnets, and security groups). For more information, see Amazon ECS service revisions.

\n

You can't describe a service revision that was created before October 25, 2024.

" + } + }, + "com.amazonaws.ecs#DescribeServiceRevisionsRequest": { + "type": "structure", + "members": { + "serviceRevisionArns": { + "target": "com.amazonaws.ecs#StringList", + "traits": { + "smithy.api#documentation": "

The ARN of the service revision.

\n

You can specify a maximum of 20 ARNs.

\n

You can call ListServiceDeployments to\n\t\t\tget the ARNs.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.ecs#DescribeServiceRevisionsResponse": { + "type": "structure", + "members": { + "serviceRevisions": { + "target": "com.amazonaws.ecs#ServiceRevisions", + "traits": { + "smithy.api#documentation": "

The list of service revisions described.

" + } + }, + "failures": { + "target": "com.amazonaws.ecs#Failures", + "traits": { + "smithy.api#documentation": "

Any failures associated with the call.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.ecs#DescribeServices": { "type": "operation", "input": { @@ -7135,6 +7336,103 @@ "smithy.api#output": {} } }, + "com.amazonaws.ecs#ListServiceDeployments": { + "type": "operation", + "input": { + "target": "com.amazonaws.ecs#ListServiceDeploymentsRequest" + }, + "output": { + "target": "com.amazonaws.ecs#ListServiceDeploymentsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.ecs#AccessDeniedException" + }, + { + "target": "com.amazonaws.ecs#ClientException" + }, + { + "target": "com.amazonaws.ecs#InvalidParameterException" + }, + { + "target": "com.amazonaws.ecs#ServerException" + }, + { + "target": "com.amazonaws.ecs#ServiceNotFoundException" + }, + { + "target": "com.amazonaws.ecs#UnsupportedFeatureException" + } + ], + "traits": { + "smithy.api#documentation": "

This operation lists all the service deployments that meet the specified filter criteria.

\n

A service deployment happens when you release a softwre update for the service. You\n\t\t\troute traffic from the running service revisions to the new service revison and control\n\t\t\tthe number of running tasks.

\n

This API returns the values that you use for the request parameters in DescribeServiceRevisions.

" + } + }, + "com.amazonaws.ecs#ListServiceDeploymentsRequest": { + "type": "structure", + "members": { + "service": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The ARN or name of the service

", + "smithy.api#required": {} + } + }, + "cluster": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The cluster that hosts the service. This can either be the cluster name or ARN. Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performanceIf you don't\n\t\t\tspecify a cluster, deault is used.

" + } + }, + "status": { + "target": "com.amazonaws.ecs#ServiceDeploymentStatusList", + "traits": { + "smithy.api#documentation": "

An optional filter you can use to narrow the results. If you do not specify a status, then\n\t\t\tall status values are included in the result.

" + } + }, + "createdAt": { + "target": "com.amazonaws.ecs#CreatedAt", + "traits": { + "smithy.api#documentation": "

An optional filter you can use to narrow the results by the service creation date. If you do\n\t\t\tnot specify a value, the result includes all services created before the current\n\t\t\ttime. The\n\t\t\tformat is yyyy-MM-dd HH:mm:ss.SSSSSS.

" + } + }, + "nextToken": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The nextToken value returned from a ListServiceDeployments request indicating that more results are available to fulfill the request and further calls are needed. If you provided maxResults, it's possible the number of results is fewer than maxResults.

" + } + }, + "maxResults": { + "target": "com.amazonaws.ecs#BoxedInteger", + "traits": { + "smithy.api#documentation": "

The maximum number of service deployment results that ListServiceDeployments\n\t\t\treturned in paginated output. When this parameter is used,\n\t\t\t\tListServiceDeployments only returns maxResults results in\n\t\t\ta single page along with a nextToken response element. The remaining\n\t\t\tresults of the initial request can be seen by sending another\n\t\t\t\tListServiceDeployments request with the returned nextToken\n\t\t\tvalue. This value can be between 1 and 100. If this parameter isn't used, then\n\t\t\t\tListServiceDeployments returns up to 20 results and a\n\t\t\t\tnextToken value if applicable.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.ecs#ListServiceDeploymentsResponse": { + "type": "structure", + "members": { + "serviceDeployments": { + "target": "com.amazonaws.ecs#ServiceDeploymentsBrief", + "traits": { + "smithy.api#documentation": "

An overview of the service deployment, including the following\n\t\t\tproperties:

\n
    \n
  • \n

    The ARN of the service deployment.

    \n
  • \n
  • \n

    The ARN of the service being deployed.

    \n
  • \n
  • \n

    The ARN of the cluster that hosts the service in the service deployment.

    \n
  • \n
  • \n

    The time that the service deployment started.

    \n
  • \n
  • \n

    The time that the service deployment completed.

    \n
  • \n
  • \n

    The service deployment status.

    \n
  • \n
  • \n

    Information about why the service deployment is in the current state.

    \n
  • \n
  • \n

    The ARN of the service revision that is being deployed.

    \n
  • \n
" + } + }, + "nextToken": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The nextToken value to include in a future ListServiceDeployments request. When the results of a ListServiceDeployments request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.ecs#ListServices": { "type": "operation", "input": { @@ -7770,7 +8068,7 @@ "loadBalancerName": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

The name of the load balancer to associate with the Amazon ECS service or task set.

\n

If you are using an Application Load Balancer or a Network Load Balancer the load balancer name parameter should be\n\t\t\tomitted.

" + "smithy.api#documentation": "

The name of the load balancer to associate with the service or task set.

\n

If you are using an Application Load Balancer or a Network Load Balancer the load balancer name parameter should be\n\t\t\tomitted.

" } }, "containerName": { @@ -8016,7 +8314,7 @@ "minimumScalingStepSize": { "target": "com.amazonaws.ecs#ManagedScalingStepSize", "traits": { - "smithy.api#documentation": "

The minimum number of Amazon EC2 instances that Amazon ECS will scale out at one time. The scale\n\t\t\tin process is not affected by this parameter If this parameter is omitted, the default\n\t\t\tvalue of 1 is used.

\n

When additional capacity is required, Amazon ECS will scale up the minimum scaling step\n\t\t\tsize even if the actual demand is less than the minimum scaling step size.

\n

If you use a capacity provider with an Auto Scaling group configured with more than\n\t\t\tone Amazon EC2 instance type or Availability Zone, Amazon ECS will scale up by the exact minimum\n\t\t\tscaling step size value and will ignore both the maximum scaling step size as well as\n\t\t\tthe capacity demand.

" + "smithy.api#documentation": "

The minimum number of Amazon EC2 instances that Amazon ECS will scale out at one time. If this parameter is omitted, the default\n\t\t\tvalue of 1 is used.

\n

When additional capacity is required, Amazon ECS will scale up the minimum scaling step\n\t\t\tsize even if the actual demand is less than the minimum scaling step size.

\n

If you use a capacity provider with an Auto Scaling group configured with more than\n\t\t\tone Amazon EC2 instance type or Availability Zone, Amazon ECS will scale up by the exact minimum\n\t\t\tscaling step size value and will ignore both the maximum scaling step size as well as\n\t\t\tthe capacity demand.

" } }, "maximumScalingStepSize": { @@ -8086,7 +8384,7 @@ "kmsKeyId": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

Specify a Key Management Service key ID to encrypt the managed storage.

" + "smithy.api#documentation": "

Specify a Amazon Web Services Key Management Service key ID to encrypt the managed storage.

" } }, "fargateEphemeralStorageKmsKeyId": { @@ -8556,7 +8854,7 @@ "containerPort": { "target": "com.amazonaws.ecs#BoxedInteger", "traits": { - "smithy.api#documentation": "

The port number on the container that's bound to the user-specified or automatically\n\t\t\tassigned host port.

\n

If you use containers in a task with the awsvpc or host\n\t\t\tnetwork mode, specify the exposed ports using containerPort.

\n

If you use containers in a task with the bridge network mode and you\n\t\t\tspecify a container port and not a host port, your container automatically receives a\n\t\t\thost port in the ephemeral port range. For more information, see hostPort.\n\t\t\tPort mappings that are automatically assigned in this way do not count toward the 100\n\t\t\treserved ports limit of a container instance.

" + "smithy.api#documentation": "

The port number on the container that's bound to the user-specified or automatically\n\t\t\tassigned host port.

\n

For tasks that use the Fargate launch type or EC2 tasks that use the\n\t\t\t\tawsvpc network mode, you use containerPort to specify the\n\t\t\texposed ports.

\n

For Windows containers on Fargate, you can't use port 3150 for the\n\t\t\t\tcontainerPort. This is because it's reserved.

\n

Suppose that you're using containers in a task with the EC2 launch type\n\t\t\tand you specify a container port and not a host port. Then, your container automatically\n\t\t\treceives a host port in the ephemeral port range. For more information, see\n\t\t\t\thostPort. Port mappings that are automatically assigned in this way\n\t\t\tdon't count toward the 100 reserved ports quota of a container instance.

" } }, "hostPort": { @@ -8591,7 +8889,7 @@ } }, "traits": { - "smithy.api#documentation": "

Port mappings allow containers to access ports on the host container instance to send\n\t\t\tor receive traffic. Port mappings are specified as part of the container\n\t\t\tdefinition.

\n

If you use containers in a task with the awsvpc or host\n\t\t\tnetwork mode, specify the exposed ports using containerPort. The\n\t\t\t\thostPort can be left blank or it must be the same value as the\n\t\t\t\tcontainerPort.

\n

Most fields of this parameter (containerPort, hostPort,\n\t\t\tprotocol) maps to PortBindings in the docker container create command and the\n\t\t\t\t--publish option to docker\n\t\t\t\t\trun. If the network mode of a task definition is set to\n\t\t\t\thost, host ports must either be undefined or match the container port\n\t\t\tin the port mapping.

\n \n

You can't expose the same container port for multiple protocols. If you attempt\n\t\t\t\tthis, an error is returned.

\n
\n

After a task reaches the RUNNING status, manual and automatic host and\n\t\t\tcontainer port assignments are visible in the networkBindings section of\n\t\t\tDescribeTasks API responses.

" + "smithy.api#documentation": "

Port mappings expose your container's network ports to the outside world. this allows\n\t\t\tclients to access your application. It's also used for inter-container communication\n\t\t\twithin the same task.

\n

For task definitions (both the Fargate and EC2 launch type) that use the\n\t\t\t\tawsvpc network mode, only specify the containerPort. The\n\t\t\t\thostPort is always ignored, and the container port is automatically\n\t\t\tmapped to a random high-numbered port on the host.

\n

Most fields of this parameter (containerPort, hostPort,\n\t\t\tprotocol) maps to PortBindings in the docker container create command and the\n\t\t\t\t--publish option to docker\n\t\t\t\t\trun. If the network mode of a task definition is set to\n\t\t\t\thost, host ports must either be undefined or match the container port\n\t\t\tin the port mapping.

\n \n

You can't expose the same container port for multiple protocols. If you attempt\n\t\t\t\tthis, an error is returned.

\n
\n

After a task reaches the RUNNING status, manual and automatic host and\n\t\t\tcontainer port assignments are visible in the networkBindings section of\n\t\t\tDescribeTasks API responses.

" } }, "com.amazonaws.ecs#PortMappingList": { @@ -9215,7 +9513,7 @@ "networkMode": { "target": "com.amazonaws.ecs#NetworkMode", "traits": { - "smithy.api#documentation": "

The Docker networking mode to use for the containers in the task. The valid values are\n none, bridge, awsvpc, and host.\n If no network mode is specified, the default is bridge.

\n

For Amazon ECS tasks on Fargate, the awsvpc network mode is required. \n For Amazon ECS tasks on Amazon EC2 Linux instances, any network mode can be used. For Amazon ECS tasks on Amazon EC2 Windows instances, or awsvpc can be used. If the network\n mode is set to none, you cannot specify port mappings in your container\n definitions, and the tasks containers do not have external connectivity. The\n host and awsvpc network modes offer the highest networking\n performance for containers because they use the EC2 network stack instead of the\n virtualized network stack provided by the bridge mode.

\n

With the host and awsvpc network modes, exposed container\n ports are mapped directly to the corresponding host port (for the host\n network mode) or the attached elastic network interface port (for the\n awsvpc network mode), so you cannot take advantage of dynamic host port\n mappings.

\n \n

When using the host network mode, you should not run\n containers using the root user (UID 0). It is considered best practice\n to use a non-root user.

\n
\n

If the network mode is awsvpc, the task is allocated an elastic network\n interface, and you must specify a NetworkConfiguration value when you create\n a service or run a task with the task definition. For more information, see Task Networking in the\n Amazon Elastic Container Service Developer Guide.

\n

If the network mode is host, you cannot run multiple instantiations of the\n same task on a single container instance when port mappings are used.

" + "smithy.api#documentation": "

The Docker networking mode to use for the containers in the task. The valid values are\n none, bridge, awsvpc, and host.\n If no network mode is specified, the default is bridge.

\n

For Amazon ECS tasks on Fargate, the awsvpc network mode is required. \n For Amazon ECS tasks on Amazon EC2 Linux instances, any network mode can be used. For Amazon ECS tasks on Amazon EC2 Windows instances, or awsvpc can be used. If the network\n mode is set to none, you cannot specify port mappings in your container\n definitions, and the tasks containers do not have external connectivity. The\n host and awsvpc network modes offer the highest networking\n performance for containers because they use the EC2 network stack instead of the\n virtualized network stack provided by the bridge mode.

\n

With the host and awsvpc network modes, exposed container\n ports are mapped directly to the corresponding host port (for the host\n network mode) or the attached elastic network interface port (for the\n awsvpc network mode), so you cannot take advantage of dynamic host port\n mappings.

\n \n

When using the host network mode, you should not run\n containers using the root user (UID 0). It is considered best practice\n to use a non-root user.

\n
\n

If the network mode is awsvpc, the task is allocated an elastic network\n interface, and you must specify a NetworkConfiguration value when you create\n a service or run a task with the task definition. For more information, see Task Networking in the\n Amazon Elastic Container Service Developer Guide.

\n

If the network mode is host, you cannot run multiple instantiations of the\n same task on a single container instance when port mappings are used.

\n

For more information, see Network\n settings in the Docker run reference.

" } }, "containerDefinitions": { @@ -9264,13 +9562,13 @@ "pidMode": { "target": "com.amazonaws.ecs#PidMode", "traits": { - "smithy.api#documentation": "

The process namespace to use for the containers in the task. The valid\n values are host or task. On Fargate for\n Linux containers, the only valid value is task. For\n example, monitoring sidecars might need pidMode to access\n information about other containers running in the same task.

\n

If host is specified, all containers within the tasks\n that specified the host PID mode on the same container\n instance share the same process namespace with the host Amazon EC2\n instance.

\n

If task is specified, all containers within the specified\n task share the same process namespace.

\n

If no value is specified, the\n default is a private namespace for each container.

\n

If the host PID mode is used, there's a heightened risk\n of undesired process namespace exposure.

\n \n

This parameter is not supported for Windows containers.

\n
\n \n

This parameter is only supported for tasks that are hosted on\n Fargate if the tasks are using platform version 1.4.0 or later\n (Linux). This isn't supported for Windows containers on\n Fargate.

\n
" + "smithy.api#documentation": "

The process namespace to use for the containers in the task. The valid\n values are host or task. On Fargate for\n Linux containers, the only valid value is task. For\n example, monitoring sidecars might need pidMode to access\n information about other containers running in the same task.

\n

If host is specified, all containers within the tasks\n that specified the host PID mode on the same container\n instance share the same process namespace with the host Amazon EC2\n instance.

\n

If task is specified, all containers within the specified\n task share the same process namespace.

\n

If no value is specified, the\n default is a private namespace for each container. For more information,\n see PID settings in the Docker run\n reference.

\n

If the host PID mode is used, there's a heightened risk\n of undesired process namespace exposure. For more information, see\n Docker security.

\n \n

This parameter is not supported for Windows containers.

\n
\n \n

This parameter is only supported for tasks that are hosted on\n Fargate if the tasks are using platform version 1.4.0 or later\n (Linux). This isn't supported for Windows containers on\n Fargate.

\n
" } }, "ipcMode": { "target": "com.amazonaws.ecs#IpcMode", "traits": { - "smithy.api#documentation": "

The IPC resource namespace to use for the containers in the task. The valid values are\n host, task, or none. If host is\n specified, then all containers within the tasks that specified the host IPC\n mode on the same container instance share the same IPC resources with the host Amazon EC2\n instance. If task is specified, all containers within the specified task\n share the same IPC resources. If none is specified, then IPC resources\n within the containers of a task are private and not shared with other containers in a\n task or on the container instance. If no value is specified, then the IPC resource\n namespace sharing depends on the Docker daemon setting on the container instance.

\n

If the host IPC mode is used, be aware that there is a heightened risk of\n undesired IPC namespace expose.

\n

If you are setting namespaced kernel parameters using systemControls for\n the containers in the task, the following will apply to your IPC resource namespace. For\n more information, see System\n Controls in the Amazon Elastic Container Service Developer Guide.

\n
    \n
  • \n

    For tasks that use the host IPC mode, IPC namespace related\n systemControls are not supported.

    \n
  • \n
  • \n

    For tasks that use the task IPC mode, IPC namespace related\n systemControls will apply to all containers within a\n task.

    \n
  • \n
\n \n

This parameter is not supported for Windows containers or tasks run on Fargate.

\n
" + "smithy.api#documentation": "

The IPC resource namespace to use for the containers in the task. The valid values are\n host, task, or none. If host is\n specified, then all containers within the tasks that specified the host IPC\n mode on the same container instance share the same IPC resources with the host Amazon EC2\n instance. If task is specified, all containers within the specified task\n share the same IPC resources. If none is specified, then IPC resources\n within the containers of a task are private and not shared with other containers in a\n task or on the container instance. If no value is specified, then the IPC resource\n namespace sharing depends on the Docker daemon setting on the container instance. For\n more information, see IPC\n settings in the Docker run reference.

\n

If the host IPC mode is used, be aware that there is a heightened risk of\n undesired IPC namespace expose. For more information, see Docker\n security.

\n

If you are setting namespaced kernel parameters using systemControls for\n the containers in the task, the following will apply to your IPC resource namespace. For\n more information, see System\n Controls in the Amazon Elastic Container Service Developer Guide.

\n
    \n
  • \n

    For tasks that use the host IPC mode, IPC namespace related\n systemControls are not supported.

    \n
  • \n
  • \n

    For tasks that use the task IPC mode, IPC namespace related\n systemControls will apply to all containers within a\n task.

    \n
  • \n
\n \n

This parameter is not supported for Windows containers or tasks run on Fargate.

\n
" } }, "proxyConfiguration": { @@ -9432,7 +9730,7 @@ "value": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

The value for the specified resource type.

\n

When the type is GPU, the value is the number of physical\n\t\t\t\tGPUs the Amazon ECS container agent reserves for the container. The number\n\t\t\tof GPUs that's reserved for all containers in a task can't exceed the number of\n\t\t\tavailable GPUs on the container instance that the task is launched on.

\n

When the type is InferenceAccelerator, the value matches the\n\t\t\t\tdeviceName for an InferenceAccelerator specified in a task definition.

", + "smithy.api#documentation": "

The value for the specified resource type.

\n

When the type is GPU, the value is the number of physical GPUs the\n\t\t\tAmazon ECS container agent reserves for the container. The number of GPUs that's reserved for\n\t\t\tall containers in a task can't exceed the number of available GPUs on the container\n\t\t\tinstance that the task is launched on.

\n

When the type is InferenceAccelerator, the value matches\n\t\t\tthe deviceName for an InferenceAccelerator specified in a task definition.

", "smithy.api#required": {} } }, @@ -9477,11 +9775,37 @@ "target": "com.amazonaws.ecs#Resource" } }, - "com.amazonaws.ecs#RunTask": { - "type": "operation", - "input": { - "target": "com.amazonaws.ecs#RunTaskRequest" - }, + "com.amazonaws.ecs#Rollback": { + "type": "structure", + "members": { + "reason": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The reason the rollback happened. For example, the circuit breaker initiated the rollback operation.

" + } + }, + "startedAt": { + "target": "com.amazonaws.ecs#Timestamp", + "traits": { + "smithy.api#documentation": "

Time time that the rollback started. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.

" + } + }, + "serviceRevisionArn": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The ARN of the service revision deployed as part of the rollback.

\n

When the type is GPU, the value is the number of physical\n\t\t\t\tGPUs the Amazon ECS container agent reserves for the container. The number\n\t\t\tof GPUs that's reserved for all containers in a task can't exceed the number of\n\t\t\tavailable GPUs on the container instance that the task is launched on.

\n

When the type is InferenceAccelerator, the value matches the\n\t\t\t\tdeviceName for an InferenceAccelerator specified in a task definition.

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

Information about the service deployment rollback.

" + } + }, + "com.amazonaws.ecs#RunTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.ecs#RunTaskRequest" + }, "output": { "target": "com.amazonaws.ecs#RunTaskResponse" }, @@ -9709,13 +10033,13 @@ "cpuArchitecture": { "target": "com.amazonaws.ecs#CPUArchitecture", "traits": { - "smithy.api#documentation": "

The CPU architecture.

\n

You can run your Linux tasks on an ARM-based platform by setting the value to\n\t\t\t\tARM64. This option is available for tasks that run on Linux Amazon EC2\n\t\t\tinstance or Linux containers on Fargate.

" + "smithy.api#documentation": "

The CPU architecture.

\n

You can run your Linux tasks on an ARM-based platform by setting the value to\n\t\t\t\tARM64. This option is available for tasks that run on Linux Amazon EC2\n\t\t\tinstance or Linux containers on Fargate.

\n

The default is X86_64.

" } }, "operatingSystemFamily": { "target": "com.amazonaws.ecs#OSFamily", "traits": { - "smithy.api#documentation": "

The operating system.

" + "smithy.api#documentation": "

The operating system.

\n

The default is Linux.

" } } }, @@ -9907,7 +10231,7 @@ "capacityProviderStrategy": { "target": "com.amazonaws.ecs#CapacityProviderStrategy", "traits": { - "smithy.api#documentation": "

The capacity provider strategy the service uses. When using the DescribeServices API,\n\t\t\tthis field is omitted if the service was created using a launch type.

" + "smithy.api#documentation": "

The capacity provider strategy the service uses. When using DescribeServices,\n\t\t\tthis field is omitted if the service was created using a launch type.

" } }, "platformVersion": { @@ -10003,7 +10327,7 @@ "tags": { "target": "com.amazonaws.ecs#Tags", "traits": { - "smithy.api#documentation": "

The metadata that you apply to the service to help you categorize and organize them.\n\t\t\tEach tag consists of a key and an optional value. You define bot the key and\n\t\t\tvalue.

\n

The following basic restrictions apply to tags:

\n
    \n
  • \n

    Maximum number of tags per resource - 50

    \n
  • \n
  • \n

    For each resource, each tag key must be unique, and each tag key can have only\n one value.

    \n
  • \n
  • \n

    Maximum key length - 128 Unicode characters in UTF-8

    \n
  • \n
  • \n

    Maximum value length - 256 Unicode characters in UTF-8

    \n
  • \n
  • \n

    If your tagging schema is used across multiple services and resources,\n remember that other services may have restrictions on allowed characters.\n Generally allowed characters are: letters, numbers, and spaces representable in\n UTF-8, and the following characters: + - = . _ : / @.

    \n
  • \n
  • \n

    Tag keys and values are case-sensitive.

    \n
  • \n
  • \n

    Do not use aws:, AWS:, or any upper or lowercase\n combination of such as a prefix for either keys or values as it is reserved for\n Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with\n this prefix do not count against your tags per resource limit.

    \n
  • \n
" + "smithy.api#documentation": "

The metadata that you apply to the service to help you categorize and organize them. Each\n\t\t\ttag consists of a key and an optional value. You define both the key and value.

\n

The following basic restrictions apply to tags:

\n
    \n
  • \n

    Maximum number of tags per resource - 50

    \n
  • \n
  • \n

    For each resource, each tag key must be unique, and each tag key can have only\n one value.

    \n
  • \n
  • \n

    Maximum key length - 128 Unicode characters in UTF-8

    \n
  • \n
  • \n

    Maximum value length - 256 Unicode characters in UTF-8

    \n
  • \n
  • \n

    If your tagging schema is used across multiple services and resources,\n remember that other services may have restrictions on allowed characters.\n Generally allowed characters are: letters, numbers, and spaces representable in\n UTF-8, and the following characters: + - = . _ : / @.

    \n
  • \n
  • \n

    Tag keys and values are case-sensitive.

    \n
  • \n
  • \n

    Do not use aws:, AWS:, or any upper or lowercase\n combination of such as a prefix for either keys or values as it is reserved for\n Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with\n this prefix do not count against your tags per resource limit.

    \n
  • \n
" } }, "createdBy": { @@ -10213,6 +10537,323 @@ "smithy.api#documentation": "

The key that encrypts and decrypts your resources for Service Connect TLS.

" } }, + "com.amazonaws.ecs#ServiceDeployment": { + "type": "structure", + "members": { + "serviceDeploymentArn": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The ARN of the service deployment.

" + } + }, + "serviceArn": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The ARN of the service for this service deployment.

" + } + }, + "clusterArn": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The ARN of the cluster that hosts the service.

" + } + }, + "createdAt": { + "target": "com.amazonaws.ecs#Timestamp", + "traits": { + "smithy.api#documentation": "

The time the service deployment was created. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.

" + } + }, + "startedAt": { + "target": "com.amazonaws.ecs#Timestamp", + "traits": { + "smithy.api#documentation": "

The time the service deployment statred. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.

" + } + }, + "finishedAt": { + "target": "com.amazonaws.ecs#Timestamp", + "traits": { + "smithy.api#documentation": "

The time the service deployment finished. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.

" + } + }, + "stoppedAt": { + "target": "com.amazonaws.ecs#Timestamp", + "traits": { + "smithy.api#documentation": "

The time the service deployment stopped. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.

\n

The service deployment stops when any of the following actions happen:

\n
    \n
  • \n

    A user manually stops the deployment

    \n
  • \n
  • \n

    The rollback option is not in use for the failure detection mechanism (the\n\t\t\t\t\tcircuit breaker or alarm-based) and the service fails.

    \n
  • \n
" + } + }, + "updatedAt": { + "target": "com.amazonaws.ecs#Timestamp", + "traits": { + "smithy.api#documentation": "

The time that the service deployment was last updated. The format is yyyy-MM-dd\n\t\t\tHH:mm:ss.SSSSSS.

" + } + }, + "sourceServiceRevisions": { + "target": "com.amazonaws.ecs#ServiceRevisionsSummaryList", + "traits": { + "smithy.api#documentation": "

The currently deployed workload configuration.

" + } + }, + "targetServiceRevision": { + "target": "com.amazonaws.ecs#ServiceRevisionSummary", + "traits": { + "smithy.api#documentation": "

The workload configuration being deployed.

" + } + }, + "status": { + "target": "com.amazonaws.ecs#ServiceDeploymentStatus", + "traits": { + "smithy.api#documentation": "

The service deployment state.

" + } + }, + "statusReason": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

Information about why the service deployment is in the current status. For example, the circuit breaker detected a failure.

" + } + }, + "deploymentConfiguration": { + "target": "com.amazonaws.ecs#DeploymentConfiguration" + }, + "rollback": { + "target": "com.amazonaws.ecs#Rollback", + "traits": { + "smithy.api#documentation": "

The rollback options the service deployment uses when the deployment fails.

" + } + }, + "deploymentCircuitBreaker": { + "target": "com.amazonaws.ecs#ServiceDeploymentCircuitBreaker", + "traits": { + "smithy.api#documentation": "

The circuit breaker configuration that determines a service deployment failed.

" + } + }, + "alarms": { + "target": "com.amazonaws.ecs#ServiceDeploymentAlarms", + "traits": { + "smithy.api#documentation": "

The CloudWatch alarms that determine when a service deployment fails.

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

Information about the service deployment.

\n

Service deployments provide a comprehensive view of your deployments. For information\n\t\t\tabout service deployments, see View service history using Amazon ECS service deployments\n\t\t\tin the \n Amazon Elastic Container Service Developer Guide\n .

" + } + }, + "com.amazonaws.ecs#ServiceDeploymentAlarms": { + "type": "structure", + "members": { + "status": { + "target": "com.amazonaws.ecs#ServiceDeploymentRollbackMonitorsStatus", + "traits": { + "smithy.api#documentation": "

The status of the alarms check. Amazon ECS is not using alarms for service deployment failures when the status is DISABLED.

" + } + }, + "alarmNames": { + "target": "com.amazonaws.ecs#StringList", + "traits": { + "smithy.api#documentation": "

The name of the CloudWatch alarms that determine when a service deployment failed. A \",\" separates the alarms.

" + } + }, + "triggeredAlarmNames": { + "target": "com.amazonaws.ecs#StringList", + "traits": { + "smithy.api#documentation": "

One or more CloudWatch alarm names that have been triggered during the service deployment. A \",\"\n\t\t\tseparates the alarm names.

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

The CloudWatch alarms used to determine a service deployment failed.

\n

Amazon ECS considers the service deployment as failed when any of the alarms move to the ALARM state. For more information, see How CloudWatch alarms detect Amazon ECS deployment failures in the Amazon ECS Developer Guide.

" + } + }, + "com.amazonaws.ecs#ServiceDeploymentBrief": { + "type": "structure", + "members": { + "serviceDeploymentArn": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The ARN of the service deployment.

" + } + }, + "serviceArn": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The ARN of the service for this service deployment.

" + } + }, + "clusterArn": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The ARN of the cluster that hosts the service.

" + } + }, + "startedAt": { + "target": "com.amazonaws.ecs#Timestamp", + "traits": { + "smithy.api#documentation": "

The time that the service deployment statred. The format is yyyy-MM-dd\n\t\t\tHH:mm:ss.SSSSSS.

" + } + }, + "createdAt": { + "target": "com.amazonaws.ecs#Timestamp", + "traits": { + "smithy.api#documentation": "

The time that the service deployment was created. The format is yyyy-MM-dd\n\t\t\tHH:mm:ss.SSSSSS.

" + } + }, + "finishedAt": { + "target": "com.amazonaws.ecs#Timestamp", + "traits": { + "smithy.api#documentation": "

The time that the service deployment completed. The format is yyyy-MM-dd\n\t\t\tHH:mm:ss.SSSSSS.

" + } + }, + "targetServiceRevisionArn": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The ARN of the service revision being deplyed.

" + } + }, + "status": { + "target": "com.amazonaws.ecs#ServiceDeploymentStatus", + "traits": { + "smithy.api#documentation": "

The status of the service deployment

" + } + }, + "statusReason": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

Information about why the service deployment is in the current status. For example, the circuit breaker detected a deployment failure.

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

The service deployment properties that are retured when you call ListServiceDeployments.

\n

This provides a high-level overview of the service deployment.

" + } + }, + "com.amazonaws.ecs#ServiceDeploymentCircuitBreaker": { + "type": "structure", + "members": { + "status": { + "target": "com.amazonaws.ecs#ServiceDeploymentRollbackMonitorsStatus", + "traits": { + "smithy.api#documentation": "

The circuit breaker status. Amazon ECS is not using the circuit breaker for service deployment failures when the status is DISABLED.

" + } + }, + "failureCount": { + "target": "com.amazonaws.ecs#Integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The number of times the circuit breaker detected a service deploymeny failure.

" + } + }, + "threshold": { + "target": "com.amazonaws.ecs#Integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The threshhold which determines that the service deployment failed.

\n

The deployment circuit breaker calculates the threshold value, and then uses the value to\n\t\t\tdetermine when to move the deployment to a FAILED state. The deployment circuit breaker\n\t\t\thas a minimum threshold of 3 and a maximum threshold of 200. and uses the values in the\n\t\t\tfollowing formula to determine the deployment failure.

\n

\n 0.5 * desired task count\n

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

Information about the circuit breaker used to determine when a service deployment has\n\t\t\tfailed.

\n

The deployment circuit breaker is the rolling update mechanism that determines if the\n\t\t\ttasks reach a steady state. The deployment circuit breaker has an option that will\n\t\t\tautomatically roll back a failed deployment to the last cpompleted service\n\t\t\trevision. For more information, see How the Amazon ECS\n\t\t\tdeployment circuit breaker detects failures in the Amazon ECS Developer\n\t\t\t\tGuide.

" + } + }, + "com.amazonaws.ecs#ServiceDeploymentRollbackMonitorsStatus": { + "type": "enum", + "members": { + "TRIGGERED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TRIGGERED" + } + }, + "MONITORING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MONITORING" + } + }, + "MONITORING_COMPLETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MONITORING_COMPLETE" + } + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } + } + }, + "com.amazonaws.ecs#ServiceDeploymentStatus": { + "type": "enum", + "members": { + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING" + } + }, + "SUCCESSFUL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCESSFUL" + } + }, + "STOPPED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STOPPED" + } + }, + "STOP_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STOP_REQUESTED" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" + } + }, + "ROLLBACK_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROLLBACK_IN_PROGRESS" + } + }, + "ROLLBACK_SUCCESSFUL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROLLBACK_SUCCESSFUL" + } + }, + "ROLLBACK_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROLLBACK_FAILED" + } + } + } + }, + "com.amazonaws.ecs#ServiceDeploymentStatusList": { + "type": "list", + "member": { + "target": "com.amazonaws.ecs#ServiceDeploymentStatus" + } + }, + "com.amazonaws.ecs#ServiceDeployments": { + "type": "list", + "member": { + "target": "com.amazonaws.ecs#ServiceDeployment" + } + }, + "com.amazonaws.ecs#ServiceDeploymentsBrief": { + "type": "list", + "member": { + "target": "com.amazonaws.ecs#ServiceDeploymentBrief" + } + }, "com.amazonaws.ecs#ServiceEvent": { "type": "structure", "members": { @@ -10399,6 +11040,155 @@ "smithy.api#documentation": "

The details for the service registry.

\n

Each service may be associated with one service registry. Multiple service registries\n\t\t\tfor each service are not supported.

\n

When you add, update, or remove the service registries configuration, Amazon ECS starts a\n\t\t\tnew deployment. New tasks are registered and deregistered to the updated service\n\t\t\tregistry configuration.

" } }, + "com.amazonaws.ecs#ServiceRevision": { + "type": "structure", + "members": { + "serviceRevisionArn": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The ARN of the service revision.

" + } + }, + "serviceArn": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The ARN of the service for the service revision.

" + } + }, + "clusterArn": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The ARN of the cluster that hosts the service.

" + } + }, + "taskDefinition": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The task definition the service revision uses.

" + } + }, + "capacityProviderStrategy": { + "target": "com.amazonaws.ecs#CapacityProviderStrategy", + "traits": { + "smithy.api#documentation": "

The capacity provider strategy the service revision uses.

" + } + }, + "launchType": { + "target": "com.amazonaws.ecs#LaunchType", + "traits": { + "smithy.api#documentation": "

The launch type the service revision uses.

" + } + }, + "platformVersion": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

For the Fargate launch type, the platform version the service revision uses.

" + } + }, + "platformFamily": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The platform family the service revision uses.

" + } + }, + "loadBalancers": { + "target": "com.amazonaws.ecs#LoadBalancers", + "traits": { + "smithy.api#documentation": "

The load balancers the service revision uses.

" + } + }, + "serviceRegistries": { + "target": "com.amazonaws.ecs#ServiceRegistries", + "traits": { + "smithy.api#documentation": "

The service registries (for Service Discovery) the service revision uses.

" + } + }, + "networkConfiguration": { + "target": "com.amazonaws.ecs#NetworkConfiguration" + }, + "containerImages": { + "target": "com.amazonaws.ecs#ContainerImages", + "traits": { + "smithy.api#documentation": "

The container images the service revision uses.

" + } + }, + "guardDutyEnabled": { + "target": "com.amazonaws.ecs#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Indicates whether Runtime Monitoring is turned on.

" + } + }, + "serviceConnectConfiguration": { + "target": "com.amazonaws.ecs#ServiceConnectConfiguration" + }, + "volumeConfigurations": { + "target": "com.amazonaws.ecs#ServiceVolumeConfigurations", + "traits": { + "smithy.api#documentation": "

The volumes that are configured at deployment that the service revision uses.

" + } + }, + "fargateEphemeralStorage": { + "target": "com.amazonaws.ecs#DeploymentEphemeralStorage" + }, + "createdAt": { + "target": "com.amazonaws.ecs#Timestamp", + "traits": { + "smithy.api#documentation": "

The time that the service revision was created. The format is yyyy-mm-dd HH:mm:ss.SSSSS.

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

Information about the service revision.

\n

A service revision contains a record of the workload configuration Amazon ECS is attempting to deploy. Whenever you create or deploy a service, Amazon ECS automatically creates and captures the configuration that you're trying to deploy in the service revision. For information\n\t\t\tabout service revisions, see Amazon ECS service revisions\n\t\t\tin the \n Amazon Elastic Container Service Developer Guide\n .

" + } + }, + "com.amazonaws.ecs#ServiceRevisionSummary": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.ecs#String", + "traits": { + "smithy.api#documentation": "

The ARN of the service revision.

" + } + }, + "requestedTaskCount": { + "target": "com.amazonaws.ecs#Integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The number of requested tasks for the service revision.

" + } + }, + "runningTaskCount": { + "target": "com.amazonaws.ecs#Integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The number of running tasks for the service revision.

" + } + }, + "pendingTaskCount": { + "target": "com.amazonaws.ecs#Integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The number of pending tasks for the service revision.

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

The information about the number of requested, pending, and running tasks for a service revision.

" + } + }, + "com.amazonaws.ecs#ServiceRevisions": { + "type": "list", + "member": { + "target": "com.amazonaws.ecs#ServiceRevision" + } + }, + "com.amazonaws.ecs#ServiceRevisionsSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.ecs#ServiceRevisionSummary" + } + }, "com.amazonaws.ecs#ServiceVolumeConfiguration": { "type": "structure", "members": { @@ -11565,7 +12355,7 @@ "networkMode": { "target": "com.amazonaws.ecs#NetworkMode", "traits": { - "smithy.api#documentation": "

The Docker networking mode to use for the containers in the task. The valid values are\n none, bridge, awsvpc, and host.\n If no network mode is specified, the default is bridge.

\n

For Amazon ECS tasks on Fargate, the awsvpc network mode is required. \n For Amazon ECS tasks on Amazon EC2 Linux instances, any network mode can be used. For Amazon ECS tasks on Amazon EC2 Windows instances, or awsvpc can be used. If the network\n mode is set to none, you cannot specify port mappings in your container\n definitions, and the tasks containers do not have external connectivity. The\n host and awsvpc network modes offer the highest networking\n performance for containers because they use the EC2 network stack instead of the\n virtualized network stack provided by the bridge mode.

\n

With the host and awsvpc network modes, exposed container\n ports are mapped directly to the corresponding host port (for the host\n network mode) or the attached elastic network interface port (for the\n awsvpc network mode), so you cannot take advantage of dynamic host port\n mappings.

\n \n

When using the host network mode, you should not run\n containers using the root user (UID 0). It is considered best practice\n to use a non-root user.

\n
\n

If the network mode is awsvpc, the task is allocated an elastic network\n interface, and you must specify a NetworkConfiguration value when you create\n a service or run a task with the task definition. For more information, see Task Networking in the\n Amazon Elastic Container Service Developer Guide.

\n

If the network mode is host, you cannot run multiple instantiations of the\n same task on a single container instance when port mappings are used.

" + "smithy.api#documentation": "

The Docker networking mode to use for the containers in the task. The valid values are\n none, bridge, awsvpc, and host.\n If no network mode is specified, the default is bridge.

\n

For Amazon ECS tasks on Fargate, the awsvpc network mode is required. \n For Amazon ECS tasks on Amazon EC2 Linux instances, any network mode can be used. For Amazon ECS tasks on Amazon EC2 Windows instances, or awsvpc can be used. If the network\n mode is set to none, you cannot specify port mappings in your container\n definitions, and the tasks containers do not have external connectivity. The\n host and awsvpc network modes offer the highest networking\n performance for containers because they use the EC2 network stack instead of the\n virtualized network stack provided by the bridge mode.

\n

With the host and awsvpc network modes, exposed container\n ports are mapped directly to the corresponding host port (for the host\n network mode) or the attached elastic network interface port (for the\n awsvpc network mode), so you cannot take advantage of dynamic host port\n mappings.

\n \n

When using the host network mode, you should not run\n containers using the root user (UID 0). It is considered best practice\n to use a non-root user.

\n
\n

If the network mode is awsvpc, the task is allocated an elastic network\n interface, and you must specify a NetworkConfiguration value when you create\n a service or run a task with the task definition. For more information, see Task Networking in the\n Amazon Elastic Container Service Developer Guide.

\n

If the network mode is host, you cannot run multiple instantiations of the\n same task on a single container instance when port mappings are used.

\n

For more information, see Network\n settings in the Docker run reference.

" } }, "revision": { @@ -11638,13 +12428,13 @@ "pidMode": { "target": "com.amazonaws.ecs#PidMode", "traits": { - "smithy.api#documentation": "

The process namespace to use for the containers in the task. The valid\n values are host or task. On Fargate for\n Linux containers, the only valid value is task. For\n example, monitoring sidecars might need pidMode to access\n information about other containers running in the same task.

\n

If host is specified, all containers within the tasks\n that specified the host PID mode on the same container\n instance share the same process namespace with the host Amazon EC2\n instance.

\n

If task is specified, all containers within the specified\n task share the same process namespace.

\n

If no value is specified, the\n default is a private namespace for each container.

\n

If the host PID mode is used, there's a heightened risk\n of undesired process namespace exposure.

\n \n

This parameter is not supported for Windows containers.

\n
\n \n

This parameter is only supported for tasks that are hosted on\n Fargate if the tasks are using platform version 1.4.0 or later\n (Linux). This isn't supported for Windows containers on\n Fargate.

\n
" + "smithy.api#documentation": "

The process namespace to use for the containers in the task. The valid\n values are host or task. On Fargate for\n Linux containers, the only valid value is task. For\n example, monitoring sidecars might need pidMode to access\n information about other containers running in the same task.

\n

If host is specified, all containers within the tasks\n that specified the host PID mode on the same container\n instance share the same process namespace with the host Amazon EC2\n instance.

\n

If task is specified, all containers within the specified\n task share the same process namespace.

\n

If no value is specified, the\n default is a private namespace for each container. For more information,\n see PID settings in the Docker run\n reference.

\n

If the host PID mode is used, there's a heightened risk\n of undesired process namespace exposure. For more information, see\n Docker security.

\n \n

This parameter is not supported for Windows containers.

\n
\n \n

This parameter is only supported for tasks that are hosted on\n Fargate if the tasks are using platform version 1.4.0 or later\n (Linux). This isn't supported for Windows containers on\n Fargate.

\n
" } }, "ipcMode": { "target": "com.amazonaws.ecs#IpcMode", "traits": { - "smithy.api#documentation": "

The IPC resource namespace to use for the containers in the task. The valid values are\n host, task, or none. If host is\n specified, then all containers within the tasks that specified the host IPC\n mode on the same container instance share the same IPC resources with the host Amazon EC2\n instance. If task is specified, all containers within the specified task\n share the same IPC resources. If none is specified, then IPC resources\n within the containers of a task are private and not shared with other containers in a\n task or on the container instance. If no value is specified, then the IPC resource\n namespace sharing depends on the Docker daemon setting on the container instance.

\n

If the host IPC mode is used, be aware that there is a heightened risk of\n undesired IPC namespace expose.

\n

If you are setting namespaced kernel parameters using systemControls for\n the containers in the task, the following will apply to your IPC resource namespace. For\n more information, see System\n Controls in the Amazon Elastic Container Service Developer Guide.

\n
    \n
  • \n

    For tasks that use the host IPC mode, IPC namespace related\n systemControls are not supported.

    \n
  • \n
  • \n

    For tasks that use the task IPC mode, IPC namespace related\n systemControls will apply to all containers within a\n task.

    \n
  • \n
\n \n

This parameter is not supported for Windows containers or tasks run on Fargate.

\n
" + "smithy.api#documentation": "

The IPC resource namespace to use for the containers in the task. The valid values are\n host, task, or none. If host is\n specified, then all containers within the tasks that specified the host IPC\n mode on the same container instance share the same IPC resources with the host Amazon EC2\n instance. If task is specified, all containers within the specified task\n share the same IPC resources. If none is specified, then IPC resources\n within the containers of a task are private and not shared with other containers in a\n task or on the container instance. If no value is specified, then the IPC resource\n namespace sharing depends on the Docker daemon setting on the container instance. For\n more information, see IPC\n settings in the Docker run reference.

\n

If the host IPC mode is used, be aware that there is a heightened risk of\n undesired IPC namespace expose. For more information, see Docker\n security.

\n

If you are setting namespaced kernel parameters using systemControls for\n the containers in the task, the following will apply to your IPC resource namespace. For\n more information, see System\n Controls in the Amazon Elastic Container Service Developer Guide.

\n
    \n
  • \n

    For tasks that use the host IPC mode, IPC namespace related\n systemControls are not supported.

    \n
  • \n
  • \n

    For tasks that use the task IPC mode, IPC namespace related\n systemControls will apply to all containers within a\n task.

    \n
  • \n
\n \n

This parameter is not supported for Windows containers or tasks run on Fargate.

\n
" } }, "proxyConfiguration": { @@ -11801,7 +12591,7 @@ "kmsKeyId": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

Specify an Key Management Service key ID to encrypt the ephemeral storage for the\n\t\t\ttask.

" + "smithy.api#documentation": "

Specify an Amazon Web Services Key Management Service key ID to encrypt the ephemeral storage for the\n\t\t\ttask.

" } } }, @@ -13105,7 +13895,7 @@ "deploymentConfiguration": { "target": "com.amazonaws.ecs#DeploymentConfiguration", "traits": { - "smithy.api#documentation": "

Optional deployment parameters that control how many tasks run during the deployment\n\t\t\tand the ordering of stopping and starting tasks.

" + "smithy.api#documentation": "

Optional deployment parameters that control how many tasks run during the deployment and the\n\t\t\tfailure detection methods.

" } }, "networkConfiguration": { diff --git a/codegen/sdk-codegen/aws-models/geo-maps.json b/codegen/sdk-codegen/aws-models/geo-maps.json new file mode 100644 index 00000000000..c49621e5bd0 --- /dev/null +++ b/codegen/sdk-codegen/aws-models/geo-maps.json @@ -0,0 +1,2181 @@ +{ + "smithy": "2.0", + "shapes": { + "com.amazonaws.geomaps#AccessDeniedException": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The request was denied because of insufficient access or permissions. Check with an administrator to verify your permissions.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.geomaps#ApiKey": { + "type": "string", + "traits": { + "smithy.api#externalDocumentation": { + "Implementation Guide": "https://github.com/paseto-standard/paseto-spec/blob/master/docs/02-Implementation-Guide/03-Algorithm-Lucidity.md" + }, + "smithy.api#length": { + "max": 1000 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.geomaps#ColorScheme": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "LIGHT", + "value": "Light" + }, + { + "name": "DARK", + "value": "Dark" + } + ] + } + }, + "com.amazonaws.geomaps#CompactOverlay": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 7000 + } + } + }, + "com.amazonaws.geomaps#CountryCode": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 3 + }, + "smithy.api#pattern": "^([A-Z]{2}|[A-Z]{3})$" + } + }, + "com.amazonaws.geomaps#DistanceMeters": { + "type": "long", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0, + "max": 4294967295 + } + } + }, + "com.amazonaws.geomaps#GeoJsonOverlay": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 7000 + } + } + }, + "com.amazonaws.geomaps#GetGlyphs": { + "type": "operation", + "input": { + "target": "com.amazonaws.geomaps#GetGlyphsRequest" + }, + "output": { + "target": "com.amazonaws.geomaps#GetGlyphsResponse" + }, + "traits": { + "smithy.api#documentation": "

Returns the map's glyphs.

", + "smithy.api#http": { + "uri": "/glyphs/{FontStack}/{FontUnicodeRange}", + "method": "GET" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "GetGlyphsSuccess", + "params": { + "FontStack": "Amazon Ember Regular", + "FontUnicodeRange": "0-255.pbf" + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.geomaps#GetGlyphsRequest": { + "type": "structure", + "members": { + "FontStack": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Name of the FontStack to retrieve.

\n

Example: Amazon Ember Bold,Noto Sans Bold.

\n

The supported font stacks are as follows:

\n
    \n
  • \n

    Amazon Ember Bold

    \n
  • \n
  • \n

    Amazon Ember Bold Italic

    \n
  • \n
  • \n

    Amazon Ember Bold,Noto Sans Bold

    \n
  • \n
  • \n

    Amazon Ember Bold,Noto Sans Bold,Noto Sans Arabic Bold

    \n
  • \n
  • \n

    Amazon Ember Condensed RC BdItalic

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Bold

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Bold Italic

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Bold,Noto Sans Bold

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Bold,Noto Sans Bold,Noto Sans Arabic Condensed Bold

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Light

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Light Italic

    \n
  • \n
  • \n

    Amazon Ember Condensed RC LtItalic

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Regular

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Regular Italic

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Regular,Noto Sans Regular

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Regular,Noto Sans Regular,Noto Sans Arabic Condensed Regular

    \n
  • \n
  • \n

    Amazon Ember Condensed RC RgItalic

    \n
  • \n
  • \n

    Amazon Ember Condensed RC ThItalic

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Thin

    \n
  • \n
  • \n

    Amazon Ember Condensed RC Thin Italic

    \n
  • \n
  • \n

    Amazon Ember Heavy

    \n
  • \n
  • \n

    Amazon Ember Heavy Italic

    \n
  • \n
  • \n

    Amazon Ember Light

    \n
  • \n
  • \n

    Amazon Ember Light Italic

    \n
  • \n
  • \n

    Amazon Ember Medium

    \n
  • \n
  • \n

    Amazon Ember Medium Italic

    \n
  • \n
  • \n

    Amazon Ember Medium,Noto Sans Medium

    \n
  • \n
  • \n

    Amazon Ember Medium,Noto Sans Medium,Noto Sans Arabic Medium

    \n
  • \n
  • \n

    Amazon Ember Regular

    \n
  • \n
  • \n

    Amazon Ember Regular Italic

    \n
  • \n
  • \n

    Amazon Ember Regular Italic,Noto Sans Italic

    \n
  • \n
  • \n

    Amazon Ember Regular Italic,Noto Sans Italic,Noto Sans Arabic Regular

    \n
  • \n
  • \n

    Amazon Ember Regular,Noto Sans Regular

    \n
  • \n
  • \n

    Amazon Ember Regular,Noto Sans Regular,Noto Sans Arabic Regular

    \n
  • \n
  • \n

    Amazon Ember Thin

    \n
  • \n
  • \n

    Amazon Ember Thin Italic

    \n
  • \n
  • \n

    AmazonEmberCdRC_Bd

    \n
  • \n
  • \n

    AmazonEmberCdRC_BdIt

    \n
  • \n
  • \n

    AmazonEmberCdRC_Lt

    \n
  • \n
  • \n

    AmazonEmberCdRC_LtIt

    \n
  • \n
  • \n

    AmazonEmberCdRC_Rg

    \n
  • \n
  • \n

    AmazonEmberCdRC_RgIt

    \n
  • \n
  • \n

    AmazonEmberCdRC_Th

    \n
  • \n
  • \n

    AmazonEmberCdRC_ThIt

    \n
  • \n
  • \n

    AmazonEmber_Bd

    \n
  • \n
  • \n

    AmazonEmber_BdIt

    \n
  • \n
  • \n

    AmazonEmber_He

    \n
  • \n
  • \n

    AmazonEmber_HeIt

    \n
  • \n
  • \n

    AmazonEmber_Lt

    \n
  • \n
  • \n

    AmazonEmber_LtIt

    \n
  • \n
  • \n

    AmazonEmber_Md

    \n
  • \n
  • \n

    AmazonEmber_MdIt

    \n
  • \n
  • \n

    AmazonEmber_Rg

    \n
  • \n
  • \n

    AmazonEmber_RgIt

    \n
  • \n
  • \n

    AmazonEmber_Th

    \n
  • \n
  • \n

    AmazonEmber_ThIt

    \n
  • \n
  • \n

    Noto Sans Black

    \n
  • \n
  • \n

    Noto Sans Black Italic

    \n
  • \n
  • \n

    Noto Sans Bold

    \n
  • \n
  • \n

    Noto Sans Bold Italic

    \n
  • \n
  • \n

    Noto Sans Extra Bold

    \n
  • \n
  • \n

    Noto Sans Extra Bold Italic

    \n
  • \n
  • \n

    Noto Sans Extra Light

    \n
  • \n
  • \n

    Noto Sans Extra Light Italic

    \n
  • \n
  • \n

    Noto Sans Italic

    \n
  • \n
  • \n

    Noto Sans Light

    \n
  • \n
  • \n

    Noto Sans Light Italic

    \n
  • \n
  • \n

    Noto Sans Medium

    \n
  • \n
  • \n

    Noto Sans Medium Italic

    \n
  • \n
  • \n

    Noto Sans Regular

    \n
  • \n
  • \n

    Noto Sans Semi Bold

    \n
  • \n
  • \n

    Noto Sans Semi Bold Italic

    \n
  • \n
  • \n

    Noto Sans Thin

    \n
  • \n
  • \n

    Noto Sans Thin Italic

    \n
  • \n
  • \n

    NotoSans-Bold

    \n
  • \n
  • \n

    NotoSans-Italic

    \n
  • \n
  • \n

    NotoSans-Medium

    \n
  • \n
  • \n

    NotoSans-Regular

    \n
  • \n
  • \n

    Open Sans Regular,Arial Unicode MS Regular

    \n
  • \n
", + "smithy.api#httpLabel": {}, + "smithy.api#length": { + "max": 1000 + }, + "smithy.api#required": {} + } + }, + "FontUnicodeRange": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

A Unicode range of characters to download glyphs for. This must be aligned to multiples\n of 256.

\n

Example: 0-255.pdf\n

", + "smithy.api#httpLabel": {}, + "smithy.api#pattern": "^[0-9]+-[0-9]+\\.pbf$", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.geomaps#GetGlyphsResponse": { + "type": "structure", + "members": { + "Blob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#documentation": "

The Glyph, as a binary blob.

", + "smithy.api#httpPayload": {} + } + }, + "ContentType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that represents the format of the response. The response returns the following as the HTTP body.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "CacheControl": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that instructs caching configuration for the client.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ETag": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The glyph's Etag.

", + "smithy.api#httpHeader": "ETag" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.geomaps#GetSprites": { + "type": "operation", + "input": { + "target": "com.amazonaws.geomaps#GetSpritesRequest" + }, + "output": { + "target": "com.amazonaws.geomaps#GetSpritesResponse" + }, + "traits": { + "smithy.api#documentation": "

Returns the map's sprites.

", + "smithy.api#http": { + "uri": "/styles/{Style}/{ColorScheme}/{Variant}/sprites/{FileName}", + "method": "GET" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "GetSpritesSuccess", + "params": { + "Style": "Standard", + "ColorScheme": "Light", + "Variant": "Default", + "FileName": "sprites.json" + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.geomaps#GetSpritesRequest": { + "type": "structure", + "members": { + "FileName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

\n Sprites API: The name of the sprite file to retrieve, following pattern\n sprites(@2x)?\\.(png|json).

\n

Example: sprites.png\n

", + "smithy.api#httpLabel": {}, + "smithy.api#pattern": "^sprites(@2x)?\\.(png|json)$", + "smithy.api#required": {} + } + }, + "Style": { + "target": "com.amazonaws.geomaps#MapStyle", + "traits": { + "smithy.api#documentation": "

Style specifies the desired map style for the Sprites APIs.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ColorScheme": { + "target": "com.amazonaws.geomaps#ColorScheme", + "traits": { + "smithy.api#documentation": "

Sets color tone for map such as dark and light for specific map styles. It applies to only vector map styles such as Standard and Monochrome.

\n

Example: Light\n

\n

Default value: Light\n

\n \n

Valid values for ColorScheme are case sensitive.

\n
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Variant": { + "target": "com.amazonaws.geomaps#Variant", + "traits": { + "smithy.api#documentation": "

Optimizes map styles for specific use case or industry. You can choose allowed variant only with Standard map style.

\n

Example: Default\n

\n \n

Valid values for Variant are case sensitive.

\n
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.geomaps#GetSpritesResponse": { + "type": "structure", + "members": { + "Blob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#documentation": "

The body of the sprite sheet or JSON offset file (image/png or application/json,\n depending on input).

", + "smithy.api#httpPayload": {} + } + }, + "ContentType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that represents the format of the response. The response returns the following as the HTTP body.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "CacheControl": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that instructs caching configuration for the client.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ETag": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The sprite's Etag.

", + "smithy.api#httpHeader": "ETag" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.geomaps#GetStaticMap": { + "type": "operation", + "input": { + "target": "com.amazonaws.geomaps#GetStaticMapRequest" + }, + "output": { + "target": "com.amazonaws.geomaps#GetStaticMapResponse" + }, + "errors": [ + { + "target": "com.amazonaws.geomaps#AccessDeniedException" + }, + { + "target": "com.amazonaws.geomaps#InternalServerException" + }, + { + "target": "com.amazonaws.geomaps#ThrottlingException" + }, + { + "target": "com.amazonaws.geomaps#ValidationException" + } + ], + "traits": { + "aws.api#dataPlane": {}, + "smithy.api#documentation": "

Provides high-quality static map images with customizable options. You can modify the map's appearance and overlay additional information. It's an ideal solution for applications requiring tailored static map snapshots.

", + "smithy.api#http": { + "uri": "/static/{FileName}", + "method": "GET" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "GetStaticMapSuccess", + "params": { + "FileName": "map", + "Width": 800, + "Height": 900, + "Center": "-123.144847,49.303609", + "Style": "Satellite", + "Zoom": 10.0 + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.geomaps#GetStaticMapRequest": { + "type": "structure", + "members": { + "BoundingBox": { + "target": "com.amazonaws.geomaps#PositionListString", + "traits": { + "smithy.api#documentation": "

Takes in two pairs of coordinates, [Lon, Lat], denoting south-westerly and\n north-easterly edges of the image. The underlying area becomes the view of the image.

\n

Example: -123.17075,49.26959,-123.08125,49.31429

", + "smithy.api#httpQuery": "bounding-box" + } + }, + "BoundedPositions": { + "target": "com.amazonaws.geomaps#PositionListString", + "traits": { + "smithy.api#documentation": "

Takes in two or more pair of coordinates, [Lon, Lat], with each coordinate separated by\n a comma. The API will generate an image to encompass all of the provided coordinates.

\n \n

Cannot be used with Zoom and or Radius\n

\n
\n

Example: 97.170451,78.039098,99.045536,27.176178

", + "smithy.api#httpQuery": "bounded-positions" + } + }, + "Center": { + "target": "com.amazonaws.geomaps#PositionString", + "traits": { + "smithy.api#documentation": "

Takes in a pair of coordinates, [Lon, Lat], which becomes the center point of the image.\n This parameter requires that either zoom or radius is set.

\n \n

Cannot be used with Zoom and or Radius\n

\n
\n

Example: 49.295,-123.108

", + "smithy.api#httpQuery": "center" + } + }, + "CompactOverlay": { + "target": "com.amazonaws.geomaps#CompactOverlay", + "traits": { + "smithy.api#documentation": "

Takes in a string to draw geometries on the image. The input is a comma separated format as follows format:\n [Lon, Lat]\n

\n

Example:\n line:-122.407653,37.798557,-122.413291,37.802443;color=%23DD0000;width=7;outline-color=#00DD00;outline-width=5yd|point:-122.40572,37.80004;label=Fog Hill Market;size=large;text-color=%23DD0000;color=#EE4B2B\n

\n \n

Currently it supports the following geometry types: point, line and polygon. It does not support multiPoint , multiLine and multiPolgyon.

\n
", + "smithy.api#httpQuery": "compact-overlay" + } + }, + "GeoJsonOverlay": { + "target": "com.amazonaws.geomaps#GeoJsonOverlay", + "traits": { + "smithy.api#documentation": "

Takes in a string to draw geometries on the image. The input is a valid GeoJSON\n collection object.

\n

Example:\n {\"type\":\"FeatureCollection\",\"features\": [{\"type\":\"Feature\",\"geometry\":{\"type\":\"MultiPoint\",\"coordinates\": [[-90.076345,51.504107],[-0.074451,51.506892]]},\"properties\": {\"color\":\"#00DD00\"}}]}\n

", + "smithy.api#httpQuery": "geojson-overlay" + } + }, + "Height": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Specifies the height of the map image.

", + "smithy.api#httpQuery": "height", + "smithy.api#range": { + "min": 64, + "max": 1400 + }, + "smithy.api#required": {} + } + }, + "Key": { + "target": "com.amazonaws.geomaps#ApiKey", + "traits": { + "smithy.api#documentation": "

Optional: The API key to be used for authorization. Either an API key or valid SigV4\n signature must be provided when making a request.

", + "smithy.api#httpQuery": "key" + } + }, + "Padding": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Applies additional space (in pixels) around overlay feature to prevent them from being\n cut or obscured.

\n \n

Value for max and min is determined by:

\n

Min: 1\n

\n

Max: min(height, width)/4\n

\n
\n

Example: 100\n

", + "smithy.api#httpQuery": "padding" + } + }, + "Radius": { + "target": "com.amazonaws.geomaps#DistanceMeters", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Used with center parameter, it specifies the zoom of the image where you can control it\n on a granular level. Takes in any value >= 1.

\n

Example: 1500\n

\n \n

Cannot be used with Zoom.

\n
\n

\n Unit: Meters\n

\n

", + "smithy.api#httpQuery": "radius" + } + }, + "FileName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The map scaling parameter to size the image, icons, and labels. It follows the pattern\n of ^map(@2x)?$.

\n

Example: map, map@2x\n

", + "smithy.api#httpLabel": {}, + "smithy.api#pattern": "^map(@2x)?$", + "smithy.api#required": {} + } + }, + "ScaleBarUnit": { + "target": "com.amazonaws.geomaps#ScaleBarUnit", + "traits": { + "smithy.api#documentation": "

Displays a scale on the bottom right of the map image with the unit specified in the\n input.

\n

Example: KilometersMiles, Miles, Kilometers, MilesKilometers\n

", + "smithy.api#httpQuery": "scale-unit" + } + }, + "Style": { + "target": "com.amazonaws.geomaps#StaticMapStyle", + "traits": { + "smithy.api#documentation": "

Style specifies the desired map style for the Style APIs.

", + "smithy.api#httpQuery": "style" + } + }, + "Width": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Specifies the width of the map image.

", + "smithy.api#httpQuery": "width", + "smithy.api#range": { + "min": 64, + "max": 1400 + }, + "smithy.api#required": {} + } + }, + "Zoom": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Specifies the zoom level of the map image.

\n \n

Cannot be used with Radius.

\n
", + "smithy.api#httpQuery": "zoom", + "smithy.api#range": { + "min": 0, + "max": 20 + } + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.geomaps#GetStaticMapResponse": { + "type": "structure", + "members": { + "Blob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#documentation": "

The blob represents a map image as a jpeg for\n the GetStaticMap API.

", + "smithy.api#httpPayload": {} + } + }, + "ContentType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that represents the format of the response. The response returns the following as the HTTP body.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "CacheControl": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that instructs caching configuration for the client.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ETag": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The static map's Etag.

", + "smithy.api#httpHeader": "ETag" + } + }, + "PricingBucket": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pricing bucket for which the request is charged at.

", + "smithy.api#httpHeader": "x-amz-geo-pricing-bucket", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.geomaps#GetStyleDescriptor": { + "type": "operation", + "input": { + "target": "com.amazonaws.geomaps#GetStyleDescriptorRequest" + }, + "output": { + "target": "com.amazonaws.geomaps#GetStyleDescriptorResponse" + }, + "traits": { + "smithy.api#documentation": "

Returns information about the style.

", + "smithy.api#http": { + "uri": "/styles/{Style}/descriptor", + "method": "GET" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "GetStyleDescriptorSuccess", + "params": { + "Style": "Standard" + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.geomaps#GetStyleDescriptorRequest": { + "type": "structure", + "members": { + "Style": { + "target": "com.amazonaws.geomaps#MapStyle", + "traits": { + "smithy.api#documentation": "

Style specifies the desired map style.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ColorScheme": { + "target": "com.amazonaws.geomaps#ColorScheme", + "traits": { + "smithy.api#documentation": "

Sets color tone for map such as dark and light for specific map styles. It applies to only vector map styles such as Standard and Monochrome.

\n

Example: Light\n

\n

Default value: Light\n

\n \n

Valid values for ColorScheme are case sensitive.

\n
", + "smithy.api#httpQuery": "color-scheme" + } + }, + "PoliticalView": { + "target": "com.amazonaws.geomaps#CountryCode", + "traits": { + "smithy.api#documentation": "

Specifies the political view using ISO 3166-2 or ISO 3166-3 country code format.

\n

The following political views are currently supported:

\n
    \n
  • \n

    \n ARG: Argentina's view on the Southern Patagonian Ice Field and Tierra Del Fuego, including the Falkland Islands, South Georgia, and South Sandwich Islands

    \n
  • \n
  • \n

    \n EGY: Egypt's view on Bir Tawil

    \n
  • \n
  • \n

    \n IND: India's view on Gilgit-Baltistan

    \n
  • \n
  • \n

    \n KEN: Kenya's view on the Ilemi Triangle

    \n
  • \n
  • \n

    \n MAR: Morocco's view on Western Sahara

    \n
  • \n
  • \n

    \n PAK: Pakistan's view on Jammu and Kashmir and the Junagadh Area

    \n
  • \n
  • \n

    \n RUS: Russia's view on Crimea

    \n
  • \n
  • \n

    \n SDN: Sudan's view on the Halaib Triangle

    \n
  • \n
  • \n

    \n SRB: Serbia's view on Kosovo, Vukovar, and Sarengrad Islands

    \n
  • \n
  • \n

    \n SUR: Suriname's view on the Courantyne Headwaters and Lawa Headwaters

    \n
  • \n
  • \n

    \n SYR: Syria's view on the Golan Heights

    \n
  • \n
  • \n

    \n TUR: Turkey's view on Cyprus and Northern Cyprus

    \n
  • \n
  • \n

    \n TZA: Tanzania's view on Lake Malawi

    \n
  • \n
  • \n

    \n URY: Uruguay's view on Rincon de Artigas

    \n
  • \n
  • \n

    \n VNM: Vietnam's view on the Paracel Islands and Spratly Islands

    \n
  • \n
", + "smithy.api#httpQuery": "political-view" + } + }, + "Key": { + "target": "com.amazonaws.geomaps#ApiKey", + "traits": { + "smithy.api#documentation": "

Optional: The API key to be used for authorization. Either an API key or valid SigV4\n signature must be provided when making a request.

", + "smithy.api#httpQuery": "key" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.geomaps#GetStyleDescriptorResponse": { + "type": "structure", + "members": { + "Blob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#documentation": "

This Blob contains the body of the style descriptor which is in application/json format.

", + "smithy.api#httpPayload": {} + } + }, + "ContentType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that represents the format of the response. The response returns the following as the HTTP body.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "CacheControl": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that instructs caching configuration for the client.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ETag": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The style descriptor's Etag.

", + "smithy.api#httpHeader": "ETag" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.geomaps#GetTile": { + "type": "operation", + "input": { + "target": "com.amazonaws.geomaps#GetTileRequest" + }, + "output": { + "target": "com.amazonaws.geomaps#GetTileResponse" + }, + "errors": [ + { + "target": "com.amazonaws.geomaps#AccessDeniedException" + }, + { + "target": "com.amazonaws.geomaps#InternalServerException" + }, + { + "target": "com.amazonaws.geomaps#ThrottlingException" + }, + { + "target": "com.amazonaws.geomaps#ValidationException" + } + ], + "traits": { + "aws.api#dataPlane": {}, + "smithy.api#documentation": "

Returns a tile. Map tiles are used by clients to render a map. they're addressed using a grid arrangement with an X coordinate, Y coordinate, and Z (zoom) level.

", + "smithy.api#http": { + "uri": "/tiles/{Tileset}/{Z}/{X}/{Y}", + "method": "GET" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "GetTileSuccess", + "params": { + "Tileset": "vector.basemap", + "X": "5190", + "Y": "11218", + "Z": "15" + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.geomaps#GetTileRequest": { + "type": "structure", + "members": { + "Tileset": { + "target": "com.amazonaws.geomaps#Tileset", + "traits": { + "smithy.api#documentation": "

Specifies the desired tile set.

\n

Valid Values: raster.satellite | vector.basemap\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Z": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The zoom value for the map tile.

", + "smithy.api#httpLabel": {}, + "smithy.api#pattern": "\\d+", + "smithy.api#required": {} + } + }, + "X": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The X axis value for the map tile. Must be between 0 and 19.

", + "smithy.api#httpLabel": {}, + "smithy.api#pattern": "\\d+", + "smithy.api#required": {} + } + }, + "Y": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Y axis value for the map tile.

", + "smithy.api#httpLabel": {}, + "smithy.api#pattern": "\\d+", + "smithy.api#required": {} + } + }, + "Key": { + "target": "com.amazonaws.geomaps#ApiKey", + "traits": { + "smithy.api#documentation": "

Optional: The API key to be used for authorization. Either an API key or valid SigV4\n signature must be provided when making a request.

", + "smithy.api#httpQuery": "key" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.geomaps#GetTileResponse": { + "type": "structure", + "members": { + "Blob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#documentation": "

The blob represents a vector tile in mvt format for the\n GetTile API.

", + "smithy.api#httpPayload": {} + } + }, + "ContentType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that represents the format of the response. The response returns the following as the HTTP body.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "CacheControl": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Header that instructs caching configuration for the client.

", + "smithy.api#httpHeader": "Cache-Control" + } + }, + "ETag": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pricing bucket for which the request is charged at.

", + "smithy.api#httpHeader": "ETag" + } + }, + "PricingBucket": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pricing bucket for which the request is charged at.

", + "smithy.api#httpHeader": "x-amz-geo-pricing-bucket", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.geomaps#InternalServerException": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The request processing has failed because of an unknown error, exception or failure.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.geomaps#MapStyle": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "STANDARD", + "value": "Standard" + }, + { + "name": "MONOCHROME", + "value": "Monochrome" + }, + { + "name": "HYBRID", + "value": "Hybrid" + }, + { + "name": "SATELLITE", + "value": "Satellite" + } + ] + } + }, + "com.amazonaws.geomaps#MapsService": { + "type": "service", + "version": "2020-11-19", + "resources": [ + { + "target": "com.amazonaws.geomaps#ProviderResource" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Geo Maps", + "arnNamespace": "geo-maps", + "cloudTrailEventSource": "geo-maps.amazonaws.com" + }, + "aws.auth#sigv4": { + "name": "geo-maps" + }, + "aws.endpoints#standardRegionalEndpoints": { + "partitionSpecialCases": { + "aws": [ + { + "endpoint": "https://maps.geo.{region}.{dnsSuffix}/v2" + }, + { + "endpoint": "https://maps.geo-fips.{region}.{dualStackDnsSuffix}/v2", + "fips": true, + "dualStack": true + }, + { + "endpoint": "https://maps.geo-fips.{region}.{dnsSuffix}/v2", + "fips": true, + "dualStack": false + }, + { + "endpoint": "https://maps.geo.{region}.{dualStackDnsSuffix}/v2", + "fips": false, + "dualStack": true + } + ], + "aws-us-gov": [ + { + "endpoint": "https://maps.geo.{region}.us-gov.{dnsSuffix}/v2" + }, + { + "endpoint": "https://maps.geo-fips.{region}.us-gov.{dualStackDnsSuffix}/v2", + "fips": true, + "dualStack": true + }, + { + "endpoint": "https://maps.geo-fips.{region}.us-gov.{dnsSuffix}/v2", + "fips": true, + "dualStack": false + }, + { + "endpoint": "https://maps.geo.{region}.us-gov.{dualStackDnsSuffix}/v2", + "fips": false, + "dualStack": true + } + ] + } + }, + "aws.protocols#restJson1": {}, + "smithy.api#cors": { + "additionalAllowedHeaders": [ + "x-amz-content-sha256", + "x-amz-user-agent", + "content-type" + ], + "additionalExposedHeaders": [ + "age", + "date", + "x-amz-apigw-id", + "x-amz-cf-id", + "x-amz-cf-pop", + "x-amzn-requestid", + "x-amzn-trace-id", + "x-cache" + ] + }, + "smithy.api#documentation": "

\n Integrate high-quality base map data into your applications using \n MapLibre. Capabilities include:\n

\n
    \n
  • \n

    Access to comprehensive base map data, allowing you to tailor the map display to your specific needs.

    \n
  • \n
  • \n

    Multiple pre-designed map styles suited for various application types, such as navigation, logistics, or data visualization.

    \n
  • \n
  • \n

    Generation of static map images for scenarios where interactive maps aren't suitable, such as:

    \n
      \n
    • \n

      Embedding in emails or documents

      \n
    • \n
    • \n

      Displaying in low-bandwidth environments

      \n
    • \n
    • \n

      Creating printable maps

      \n
    • \n
    • \n

      Enhancing application performance by reducing client-side rendering

      \n
    • \n
    \n
  • \n
", + "smithy.api#title": "Amazon Location Service Maps V2", + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "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" + }, + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the 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": [], + "rules": [ + { + "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" + } + ], + "type": "tree" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://maps.geo.{Region}.{PartitionResult#dnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "endpoint": { + "url": "https://maps.geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://maps.geo-fips.{Region}.{PartitionResult#dnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "endpoint": { + "url": "https://maps.geo.{Region}.{PartitionResult#dualStackDnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://maps.geo.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "endpoint": { + "url": "https://maps.geo-fips.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://maps.geo-fips.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "endpoint": { + "url": "https://maps.geo.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "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://geo-maps-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 + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://geo-maps-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": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://geo-maps.{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://geo-maps.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ], + "type": "tree" + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For custom endpoint with region not set and fips disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Endpoint": "https://example.com", + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with fips enabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Endpoint": "https://example.com", + "UseFIPS": true + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Endpoint": "https://example.com", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://maps.geo-fips.us-east-1.api.aws/v2" + } + }, + "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://maps.geo-fips.us-east-1.amazonaws.com/v2" + } + }, + "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://maps.geo.us-east-1.api.aws/v2" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://maps.geo.us-east-1.amazonaws.com/v2" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://geo-maps-fips.cn-northwest-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-maps-fips.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://geo-maps.cn-northwest-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-maps.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://maps.geo-fips.us-gov-west-1.us-gov.api.aws/v2" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://maps.geo-fips.us-gov-west-1.us-gov.amazonaws.com/v2" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://maps.geo.us-gov-west-1.us-gov.api.aws/v2" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://maps.geo.us-gov-west-1.us-gov.amazonaws.com/v2" + } + }, + "params": { + "Region": "us-gov-west-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://geo-maps-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://geo-maps.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://geo-maps-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://geo-maps.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-isoe-west-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": "eu-isoe-west-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-maps-fips.eu-isoe-west-1.cloud.adc-e.uk" + } + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-maps.eu-isoe-west-1.cloud.adc-e.uk" + } + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isof-south-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-isof-south-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-maps-fips.us-isof-south-1.csp.hci.ic.gov" + } + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-maps.us-isof-south-1.csp.hci.ic.gov" + } + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.geomaps#PositionListString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 7 + }, + "smithy.api#pattern": "^(-?\\d{1,3}(\\.\\d{1,14})?,-?\\d{1,2}(\\.\\d{1,14})?)(,(-?\\d{1,3}(\\.\\d{1,14})?,-?\\d{1,2}(\\.\\d{1,14})?))*$" + } + }, + "com.amazonaws.geomaps#PositionString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 36 + }, + "smithy.api#pattern": "^-?\\d{1,3}(\\.\\d{1,14})?,-?\\d{1,2}(\\.\\d{1,14})?$" + } + }, + "com.amazonaws.geomaps#ProviderResource": { + "type": "resource", + "operations": [ + { + "target": "com.amazonaws.geomaps#GetGlyphs" + }, + { + "target": "com.amazonaws.geomaps#GetSprites" + }, + { + "target": "com.amazonaws.geomaps#GetStaticMap" + }, + { + "target": "com.amazonaws.geomaps#GetStyleDescriptor" + }, + { + "target": "com.amazonaws.geomaps#GetTile" + } + ] + }, + "com.amazonaws.geomaps#ScaleBarUnit": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "KILOMETERS", + "value": "Kilometers" + }, + { + "name": "KILOMETERS_MILES", + "value": "KilometersMiles" + }, + { + "name": "MILES", + "value": "Miles" + }, + { + "name": "MILES_KILOMETERS", + "value": "MilesKilometers" + } + ] + } + }, + "com.amazonaws.geomaps#StaticMapStyle": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "SATELLITE", + "value": "Satellite" + } + ] + } + }, + "com.amazonaws.geomaps#ThrottlingException": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The request was denied due to request throttling.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.geomaps#Tileset": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#pattern": "^[-.\\w]+$" + } + }, + "com.amazonaws.geomaps#ValidationException": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + }, + "Reason": { + "target": "com.amazonaws.geomaps#ValidationExceptionReason", + "traits": { + "smithy.api#documentation": "

The field where thebb invalid entry was detected.

", + "smithy.api#jsonName": "reason", + "smithy.api#required": {} + } + }, + "FieldList": { + "target": "com.amazonaws.geomaps#ValidationExceptionFieldList", + "traits": { + "smithy.api#documentation": "

A message with the reason for the validation exception error.

", + "smithy.api#jsonName": "fieldList", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The input fails to satisfy the constraints specified by an AWS service.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.geomaps#ValidationExceptionField": { + "type": "structure", + "members": { + "Name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the resource.

", + "smithy.api#jsonName": "name", + "smithy.api#required": {} + } + }, + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The error message.

", + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The input fails to satisfy the constraints specified by the Amazon Location service.

" + } + }, + "com.amazonaws.geomaps#ValidationExceptionFieldList": { + "type": "list", + "member": { + "target": "com.amazonaws.geomaps#ValidationExceptionField" + } + }, + "com.amazonaws.geomaps#ValidationExceptionReason": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "UNKNOWN_OPERATION", + "value": "UnknownOperation", + "documentation": "No such operation is supported." + }, + { + "name": "MISSING", + "value": "Missing", + "documentation": "The required input is missing." + }, + { + "name": "CANNOT_PARSE", + "value": "CannotParse", + "documentation": " The input cannot be parsed. For example a required JSON document, ARN identifier,\n date value, or numeric field cannot be parsed.\n" + }, + { + "name": "FIELD_VALIDATION_FAILED", + "value": "FieldValidationFailed", + "documentation": " The input is present and parsable, but it is otherwise invalid. For example, a\n required numeric argument is outside the allowed range.\n" + }, + { + "name": "OTHER", + "value": "Other", + "documentation": "The input is invalid but no more specific reason is applicable." + }, + { + "name": "UNKNOWN_FIELD", + "value": "UnknownField", + "documentation": "No such field is supported." + } + ] + } + }, + "com.amazonaws.geomaps#Variant": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "DEFAULT", + "value": "Default" + } + ] + } + } + } +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/geo-places.json b/codegen/sdk-codegen/aws-models/geo-places.json new file mode 100644 index 00000000000..a14d4b57e97 --- /dev/null +++ b/codegen/sdk-codegen/aws-models/geo-places.json @@ -0,0 +1,5840 @@ +{ + "smithy": "2.0", + "shapes": { + "com.amazonaws.geoplaces#AccessDeniedException": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

You don't have sufficient access to perform this action.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.geoplaces#AccessPoint": { + "type": "structure", + "members": { + "Position": { + "target": "com.amazonaws.geoplaces#Position", + "traits": { + "smithy.api#documentation": "

The position, in longitude and latitude.

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

Position of the access point represented by longitude and latitude for a vehicle.

" + } + }, + "com.amazonaws.geoplaces#AccessPointList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#AccessPoint" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.geoplaces#AccessRestriction": { + "type": "structure", + "members": { + "Restricted": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

The restriction.

" + } + }, + "Categories": { + "target": "com.amazonaws.geoplaces#CategoryList", + "traits": { + "smithy.api#documentation": "

Categories of results that results must belong too.

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

Indicates if the access location is restricted. Index correlates to that of an access\n point and indicates if access through this point has some form of restriction.

" + } + }, + "com.amazonaws.geoplaces#AccessRestrictionList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#AccessRestriction" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.geoplaces#Address": { + "type": "structure", + "members": { + "Label": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Assembled address value built out of the address components, according to the regional\n postal rules. This is the correctly formatted address.

", + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "Country": { + "target": "com.amazonaws.geoplaces#Country", + "traits": { + "smithy.api#documentation": "

The country component of the address.

" + } + }, + "Region": { + "target": "com.amazonaws.geoplaces#Region", + "traits": { + "smithy.api#documentation": "

The region or state results should be present in.

\n

Example: North Rhine-Westphalia.

" + } + }, + "SubRegion": { + "target": "com.amazonaws.geoplaces#SubRegion", + "traits": { + "smithy.api#documentation": "

The sub-region or county for which results should be present in.

" + } + }, + "Locality": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The locality or city of the address.

\n

Example: Vancouver.

", + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "District": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The district or division of a locality associated with this address.

", + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "SubDistrict": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

A subdivision of a district.

\n

Example: Minden-Lübbecke.

", + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "PostalCode": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

An alphanumeric string included in a postal address to facilitate mail sorting, such as\n post code, postcode, or ZIP code, for which the result should posses.

", + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "Block": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Name of the block.

\n

Example: Sunny Mansion 203 block: 2 Chome\n

", + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "SubBlock": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Name of sub-block.

\n

Example: Sunny Mansion 203 sub-block: 4\n

", + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "Intersection": { + "target": "com.amazonaws.geoplaces#IntersectionList", + "traits": { + "smithy.api#documentation": "

Name of the streets in the intersection.

\n

Example: [\"Friedrichstraße\",\"Unter den Linden\"]\n

" + } + }, + "Street": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the street results should be present in.

", + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "StreetComponents": { + "target": "com.amazonaws.geoplaces#StreetComponentsList", + "traits": { + "smithy.api#documentation": "

Components of the street.

\n

Example: Younge from the \"Younge street\".

" + } + }, + "AddressNumber": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The number that identifies an address within a street.

", + "smithy.api#length": { + "min": 0, + "max": 10 + } + } + }, + "Building": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the building at the address.

", + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

The place address.

" + } + }, + "com.amazonaws.geoplaces#AddressComponentMatchScores": { + "type": "structure", + "members": { + "Country": { + "target": "com.amazonaws.geoplaces#MatchScore", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the country that the results will be present in.

" + } + }, + "Region": { + "target": "com.amazonaws.geoplaces#MatchScore", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The region or state results should be to be present in.

\n

Example: North Rhine-Westphalia.

" + } + }, + "SubRegion": { + "target": "com.amazonaws.geoplaces#MatchScore", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The sub-region or county for which results should be present in.

" + } + }, + "Locality": { + "target": "com.amazonaws.geoplaces#MatchScore", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The city or locality results should be present in.

\n

Example: Vancouver.

" + } + }, + "District": { + "target": "com.amazonaws.geoplaces#MatchScore", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The district or division of a city the results should be present in.

" + } + }, + "SubDistrict": { + "target": "com.amazonaws.geoplaces#MatchScore", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

A subdivision of a district.

\n

Example: Minden-Lübbecke\n

" + } + }, + "PostalCode": { + "target": "com.amazonaws.geoplaces#MatchScore", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

An alphanumeric string included in a postal address to facilitate mail sorting, such as\n post code, postcode, or ZIP code, for which the result should posses.

" + } + }, + "Block": { + "target": "com.amazonaws.geoplaces#MatchScore", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Name of the block.

\n

Example: Sunny Mansion 203 block: 2 Chome\n

" + } + }, + "SubBlock": { + "target": "com.amazonaws.geoplaces#MatchScore", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Name of sub-block.

\n

Example: Sunny Mansion 203 sub-block: 4\n

" + } + }, + "Intersection": { + "target": "com.amazonaws.geoplaces#MatchScoreList", + "traits": { + "smithy.api#documentation": "

Name of the streets in the intersection.

\n

Example: [\"Friedrichstraße\",\"Unter den Linden\"]\n

", + "smithy.api#length": { + "min": 1, + "max": 2 + } + } + }, + "AddressNumber": { + "target": "com.amazonaws.geoplaces#MatchScore", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The house number or address results should have.

" + } + }, + "Building": { + "target": "com.amazonaws.geoplaces#MatchScore", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The name of the building at the address.

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

Indicates how well the entire input matches the returned. It is equal to 1 if all input\n tokens are recognized and matched.

" + } + }, + "com.amazonaws.geoplaces#AddressComponentPhonemes": { + "type": "structure", + "members": { + "Country": { + "target": "com.amazonaws.geoplaces#PhonemeTranscriptionList", + "traits": { + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the country that the results will be present in.

" + } + }, + "Region": { + "target": "com.amazonaws.geoplaces#PhonemeTranscriptionList", + "traits": { + "smithy.api#documentation": "

How to pronounce the region or state results should be to be present in.

" + } + }, + "SubRegion": { + "target": "com.amazonaws.geoplaces#PhonemeTranscriptionList", + "traits": { + "smithy.api#documentation": "

How to pronounce the sub-region or county for which results should be present in.

" + } + }, + "Locality": { + "target": "com.amazonaws.geoplaces#PhonemeTranscriptionList", + "traits": { + "smithy.api#documentation": "

How to pronounce the city or locality results should be present in.

\n

Example: Vancouver.

" + } + }, + "District": { + "target": "com.amazonaws.geoplaces#PhonemeTranscriptionList", + "traits": { + "smithy.api#documentation": "

How to pronounce the district or division of a city results should be present in.

" + } + }, + "SubDistrict": { + "target": "com.amazonaws.geoplaces#PhonemeTranscriptionList", + "traits": { + "smithy.api#documentation": "

How to pronounce the sub-district or division of a city results should be present\n in.

" + } + }, + "Block": { + "target": "com.amazonaws.geoplaces#PhonemeTranscriptionList", + "traits": { + "smithy.api#documentation": "

How to pronounce the name of the block.

" + } + }, + "SubBlock": { + "target": "com.amazonaws.geoplaces#PhonemeTranscriptionList", + "traits": { + "smithy.api#documentation": "

How to pronounce the name of the sub-block.

" + } + }, + "Street": { + "target": "com.amazonaws.geoplaces#PhonemeTranscriptionList", + "traits": { + "smithy.api#documentation": "

How to pronounce the name of the street results should be present in.

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

How to pronounce the various components of the address or place.

" + } + }, + "com.amazonaws.geoplaces#ApiKey": { + "type": "string", + "traits": { + "smithy.api#externalDocumentation": { + "Implementation Guide": "https://github.com/paseto-standard/paseto-spec/blob/master/docs/02-Implementation-Guide/03-Algorithm-Lucidity.md" + }, + "smithy.api#length": { + "max": 1000 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.geoplaces#Autocomplete": { + "type": "operation", + "input": { + "target": "com.amazonaws.geoplaces#AutocompleteRequest" + }, + "output": { + "target": "com.amazonaws.geoplaces#AutocompleteResponse" + }, + "errors": [ + { + "target": "com.amazonaws.geoplaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.geoplaces#InternalServerException" + }, + { + "target": "com.amazonaws.geoplaces#ThrottlingException" + }, + { + "target": "com.amazonaws.geoplaces#ValidationException" + } + ], + "traits": { + "aws.api#dataPlane": {}, + "smithy.api#documentation": "

The autocomplete operation speeds up and increases the accuracy of entering addresses by providing a list of address candidates matching a partially entered address. Results are sorted from most to least matching. Filtering and biasing can be used to increase the relevance of the results if additional search context is known

", + "smithy.api#http": { + "uri": "/autocomplete", + "method": "POST" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "AutocompleteSuccess", + "params": { + "QueryText": "Star" + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.geoplaces#AutocompleteAdditionalFeature": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "CORE", + "value": "Core" + } + ] + } + }, + "com.amazonaws.geoplaces#AutocompleteAdditionalFeatureList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#AutocompleteAdditionalFeature" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.geoplaces#AutocompleteAddressHighlights": { + "type": "structure", + "members": { + "Label": { + "target": "com.amazonaws.geoplaces#HighlightList", + "traits": { + "smithy.api#documentation": "

Indicates the starting and ending indexes for result items where they are identified to match the input query.\n This should be used to provide emphasis to output display to make selecting the correct result from a list easier for end users.

" + } + }, + "Country": { + "target": "com.amazonaws.geoplaces#CountryHighlights", + "traits": { + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the country that the results will be present in.

" + } + }, + "Region": { + "target": "com.amazonaws.geoplaces#RegionHighlights", + "traits": { + "smithy.api#documentation": "

The region or state results should be to be present in.

\n

Example: North Rhine-Westphalia.

" + } + }, + "SubRegion": { + "target": "com.amazonaws.geoplaces#SubRegionHighlights", + "traits": { + "smithy.api#documentation": "

The sub-region or county for which results should be present in.

" + } + }, + "Locality": { + "target": "com.amazonaws.geoplaces#HighlightList", + "traits": { + "smithy.api#documentation": "

The city or locality results should be present in.

\n

Example: Vancouver.

" + } + }, + "District": { + "target": "com.amazonaws.geoplaces#HighlightList", + "traits": { + "smithy.api#documentation": "

The district or division of a city the results should be present in.

" + } + }, + "SubDistrict": { + "target": "com.amazonaws.geoplaces#HighlightList", + "traits": { + "smithy.api#documentation": "

Indicates the starting and ending index of the title in the text query that match the found title.

" + } + }, + "Street": { + "target": "com.amazonaws.geoplaces#HighlightList", + "traits": { + "smithy.api#documentation": "

The name of the street results should be present in.

" + } + }, + "Block": { + "target": "com.amazonaws.geoplaces#HighlightList", + "traits": { + "smithy.api#documentation": "

Name of the block. Example: Sunny Mansion 203\nblock: 2 Chome

" + } + }, + "SubBlock": { + "target": "com.amazonaws.geoplaces#HighlightList", + "traits": { + "smithy.api#documentation": "

Name of sub-block. Example Sunny Mansion 203 sub-block: 4

" + } + }, + "Intersection": { + "target": "com.amazonaws.geoplaces#IntersectionHighlightsList", + "traits": { + "smithy.api#documentation": "

Name of the streets in the intersection. For example: e.g. [\"Friedrichstraße\",\"Unter den Linden\"]

" + } + }, + "PostalCode": { + "target": "com.amazonaws.geoplaces#HighlightList", + "traits": { + "smithy.api#documentation": "

An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code for which the result should posses.

" + } + }, + "AddressNumber": { + "target": "com.amazonaws.geoplaces#HighlightList", + "traits": { + "smithy.api#documentation": "

The house number or address results should have.

" + } + }, + "Building": { + "target": "com.amazonaws.geoplaces#HighlightList", + "traits": { + "smithy.api#documentation": "

The name of the building at the address.

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

Describes how the parts of the response element matched the input query by returning the sections of the response which matched to input query terms.

" + } + }, + "com.amazonaws.geoplaces#AutocompleteFilter": { + "type": "structure", + "members": { + "BoundingBox": { + "target": "com.amazonaws.geoplaces#BoundingBox", + "traits": { + "smithy.api#documentation": "

The bounding box enclosing the geometric shape (area or line) that an individual result covers.

\n

The bounding box formed is defined as a set 4 coordinates: [{westward lng},\n {southern lat}, {eastward lng}, {northern lat}]\n

" + } + }, + "Circle": { + "target": "com.amazonaws.geoplaces#FilterCircle" + }, + "IncludeCountries": { + "target": "com.amazonaws.geoplaces#CountryCodeList", + "traits": { + "smithy.api#documentation": "

A list of countries that all results must be in. Countries are represented by either their alpha-2 or alpha-3 character codes.

" + } + }, + "IncludePlaceTypes": { + "target": "com.amazonaws.geoplaces#AutocompleteFilterPlaceTypeList", + "traits": { + "smithy.api#documentation": "

The included place types.

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

Autocomplete structure which contains a set of inclusion/exclusion properties that results must posses in order to be returned as a result.

" + } + }, + "com.amazonaws.geoplaces#AutocompleteFilterPlaceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "LOCALITY", + "value": "Locality" + }, + { + "name": "POSTAL_CODE", + "value": "PostalCode" + } + ] + } + }, + "com.amazonaws.geoplaces#AutocompleteFilterPlaceTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#AutocompleteFilterPlaceType" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.geoplaces#AutocompleteHighlights": { + "type": "structure", + "members": { + "Title": { + "target": "com.amazonaws.geoplaces#HighlightList", + "traits": { + "smithy.api#documentation": "

Indicates where the title field in the result matches the input query.

" + } + }, + "Address": { + "target": "com.amazonaws.geoplaces#AutocompleteAddressHighlights", + "traits": { + "smithy.api#documentation": "

Describes how part of the result address match the input query.

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

Describes how the parts of the response element matched the input query by returning the sections of the response which matched to input query terms.

" + } + }, + "com.amazonaws.geoplaces#AutocompleteIntendedUse": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "SINGLE_USE", + "value": "SingleUse", + "documentation": "Indicates that results of the operation are for single use, e.g., displaying results on a map or presenting options to users." + } + ] + } + }, + "com.amazonaws.geoplaces#AutocompleteRequest": { + "type": "structure", + "members": { + "QueryText": { + "target": "com.amazonaws.geoplaces#SensitiveString", + "traits": { + "smithy.api#documentation": "

The free-form text query to match addresses against. This is usually a partially typed address from an end user in an address box or form.

", + "smithy.api#length": { + "min": 1, + "max": 200 + }, + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

An optional limit for the number of results returned in a single call.

", + "smithy.api#range": { + "min": 1, + "max": 20 + } + } + }, + "BiasPosition": { + "target": "com.amazonaws.geoplaces#Position", + "traits": { + "smithy.api#documentation": "

The position in longitude and latitude that the results should be close to. Typically,\n place results returned are ranked higher the closer they are to this position. Stored in\n [lng, lat] and in the WSG84 format.

\n \n

The fields BiasPosition, FilterBoundingBox, and\n FilterCircle are mutually exclusive.

\n
" + } + }, + "Filter": { + "target": "com.amazonaws.geoplaces#AutocompleteFilter", + "traits": { + "smithy.api#documentation": "

A structure which contains a set of inclusion/exclusion properties that results must posses in order to be returned as a result.

" + } + }, + "PostalCodeMode": { + "target": "com.amazonaws.geoplaces#PostalCodeMode", + "traits": { + "smithy.api#documentation": "

The PostalCodeMode affects how postal code results are returned. If a\n postal code spans multiple localities and this value is empty, \n partial district or locality information may be returned under a single postal code result entry. If it's populated with the value cityLookup, all cities in that\n postal code are returned.

" + } + }, + "AdditionalFeatures": { + "target": "com.amazonaws.geoplaces#AutocompleteAdditionalFeatureList", + "traits": { + "smithy.api#documentation": "

A list of optional additional parameters that can be requested for\n each result.

" + } + }, + "Language": { + "target": "com.amazonaws.geoplaces#LanguageTag", + "traits": { + "smithy.api#documentation": "

A list of BCP 47 compliant language codes for the results to be rendered in. If there is no data for the result in the requested language, data will be returned in the default language for the entry.

" + } + }, + "PoliticalView": { + "target": "com.amazonaws.geoplaces#CountryCode", + "traits": { + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.

" + } + }, + "IntendedUse": { + "target": "com.amazonaws.geoplaces#AutocompleteIntendedUse", + "traits": { + "smithy.api#documentation": "

Indicates if the results will be stored. Defaults to SingleUse, if left\n empty.

" + } + }, + "Key": { + "target": "com.amazonaws.geoplaces#ApiKey", + "traits": { + "smithy.api#documentation": "

Optional: The API key to be used for authorization. Either an API key or valid SigV4\n signature must be provided when making a request.

", + "smithy.api#httpQuery": "key" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.geoplaces#AutocompleteResponse": { + "type": "structure", + "members": { + "PricingBucket": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pricing bucket for which the query is charged at.

\n

For more inforamtion on pricing, please visit Amazon Location Service Pricing.

", + "smithy.api#httpHeader": "x-amz-geo-pricing-bucket", + "smithy.api#required": {} + } + }, + "ResultItems": { + "target": "com.amazonaws.geoplaces#AutocompleteResultItemList", + "traits": { + "smithy.api#documentation": "

List of places or results returned for a query.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.geoplaces#AutocompleteResultItem": { + "type": "structure", + "members": { + "PlaceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The PlaceId of the place associated with this result. This can be used to look up additional details about the result via GetPlace.

", + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#required": {} + } + }, + "PlaceType": { + "target": "com.amazonaws.geoplaces#PlaceType", + "traits": { + "smithy.api#documentation": "

PlaceType describes the type of result entry returned.

", + "smithy.api#required": {} + } + }, + "Title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

A formatted string for display when presenting this result to an end user.

", + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#required": {} + } + }, + "Address": { + "target": "com.amazonaws.geoplaces#Address", + "traits": { + "smithy.api#documentation": "

The address associated with this result.

" + } + }, + "Distance": { + "target": "com.amazonaws.geoplaces#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The distance in meters between the center of the search area and this result. Useful to evaluate how far away from the original bias position the result is.

" + } + }, + "Language": { + "target": "com.amazonaws.geoplaces#LanguageTag", + "traits": { + "smithy.api#documentation": "

A list of BCP 47 compliant language codes for the results to be rendered in. If there is no data for the result in the requested language, data will be returned in the default language for the entry.

" + } + }, + "PoliticalView": { + "target": "com.amazonaws.geoplaces#CountryCode3", + "traits": { + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.

" + } + }, + "Highlights": { + "target": "com.amazonaws.geoplaces#AutocompleteHighlights", + "traits": { + "smithy.api#documentation": "

Indicates the starting and ending index of the place in the text query that match the found title.

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

A result matching the input query text.

" + } + }, + "com.amazonaws.geoplaces#AutocompleteResultItemList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#AutocompleteResultItem" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 20 + } + } + }, + "com.amazonaws.geoplaces#BoundingBox": { + "type": "list", + "member": { + "target": "smithy.api#Double" + }, + "traits": { + "smithy.api#externalDocumentation": { + "Documentation": "https://tools.ietf.org/html/rfc7946#section-5" + }, + "smithy.api#length": { + "min": 4, + "max": 4 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.geoplaces#BusinessChain": { + "type": "structure", + "members": { + "Name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The business chain name.

", + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "Id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Business Chain Id.

", + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

A businesschain is a chain of businesses that belong to the same brand. For example 7-11.

" + } + }, + "com.amazonaws.geoplaces#BusinessChainList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#BusinessChain" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.geoplaces#Category": { + "type": "structure", + "members": { + "Id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The category ID.

", + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#required": {} + } + }, + "Name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The category name.

", + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#required": {} + } + }, + "LocalizedName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Localized name of the category type.

", + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "Primary": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Boolean which indicates if this category is the primary offered by the place.

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

Category of the Place returned.

" + } + }, + "com.amazonaws.geoplaces#CategoryList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#Category" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.geoplaces#ComponentMatchScores": { + "type": "structure", + "members": { + "Title": { + "target": "com.amazonaws.geoplaces#MatchScore", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Indicates the starting and ending index of the title in the text query that match the found title.

" + } + }, + "Address": { + "target": "com.amazonaws.geoplaces#AddressComponentMatchScores", + "traits": { + "smithy.api#documentation": "

The place's address.

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

Indicates how well the input matches the returned element.\n It is equal to 1 if all input tokens are recognized and matched to the title in the result.

" + } + }, + "com.amazonaws.geoplaces#ContactDetails": { + "type": "structure", + "members": { + "Label": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The contact's label.

", + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "Value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The contact's value.

", + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "Categories": { + "target": "com.amazonaws.geoplaces#CategoryList", + "traits": { + "smithy.api#documentation": "

Categories of results that results must belong too.

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

Details related to contacts.

" + } + }, + "com.amazonaws.geoplaces#ContactDetailsList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#ContactDetails" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.geoplaces#Contacts": { + "type": "structure", + "members": { + "Phones": { + "target": "com.amazonaws.geoplaces#ContactDetailsList", + "traits": { + "smithy.api#documentation": "

List of phone numbers for the results contact.

" + } + }, + "Faxes": { + "target": "com.amazonaws.geoplaces#ContactDetailsList", + "traits": { + "smithy.api#documentation": "

List of fax addresses for the result contact.

" + } + }, + "Websites": { + "target": "com.amazonaws.geoplaces#ContactDetailsList", + "traits": { + "smithy.api#documentation": "

List of website URLs that belong to the result.

" + } + }, + "Emails": { + "target": "com.amazonaws.geoplaces#ContactDetailsList", + "traits": { + "smithy.api#documentation": "

List of emails for contacts of the result.

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

A list of potential contact methods for the result/place.

" + } + }, + "com.amazonaws.geoplaces#Country": { + "type": "structure", + "members": { + "Code2": { + "target": "com.amazonaws.geoplaces#CountryCode2", + "traits": { + "smithy.api#documentation": "

Country, represented by its alpha 2-character code.

" + } + }, + "Code3": { + "target": "com.amazonaws.geoplaces#CountryCode3", + "traits": { + "smithy.api#documentation": "

Country, represented by its alpha t-character code.

" + } + }, + "Name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Name of the country.

", + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the country that the results will be present in.

" + } + }, + "com.amazonaws.geoplaces#CountryCode": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 3 + }, + "smithy.api#pattern": "^([A-Z]{2}|[A-Z]{3})$" + } + }, + "com.amazonaws.geoplaces#CountryCode2": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 2 + }, + "smithy.api#pattern": "^[A-Z]{2}$" + } + }, + "com.amazonaws.geoplaces#CountryCode3": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 3 + }, + "smithy.api#pattern": "^[A-Z]{3}$" + } + }, + "com.amazonaws.geoplaces#CountryCodeList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#CountryCode" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.geoplaces#CountryHighlights": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.geoplaces#HighlightList", + "traits": { + "smithy.api#documentation": "

Indicates the starting and ending index of the country code in the text query that match the found title.

" + } + }, + "Name": { + "target": "com.amazonaws.geoplaces#HighlightList", + "traits": { + "smithy.api#documentation": "

Indicates the starting and ending index of the country code in the text query that match the found title.

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

Indicates the starting and ending index of the country in the text query that match the found title.

" + } + }, + "com.amazonaws.geoplaces#DistanceMeters": { + "type": "long", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0, + "max": 4294967295 + } + } + }, + "com.amazonaws.geoplaces#DurationSeconds": { + "type": "long", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0, + "max": 4294967295 + } + } + }, + "com.amazonaws.geoplaces#FilterBusinessChainList": { + "type": "list", + "member": { + "target": "smithy.api#String", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.geoplaces#FilterCategoryList": { + "type": "list", + "member": { + "target": "smithy.api#String", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.geoplaces#FilterCircle": { + "type": "structure", + "members": { + "Center": { + "target": "com.amazonaws.geoplaces#Position", + "traits": { + "smithy.api#documentation": "

The center position, in longitude and latitude, of the FilterCircle.

", + "smithy.api#required": {} + } + }, + "Radius": { + "target": "com.amazonaws.geoplaces#DistanceMeters", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

The radius, in meters, of the FilterCircle.

", + "smithy.api#range": { + "min": 1, + "max": 21000000 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The Circle that all results must be in.

", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.geoplaces#FilterFoodTypeList": { + "type": "list", + "member": { + "target": "smithy.api#String", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.geoplaces#FoodType": { + "type": "structure", + "members": { + "LocalizedName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Localized name of the food type.

", + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#required": {} + } + }, + "Id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Food Type Id.

", + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "Primary": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Boolean which indicates if this food type is the primary offered by the place. For\n example, if a location serves fast food, but also dessert, he primary would likely be fast\n food.

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

List of Food types offered by this result.

" + } + }, + "com.amazonaws.geoplaces#FoodTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#FoodType" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.geoplaces#Geocode": { + "type": "operation", + "input": { + "target": "com.amazonaws.geoplaces#GeocodeRequest" + }, + "output": { + "target": "com.amazonaws.geoplaces#GeocodeResponse" + }, + "errors": [ + { + "target": "com.amazonaws.geoplaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.geoplaces#InternalServerException" + }, + { + "target": "com.amazonaws.geoplaces#ThrottlingException" + }, + { + "target": "com.amazonaws.geoplaces#ValidationException" + } + ], + "traits": { + "aws.api#dataPlane": {}, + "smithy.api#documentation": "

The Geocode action allows you to obtain coordinates, addresses, and other\n information about places.

", + "smithy.api#http": { + "uri": "/geocode", + "method": "POST" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "GeocodeSuccess", + "params": { + "QueryText": "Starbucks" + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.geoplaces#GeocodeAdditionalFeature": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "TIME_ZONE", + "value": "TimeZone" + }, + { + "name": "ACCESS", + "value": "Access" + } + ] + } + }, + "com.amazonaws.geoplaces#GeocodeAdditionalFeatureList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#GeocodeAdditionalFeature" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.geoplaces#GeocodeFilter": { + "type": "structure", + "members": { + "IncludeCountries": { + "target": "com.amazonaws.geoplaces#CountryCodeList", + "traits": { + "smithy.api#documentation": "

A list of countries that all results must be in. Countries are represented by either their alpha-2 or alpha-3 character codes.

" + } + }, + "IncludePlaceTypes": { + "target": "com.amazonaws.geoplaces#GeocodeFilterPlaceTypeList", + "traits": { + "smithy.api#documentation": "

The included place types.

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

Geocode structure which contains a set of inclusion/exclusion properties that results must posses in order to be returned as a result.

" + } + }, + "com.amazonaws.geoplaces#GeocodeFilterPlaceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "LOCALITY", + "value": "Locality" + }, + { + "name": "POSTAL_CODE", + "value": "PostalCode" + }, + { + "name": "INTERSECTION", + "value": "Intersection" + }, + { + "name": "STREET", + "value": "Street" + }, + { + "name": "POINT_ADDRESS", + "value": "PointAddress" + }, + { + "name": "INTERPOLATED_ADDRESS", + "value": "InterpolatedAddress" + } + ] + } + }, + "com.amazonaws.geoplaces#GeocodeFilterPlaceTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#GeocodeFilterPlaceType" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 6 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.geoplaces#GeocodeIntendedUse": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "SINGLE_USE", + "value": "SingleUse", + "documentation": "Indicates that results of the operation are for single use, e.g., displaying results on a map or presenting options to users." + }, + { + "name": "STORAGE", + "value": "Storage", + "documentation": "Indicates that results of the operation may be stored locally." + } + ] + } + }, + "com.amazonaws.geoplaces#GeocodeQueryComponents": { + "type": "structure", + "members": { + "Country": { + "target": "com.amazonaws.geoplaces#SensitiveString", + "traits": { + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the country that the results will be present in.

", + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#pattern": "^[^;]+$" + } + }, + "Region": { + "target": "com.amazonaws.geoplaces#SensitiveString", + "traits": { + "smithy.api#documentation": "

The region or state results should be to be present in.

\n

Example: North Rhine-Westphalia.

", + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#pattern": "^[^;]+$" + } + }, + "SubRegion": { + "target": "com.amazonaws.geoplaces#SensitiveString", + "traits": { + "smithy.api#documentation": "

The sub-region or county for which results should be present in.

", + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#pattern": "^[^;]+$" + } + }, + "Locality": { + "target": "com.amazonaws.geoplaces#SensitiveString", + "traits": { + "smithy.api#documentation": "

City or locality results should be present in.

\n

Example: Vancouver.

", + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#pattern": "^[^;]+$" + } + }, + "District": { + "target": "com.amazonaws.geoplaces#SensitiveString", + "traits": { + "smithy.api#documentation": "

The district or division of a city the results should be present in.

", + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#pattern": "^[^;]+$" + } + }, + "Street": { + "target": "com.amazonaws.geoplaces#SensitiveString", + "traits": { + "smithy.api#documentation": "

The name of the street results should be present in.

", + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#pattern": "^[^;]+$" + } + }, + "AddressNumber": { + "target": "com.amazonaws.geoplaces#SensitiveString", + "traits": { + "smithy.api#documentation": "

The house number or address results should have.

", + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#pattern": "^[^;]+$" + } + }, + "PostalCode": { + "target": "com.amazonaws.geoplaces#SensitiveString", + "traits": { + "smithy.api#documentation": "

An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code for which the result should posses.

", + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#pattern": "^[^;]+$" + } + } + }, + "traits": { + "smithy.api#documentation": "

A structured free text query allows you to search for places by the name or text representation of specific properties of the place.

" + } + }, + "com.amazonaws.geoplaces#GeocodeRequest": { + "type": "structure", + "members": { + "QueryText": { + "target": "com.amazonaws.geoplaces#SensitiveString", + "traits": { + "smithy.api#documentation": "

The free-form text query to match addresses against. This is usually a partially typed address from an end user in an address box or form.

", + "smithy.api#length": { + "min": 1, + "max": 200 + } + } + }, + "QueryComponents": { + "target": "com.amazonaws.geoplaces#GeocodeQueryComponents" + }, + "MaxResults": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

An optional limit for the number of results returned in a single call.

", + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "BiasPosition": { + "target": "com.amazonaws.geoplaces#Position", + "traits": { + "smithy.api#documentation": "

The position, in longitude and latitude, that the results should be close to. Typically,\n place results returned are ranked higher the closer they are to this position. Stored in\n [lng, lat] and in the WSG84 format.

\n \n

The fields BiasPosition, FilterBoundingBox, and\n FilterCircle are mutually exclusive.

\n
" + } + }, + "Filter": { + "target": "com.amazonaws.geoplaces#GeocodeFilter", + "traits": { + "smithy.api#documentation": "

A structure which contains a set of inclusion/exclusion properties that results must posses in order to be returned as a result.

" + } + }, + "AdditionalFeatures": { + "target": "com.amazonaws.geoplaces#GeocodeAdditionalFeatureList", + "traits": { + "smithy.api#documentation": "

A list of optional additional parameters, such as time zone, that can be requested for\n each result.

" + } + }, + "Language": { + "target": "com.amazonaws.geoplaces#LanguageTag", + "traits": { + "smithy.api#documentation": "

A list of BCP 47 compliant language codes for the results to be rendered in. If there is no data for the result in the requested language, data will be returned in the default language for the entry.

" + } + }, + "PoliticalView": { + "target": "com.amazonaws.geoplaces#CountryCode", + "traits": { + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the political view of a country. \n The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.

" + } + }, + "IntendedUse": { + "target": "com.amazonaws.geoplaces#GeocodeIntendedUse", + "traits": { + "smithy.api#documentation": "

Indicates if the results will be stored. Defaults to SingleUse, if left\n empty.

" + } + }, + "Key": { + "target": "com.amazonaws.geoplaces#ApiKey", + "traits": { + "smithy.api#documentation": "

Optional: The API key to be used for authorization. Either an API key or valid SigV4\n signature must be provided when making a request.

", + "smithy.api#httpQuery": "key" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.geoplaces#GeocodeResponse": { + "type": "structure", + "members": { + "PricingBucket": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pricing bucket for which the query is charged at.

\n

For more inforamtion on pricing, please visit Amazon Location Service Pricing.

", + "smithy.api#httpHeader": "x-amz-geo-pricing-bucket", + "smithy.api#required": {} + } + }, + "ResultItems": { + "target": "com.amazonaws.geoplaces#GeocodeResultItemList", + "traits": { + "smithy.api#documentation": "

List of places or results returned for a query.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.geoplaces#GeocodeResultItem": { + "type": "structure", + "members": { + "PlaceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The PlaceId of the place you wish to receive the information for.

", + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#required": {} + } + }, + "PlaceType": { + "target": "com.amazonaws.geoplaces#PlaceType", + "traits": { + "smithy.api#documentation": "

A PlaceType is a category that the result place must belong to.

", + "smithy.api#required": {} + } + }, + "Title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The localized display name of this result item based on request parameter language.

", + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#required": {} + } + }, + "Address": { + "target": "com.amazonaws.geoplaces#Address", + "traits": { + "smithy.api#documentation": "

The place's address.

" + } + }, + "AddressNumberCorrected": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Boolean indicating if the address provided has been corrected.

" + } + }, + "PostalCodeDetails": { + "target": "com.amazonaws.geoplaces#PostalCodeDetailsList", + "traits": { + "smithy.api#documentation": "

Contains details about the postal code of the place/result.

" + } + }, + "Position": { + "target": "com.amazonaws.geoplaces#Position", + "traits": { + "smithy.api#documentation": "

The position in longitude and latitude.

" + } + }, + "Distance": { + "target": "com.amazonaws.geoplaces#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The distance in meters from the QueryPosition.

" + } + }, + "MapView": { + "target": "com.amazonaws.geoplaces#BoundingBox", + "traits": { + "smithy.api#documentation": "

The bounding box enclosing the geometric shape (area or line) that an individual result covers.

\n

The bounding box formed is defined as a set 4 coordinates: [{westward lng},\n {southern lat}, {eastward lng}, {northern lat}]\n

" + } + }, + "Categories": { + "target": "com.amazonaws.geoplaces#CategoryList", + "traits": { + "smithy.api#documentation": "

Categories of results that results must belong to.

" + } + }, + "FoodTypes": { + "target": "com.amazonaws.geoplaces#FoodTypeList", + "traits": { + "smithy.api#documentation": "

List of food types offered by this result.

" + } + }, + "AccessPoints": { + "target": "com.amazonaws.geoplaces#AccessPointList", + "traits": { + "smithy.api#documentation": "

Position of the access point represent by longitude and latitude.

" + } + }, + "TimeZone": { + "target": "com.amazonaws.geoplaces#TimeZone", + "traits": { + "smithy.api#documentation": "

The time zone in which the place is located.

" + } + }, + "PoliticalView": { + "target": "com.amazonaws.geoplaces#CountryCode3", + "traits": { + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.

" + } + }, + "MatchScores": { + "target": "com.amazonaws.geoplaces#MatchScoreDetails", + "traits": { + "smithy.api#documentation": "

Indicates how well the entire input matches the returned. It is equal to 1 if all input\n tokens are recognized and matched.

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

The Geocoded result.

" + } + }, + "com.amazonaws.geoplaces#GeocodeResultItemList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#GeocodeResultItem" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.geoplaces#GetPlace": { + "type": "operation", + "input": { + "target": "com.amazonaws.geoplaces#GetPlaceRequest" + }, + "output": { + "target": "com.amazonaws.geoplaces#GetPlaceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.geoplaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.geoplaces#InternalServerException" + }, + { + "target": "com.amazonaws.geoplaces#ThrottlingException" + }, + { + "target": "com.amazonaws.geoplaces#ValidationException" + } + ], + "traits": { + "aws.api#dataPlane": {}, + "smithy.api#documentation": "

Finds a place by its unique ID. A PlaceId is returned by other place\n operations.

", + "smithy.api#http": { + "uri": "/place/{PlaceId}", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.geoplaces#GetPlaceAdditionalFeature": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "TIME_ZONE", + "value": "TimeZone" + }, + { + "name": "PHONEMES", + "value": "Phonemes" + }, + { + "name": "ACCESS", + "value": "Access" + }, + { + "name": "CONTACT", + "value": "Contact" + } + ] + } + }, + "com.amazonaws.geoplaces#GetPlaceAdditionalFeatureList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#GetPlaceAdditionalFeature" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.geoplaces#GetPlaceIntendedUse": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "SINGLE_USE", + "value": "SingleUse", + "documentation": "Indicates that results of the operation are for single use, e.g., displaying results on a map or presenting options to users." + }, + { + "name": "STORAGE", + "value": "Storage", + "documentation": "Indicates that results of the operation may be stored locally." + } + ] + } + }, + "com.amazonaws.geoplaces#GetPlaceRequest": { + "type": "structure", + "members": { + "PlaceId": { + "target": "com.amazonaws.geoplaces#SensitiveString", + "traits": { + "smithy.api#documentation": "

The PlaceId of the place you wish to receive the information for.

", + "smithy.api#httpLabel": {}, + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#required": {} + } + }, + "AdditionalFeatures": { + "target": "com.amazonaws.geoplaces#GetPlaceAdditionalFeatureList", + "traits": { + "smithy.api#documentation": "

A list of optional additional parameters such as time zone that can be requested for\n each result.

", + "smithy.api#httpQuery": "additional-features" + } + }, + "Language": { + "target": "com.amazonaws.geoplaces#LanguageTag", + "traits": { + "smithy.api#documentation": "

A list of BCP 47 compliant language codes for the results to be rendered in. If there is no data for the result in the requested language, data will be returned in the default language for the entry.

", + "smithy.api#httpQuery": "language" + } + }, + "PoliticalView": { + "target": "com.amazonaws.geoplaces#CountryCode", + "traits": { + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.

", + "smithy.api#httpQuery": "political-view" + } + }, + "IntendedUse": { + "target": "com.amazonaws.geoplaces#GetPlaceIntendedUse", + "traits": { + "smithy.api#documentation": "

Indicates if the results will be stored. Defaults to SingleUse, if left empty.

", + "smithy.api#httpQuery": "intended-use" + } + }, + "Key": { + "target": "com.amazonaws.geoplaces#ApiKey", + "traits": { + "smithy.api#documentation": "

Optional: The API key to be used for authorization. Either an API key or valid SigV4\n signature must be provided when making a request.

", + "smithy.api#httpQuery": "key" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.geoplaces#GetPlaceResponse": { + "type": "structure", + "members": { + "PlaceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The PlaceId of the place you wish to receive the information for.

", + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#required": {} + } + }, + "PlaceType": { + "target": "com.amazonaws.geoplaces#PlaceType", + "traits": { + "smithy.api#documentation": "

A PlaceType is a category that the result place must belong to.

", + "smithy.api#required": {} + } + }, + "Title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The localized display name of this result item based on request parameter language.

", + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#required": {} + } + }, + "PricingBucket": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pricing bucket for which the query is charged at.

\n

For more inforamtion on pricing, please visit Amazon Location Service Pricing.

", + "smithy.api#httpHeader": "x-amz-geo-pricing-bucket", + "smithy.api#required": {} + } + }, + "Address": { + "target": "com.amazonaws.geoplaces#Address", + "traits": { + "smithy.api#documentation": "

The place's address.

" + } + }, + "AddressNumberCorrected": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Boolean indicating if the address provided has been corrected.

" + } + }, + "PostalCodeDetails": { + "target": "com.amazonaws.geoplaces#PostalCodeDetailsList", + "traits": { + "smithy.api#documentation": "

Contains details about the postal code of the place/result.

" + } + }, + "Position": { + "target": "com.amazonaws.geoplaces#Position", + "traits": { + "smithy.api#documentation": "

The position, in longitude and latitude.

" + } + }, + "MapView": { + "target": "com.amazonaws.geoplaces#BoundingBox", + "traits": { + "smithy.api#documentation": "

The bounding box enclosing the geometric shape (area or line) that an individual result covers.

\n

The bounding box formed is defined as a set of four coordinates: [{westward lng},\n {southern lat}, {eastward lng}, {northern lat}]\n

" + } + }, + "Categories": { + "target": "com.amazonaws.geoplaces#CategoryList", + "traits": { + "smithy.api#documentation": "

Categories of results that results must belong to.

" + } + }, + "FoodTypes": { + "target": "com.amazonaws.geoplaces#FoodTypeList", + "traits": { + "smithy.api#documentation": "

List of food types offered by this result.

" + } + }, + "BusinessChains": { + "target": "com.amazonaws.geoplaces#BusinessChainList", + "traits": { + "smithy.api#documentation": "

The Business Chains associated with the place.

" + } + }, + "Contacts": { + "target": "com.amazonaws.geoplaces#Contacts", + "traits": { + "smithy.api#documentation": "

List of potential contact methods for the result/place.

" + } + }, + "OpeningHours": { + "target": "com.amazonaws.geoplaces#OpeningHoursList", + "traits": { + "smithy.api#documentation": "

List of opening hours objects.

" + } + }, + "AccessPoints": { + "target": "com.amazonaws.geoplaces#AccessPointList", + "traits": { + "smithy.api#documentation": "

Position of the access point in (lng,lat).

" + } + }, + "AccessRestrictions": { + "target": "com.amazonaws.geoplaces#AccessRestrictionList", + "traits": { + "smithy.api#documentation": "

Indicates known access restrictions on a vehicle access point. The index correlates to an access point and indicates if access through this point has some form of restriction.

" + } + }, + "TimeZone": { + "target": "com.amazonaws.geoplaces#TimeZone", + "traits": { + "smithy.api#documentation": "

The time zone in which the place is located.

" + } + }, + "PoliticalView": { + "target": "com.amazonaws.geoplaces#CountryCode3", + "traits": { + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.

" + } + }, + "Phonemes": { + "target": "com.amazonaws.geoplaces#PhonemeDetails", + "traits": { + "smithy.api#documentation": "

How the various components of the result's address are pronounced in various\n languages.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.geoplaces#Highlight": { + "type": "structure", + "members": { + "StartIndex": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Start index of the highlight.

", + "smithy.api#range": { + "min": 0 + } + } + }, + "EndIndex": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

End index of the highlight.

", + "smithy.api#range": { + "min": 0 + } + } + }, + "Value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The highlight's value.

", + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes how parts of the result response match the input query.

" + } + }, + "com.amazonaws.geoplaces#HighlightList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#Highlight" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.geoplaces#InternalServerException": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The request processing has failed because of an unknown error, exception or failure.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.geoplaces#IntersectionHighlightsList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#HighlightList" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.geoplaces#IntersectionList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#IntersectionStreet" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.geoplaces#IntersectionStreet": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.geoplaces#LanguageTag": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 35 + } + } + }, + "com.amazonaws.geoplaces#MatchScore": { + "type": "double", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0, + "max": 1 + } + } + }, + "com.amazonaws.geoplaces#MatchScoreDetails": { + "type": "structure", + "members": { + "Overall": { + "target": "com.amazonaws.geoplaces#MatchScore", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Indicates how well the entire input matches the returned. It is equal to 1 if all input tokens are recognized and matched.

" + } + }, + "Components": { + "target": "com.amazonaws.geoplaces#ComponentMatchScores", + "traits": { + "smithy.api#documentation": "

Indicates how well the component input matches the returned. It is equal to 1 if all\n input tokens are recognized and matched.

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

Details related to the match score.

" + } + }, + "com.amazonaws.geoplaces#MatchScoreList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#MatchScore" + } + }, + "com.amazonaws.geoplaces#OpeningHours": { + "type": "structure", + "members": { + "Display": { + "target": "com.amazonaws.geoplaces#OpeningHoursDisplayList", + "traits": { + "smithy.api#documentation": "

List of opening hours in the format they are displayed in. This can vary by result and\n in most cases represents how the result uniquely formats their opening hours.

" + } + }, + "OpenNow": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Boolean which indicates if the result/place is currently open.

" + } + }, + "Components": { + "target": "com.amazonaws.geoplaces#OpeningHoursComponentsList", + "traits": { + "smithy.api#documentation": "

Components of the opening hours object.

" + } + }, + "Categories": { + "target": "com.amazonaws.geoplaces#CategoryList", + "traits": { + "smithy.api#documentation": "

Categories of results that results must belong too.

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

List of opening hours objects.

" + } + }, + "com.amazonaws.geoplaces#OpeningHoursComponents": { + "type": "structure", + "members": { + "OpenTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

String which represents the opening hours, such as \"T070000\".

", + "smithy.api#length": { + "min": 0, + "max": 21 + } + } + }, + "OpenDuration": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

String which represents the duration of the opening period, such as\n \"PT12H00M\".

", + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "Recurrence": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Days or periods when the provided opening hours are in affect.

\n

Example: FREQ:DAILY;BYDAY:MO,TU,WE,TH,SU\n

", + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Components of the opening hours object.

" + } + }, + "com.amazonaws.geoplaces#OpeningHoursComponentsList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#OpeningHoursComponents" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.geoplaces#OpeningHoursDisplay": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.geoplaces#OpeningHoursDisplayList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#OpeningHoursDisplay" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.geoplaces#OpeningHoursList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#OpeningHours" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.geoplaces#PhonemeDetails": { + "type": "structure", + "members": { + "Title": { + "target": "com.amazonaws.geoplaces#PhonemeTranscriptionList", + "traits": { + "smithy.api#documentation": "

List of PhonemeTranscription. See PhonemeTranscription for\n fields.

" + } + }, + "Address": { + "target": "com.amazonaws.geoplaces#AddressComponentPhonemes", + "traits": { + "smithy.api#documentation": "

How to pronounce the address.

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

The phoneme details.

" + } + }, + "com.amazonaws.geoplaces#PhonemeTranscription": { + "type": "structure", + "members": { + "Value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Value which indicates how to pronounce the value.

", + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "Language": { + "target": "com.amazonaws.geoplaces#LanguageTag", + "traits": { + "smithy.api#documentation": "

A list of BCP 47 compliant language codes for the results to be rendered in. If there is no data for the result in the requested language, data will be returned in the default language for the entry.

" + } + }, + "Preferred": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Boolean which indicates if it the preferred pronunciation.

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

How to pronounce the various components of the address or place.

" + } + }, + "com.amazonaws.geoplaces#PhonemeTranscriptionList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#PhonemeTranscription" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.geoplaces#PlaceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "COUNTRY", + "value": "Country" + }, + { + "name": "REGION", + "value": "Region" + }, + { + "name": "SUB_REGION", + "value": "SubRegion" + }, + { + "name": "LOCALITY", + "value": "Locality" + }, + { + "name": "DISTRICT", + "value": "District" + }, + { + "name": "SUB_DISTRICT", + "value": "SubDistrict" + }, + { + "name": "POSTAL_CODE", + "value": "PostalCode" + }, + { + "name": "BLOCK", + "value": "Block" + }, + { + "name": "SUB_BLOCK", + "value": "SubBlock" + }, + { + "name": "INTERSECTION", + "value": "Intersection" + }, + { + "name": "STREET", + "value": "Street" + }, + { + "name": "POINT_OF_INTEREST", + "value": "PointOfInterest" + }, + { + "name": "POINT_ADDRESS", + "value": "PointAddress" + }, + { + "name": "INTERPOLATED_ADDRESS", + "value": "InterpolatedAddress" + } + ] + } + }, + "com.amazonaws.geoplaces#PlacesService": { + "type": "service", + "version": "2020-11-19", + "resources": [ + { + "target": "com.amazonaws.geoplaces#ProviderResource" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Geo Places", + "arnNamespace": "geo-places", + "cloudTrailEventSource": "geo-places.amazonaws.com" + }, + "aws.auth#sigv4": { + "name": "geo-places" + }, + "aws.endpoints#standardRegionalEndpoints": { + "partitionSpecialCases": { + "aws": [ + { + "endpoint": "https://places.geo.{region}.{dnsSuffix}/v2" + }, + { + "endpoint": "https://places.geo-fips.{region}.{dualStackDnsSuffix}/v2", + "fips": true, + "dualStack": true + }, + { + "endpoint": "https://places.geo-fips.{region}.{dnsSuffix}/v2", + "fips": true, + "dualStack": false + }, + { + "endpoint": "https://places.geo.{region}.{dualStackDnsSuffix}/v2", + "fips": false, + "dualStack": true + } + ], + "aws-us-gov": [ + { + "endpoint": "https://places.geo.{region}.us-gov.{dnsSuffix}/v2" + }, + { + "endpoint": "https://places.geo-fips.{region}.us-gov.{dualStackDnsSuffix}/v2", + "fips": true, + "dualStack": true + }, + { + "endpoint": "https://places.geo-fips.{region}.us-gov.{dnsSuffix}/v2", + "fips": true, + "dualStack": false + }, + { + "endpoint": "https://places.geo.{region}.us-gov.{dualStackDnsSuffix}/v2", + "fips": false, + "dualStack": true + } + ] + } + }, + "aws.protocols#restJson1": {}, + "smithy.api#cors": { + "additionalAllowedHeaders": [ + "x-amz-content-sha256", + "x-amz-user-agent", + "content-type" + ] + }, + "smithy.api#documentation": "

\n The Places API enables powerful location search and geocoding capabilities for your applications, offering global coverage with rich, detailed information. Key features include:\n

\n
    \n
  • \n

    Forward and reverse geocoding for addresses and coordinates

    \n
  • \n
  • \n

    Comprehensive place searches with detailed information, including:

    \n
      \n
    • \n

      Business names and addresses

      \n
    • \n
    • \n

      Contact information

      \n
    • \n
    • \n

      Hours of operation

      \n
    • \n
    • \n

      POI (Points of Interest) categories

      \n
    • \n
    • \n

      Food types for restaurants

      \n
    • \n
    • \n

      Chain affiliation for relevant businesses

      \n
    • \n
    \n
  • \n
  • \n

    Global data coverage with a wide range of POI categories

    \n
  • \n
  • \n

    Regular data updates to ensure accuracy and relevance

    \n
  • \n
", + "smithy.api#title": "Amazon Location Service Places V2", + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "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" + }, + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the 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": [], + "rules": [ + { + "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" + } + ], + "type": "tree" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://places.geo.{Region}.{PartitionResult#dnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "endpoint": { + "url": "https://places.geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://places.geo-fips.{Region}.{PartitionResult#dnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "endpoint": { + "url": "https://places.geo.{Region}.{PartitionResult#dualStackDnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://places.geo.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "endpoint": { + "url": "https://places.geo-fips.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://places.geo-fips.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "endpoint": { + "url": "https://places.geo.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "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://geo-places-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 + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://geo-places-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": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://geo-places.{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://geo-places.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ], + "type": "tree" + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For custom endpoint with region not set and fips disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Endpoint": "https://example.com", + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with fips enabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Endpoint": "https://example.com", + "UseFIPS": true + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Endpoint": "https://example.com", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://places.geo-fips.us-east-1.api.aws/v2" + } + }, + "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://places.geo-fips.us-east-1.amazonaws.com/v2" + } + }, + "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://places.geo.us-east-1.api.aws/v2" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://places.geo.us-east-1.amazonaws.com/v2" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://geo-places-fips.cn-northwest-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-places-fips.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://geo-places.cn-northwest-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-places.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://places.geo-fips.us-gov-west-1.us-gov.api.aws/v2" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://places.geo-fips.us-gov-west-1.us-gov.amazonaws.com/v2" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://places.geo.us-gov-west-1.us-gov.api.aws/v2" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://places.geo.us-gov-west-1.us-gov.amazonaws.com/v2" + } + }, + "params": { + "Region": "us-gov-west-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://geo-places-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://geo-places.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://geo-places-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://geo-places.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-isoe-west-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": "eu-isoe-west-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-places-fips.eu-isoe-west-1.cloud.adc-e.uk" + } + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-places.eu-isoe-west-1.cloud.adc-e.uk" + } + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isof-south-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-isof-south-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-places-fips.us-isof-south-1.csp.hci.ic.gov" + } + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-places.us-isof-south-1.csp.hci.ic.gov" + } + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.geoplaces#Position": { + "type": "list", + "member": { + "target": "smithy.api#Double" + }, + "traits": { + "smithy.api#externalDocumentation": { + "Documentation": "https://tools.ietf.org/html/rfc7946#section-3.1.1" + }, + "smithy.api#length": { + "min": 2, + "max": 2 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.geoplaces#PostalAuthority": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "USPS", + "value": "Usps" + } + ] + } + }, + "com.amazonaws.geoplaces#PostalCodeDetails": { + "type": "structure", + "members": { + "PostalCode": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code for which the result should posses.

", + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "PostalAuthority": { + "target": "com.amazonaws.geoplaces#PostalAuthority", + "traits": { + "smithy.api#documentation": "

The postal authority or entity. This could be a governmental authority, a regulatory authority, or a designated postal operator.

" + } + }, + "PostalCodeType": { + "target": "com.amazonaws.geoplaces#PostalCodeType", + "traits": { + "smithy.api#documentation": "

The postal code type.

" + } + }, + "UspsZip": { + "target": "com.amazonaws.geoplaces#UspsZip", + "traits": { + "smithy.api#documentation": "

The ZIP Classification Code, or in other words what type of postal code is it.

" + } + }, + "UspsZipPlus4": { + "target": "com.amazonaws.geoplaces#UspsZipPlus4", + "traits": { + "smithy.api#documentation": "

The USPS ZIP+4 Record Type Code.

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

Contains details about the postal code of the place or result.

" + } + }, + "com.amazonaws.geoplaces#PostalCodeDetailsList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#PostalCodeDetails" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.geoplaces#PostalCodeMode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "MERGE_ALL_SPANNED_LOCALITIES", + "value": "MergeAllSpannedLocalities" + }, + { + "name": "ENUMERATE_SPANNED_LOCALITIES", + "value": "EnumerateSpannedLocalities" + } + ] + } + }, + "com.amazonaws.geoplaces#PostalCodeType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "USPS_ZIP", + "value": "UspsZip" + }, + { + "name": "USPS_ZIP_PLUS_4", + "value": "UspsZipPlus4" + } + ] + } + }, + "com.amazonaws.geoplaces#ProviderResource": { + "type": "resource", + "operations": [ + { + "target": "com.amazonaws.geoplaces#Autocomplete" + }, + { + "target": "com.amazonaws.geoplaces#Geocode" + }, + { + "target": "com.amazonaws.geoplaces#GetPlace" + }, + { + "target": "com.amazonaws.geoplaces#ReverseGeocode" + }, + { + "target": "com.amazonaws.geoplaces#SearchNearby" + }, + { + "target": "com.amazonaws.geoplaces#SearchText" + }, + { + "target": "com.amazonaws.geoplaces#Suggest" + } + ] + }, + "com.amazonaws.geoplaces#QueryRefinement": { + "type": "structure", + "members": { + "RefinedTerm": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The term that will be suggested to the user.

", + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#required": {} + } + }, + "OriginalTerm": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The sub-string of the original query that is replaced by this query term.

", + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#required": {} + } + }, + "StartIndex": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Start index of the parsed component.

", + "smithy.api#range": { + "min": 0 + }, + "smithy.api#required": {} + } + }, + "EndIndex": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

End index of the parsed query.

", + "smithy.api#range": { + "min": 0 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Suggestions for refining individual query terms. Suggestions are returned as objects\n which note the term, suggested replacement, and its index in the query.

" + } + }, + "com.amazonaws.geoplaces#QueryRefinementList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#QueryRefinement" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 10 + } + } + }, + "com.amazonaws.geoplaces#QueryType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "CATEGORY", + "value": "Category" + }, + { + "name": "BUSINESS_CHAIN", + "value": "BusinessChain" + } + ] + } + }, + "com.amazonaws.geoplaces#RecordTypeCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "FIRM", + "value": "Firm" + }, + { + "name": "GENERAL", + "value": "General" + }, + { + "name": "HIGH_RISE", + "value": "HighRise" + }, + { + "name": "POST_OFFICE_BOX", + "value": "PostOfficeBox" + }, + { + "name": "RURAL", + "value": "Rural" + }, + { + "name": "STREET", + "value": "Street" + } + ] + } + }, + "com.amazonaws.geoplaces#Region": { + "type": "structure", + "members": { + "Code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Abbreviated code for a the state, province or region of the country.

\n

Example: BC.

", + "smithy.api#length": { + "min": 0, + "max": 3 + } + } + }, + "Name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Name for a the state, province, or region of the country.

\n

Example: British Columbia.

", + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

The region or state results should be to be present in.

\n

Example: North Rhine-Westphalia.

" + } + }, + "com.amazonaws.geoplaces#RegionHighlights": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.geoplaces#HighlightList", + "traits": { + "smithy.api#documentation": "

Indicates the starting and ending index of the region in the text query that match the found title.

" + } + }, + "Name": { + "target": "com.amazonaws.geoplaces#HighlightList", + "traits": { + "smithy.api#documentation": "

Indicates the starting and ending index of the region name in the text query that match the found title.

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

Indicates the starting and ending index of the region in the text query that match the found title.

" + } + }, + "com.amazonaws.geoplaces#ReverseGeocode": { + "type": "operation", + "input": { + "target": "com.amazonaws.geoplaces#ReverseGeocodeRequest" + }, + "output": { + "target": "com.amazonaws.geoplaces#ReverseGeocodeResponse" + }, + "errors": [ + { + "target": "com.amazonaws.geoplaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.geoplaces#InternalServerException" + }, + { + "target": "com.amazonaws.geoplaces#ThrottlingException" + }, + { + "target": "com.amazonaws.geoplaces#ValidationException" + } + ], + "traits": { + "aws.api#dataPlane": {}, + "smithy.api#documentation": "

The ReverseGeocode operation allows you to retrieve addresses and place\n information from coordinates.

", + "smithy.api#http": { + "uri": "/reverse-geocode", + "method": "POST" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "ReverseGeocodeSuccess", + "params": { + "QueryPosition": [ + 2.2945, + 48.85824 + ] + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.geoplaces#ReverseGeocodeAdditionalFeature": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "TIME_ZONE", + "value": "TimeZone" + }, + { + "name": "ACCESS", + "value": "Access" + } + ] + } + }, + "com.amazonaws.geoplaces#ReverseGeocodeAdditionalFeatureList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#ReverseGeocodeAdditionalFeature" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.geoplaces#ReverseGeocodeFilter": { + "type": "structure", + "members": { + "IncludePlaceTypes": { + "target": "com.amazonaws.geoplaces#ReverseGeocodeFilterPlaceTypeList", + "traits": { + "smithy.api#documentation": "

The included place types.

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

The included place types.

" + } + }, + "com.amazonaws.geoplaces#ReverseGeocodeFilterPlaceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "LOCALITY", + "value": "Locality" + }, + { + "name": "INTERSECTION", + "value": "Intersection" + }, + { + "name": "STREET", + "value": "Street" + }, + { + "name": "POINT_ADDRESS", + "value": "PointAddress" + }, + { + "name": "INTERPOLATED_ADDRESS", + "value": "InterpolatedAddress" + } + ] + } + }, + "com.amazonaws.geoplaces#ReverseGeocodeFilterPlaceTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#ReverseGeocodeFilterPlaceType" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 5 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.geoplaces#ReverseGeocodeIntendedUse": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "SINGLE_USE", + "value": "SingleUse", + "documentation": "Indicates that results of the operation are for single use, e.g., displaying results on a map or presenting options to users." + }, + { + "name": "STORAGE", + "value": "Storage", + "documentation": "Indicates that results of the operation may be stored locally." + } + ] + } + }, + "com.amazonaws.geoplaces#ReverseGeocodeRequest": { + "type": "structure", + "members": { + "QueryPosition": { + "target": "com.amazonaws.geoplaces#Position", + "traits": { + "smithy.api#documentation": "

The position, in [lng, lat] for which you are querying nearby resultsfor. Results closer to the position will be ranked higher then results further away from the position

", + "smithy.api#required": {} + } + }, + "QueryRadius": { + "target": "com.amazonaws.geoplaces#DistanceMeters", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

The maximum distance in meters from the QueryPosition from which a result will be returned.

", + "smithy.api#range": { + "min": 1, + "max": 21000000 + } + } + }, + "MaxResults": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

An optional limit for the number of results returned in a single call.

", + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "Filter": { + "target": "com.amazonaws.geoplaces#ReverseGeocodeFilter", + "traits": { + "smithy.api#documentation": "

A structure which contains a set of inclusion/exclusion properties that results must posses in order to be returned as a result.

" + } + }, + "AdditionalFeatures": { + "target": "com.amazonaws.geoplaces#ReverseGeocodeAdditionalFeatureList", + "traits": { + "smithy.api#documentation": "

A list of optional additional parameters, such as time zone that can be requested for\n each result.

" + } + }, + "Language": { + "target": "com.amazonaws.geoplaces#LanguageTag", + "traits": { + "smithy.api#documentation": "

A list of BCP 47 compliant language codes for the results to be rendered in. If there is no data for the result in the requested language, data will be returned in the default language for the entry.

" + } + }, + "PoliticalView": { + "target": "com.amazonaws.geoplaces#CountryCode", + "traits": { + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.

" + } + }, + "IntendedUse": { + "target": "com.amazonaws.geoplaces#ReverseGeocodeIntendedUse", + "traits": { + "smithy.api#documentation": "

Indicates if the results will be stored. Defaults to SingleUse, if left empty.

" + } + }, + "Key": { + "target": "com.amazonaws.geoplaces#ApiKey", + "traits": { + "smithy.api#documentation": "

Optional: The API key to be used for authorization. Either an API key or valid SigV4\n signature must be provided when making a request.

", + "smithy.api#httpQuery": "key" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.geoplaces#ReverseGeocodeResponse": { + "type": "structure", + "members": { + "PricingBucket": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pricing bucket for which the query is charged at.

\n

For more inforamtion on pricing, please visit Amazon Location Service Pricing.

", + "smithy.api#httpHeader": "x-amz-geo-pricing-bucket", + "smithy.api#required": {} + } + }, + "ResultItems": { + "target": "com.amazonaws.geoplaces#ReverseGeocodeResultItemList", + "traits": { + "smithy.api#documentation": "

List of places or results returned for a query.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.geoplaces#ReverseGeocodeResultItem": { + "type": "structure", + "members": { + "PlaceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The PlaceId of the place you wish to receive the information for.

", + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#required": {} + } + }, + "PlaceType": { + "target": "com.amazonaws.geoplaces#PlaceType", + "traits": { + "smithy.api#documentation": "

A PlaceType is a category that the result place must belong to.

", + "smithy.api#required": {} + } + }, + "Title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The localized display name of this result item based on request parameter language.

", + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#required": {} + } + }, + "Address": { + "target": "com.amazonaws.geoplaces#Address", + "traits": { + "smithy.api#documentation": "

The place's address.

" + } + }, + "AddressNumberCorrected": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Boolean indicating if the address provided has been corrected.

" + } + }, + "PostalCodeDetails": { + "target": "com.amazonaws.geoplaces#PostalCodeDetailsList", + "traits": { + "smithy.api#documentation": "

Contains details about the postal code of the place/result.

" + } + }, + "Position": { + "target": "com.amazonaws.geoplaces#Position", + "traits": { + "smithy.api#documentation": "

The position in longitude and latitude.

" + } + }, + "Distance": { + "target": "com.amazonaws.geoplaces#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The distance in meters from the QueryPosition.

" + } + }, + "MapView": { + "target": "com.amazonaws.geoplaces#BoundingBox", + "traits": { + "smithy.api#documentation": "

The bounding box enclosing the geometric shape (area or line) that an individual result covers.

\n

The bounding box formed is defined as a set 4 coordinates: [{westward lng},\n {southern lat}, {eastward lng}, {northern lat}]\n

" + } + }, + "Categories": { + "target": "com.amazonaws.geoplaces#CategoryList", + "traits": { + "smithy.api#documentation": "

Categories of results that results must belong to.

" + } + }, + "FoodTypes": { + "target": "com.amazonaws.geoplaces#FoodTypeList", + "traits": { + "smithy.api#documentation": "

List of food types offered by this result.

" + } + }, + "AccessPoints": { + "target": "com.amazonaws.geoplaces#AccessPointList", + "traits": { + "smithy.api#documentation": "

Position of the access point represent by longitude and latitude.

" + } + }, + "TimeZone": { + "target": "com.amazonaws.geoplaces#TimeZone", + "traits": { + "smithy.api#documentation": "

The time zone in which the place is located.

" + } + }, + "PoliticalView": { + "target": "com.amazonaws.geoplaces#CountryCode3", + "traits": { + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.

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

The returned location from the Reverse Geocode action.

" + } + }, + "com.amazonaws.geoplaces#ReverseGeocodeResultItemList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#ReverseGeocodeResultItem" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.geoplaces#SearchNearby": { + "type": "operation", + "input": { + "target": "com.amazonaws.geoplaces#SearchNearbyRequest" + }, + "output": { + "target": "com.amazonaws.geoplaces#SearchNearbyResponse" + }, + "errors": [ + { + "target": "com.amazonaws.geoplaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.geoplaces#InternalServerException" + }, + { + "target": "com.amazonaws.geoplaces#ThrottlingException" + }, + { + "target": "com.amazonaws.geoplaces#ValidationException" + } + ], + "traits": { + "aws.api#dataPlane": {}, + "smithy.api#documentation": "

Search nearby a specified location.

", + "smithy.api#http": { + "uri": "/search-nearby", + "method": "POST" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "SearchNearbySuccess", + "params": { + "QueryPosition": [ + 2.2945, + 48.85824 + ] + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.geoplaces#SearchNearbyAdditionalFeature": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "TIME_ZONE", + "value": "TimeZone" + }, + { + "name": "PHONEMES", + "value": "Phonemes" + }, + { + "name": "ACCESS", + "value": "Access" + }, + { + "name": "CONTACT", + "value": "Contact" + } + ] + } + }, + "com.amazonaws.geoplaces#SearchNearbyAdditionalFeatureList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#SearchNearbyAdditionalFeature" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.geoplaces#SearchNearbyFilter": { + "type": "structure", + "members": { + "BoundingBox": { + "target": "com.amazonaws.geoplaces#BoundingBox", + "traits": { + "smithy.api#documentation": "

The bounding box enclosing the geometric shape (area or line) that an individual result covers.

\n

The bounding box formed is defined as a set 4 coordinates: [{westward lng},\n {southern lat}, {eastward lng}, {northern lat}]\n

" + } + }, + "IncludeCountries": { + "target": "com.amazonaws.geoplaces#CountryCodeList", + "traits": { + "smithy.api#documentation": "

A list of countries that all results must be in. Countries are represented by either their alpha-2 or alpha-3 character codes.

" + } + }, + "IncludeCategories": { + "target": "com.amazonaws.geoplaces#FilterCategoryList", + "traits": { + "smithy.api#documentation": "

Categories of results that results must belong too.

" + } + }, + "ExcludeCategories": { + "target": "com.amazonaws.geoplaces#FilterCategoryList", + "traits": { + "smithy.api#documentation": "

Categories of results that results are excluded from.

" + } + }, + "IncludeBusinessChains": { + "target": "com.amazonaws.geoplaces#FilterBusinessChainList", + "traits": { + "smithy.api#documentation": "

The Business Chains associated with the place.

" + } + }, + "ExcludeBusinessChains": { + "target": "com.amazonaws.geoplaces#FilterBusinessChainList", + "traits": { + "smithy.api#documentation": "

The Business Chains associated with the place.

" + } + }, + "IncludeFoodTypes": { + "target": "com.amazonaws.geoplaces#FilterFoodTypeList", + "traits": { + "smithy.api#documentation": "

Food types that results are included from.

" + } + }, + "ExcludeFoodTypes": { + "target": "com.amazonaws.geoplaces#FilterFoodTypeList", + "traits": { + "smithy.api#documentation": "

Food types that results are excluded from.

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

SearchNearby structure which contains a set of inclusion/exclusion properties that results must posses in order to be returned as a result.

" + } + }, + "com.amazonaws.geoplaces#SearchNearbyIntendedUse": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "SINGLE_USE", + "value": "SingleUse", + "documentation": "Indicates that results of the operation are for single use, e.g., displaying results on a map or presenting options to users." + }, + { + "name": "STORAGE", + "value": "Storage", + "documentation": "Indicates that results of the operation may be stored locally." + } + ] + } + }, + "com.amazonaws.geoplaces#SearchNearbyRequest": { + "type": "structure", + "members": { + "QueryPosition": { + "target": "com.amazonaws.geoplaces#Position", + "traits": { + "smithy.api#documentation": "

The position, in [lng, lat] for which you are querying nearby resultsfor. Results closer to the position will be ranked higher then results further away from the position

", + "smithy.api#required": {} + } + }, + "QueryRadius": { + "target": "com.amazonaws.geoplaces#DistanceMeters", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

The maximum distance in meters from the QueryPosition from which a result will be returned.

", + "smithy.api#range": { + "min": 1, + "max": 21000000 + } + } + }, + "MaxResults": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

An optional limit for the number of results returned in a single call.

", + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "Filter": { + "target": "com.amazonaws.geoplaces#SearchNearbyFilter", + "traits": { + "smithy.api#documentation": "

A structure which contains a set of inclusion/exclusion properties that results must posses in order to be returned as a result.

" + } + }, + "AdditionalFeatures": { + "target": "com.amazonaws.geoplaces#SearchNearbyAdditionalFeatureList", + "traits": { + "smithy.api#documentation": "

A list of optional additional parameters, such as time zone, that can be requested for\n each result.

" + } + }, + "Language": { + "target": "com.amazonaws.geoplaces#LanguageTag", + "traits": { + "smithy.api#documentation": "

A list of BCP 47 compliant language codes for the results to be rendered in. If there is no data for the result in the requested language, data will be returned in the default language for the entry.

" + } + }, + "PoliticalView": { + "target": "com.amazonaws.geoplaces#CountryCode", + "traits": { + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.

" + } + }, + "IntendedUse": { + "target": "com.amazonaws.geoplaces#SearchNearbyIntendedUse", + "traits": { + "smithy.api#documentation": "

Indicates if the results will be stored. Defaults to SingleUse, if left empty.

" + } + }, + "NextToken": { + "target": "com.amazonaws.geoplaces#Token", + "traits": { + "smithy.api#documentation": "

If nextToken is returned, \n there are more results available. The value of nextToken is a unique pagination token for each page.

" + } + }, + "Key": { + "target": "com.amazonaws.geoplaces#ApiKey", + "traits": { + "smithy.api#documentation": "

Optional: The API key to be used for authorization. Either an API key or valid SigV4\n signature must be provided when making a request.

", + "smithy.api#httpQuery": "key" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.geoplaces#SearchNearbyResponse": { + "type": "structure", + "members": { + "PricingBucket": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pricing bucket for which the query is charged at.

\n

For more inforamtion on pricing, please visit Amazon Location Service Pricing.

", + "smithy.api#httpHeader": "x-amz-geo-pricing-bucket", + "smithy.api#required": {} + } + }, + "ResultItems": { + "target": "com.amazonaws.geoplaces#SearchNearbyResultItemList", + "traits": { + "smithy.api#documentation": "

List of places or results returned for a query.

" + } + }, + "NextToken": { + "target": "com.amazonaws.geoplaces#Token", + "traits": { + "smithy.api#documentation": "

If nextToken is returned, \n there are more results available. The value of nextToken is a unique pagination token for each page.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.geoplaces#SearchNearbyResultItem": { + "type": "structure", + "members": { + "PlaceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The PlaceId of the place you wish to receive the information for.

", + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#required": {} + } + }, + "PlaceType": { + "target": "com.amazonaws.geoplaces#PlaceType", + "traits": { + "smithy.api#documentation": "

A PlaceType is a category that the result place must belong to.

", + "smithy.api#required": {} + } + }, + "Title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The item's title.

", + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#required": {} + } + }, + "Address": { + "target": "com.amazonaws.geoplaces#Address", + "traits": { + "smithy.api#documentation": "

The place's address.

" + } + }, + "AddressNumberCorrected": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Boolean indicating if the address provided has been corrected.

" + } + }, + "Position": { + "target": "com.amazonaws.geoplaces#Position", + "traits": { + "smithy.api#documentation": "

The position in longitude and latitude.

" + } + }, + "Distance": { + "target": "com.amazonaws.geoplaces#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The distance in meters from the QueryPosition.

" + } + }, + "MapView": { + "target": "com.amazonaws.geoplaces#BoundingBox", + "traits": { + "smithy.api#documentation": "

The bounding box enclosing the geometric shape (area or line) that an individual result covers.

\n

The bounding box formed is defined as a set 4 coordinates: [{westward lng},\n {southern lat}, {eastward lng}, {northern lat}]\n

" + } + }, + "Categories": { + "target": "com.amazonaws.geoplaces#CategoryList", + "traits": { + "smithy.api#documentation": "

Categories of results that results must belong to.

" + } + }, + "FoodTypes": { + "target": "com.amazonaws.geoplaces#FoodTypeList", + "traits": { + "smithy.api#documentation": "

List of food types offered by this result.

" + } + }, + "BusinessChains": { + "target": "com.amazonaws.geoplaces#BusinessChainList", + "traits": { + "smithy.api#documentation": "

The Business Chains associated with the place.

" + } + }, + "Contacts": { + "target": "com.amazonaws.geoplaces#Contacts", + "traits": { + "smithy.api#documentation": "

List of potential contact methods for the result/place.

" + } + }, + "OpeningHours": { + "target": "com.amazonaws.geoplaces#OpeningHoursList", + "traits": { + "smithy.api#documentation": "

List of opening hours objects.

" + } + }, + "AccessPoints": { + "target": "com.amazonaws.geoplaces#AccessPointList", + "traits": { + "smithy.api#documentation": "

Position of the access point represent by longitude and latitude.

" + } + }, + "AccessRestrictions": { + "target": "com.amazonaws.geoplaces#AccessRestrictionList", + "traits": { + "smithy.api#documentation": "

Indicates known access restrictions on a vehicle access point. The index correlates to an access point and indicates if access through this point has some form of restriction.

" + } + }, + "TimeZone": { + "target": "com.amazonaws.geoplaces#TimeZone", + "traits": { + "smithy.api#documentation": "

The time zone in which the place is located.

" + } + }, + "PoliticalView": { + "target": "com.amazonaws.geoplaces#CountryCode3", + "traits": { + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.

" + } + }, + "Phonemes": { + "target": "com.amazonaws.geoplaces#PhonemeDetails", + "traits": { + "smithy.api#documentation": "

How the various components of the result's address are pronounced in various\n languages.

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

The search results of nearby places.

" + } + }, + "com.amazonaws.geoplaces#SearchNearbyResultItemList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#SearchNearbyResultItem" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.geoplaces#SearchText": { + "type": "operation", + "input": { + "target": "com.amazonaws.geoplaces#SearchTextRequest" + }, + "output": { + "target": "com.amazonaws.geoplaces#SearchTextResponse" + }, + "errors": [ + { + "target": "com.amazonaws.geoplaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.geoplaces#InternalServerException" + }, + { + "target": "com.amazonaws.geoplaces#ThrottlingException" + }, + { + "target": "com.amazonaws.geoplaces#ValidationException" + } + ], + "traits": { + "aws.api#dataPlane": {}, + "smithy.api#documentation": "

Use the SearchText operation to search for geocode and place information.\n You can then complete a follow-up query suggested from the Suggest API via a\n query id.

", + "smithy.api#http": { + "uri": "/search-text", + "method": "POST" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "SearchTextSuccess", + "params": { + "QueryText": "Taj Mahal", + "BiasPosition": [ + 78.0421, + 27.1753 + ] + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.geoplaces#SearchTextAdditionalFeature": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "TIME_ZONE", + "value": "TimeZone" + }, + { + "name": "PHONEMES", + "value": "Phonemes" + }, + { + "name": "ACCESS", + "value": "Access" + }, + { + "name": "CONTACT", + "value": "Contact" + } + ] + } + }, + "com.amazonaws.geoplaces#SearchTextAdditionalFeatureList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#SearchTextAdditionalFeature" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.geoplaces#SearchTextFilter": { + "type": "structure", + "members": { + "BoundingBox": { + "target": "com.amazonaws.geoplaces#BoundingBox", + "traits": { + "smithy.api#documentation": "

The bounding box enclosing the geometric shape (area or line) that an individual result covers.

\n

The bounding box formed is defined as a set 4 coordinates: [{westward lng},\n {southern lat}, {eastward lng}, {northern lat}]\n

" + } + }, + "Circle": { + "target": "com.amazonaws.geoplaces#FilterCircle" + }, + "IncludeCountries": { + "target": "com.amazonaws.geoplaces#CountryCodeList", + "traits": { + "smithy.api#documentation": "

A list of countries that all results must be in. Countries are represented by either their alpha-2 or alpha-3 character codes.

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

SearchText structure which contains a set of inclusion/exclusion properties that results must posses in order to be returned as a result.

" + } + }, + "com.amazonaws.geoplaces#SearchTextIntendedUse": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "SINGLE_USE", + "value": "SingleUse", + "documentation": "Indicates that results of the operation are for single use, e.g., displaying results on a map or presenting options to users." + }, + { + "name": "STORAGE", + "value": "Storage", + "documentation": "Indicates that results of the operation may be stored locally." + } + ] + } + }, + "com.amazonaws.geoplaces#SearchTextRequest": { + "type": "structure", + "members": { + "QueryText": { + "target": "com.amazonaws.geoplaces#SensitiveString", + "traits": { + "smithy.api#documentation": "

The free-form text query to match addresses against. This is usually a partially typed address from an end user in an address box or form.

", + "smithy.api#length": { + "min": 1, + "max": 200 + } + } + }, + "QueryId": { + "target": "com.amazonaws.geoplaces#SensitiveString", + "traits": { + "smithy.api#documentation": "

The query Id.

", + "smithy.api#length": { + "min": 1, + "max": 400 + } + } + }, + "MaxResults": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

An optional limit for the number of results returned in a single call.

", + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "BiasPosition": { + "target": "com.amazonaws.geoplaces#Position", + "traits": { + "smithy.api#documentation": "

The position, in longitude and latitude, that the results should be close to. Typically,\n place results returned are ranked higher the closer they are to this position. Stored in\n [lng, lat] and in the WSG84 format.

\n \n

The fields BiasPosition, FilterBoundingBox, and FilterCircle are mutually exclusive.

\n
" + } + }, + "Filter": { + "target": "com.amazonaws.geoplaces#SearchTextFilter", + "traits": { + "smithy.api#documentation": "

A structure which contains a set of inclusion/exclusion properties that results must posses in order to be returned as a result.

" + } + }, + "AdditionalFeatures": { + "target": "com.amazonaws.geoplaces#SearchTextAdditionalFeatureList", + "traits": { + "smithy.api#documentation": "

A list of optional additional parameters, such as time zone, that can be requested for\n each result.

" + } + }, + "Language": { + "target": "com.amazonaws.geoplaces#LanguageTag", + "traits": { + "smithy.api#documentation": "

A list of BCP 47 compliant language codes for the results to be rendered in. If there is no data for the result in the requested language, data will be returned in the default language for the entry.

" + } + }, + "PoliticalView": { + "target": "com.amazonaws.geoplaces#CountryCode", + "traits": { + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.

" + } + }, + "IntendedUse": { + "target": "com.amazonaws.geoplaces#SearchTextIntendedUse", + "traits": { + "smithy.api#documentation": "

Indicates if the results will be stored. Defaults to SingleUse, if left empty.

" + } + }, + "NextToken": { + "target": "com.amazonaws.geoplaces#Token", + "traits": { + "smithy.api#documentation": "

If nextToken is returned, \n there are more results available. The value of nextToken is a unique pagination token for each page.

" + } + }, + "Key": { + "target": "com.amazonaws.geoplaces#ApiKey", + "traits": { + "smithy.api#documentation": "

Optional: The API key to be used for authorization. Either an API key or valid SigV4\n signature must be provided when making a request.

", + "smithy.api#httpQuery": "key" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.geoplaces#SearchTextResponse": { + "type": "structure", + "members": { + "PricingBucket": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pricing bucket for which the query is charged at.

\n

For more inforamtion on pricing, please visit Amazon Location Service Pricing.

", + "smithy.api#httpHeader": "x-amz-geo-pricing-bucket", + "smithy.api#required": {} + } + }, + "ResultItems": { + "target": "com.amazonaws.geoplaces#SearchTextResultItemList", + "traits": { + "smithy.api#documentation": "

List of places or results returned for a query.

" + } + }, + "NextToken": { + "target": "com.amazonaws.geoplaces#Token", + "traits": { + "smithy.api#documentation": "

If nextToken is returned, \n there are more results available. The value of nextToken is a unique pagination token for each page.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.geoplaces#SearchTextResultItem": { + "type": "structure", + "members": { + "PlaceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The PlaceId of the place you wish to receive the information for.

", + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#required": {} + } + }, + "PlaceType": { + "target": "com.amazonaws.geoplaces#PlaceType", + "traits": { + "smithy.api#documentation": "

A PlaceType is a category that the result place must belong to.

", + "smithy.api#required": {} + } + }, + "Title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The item's title.

", + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#required": {} + } + }, + "Address": { + "target": "com.amazonaws.geoplaces#Address", + "traits": { + "smithy.api#documentation": "

The place's address.

" + } + }, + "AddressNumberCorrected": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Boolean indicating if the address provided has been corrected.

" + } + }, + "Position": { + "target": "com.amazonaws.geoplaces#Position", + "traits": { + "smithy.api#documentation": "

The position, in longitude and latitude.

" + } + }, + "Distance": { + "target": "com.amazonaws.geoplaces#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The distance in meters from the QueryPosition.

" + } + }, + "MapView": { + "target": "com.amazonaws.geoplaces#BoundingBox", + "traits": { + "smithy.api#documentation": "

The bounding box enclosing the geometric shape (area or line) that an individual result covers.

\n

The bounding box formed is defined as a set 4 coordinates: [{westward lng},\n {southern lat}, {eastward lng}, {northern lat}]\n

" + } + }, + "Categories": { + "target": "com.amazonaws.geoplaces#CategoryList", + "traits": { + "smithy.api#documentation": "

Categories of results that results must belong to.

" + } + }, + "FoodTypes": { + "target": "com.amazonaws.geoplaces#FoodTypeList", + "traits": { + "smithy.api#documentation": "

List of food types offered by this result.

" + } + }, + "BusinessChains": { + "target": "com.amazonaws.geoplaces#BusinessChainList", + "traits": { + "smithy.api#documentation": "

The Business Chains associated with the place.

" + } + }, + "Contacts": { + "target": "com.amazonaws.geoplaces#Contacts", + "traits": { + "smithy.api#documentation": "

List of potential contact methods for the result/place.

" + } + }, + "OpeningHours": { + "target": "com.amazonaws.geoplaces#OpeningHoursList", + "traits": { + "smithy.api#documentation": "

List of opening hours objects.

" + } + }, + "AccessPoints": { + "target": "com.amazonaws.geoplaces#AccessPointList", + "traits": { + "smithy.api#documentation": "

Position of the access point represent by longitude and latitude.

" + } + }, + "AccessRestrictions": { + "target": "com.amazonaws.geoplaces#AccessRestrictionList", + "traits": { + "smithy.api#documentation": "

Indicates known access restrictions on a vehicle access point. The index correlates to an access point and indicates if access through this point has some form of restriction.

" + } + }, + "TimeZone": { + "target": "com.amazonaws.geoplaces#TimeZone", + "traits": { + "smithy.api#documentation": "

The time zone in which the place is located.

" + } + }, + "PoliticalView": { + "target": "com.amazonaws.geoplaces#CountryCode3", + "traits": { + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.

" + } + }, + "Phonemes": { + "target": "com.amazonaws.geoplaces#PhonemeDetails", + "traits": { + "smithy.api#documentation": "

How the various components of the result's address are pronounced in various\n languages.

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

The text search result.

" + } + }, + "com.amazonaws.geoplaces#SearchTextResultItemList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#SearchTextResultItem" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.geoplaces#SensitiveString": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.geoplaces#StreetComponents": { + "type": "structure", + "members": { + "BaseName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Base name part of the street name.

\n

Example: Younge from the “Younge street\".

", + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "Type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Street type part of the street name.

\n

Example: “avenue\".

", + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "TypePlacement": { + "target": "com.amazonaws.geoplaces#TypePlacement", + "traits": { + "smithy.api#documentation": "

Defines if the street type is before or after the base name.

" + } + }, + "TypeSeparator": { + "target": "com.amazonaws.geoplaces#TypeSeparator", + "traits": { + "smithy.api#documentation": "

What character(s) separates the string from its type.

" + } + }, + "Prefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

A prefix is a directional identifier that precedes, but is not included in, the base\n name of a road.

\n

Example: E for East.

", + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "Suffix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

A suffix is a directional identifier that follows, but is not included in, the base name\n of a road.

\n

Example W for West.

", + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "Direction": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Indicates the official directional identifiers assigned to highways.

", + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "Language": { + "target": "com.amazonaws.geoplaces#LanguageTag", + "traits": { + "smithy.api#documentation": "

A BCP 47 compliant language codes for the results to be rendered in. If there is no data for the result in the requested language, data will be returned in the default language for the entry.

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

Components of a street.

" + } + }, + "com.amazonaws.geoplaces#StreetComponentsList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#StreetComponents" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.geoplaces#SubRegion": { + "type": "structure", + "members": { + "Code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Abbreviated code for the county or sub-region.

", + "smithy.api#length": { + "min": 0, + "max": 3 + } + } + }, + "Name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Name for the county or sub-region.

", + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

The sub-region.

" + } + }, + "com.amazonaws.geoplaces#SubRegionHighlights": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.geoplaces#HighlightList", + "traits": { + "smithy.api#documentation": "

Indicates the starting and ending index of the sub-region in the text query that match\n the found title.

" + } + }, + "Name": { + "target": "com.amazonaws.geoplaces#HighlightList", + "traits": { + "smithy.api#documentation": "

Indicates the starting and ending index of the name in the text query that match the found title.

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

Indicates the starting and ending index of the sub-region in the text query that match\n the found title.

" + } + }, + "com.amazonaws.geoplaces#Suggest": { + "type": "operation", + "input": { + "target": "com.amazonaws.geoplaces#SuggestRequest" + }, + "output": { + "target": "com.amazonaws.geoplaces#SuggestResponse" + }, + "errors": [ + { + "target": "com.amazonaws.geoplaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.geoplaces#InternalServerException" + }, + { + "target": "com.amazonaws.geoplaces#ThrottlingException" + }, + { + "target": "com.amazonaws.geoplaces#ValidationException" + } + ], + "traits": { + "aws.api#dataPlane": {}, + "smithy.api#documentation": "

The Suggest operation finds addresses or place candidates based on\n incomplete or misspelled queries. You then select the best query to submit based on the\n returned results.

", + "smithy.api#http": { + "uri": "/suggest", + "method": "POST" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "SuggestSuccess", + "params": { + "QueryText": "Taj Mahal", + "BiasPosition": [ + 78.0421, + 27.1753 + ] + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.geoplaces#SuggestAdditionalFeature": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "CORE", + "value": "Core" + }, + { + "name": "TIME_ZONE", + "value": "TimeZone" + }, + { + "name": "PHONEMES", + "value": "Phonemes" + }, + { + "name": "ACCESS", + "value": "Access" + } + ] + } + }, + "com.amazonaws.geoplaces#SuggestAdditionalFeatureList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#SuggestAdditionalFeature" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.geoplaces#SuggestAddressHighlights": { + "type": "structure", + "members": { + "Label": { + "target": "com.amazonaws.geoplaces#HighlightList", + "traits": { + "smithy.api#documentation": "

Indicates the starting and ending indexes of the places in the result which were identified to match the textQuery. This result is useful for providing emphasis to results where the user query directly matched to make selecting the correct result from a list easier for an end user.

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

Describes how the parts of the textQuery matched the input query by returning the sections of the response which matched to textQuery terms.

" + } + }, + "com.amazonaws.geoplaces#SuggestFilter": { + "type": "structure", + "members": { + "BoundingBox": { + "target": "com.amazonaws.geoplaces#BoundingBox", + "traits": { + "smithy.api#documentation": "

The bounding box enclosing the geometric shape (area or line) that an individual result covers.

\n

The bounding box formed is defined as a set 4 coordinates: [{westward lng},\n {southern lat}, {eastward lng}, {northern lat}]\n

" + } + }, + "Circle": { + "target": "com.amazonaws.geoplaces#FilterCircle" + }, + "IncludeCountries": { + "target": "com.amazonaws.geoplaces#CountryCodeList", + "traits": { + "smithy.api#documentation": "

A list of countries that all results must be in. Countries are represented by either their alpha-2 or alpha-3 character codes.

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

SuggestFilter structure which contains a set of inclusion/exclusion properties that results must posses in order to be returned as a result.

" + } + }, + "com.amazonaws.geoplaces#SuggestHighlights": { + "type": "structure", + "members": { + "Title": { + "target": "com.amazonaws.geoplaces#HighlightList", + "traits": { + "smithy.api#documentation": "

Indicates the starting and ending index of the title in the text query that match the found title.

" + } + }, + "Address": { + "target": "com.amazonaws.geoplaces#SuggestAddressHighlights", + "traits": { + "smithy.api#documentation": "

The place's address.

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

Describes how the parts of the textQuery matched the input query by returning the sections of the response which matched to textQuery terms.

" + } + }, + "com.amazonaws.geoplaces#SuggestIntendedUse": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "SINGLE_USE", + "value": "SingleUse", + "documentation": "Indicates that results of the operation are for single use, e.g., displaying results on a map or presenting options to users." + } + ] + } + }, + "com.amazonaws.geoplaces#SuggestPlaceResult": { + "type": "structure", + "members": { + "PlaceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The PlaceId of the place you wish to receive the information for.

", + "smithy.api#length": { + "min": 1, + "max": 200 + } + } + }, + "PlaceType": { + "target": "com.amazonaws.geoplaces#PlaceType", + "traits": { + "smithy.api#documentation": "

A PlaceType is a category that the result place must belong to.

" + } + }, + "Address": { + "target": "com.amazonaws.geoplaces#Address", + "traits": { + "smithy.api#documentation": "

The place's address.

" + } + }, + "Position": { + "target": "com.amazonaws.geoplaces#Position", + "traits": { + "smithy.api#documentation": "

The position, in longitude and latitude.

" + } + }, + "Distance": { + "target": "com.amazonaws.geoplaces#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The distance in meters from the QueryPosition.

" + } + }, + "MapView": { + "target": "com.amazonaws.geoplaces#BoundingBox", + "traits": { + "smithy.api#documentation": "

The bounding box enclosing the geometric shape (area or line) that an individual result covers.

\n

The bounding box formed is defined as a set 4 coordinates: [{westward lng},\n {southern lat}, {eastward lng}, {northern lat}]\n

" + } + }, + "Categories": { + "target": "com.amazonaws.geoplaces#CategoryList", + "traits": { + "smithy.api#documentation": "

Categories of results that results must belong to.

" + } + }, + "FoodTypes": { + "target": "com.amazonaws.geoplaces#FoodTypeList", + "traits": { + "smithy.api#documentation": "

List of food types offered by this result.

" + } + }, + "BusinessChains": { + "target": "com.amazonaws.geoplaces#BusinessChainList", + "traits": { + "smithy.api#documentation": "

The Business Chains associated with the place.

" + } + }, + "AccessPoints": { + "target": "com.amazonaws.geoplaces#AccessPointList", + "traits": { + "smithy.api#documentation": "

Position of the access point represent by longitude and latitude.

" + } + }, + "AccessRestrictions": { + "target": "com.amazonaws.geoplaces#AccessRestrictionList", + "traits": { + "smithy.api#documentation": "

Indicates known access restrictions on a vehicle access point. The index correlates to an access point and indicates if access through this point has some form of restriction.

" + } + }, + "TimeZone": { + "target": "com.amazonaws.geoplaces#TimeZone", + "traits": { + "smithy.api#documentation": "

The time zone in which the place is located.

" + } + }, + "PoliticalView": { + "target": "com.amazonaws.geoplaces#CountryCode3", + "traits": { + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.

" + } + }, + "Phonemes": { + "target": "com.amazonaws.geoplaces#PhonemeDetails", + "traits": { + "smithy.api#documentation": "

How the various components of the result's address are pronounced in various\n languages.

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

The suggested place results.

" + } + }, + "com.amazonaws.geoplaces#SuggestQueryResult": { + "type": "structure", + "members": { + "QueryId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

QueryId can be used to complete a follow up query through the SearchText API. The QueryId retains context from the original Suggest request such as filters, political view and language. See the SearchText API documentation for more details SearchText API docs.

", + "smithy.api#length": { + "min": 0, + "max": 400 + } + } + }, + "QueryType": { + "target": "com.amazonaws.geoplaces#QueryType", + "traits": { + "smithy.api#documentation": "

The query type. Category qeuries will search for places which have an entry matching the given category, for example \"doctor office\". BusinessChain queries will search for instances of a given business.

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

The suggested query results.

" + } + }, + "com.amazonaws.geoplaces#SuggestRequest": { + "type": "structure", + "members": { + "QueryText": { + "target": "com.amazonaws.geoplaces#SensitiveString", + "traits": { + "smithy.api#documentation": "

The free-form text query to match addresses against. This is usually a partially typed address from an end user in an address box or form.

", + "smithy.api#length": { + "min": 1, + "max": 200 + }, + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

An optional limit for the number of results returned in a single call.

", + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "MaxQueryRefinements": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Maximum number of query terms to be returned for use with a search text query.

", + "smithy.api#range": { + "min": 1, + "max": 10 + } + } + }, + "BiasPosition": { + "target": "com.amazonaws.geoplaces#Position", + "traits": { + "smithy.api#documentation": "

The position, in longitude and latitude, that the results should be close to. Typically,\n place results returned are ranked higher the closer they are to this position. Stored in\n [lng, lat] and in the WSG84 format.

\n \n

The fields BiasPosition, FilterBoundingBox, and FilterCircle are mutually exclusive.

\n
" + } + }, + "Filter": { + "target": "com.amazonaws.geoplaces#SuggestFilter", + "traits": { + "smithy.api#documentation": "

A structure which contains a set of inclusion/exclusion properties that results must posses in order to be returned as a result.

" + } + }, + "AdditionalFeatures": { + "target": "com.amazonaws.geoplaces#SuggestAdditionalFeatureList", + "traits": { + "smithy.api#documentation": "

A list of optional additional parameters, such as time zone, that can be requested for\n each result.

" + } + }, + "Language": { + "target": "com.amazonaws.geoplaces#LanguageTag", + "traits": { + "smithy.api#documentation": "

A list of BCP 47 compliant language codes for the results to be rendered in. If there is no data for the result in the requested language, data will be returned in the default language for the entry.

" + } + }, + "PoliticalView": { + "target": "com.amazonaws.geoplaces#CountryCode", + "traits": { + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.

" + } + }, + "IntendedUse": { + "target": "com.amazonaws.geoplaces#SuggestIntendedUse", + "traits": { + "smithy.api#documentation": "

Indicates if the results will be stored. Defaults to SingleUse, if left empty.

" + } + }, + "Key": { + "target": "com.amazonaws.geoplaces#ApiKey", + "traits": { + "smithy.api#documentation": "

Optional: The API key to be used for authorization. Either an API key or valid SigV4\n signature must be provided when making a request.

", + "smithy.api#httpQuery": "key" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.geoplaces#SuggestResponse": { + "type": "structure", + "members": { + "PricingBucket": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pricing bucket for which the query is charged at.

\n

For more inforamtion on pricing, please visit Amazon Location Service Pricing.

", + "smithy.api#httpHeader": "x-amz-geo-pricing-bucket", + "smithy.api#required": {} + } + }, + "ResultItems": { + "target": "com.amazonaws.geoplaces#SuggestResultItemList", + "traits": { + "smithy.api#documentation": "

List of places or results returned for a query.

" + } + }, + "QueryRefinements": { + "target": "com.amazonaws.geoplaces#QueryRefinementList", + "traits": { + "smithy.api#documentation": "

Maximum number of query terms to be returned for use with a search text query.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.geoplaces#SuggestResultItem": { + "type": "structure", + "members": { + "Title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The display title that should be used when presenting this option to the end user.

", + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#required": {} + } + }, + "SuggestResultItemType": { + "target": "com.amazonaws.geoplaces#SuggestResultItemType", + "traits": { + "smithy.api#documentation": "

The result type. Place results represent the final result for a point of interest, Query results represent a follow up query which can be completed through the SearchText operation.

", + "smithy.api#required": {} + } + }, + "Place": { + "target": "com.amazonaws.geoplaces#SuggestPlaceResult", + "traits": { + "smithy.api#documentation": "

The suggested place by its unique ID.

" + } + }, + "Query": { + "target": "com.amazonaws.geoplaces#SuggestQueryResult" + }, + "Highlights": { + "target": "com.amazonaws.geoplaces#SuggestHighlights", + "traits": { + "smithy.api#documentation": "

Describes how the parts of the response element matched the input query by returning the sections of the response which matched to input query terms.

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

The resulting item from the suggested query.

" + } + }, + "com.amazonaws.geoplaces#SuggestResultItemList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#SuggestResultItem" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.geoplaces#SuggestResultItemType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "PLACE", + "value": "Place" + }, + { + "name": "QUERY", + "value": "Query" + } + ] + } + }, + "com.amazonaws.geoplaces#ThrottlingException": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The request was denied due to request throttling.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.geoplaces#TimeZone": { + "type": "structure", + "members": { + "Name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The time zone name.

", + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#required": {} + } + }, + "Offset": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Time zone offset of the timezone from UTC.

", + "smithy.api#length": { + "min": 0, + "max": 6 + } + } + }, + "OffsetSeconds": { + "target": "com.amazonaws.geoplaces#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The offset of the time zone from UTC, in seconds.

", + "smithy.api#range": { + "min": 0 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

The time zone in which the place is located.

" + } + }, + "com.amazonaws.geoplaces#Token": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2000 + } + } + }, + "com.amazonaws.geoplaces#TypePlacement": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "BEFORE_BASE_NAME", + "value": "BeforeBaseName" + }, + { + "name": "AFTER_BASE_NAME", + "value": "AfterBaseName" + } + ] + } + }, + "com.amazonaws.geoplaces#TypeSeparator": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1 + }, + "smithy.api#pattern": "^$|^ $" + } + }, + "com.amazonaws.geoplaces#UspsZip": { + "type": "structure", + "members": { + "ZipClassificationCode": { + "target": "com.amazonaws.geoplaces#ZipClassificationCode", + "traits": { + "smithy.api#documentation": "

The ZIP Classification Code, or in other words what type of postal code is it.

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

The USPS zip code.

" + } + }, + "com.amazonaws.geoplaces#UspsZipPlus4": { + "type": "structure", + "members": { + "RecordTypeCode": { + "target": "com.amazonaws.geoplaces#RecordTypeCode", + "traits": { + "smithy.api#documentation": "

The USPS ZIP+4 Record Type Code.

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

The USPS zip+4 code.

" + } + }, + "com.amazonaws.geoplaces#ValidationException": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + }, + "Reason": { + "target": "com.amazonaws.geoplaces#ValidationExceptionReason", + "traits": { + "smithy.api#documentation": "

Test stub for reason

", + "smithy.api#jsonName": "reason", + "smithy.api#required": {} + } + }, + "FieldList": { + "target": "com.amazonaws.geoplaces#ValidationExceptionFieldList", + "traits": { + "smithy.api#documentation": "

Test stub for FieldList.

", + "smithy.api#jsonName": "fieldList", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The input fails to satisfy the constraints specified by an AWS service.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.geoplaces#ValidationExceptionField": { + "type": "structure", + "members": { + "Name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the resource.

", + "smithy.api#jsonName": "name", + "smithy.api#required": {} + } + }, + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The error message.

", + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The input fails to satisfy the constraints specified by the Amazon Location service.

" + } + }, + "com.amazonaws.geoplaces#ValidationExceptionFieldList": { + "type": "list", + "member": { + "target": "com.amazonaws.geoplaces#ValidationExceptionField" + } + }, + "com.amazonaws.geoplaces#ValidationExceptionReason": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "UNKNOWN_OPERATION", + "value": "UnknownOperation", + "documentation": "No such operation is supported." + }, + { + "name": "MISSING", + "value": "Missing", + "documentation": "The required input is missing." + }, + { + "name": "CANNOT_PARSE", + "value": "CannotParse", + "documentation": " The input cannot be parsed. For example a required JSON document, ARN identifier,\n date value, or numeric field cannot be parsed.\n" + }, + { + "name": "FIELD_VALIDATION_FAILED", + "value": "FieldValidationFailed", + "documentation": " The input is present and parsable, but it is otherwise invalid. For example, a\n required numeric argument is outside the allowed range.\n" + }, + { + "name": "OTHER", + "value": "Other", + "documentation": "The input is invalid but no more specific reason is applicable." + }, + { + "name": "UNKNOWN_FIELD", + "value": "UnknownField", + "documentation": "No such field is supported." + } + ] + } + }, + "com.amazonaws.geoplaces#ZipClassificationCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "MILITARY", + "value": "Military" + }, + { + "name": "POST_OFFICE_BOXES", + "value": "PostOfficeBoxes" + }, + { + "name": "UNIQUE", + "value": "Unique" + } + ] + } + } + } +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/geo-routes.json b/codegen/sdk-codegen/aws-models/geo-routes.json new file mode 100644 index 00000000000..aa9c2cf304e --- /dev/null +++ b/codegen/sdk-codegen/aws-models/geo-routes.json @@ -0,0 +1,11353 @@ +{ + "smithy": "2.0", + "shapes": { + "com.amazonaws.georoutes#AccessDeniedException": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

You don't have sufficient access to perform this action.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.georoutes#ApiKey": { + "type": "string", + "traits": { + "smithy.api#externalDocumentation": { + "Implementation Guide": "https://github.com/paseto-standard/paseto-spec/blob/master/docs/02-Implementation-Guide/03-Algorithm-Lucidity.md" + }, + "smithy.api#length": { + "max": 1000 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.georoutes#BeforeWaypointsList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#WaypointIndex" + } + }, + "com.amazonaws.georoutes#BoundingBox": { + "type": "list", + "member": { + "target": "smithy.api#Double" + }, + "traits": { + "smithy.api#externalDocumentation": { + "Documentation": "https://tools.ietf.org/html/rfc7946#section-5" + }, + "smithy.api#length": { + "min": 4, + "max": 4 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.georoutes#CalculateIsolines": { + "type": "operation", + "input": { + "target": "com.amazonaws.georoutes#CalculateIsolinesRequest" + }, + "output": { + "target": "com.amazonaws.georoutes#CalculateIsolinesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.georoutes#AccessDeniedException" + }, + { + "target": "com.amazonaws.georoutes#InternalServerException" + }, + { + "target": "com.amazonaws.georoutes#ThrottlingException" + }, + { + "target": "com.amazonaws.georoutes#ValidationException" + } + ], + "traits": { + "aws.api#dataPlane": {}, + "smithy.api#documentation": "

Use the CalculateIsolines action to find service areas that can be reached\n in a given threshold of time, distance.

", + "smithy.api#http": { + "uri": "/isolines", + "method": "POST" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "CalculateIsolinesSuccess", + "params": { + "Thresholds": { + "Time": [ + 60 + ] + }, + "Origin": [ + -123.116796, + 49.281476 + ] + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.georoutes#CalculateIsolinesRequest": { + "type": "structure", + "members": { + "Allow": { + "target": "com.amazonaws.georoutes#IsolineAllowOptions", + "traits": { + "smithy.api#documentation": "

Features that are allowed while calculating. a route

" + } + }, + "ArrivalTime": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

Time of arrival at the destination.

\n

Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm\n

\n

Examples:

\n

\n 2020-04-22T17:57:24Z\n

\n

\n 2020-04-22T17:57:24+02:00\n

" + } + }, + "Avoid": { + "target": "com.amazonaws.georoutes#IsolineAvoidanceOptions", + "traits": { + "smithy.api#documentation": "

Features that are avoided while calculating a route. Avoidance is on a best-case basis. If an\n avoidance can't be satisfied for a particular case, it violates the avoidance and the\n returned response produces a notice for the violation.

" + } + }, + "DepartNow": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Uses the current time as the time of departure.

" + } + }, + "DepartureTime": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

Time of departure from thr origin.

\n

Time format:YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm\n

\n

Examples:

\n

\n 2020-04-22T17:57:24Z\n

\n

\n 2020-04-22T17:57:24+02:00\n

" + } + }, + "Destination": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

The final position for the route. In the World Geodetic System (WGS 84) format: [longitude, latitude].

" + } + }, + "DestinationOptions": { + "target": "com.amazonaws.georoutes#IsolineDestinationOptions", + "traits": { + "smithy.api#documentation": "

Destination related options.

" + } + }, + "IsolineGeometryFormat": { + "target": "com.amazonaws.georoutes#GeometryFormat", + "traits": { + "smithy.api#documentation": "

The format of the returned IsolineGeometry.

\n

Default Value:FlexiblePolyline\n

" + } + }, + "IsolineGranularity": { + "target": "com.amazonaws.georoutes#IsolineGranularityOptions", + "traits": { + "smithy.api#documentation": "

Defines the granularity of the returned Isoline

" + } + }, + "Key": { + "target": "com.amazonaws.georoutes#ApiKey", + "traits": { + "smithy.api#documentation": "

Optional: The API key to be used for authorization. Either an API key or valid SigV4\n signature must be provided when making a request.

", + "smithy.api#httpQuery": "key" + } + }, + "OptimizeIsolineFor": { + "target": "com.amazonaws.georoutes#IsolineOptimizationObjective", + "traits": { + "smithy.api#documentation": "

Specifies the optimization criteria for when calculating an isoline. AccurateCalculation generates an isoline of higher granularity that is more precise. \nFastCalculation generates an isoline faster by reducing the granularity, and in turn the quality of the isoline. BalancedCalculation generates an isoline by balancing between quality and performance. \n

\n

Default Value: BalancedCalculation\n

" + } + }, + "OptimizeRoutingFor": { + "target": "com.amazonaws.georoutes#RoutingObjective", + "traits": { + "smithy.api#documentation": "

Specifies the optimization criteria for calculating a route.

\n

Default Value: FastestRoute\n

" + } + }, + "Origin": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

The start position for the route.

" + } + }, + "OriginOptions": { + "target": "com.amazonaws.georoutes#IsolineOriginOptions", + "traits": { + "smithy.api#documentation": "

Origin related options.

" + } + }, + "Thresholds": { + "target": "com.amazonaws.georoutes#IsolineThresholds", + "traits": { + "smithy.api#documentation": "

Threshold to be used for the isoline calculation. Up to \n 3 thresholds per provided type can be requested.

", + "smithy.api#required": {} + } + }, + "Traffic": { + "target": "com.amazonaws.georoutes#IsolineTrafficOptions", + "traits": { + "smithy.api#documentation": "

Traffic related options.

" + } + }, + "TravelMode": { + "target": "com.amazonaws.georoutes#IsolineTravelMode", + "traits": { + "smithy.api#documentation": "

Specifies the mode of transport when calculating a route. \n Used in estimating the speed of travel and road compatibility.

\n \n

The mode Scooter also applies to motorcycles, set to Scooter when wanted to calculate options for motorcycles.

\n
\n

Default Value: Car\n

" + } + }, + "TravelModeOptions": { + "target": "com.amazonaws.georoutes#IsolineTravelModeOptions", + "traits": { + "smithy.api#documentation": "

Travel mode related options for the provided travel mode.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.georoutes#CalculateIsolinesResponse": { + "type": "structure", + "members": { + "ArrivalTime": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

Time of arrival at the destination. This parameter is returned only if the Destination parameters was provided in the request.

\n

Time format:YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm\n

\n

Examples:

\n

\n 2020-04-22T17:57:24Z\n

\n

\n 2020-04-22T17:57:24+02:00\n

" + } + }, + "DepartureTime": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

Time of departure from thr origin.

\n

Time format:YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm\n

\n

Examples:

\n

\n 2020-04-22T17:57:24Z\n

\n

\n 2020-04-22T17:57:24+02:00\n

" + } + }, + "IsolineGeometryFormat": { + "target": "com.amazonaws.georoutes#GeometryFormat", + "traits": { + "smithy.api#documentation": "

The format of the returned IsolineGeometry.

\n

Default Value:FlexiblePolyline\n

", + "smithy.api#required": {} + } + }, + "Isolines": { + "target": "com.amazonaws.georoutes#IsolineList", + "traits": { + "smithy.api#documentation": "

Calculated isolines and associated properties.

", + "smithy.api#required": {} + } + }, + "PricingBucket": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pricing bucket for which the query is charged at.

", + "smithy.api#httpHeader": "x-amz-geo-pricing-bucket", + "smithy.api#required": {} + } + }, + "SnappedDestination": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

Snapped destination that was used for the Isoline calculation.

" + } + }, + "SnappedOrigin": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

Snapped origin that was used for the Isoline calculation.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.georoutes#CalculateRouteMatrix": { + "type": "operation", + "input": { + "target": "com.amazonaws.georoutes#CalculateRouteMatrixRequest" + }, + "output": { + "target": "com.amazonaws.georoutes#CalculateRouteMatrixResponse" + }, + "errors": [ + { + "target": "com.amazonaws.georoutes#AccessDeniedException" + }, + { + "target": "com.amazonaws.georoutes#InternalServerException" + }, + { + "target": "com.amazonaws.georoutes#ThrottlingException" + }, + { + "target": "com.amazonaws.georoutes#ValidationException" + } + ], + "traits": { + "aws.api#dataPlane": {}, + "smithy.api#documentation": "

Calculates route matrix containing the results for all pairs of \n Origins to Destinations. Each row corresponds to one entry in Origins. \n Each entry in the row corresponds to the route from that entry in Origins to an entry in Destinations positions.

", + "smithy.api#http": { + "uri": "/route-matrix", + "method": "POST" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "CalculateRouteMatrixSuccess", + "params": { + "Origins": [ + { + "Position": [ + -123.11679, + 49.28147 + ] + } + ], + "Destinations": [ + { + "Position": [ + -123.11231, + 49.28897192166 + ] + } + ], + "RoutingBoundary": { + "Unbounded": true + } + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.georoutes#CalculateRouteMatrixRequest": { + "type": "structure", + "members": { + "Allow": { + "target": "com.amazonaws.georoutes#RouteMatrixAllowOptions", + "traits": { + "smithy.api#documentation": "

Features that are allowed while calculating. a route

" + } + }, + "Avoid": { + "target": "com.amazonaws.georoutes#RouteMatrixAvoidanceOptions", + "traits": { + "smithy.api#documentation": "

Features that are avoided while calculating a route. Avoidance is on a best-case basis. If an\n avoidance can't be satisfied for a particular case, it violates the avoidance and the\n returned response produces a notice for the violation.

" + } + }, + "DepartNow": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Uses the current time as the time of departure.

" + } + }, + "DepartureTime": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

Time of departure from thr origin.

\n

Time format:YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm\n

\n

Examples:

\n

\n 2020-04-22T17:57:24Z\n

\n

\n 2020-04-22T17:57:24+02:00\n

" + } + }, + "Destinations": { + "target": "com.amazonaws.georoutes#RouteMatrixDestinationList", + "traits": { + "smithy.api#documentation": "

List of destinations for the route.

", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "Exclude": { + "target": "com.amazonaws.georoutes#RouteMatrixExclusionOptions", + "traits": { + "smithy.api#documentation": "

Features to be strictly excluded while calculating the route.

" + } + }, + "Key": { + "target": "com.amazonaws.georoutes#ApiKey", + "traits": { + "smithy.api#documentation": "

Optional: The API key to be used for authorization. Either an API key or valid SigV4\n signature must be provided when making a request.

", + "smithy.api#httpQuery": "key" + } + }, + "OptimizeRoutingFor": { + "target": "com.amazonaws.georoutes#RoutingObjective", + "traits": { + "smithy.api#documentation": "

Specifies the optimization criteria for calculating a route.

\n

Default Value: FastestRoute\n

" + } + }, + "Origins": { + "target": "com.amazonaws.georoutes#RouteMatrixOriginList", + "traits": { + "smithy.api#documentation": "

The position in longitude and latitude for the origin.

", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "RoutingBoundary": { + "target": "com.amazonaws.georoutes#RouteMatrixBoundary", + "traits": { + "smithy.api#documentation": "

Boundary within which the matrix is to be calculated. \n All data, origins and destinations outside the boundary are considered invalid.

\n \n

When request routing boundary was set as AutoCircle, the response routing boundary will return Circle derived from the AutoCircle settings.

\n
", + "smithy.api#required": {} + } + }, + "Traffic": { + "target": "com.amazonaws.georoutes#RouteMatrixTrafficOptions", + "traits": { + "smithy.api#documentation": "

Traffic related options.

" + } + }, + "TravelMode": { + "target": "com.amazonaws.georoutes#RouteMatrixTravelMode", + "traits": { + "smithy.api#documentation": "

Specifies the mode of transport when calculating a route. \n Used in estimating the speed of travel and road compatibility.

\n

Default Value: Car\n

" + } + }, + "TravelModeOptions": { + "target": "com.amazonaws.georoutes#RouteMatrixTravelModeOptions", + "traits": { + "smithy.api#documentation": "

Travel mode related options for the provided travel mode.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.georoutes#CalculateRouteMatrixResponse": { + "type": "structure", + "members": { + "ErrorCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The count of error results in the route matrix. If this number is 0, all routes were calculated successfully.

", + "smithy.api#range": { + "min": 0 + }, + "smithy.api#required": {} + } + }, + "PricingBucket": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pricing bucket for which the query is charged at.

", + "smithy.api#httpHeader": "x-amz-geo-pricing-bucket", + "smithy.api#required": {} + } + }, + "RouteMatrix": { + "target": "com.amazonaws.georoutes#RouteMatrix", + "traits": { + "smithy.api#documentation": "

The calculated route matrix containing the results for all pairs of Origins to Destination positions. Each row corresponds to one entry in Origins. Each entry in the row corresponds to the route from that entry in Origins to an entry in Destination positions.

", + "smithy.api#required": {} + } + }, + "RoutingBoundary": { + "target": "com.amazonaws.georoutes#RouteMatrixBoundary", + "traits": { + "smithy.api#documentation": "

Boundary within which the matrix is to be calculated. All data, origins and destinations outside the boundary are considered invalid.

\n \n

When request routing boundary was set as AutoCircle, the response routing boundary will return Circle derived from the AutoCircle settings.

\n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.georoutes#CalculateRoutes": { + "type": "operation", + "input": { + "target": "com.amazonaws.georoutes#CalculateRoutesRequest" + }, + "output": { + "target": "com.amazonaws.georoutes#CalculateRoutesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.georoutes#AccessDeniedException" + }, + { + "target": "com.amazonaws.georoutes#InternalServerException" + }, + { + "target": "com.amazonaws.georoutes#ThrottlingException" + }, + { + "target": "com.amazonaws.georoutes#ValidationException" + } + ], + "traits": { + "aws.api#dataPlane": {}, + "smithy.api#documentation": "

Calculates a route given the following required parameters: \n Origin and Destination.

", + "smithy.api#http": { + "uri": "/routes", + "method": "POST" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "CalculateRoutesSuccess", + "params": { + "Origin": [ + -123.253374, + 49.351673 + ], + "Destination": [ + -123.930756, + 49.1314 + ] + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.georoutes#CalculateRoutesRequest": { + "type": "structure", + "members": { + "Allow": { + "target": "com.amazonaws.georoutes#RouteAllowOptions", + "traits": { + "smithy.api#documentation": "

Features that are allowed while calculating. a route

" + } + }, + "ArrivalTime": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

Time of arrival at the destination.

\n

Time format:YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm\n

\n

Examples:

\n

\n 2020-04-22T17:57:24Z\n

\n

\n 2020-04-22T17:57:24+02:00\n

" + } + }, + "Avoid": { + "target": "com.amazonaws.georoutes#RouteAvoidanceOptions", + "traits": { + "smithy.api#documentation": "

Features that are avoided while calculating a route. Avoidance is on a best-case basis. If an\n avoidance can't be satisfied for a particular case, it violates the avoidance and the\n returned response produces a notice for the violation.

" + } + }, + "DepartNow": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Uses the current time as the time of departure.

" + } + }, + "DepartureTime": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

Time of departure from thr origin.

\n

Time format:YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm\n

\n

Examples:

\n

\n 2020-04-22T17:57:24Z\n

\n

\n 2020-04-22T17:57:24+02:00\n

" + } + }, + "Destination": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

The final position for the route. In the World Geodetic System (WGS 84) format: [longitude, latitude].

", + "smithy.api#required": {} + } + }, + "DestinationOptions": { + "target": "com.amazonaws.georoutes#RouteDestinationOptions", + "traits": { + "smithy.api#documentation": "

Destination related options.

" + } + }, + "Driver": { + "target": "com.amazonaws.georoutes#RouteDriverOptions", + "traits": { + "smithy.api#documentation": "

Driver related options.

" + } + }, + "Exclude": { + "target": "com.amazonaws.georoutes#RouteExclusionOptions", + "traits": { + "smithy.api#documentation": "

Features to be strictly excluded while calculating the route.

" + } + }, + "InstructionsMeasurementSystem": { + "target": "com.amazonaws.georoutes#MeasurementSystem", + "traits": { + "smithy.api#documentation": "

Measurement system to be used for instructions within steps in the response.

" + } + }, + "Key": { + "target": "com.amazonaws.georoutes#ApiKey", + "traits": { + "smithy.api#documentation": "

Optional: The API key to be used for authorization. Either an API key or valid SigV4\n signature must be provided when making a request.

", + "smithy.api#httpQuery": "key" + } + }, + "Languages": { + "target": "com.amazonaws.georoutes#LanguageTagList", + "traits": { + "smithy.api#documentation": "

List of languages for instructions within steps in the response.

\n \n

Instructions in the requested language are returned only if they are available.

\n
", + "smithy.api#length": { + "max": 10 + } + } + }, + "LegAdditionalFeatures": { + "target": "com.amazonaws.georoutes#RouteLegAdditionalFeatureList", + "traits": { + "smithy.api#documentation": "

A list of optional additional parameters such as timezone that can be requested for each result.

\n
    \n
  • \n

    \n Elevation: Retrieves the elevation information for each location.

    \n
  • \n
  • \n

    \n Incidents: Provides information on traffic incidents along the route.

    \n
  • \n
  • \n

    \n PassThroughWaypoints: Indicates waypoints that are passed through without stopping.

    \n
  • \n
  • \n

    \n Summary: Returns a summary of the route, including distance and duration.

    \n
  • \n
  • \n

    \n Tolls: Supplies toll cost information along the route.

    \n
  • \n
  • \n

    \n TravelStepInstructions: Provides step-by-step instructions for travel along the route.

    \n
  • \n
  • \n

    \n TruckRoadTypes: Returns information about road types suitable for trucks.

    \n
  • \n
  • \n

    \n TypicalDuration: Gives typical travel duration based on historical data.

    \n
  • \n
  • \n

    \n Zones: Specifies the time zone information for each waypoint.

    \n
  • \n
" + } + }, + "LegGeometryFormat": { + "target": "com.amazonaws.georoutes#GeometryFormat", + "traits": { + "smithy.api#documentation": "

Specifies the format of the geometry returned for each leg of the route. You can \n choose between two different geometry encoding formats.

\n

\n FlexiblePolyline: A compact and precise encoding format for the \n leg geometry. For more information on the format, see the GitHub repository for \n FlexiblePolyline\n .

\n

\n Simple: A less compact encoding,\n which is easier to decode but may be less precise and result in larger payloads.

" + } + }, + "MaxAlternatives": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Maximum number of alternative routes to be provided in the response, if available.

", + "smithy.api#range": { + "min": 0, + "max": 5 + } + } + }, + "OptimizeRoutingFor": { + "target": "com.amazonaws.georoutes#RoutingObjective", + "traits": { + "smithy.api#documentation": "

Specifies the optimization criteria for calculating a route.

\n

Default Value: FastestRoute\n

" + } + }, + "Origin": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

The start position for the route.

", + "smithy.api#required": {} + } + }, + "OriginOptions": { + "target": "com.amazonaws.georoutes#RouteOriginOptions", + "traits": { + "smithy.api#documentation": "

Origin related options.

" + } + }, + "SpanAdditionalFeatures": { + "target": "com.amazonaws.georoutes#RouteSpanAdditionalFeatureList", + "traits": { + "smithy.api#documentation": "

A list of optional features such as SpeedLimit that can be requested for a Span. A span is a section of a Leg for which the requested features have the same values.

" + } + }, + "Tolls": { + "target": "com.amazonaws.georoutes#RouteTollOptions", + "traits": { + "smithy.api#documentation": "

Toll related options.

" + } + }, + "Traffic": { + "target": "com.amazonaws.georoutes#RouteTrafficOptions", + "traits": { + "smithy.api#documentation": "

Traffic related options.

" + } + }, + "TravelMode": { + "target": "com.amazonaws.georoutes#RouteTravelMode", + "traits": { + "smithy.api#documentation": "

Specifies the mode of transport when calculating a route. \n Used in estimating the speed of travel and road compatibility.

\n

Default Value: Car\n

" + } + }, + "TravelModeOptions": { + "target": "com.amazonaws.georoutes#RouteTravelModeOptions", + "traits": { + "smithy.api#documentation": "

Travel mode related options for the provided travel mode.

" + } + }, + "TravelStepType": { + "target": "com.amazonaws.georoutes#RouteTravelStepType", + "traits": { + "smithy.api#documentation": "

Type of step returned by the response.\nDefault provides basic steps intended for web based applications.\nTurnByTurn provides detailed instructions with more granularity intended for a turn based naviagtion system.

" + } + }, + "Waypoints": { + "target": "com.amazonaws.georoutes#RouteWaypointList", + "traits": { + "smithy.api#documentation": "

List of waypoints between the Origin and Destination.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.georoutes#CalculateRoutesResponse": { + "type": "structure", + "members": { + "LegGeometryFormat": { + "target": "com.amazonaws.georoutes#GeometryFormat", + "traits": { + "smithy.api#documentation": "

Specifies the format of the geometry returned for each leg of the route.

", + "smithy.api#required": {} + } + }, + "Notices": { + "target": "com.amazonaws.georoutes#RouteResponseNoticeList", + "traits": { + "smithy.api#documentation": "

Notices are additional information returned that indicate issues that occurred during route calculation.

", + "smithy.api#required": {} + } + }, + "PricingBucket": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pricing bucket for which the query is charged at.

", + "smithy.api#httpHeader": "x-amz-geo-pricing-bucket", + "smithy.api#required": {} + } + }, + "Routes": { + "target": "com.amazonaws.georoutes#RouteList", + "traits": { + "smithy.api#documentation": "

The path from the origin to the destination.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.georoutes#Circle": { + "type": "structure", + "members": { + "Center": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

Center of the Circle defined in longitude and latitude coordinates.

\n

Example: [-123.1174, 49.2847] represents the position with longitude -123.1174 and latitude 49.2847.

", + "smithy.api#required": {} + } + }, + "Radius": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "

Radius of the Circle.

\n

\n Unit: meters\n

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

Geometry defined as a circle. When request routing boundary was set as AutoCircle, the response routing boundary will return Circle derived from the AutoCircle settings.

", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.georoutes#Corridor": { + "type": "structure", + "members": { + "LineString": { + "target": "com.amazonaws.georoutes#LineString", + "traits": { + "smithy.api#documentation": "

An ordered list of positions used to plot a route on a map.

\n \n

LineString and Polyline are mutually exclusive properties.

\n
", + "smithy.api#required": {} + } + }, + "Radius": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Radius that defines the width of the corridor.

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

Geometry defined as a corridor - a LineString with a radius that defines the width of the corridor.

", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.georoutes#CountryCode": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 3 + }, + "smithy.api#pattern": "^([A-Z]{2}|[A-Z]{3})$" + } + }, + "com.amazonaws.georoutes#CountryCode3": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 3 + }, + "smithy.api#pattern": "^[A-Z]{3}$" + } + }, + "com.amazonaws.georoutes#CountryCodeList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#CountryCode" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.georoutes#CurrencyCode": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 3 + }, + "smithy.api#pattern": "^[A-Z]{3}$" + } + }, + "com.amazonaws.georoutes#DayOfWeek": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "MONDAY", + "value": "Monday" + }, + { + "name": "TUESDAY", + "value": "Tuesday" + }, + { + "name": "WEDNESDAY", + "value": "Wednesday" + }, + { + "name": "THURSDAY", + "value": "Thursday" + }, + { + "name": "FRIDAY", + "value": "Friday" + }, + { + "name": "SATURDAY", + "value": "Saturday" + }, + { + "name": "SUNDAY", + "value": "Sunday" + } + ] + } + }, + "com.amazonaws.georoutes#DimensionCentimeters": { + "type": "long", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0, + "max": 4294967295 + } + } + }, + "com.amazonaws.georoutes#DistanceMeters": { + "type": "long", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0, + "max": 4294967295 + } + } + }, + "com.amazonaws.georoutes#DistanceThresholdList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#range": { + "min": 0, + "max": 300000 + } + } + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 5 + } + } + }, + "com.amazonaws.georoutes#DurationSeconds": { + "type": "long", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0, + "max": 4294967295 + } + } + }, + "com.amazonaws.georoutes#GeometryFormat": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "FLEXIBLE_POLYLINE", + "value": "FlexiblePolyline" + }, + { + "name": "SIMPLE", + "value": "Simple" + } + ] + } + }, + "com.amazonaws.georoutes#Heading": { + "type": "double", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0.0, + "max": 360.0 + } + } + }, + "com.amazonaws.georoutes#IndexList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + } + }, + "com.amazonaws.georoutes#InternalServerException": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The request processing has failed because of an unknown error, exception or failure.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.georoutes#Isoline": { + "type": "structure", + "members": { + "Connections": { + "target": "com.amazonaws.georoutes#IsolineConnectionList", + "traits": { + "smithy.api#documentation": "

Isolines may contain multiple components, if these components are connected by ferry links. These components are returned as separate polygons while the ferry links are returned as connections.

", + "smithy.api#required": {} + } + }, + "DistanceThreshold": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Distance threshold corresponding to the calculated Isoline.

" + } + }, + "Geometries": { + "target": "com.amazonaws.georoutes#IsolineShapeGeometryList", + "traits": { + "smithy.api#documentation": "

Geometries for the Calculated isolines.

", + "smithy.api#required": {} + } + }, + "TimeThreshold": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Time threshold corresponding to the calculated isoline.

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

Calculated isolines and associated properties.

" + } + }, + "com.amazonaws.georoutes#IsolineAllowOptions": { + "type": "structure", + "members": { + "Hot": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Allow Hot (High Occupancy Toll) lanes while calculating the route.

" + } + }, + "Hov": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Allow Hov (High Occupancy vehicle) lanes while calculating the route.

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

Features that are allowed while calculating. a route

" + } + }, + "com.amazonaws.georoutes#IsolineAvoidanceArea": { + "type": "structure", + "members": { + "Except": { + "target": "com.amazonaws.georoutes#IsolineAvoidanceAreaGeometryList", + "traits": { + "smithy.api#documentation": "

Exceptions to the provided avoidance geometry, to be included while calculating the route.

" + } + }, + "Geometry": { + "target": "com.amazonaws.georoutes#IsolineAvoidanceAreaGeometry", + "traits": { + "smithy.api#documentation": "

Geometry of the area to be avoided.

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

The area to be avoided.

" + } + }, + "com.amazonaws.georoutes#IsolineAvoidanceAreaGeometry": { + "type": "structure", + "members": { + "BoundingBox": { + "target": "com.amazonaws.georoutes#BoundingBox", + "traits": { + "smithy.api#documentation": "

Geometry defined as a bounding box. The first pair represents the X and Y coordinates\n (longitude and latitude,) of the southwest corner of the bounding box; the second pair\n represents the X and Y coordinates (longitude and latitude) of the northeast corner.

" + } + }, + "Corridor": { + "target": "com.amazonaws.georoutes#Corridor", + "traits": { + "smithy.api#documentation": "

Geometry defined as a corridor - a LineString with a radius that defines the width of the corridor.

" + } + }, + "Polygon": { + "target": "com.amazonaws.georoutes#LinearRings", + "traits": { + "smithy.api#documentation": "

A list of Polygon will be excluded for calculating isolines, the list can only contain 1 polygon.

", + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "PolylineCorridor": { + "target": "com.amazonaws.georoutes#PolylineCorridor", + "traits": { + "smithy.api#documentation": "

Geometry defined as an encoded corridor – a polyline with a radius that defines the width of the corridor. For more information on polyline \nencoding, see https://github.com/heremaps/flexiblepolyline/blob/master/README.md.

" + } + }, + "PolylinePolygon": { + "target": "com.amazonaws.georoutes#PolylineRingList", + "traits": { + "smithy.api#documentation": "

A list of PolylinePolygon's that are excluded for calculating isolines, the list can only contain 1 polygon. For more information on polyline encoding, see https://github.com/heremaps/flexiblepolyline/blob/master/README.md. \n

", + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

The avoidance geometry, to be included while calculating the route.

" + } + }, + "com.amazonaws.georoutes#IsolineAvoidanceAreaGeometryList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#IsolineAvoidanceAreaGeometry" + } + }, + "com.amazonaws.georoutes#IsolineAvoidanceAreaList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#IsolineAvoidanceArea" + } + }, + "com.amazonaws.georoutes#IsolineAvoidanceOptions": { + "type": "structure", + "members": { + "Areas": { + "target": "com.amazonaws.georoutes#IsolineAvoidanceAreaList", + "traits": { + "smithy.api#documentation": "

Areas to be avoided.

" + } + }, + "CarShuttleTrains": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid car-shuttle-trains while calculating the route.

" + } + }, + "ControlledAccessHighways": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid controlled access highways while calculating the route.

" + } + }, + "DirtRoads": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid dirt roads while calculating the route.

" + } + }, + "Ferries": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid ferries while calculating the route.

" + } + }, + "SeasonalClosure": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid roads that have seasonal closure while calculating the route.

" + } + }, + "TollRoads": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoids roads where the specified toll transponders are the only mode of payment.

" + } + }, + "TollTransponders": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoids roads where the specified toll transponders are the only mode of payment.

" + } + }, + "TruckRoadTypes": { + "target": "com.amazonaws.georoutes#TruckRoadTypeList", + "traits": { + "smithy.api#documentation": "

Truck road type identifiers. BK1 through BK4 apply only to Sweden. \nA2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico.

\n \n

There are currently no other supported values as of 26th April 2024.

\n
" + } + }, + "Tunnels": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid tunnels while calculating the route.

" + } + }, + "UTurns": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid U-turns for calculation on highways and motorways.

" + } + }, + "ZoneCategories": { + "target": "com.amazonaws.georoutes#IsolineAvoidanceZoneCategoryList", + "traits": { + "smithy.api#documentation": "

Zone categories to be avoided.

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

Features that are avoided while calculating a route. Avoidance is on a best-case basis. If an\n avoidance can't be satisfied for a particular case, it violates the avoidance and the\n returned response produces a notice for the violation.

" + } + }, + "com.amazonaws.georoutes#IsolineAvoidanceZoneCategory": { + "type": "structure", + "members": { + "Category": { + "target": "com.amazonaws.georoutes#IsolineZoneCategory", + "traits": { + "smithy.api#documentation": "

Zone category to be avoided.

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

Zone category to be avoided.

" + } + }, + "com.amazonaws.georoutes#IsolineAvoidanceZoneCategoryList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#IsolineAvoidanceZoneCategory" + }, + "traits": { + "smithy.api#length": { + "max": 3 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.georoutes#IsolineCarOptions": { + "type": "structure", + "members": { + "EngineType": { + "target": "com.amazonaws.georoutes#IsolineEngineType", + "traits": { + "smithy.api#documentation": "

Engine type of the vehicle.

" + } + }, + "LicensePlate": { + "target": "com.amazonaws.georoutes#IsolineVehicleLicensePlate", + "traits": { + "smithy.api#documentation": "

The vehicle License Plate.

" + } + }, + "MaxSpeed": { + "target": "com.amazonaws.georoutes#SpeedKilometersPerHour", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Maximum speed.

\n

\n Unit: KilometersPerHour\n

", + "smithy.api#range": { + "min": 3.6, + "max": 252.0 + } + } + }, + "Occupancy": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

The number of occupants in the vehicle.

\n

Default Value: 1\n

", + "smithy.api#range": { + "min": 1 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Options for vehicles.

" + } + }, + "com.amazonaws.georoutes#IsolineConnection": { + "type": "structure", + "members": { + "FromPolygonIndex": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Index of the polygon corresponding to the \"from\" component of the connection. The polygon is available from Isoline[].Geometries.

", + "smithy.api#range": { + "min": 0 + }, + "smithy.api#required": {} + } + }, + "Geometry": { + "target": "com.amazonaws.georoutes#IsolineConnectionGeometry", + "traits": { + "smithy.api#documentation": "

The isoline geometry.

", + "smithy.api#required": {} + } + }, + "ToPolygonIndex": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Index of the polygon corresponding to the \"to\" component of the connection. The polygon is available from Isoline[].Geometries.

", + "smithy.api#range": { + "min": 0 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Isolines may contain multiple components, if these components are connected by ferry links. These components are returned as separate polygons while the ferry links are returned as connections.

" + } + }, + "com.amazonaws.georoutes#IsolineConnectionGeometry": { + "type": "structure", + "members": { + "LineString": { + "target": "com.amazonaws.georoutes#LineString", + "traits": { + "smithy.api#documentation": "

An ordered list of positions used to plot a route on a map.

\n \n

LineString and Polyline are mutually exclusive properties.

\n
" + } + }, + "Polyline": { + "target": "com.amazonaws.georoutes#Polyline", + "traits": { + "smithy.api#documentation": "

An ordered list of positions used to plot a route on a map in a lossy compression format.

\n \n

LineString and Polyline are mutually exclusive properties.

\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

Geometry of the connection between different Isoline components.

" + } + }, + "com.amazonaws.georoutes#IsolineConnectionList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#IsolineConnection" + } + }, + "com.amazonaws.georoutes#IsolineDestinationOptions": { + "type": "structure", + "members": { + "AvoidActionsForDistance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Avoids actions for the provided distance. This is typically to consider for users in moving vehicles who may not have sufficient time to make an action at an origin or a destination.

" + } + }, + "Heading": { + "target": "com.amazonaws.georoutes#Heading", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

GPS Heading at the position.

" + } + }, + "Matching": { + "target": "com.amazonaws.georoutes#IsolineMatchingOptions", + "traits": { + "smithy.api#documentation": "

Options to configure matching the provided position to the road network.

" + } + }, + "SideOfStreet": { + "target": "com.amazonaws.georoutes#IsolineSideOfStreetOptions", + "traits": { + "smithy.api#documentation": "

Options to configure matching the provided position to a side of the street.

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

Destination related options.

" + } + }, + "com.amazonaws.georoutes#IsolineEngineType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "ELECTRIC", + "value": "Electric" + }, + { + "name": "INTERNAL_COMBUSTION", + "value": "InternalCombustion" + }, + { + "name": "PLUGIN_HYBRID", + "value": "PluginHybrid" + } + ] + } + }, + "com.amazonaws.georoutes#IsolineGranularityOptions": { + "type": "structure", + "members": { + "MaxPoints": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Maximum number of points of returned Isoline.

", + "smithy.api#range": { + "min": 31 + } + } + }, + "MaxResolution": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Maximum resolution of the returned isoline.

\n

\n Unit: centimeters\n

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

Isoline granularity related options.

" + } + }, + "com.amazonaws.georoutes#IsolineHazardousCargoType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "COMBUSTIBLE", + "value": "Combustible" + }, + { + "name": "CORROSIVE", + "value": "Corrosive" + }, + { + "name": "EXPLOSIVE", + "value": "Explosive" + }, + { + "name": "FLAMMABLE", + "value": "Flammable" + }, + { + "name": "GAS", + "value": "Gas" + }, + { + "name": "HARMFUL_TO_WATER", + "value": "HarmfulToWater" + }, + { + "name": "ORGANIC", + "value": "Organic" + }, + { + "name": "OTHER", + "value": "Other" + }, + { + "name": "POISON", + "value": "Poison" + }, + { + "name": "POISONOUS_INHALATION", + "value": "PoisonousInhalation" + }, + { + "name": "RADIOACTIVE", + "value": "Radioactive" + } + ] + } + }, + "com.amazonaws.georoutes#IsolineHazardousCargoTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#IsolineHazardousCargoType" + }, + "traits": { + "smithy.api#length": { + "max": 11 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.georoutes#IsolineList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#Isoline" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 5 + } + } + }, + "com.amazonaws.georoutes#IsolineMatchingOptions": { + "type": "structure", + "members": { + "NameHint": { + "target": "com.amazonaws.georoutes#SensitiveString", + "traits": { + "smithy.api#documentation": "

Attempts to match the provided position to a road similar to the provided name.

" + } + }, + "OnRoadThreshold": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

If the distance to a highway/bridge/tunnel/sliproad is within threshold, the waypoint will be snapped to the highway/bridge/tunnel/sliproad.

\n

\n Unit: meters\n

" + } + }, + "Radius": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.

\n

\n Unit: Meters\n

" + } + }, + "Strategy": { + "target": "com.amazonaws.georoutes#MatchingStrategy", + "traits": { + "smithy.api#documentation": "

Strategy that defines matching of the position onto the road network. MatchAny considers all roads possible, whereas MatchMostSignificantRoad matches to the most significant road.

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

Isoline matching related options.

" + } + }, + "com.amazonaws.georoutes#IsolineOptimizationObjective": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "ACCURATE_CALCULATION", + "value": "AccurateCalculation" + }, + { + "name": "BALANCED_CALCULATION", + "value": "BalancedCalculation" + }, + { + "name": "FAST_CALCULATION", + "value": "FastCalculation" + } + ] + } + }, + "com.amazonaws.georoutes#IsolineOriginOptions": { + "type": "structure", + "members": { + "AvoidActionsForDistance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Avoids actions for the provided distance. This is typically to consider for users in moving vehicles who may not have sufficient time to make an action at an origin or a destination.

" + } + }, + "Heading": { + "target": "com.amazonaws.georoutes#Heading", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

GPS Heading at the position.

" + } + }, + "Matching": { + "target": "com.amazonaws.georoutes#IsolineMatchingOptions", + "traits": { + "smithy.api#documentation": "

Options to configure matching the provided position to the road network.

" + } + }, + "SideOfStreet": { + "target": "com.amazonaws.georoutes#IsolineSideOfStreetOptions", + "traits": { + "smithy.api#documentation": "

Options to configure matching the provided position to a side of the street.

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

Options for the property.

" + } + }, + "com.amazonaws.georoutes#IsolineScooterOptions": { + "type": "structure", + "members": { + "EngineType": { + "target": "com.amazonaws.georoutes#IsolineEngineType", + "traits": { + "smithy.api#documentation": "

Engine type of the vehicle.

" + } + }, + "LicensePlate": { + "target": "com.amazonaws.georoutes#IsolineVehicleLicensePlate", + "traits": { + "smithy.api#documentation": "

The vehicle License Plate.

" + } + }, + "MaxSpeed": { + "target": "com.amazonaws.georoutes#SpeedKilometersPerHour", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Maximum speed specified.

\n

\n Unit: KilometersPerHour\n

", + "smithy.api#range": { + "min": 3.6, + "max": 252.0 + } + } + }, + "Occupancy": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

The number of occupants in the vehicle.

\n

Default Value: 1\n

", + "smithy.api#range": { + "min": 1 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Options for the property.

" + } + }, + "com.amazonaws.georoutes#IsolineShapeGeometry": { + "type": "structure", + "members": { + "Polygon": { + "target": "com.amazonaws.georoutes#LinearRings", + "traits": { + "smithy.api#documentation": "

A list of Isoline Polygons, for each isoline polygon, it contains polygons of the first linear ring (the outer ring) and from 2nd item to the last item (the inner rings).

" + } + }, + "PolylinePolygon": { + "target": "com.amazonaws.georoutes#PolylineRingList", + "traits": { + "smithy.api#documentation": "

A list of Isoline PolylinePolygon, for each isoline PolylinePolygon, it contains PolylinePolygon \n of the first linear ring (the outer ring) and from 2nd item to the last item (the inner rings). \n For more information on polyline encoding, see https://github.com/heremaps/flexiblepolyline/blob/master/README.md.

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

Geometry of the connection between different Isoline components.

" + } + }, + "com.amazonaws.georoutes#IsolineShapeGeometryList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#IsolineShapeGeometry" + } + }, + "com.amazonaws.georoutes#IsolineSideOfStreetOptions": { + "type": "structure", + "members": { + "Position": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

Position defined as [longitude, latitude].

", + "smithy.api#required": {} + } + }, + "UseWith": { + "target": "com.amazonaws.georoutes#SideOfStreetMatchingStrategy", + "traits": { + "smithy.api#documentation": "

Strategy that defines when the side of street position should be used. AnyStreet will always use the provided position.

\n

Default Value: DividedStreetOnly\n

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

Options to configure matching the provided position to a side of the street.

" + } + }, + "com.amazonaws.georoutes#IsolineThresholds": { + "type": "structure", + "members": { + "Distance": { + "target": "com.amazonaws.georoutes#DistanceThresholdList", + "traits": { + "smithy.api#documentation": "

Distance to be used for the isoline calculation.

" + } + }, + "Time": { + "target": "com.amazonaws.georoutes#TimeThresholdList", + "traits": { + "smithy.api#documentation": "

Time to be used for the isoline calculation.

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

Threshold to be used for the isoline calculation. Up to 3 thresholds per provided type\n can be requested.

" + } + }, + "com.amazonaws.georoutes#IsolineTrafficOptions": { + "type": "structure", + "members": { + "FlowEventThresholdOverride": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration for which flow traffic is considered valid. For this period, the flow traffic is used over historical traffic data. Flow traffic refers to congestion, which changes very quickly. Duration in seconds for which flow traffic event would be considered valid. While flow traffic event is valid it will be used over the historical traffic data.

\n

\n Unit: seconds\n

" + } + }, + "Usage": { + "target": "com.amazonaws.georoutes#TrafficUsage", + "traits": { + "smithy.api#documentation": "

Determines if traffic should be used or ignored while calculating the route.

\n

Default Value: UseTrafficData\n

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

Options related to traffic.

" + } + }, + "com.amazonaws.georoutes#IsolineTrailerOptions": { + "type": "structure", + "members": { + "AxleCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Total number of axles of the vehicle.

", + "smithy.api#range": { + "min": 1 + } + } + }, + "TrailerCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Number of trailers attached to the vehicle.

\n

Default Value: 0\n

", + "smithy.api#range": { + "min": 1, + "max": 255 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Trailer options corresponding to the vehicle.

" + } + }, + "com.amazonaws.georoutes#IsolineTravelMode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "CAR", + "value": "Car" + }, + { + "name": "PEDESTRIAN", + "value": "Pedestrian" + }, + { + "name": "SCOOTER", + "value": "Scooter" + }, + { + "name": "TRUCK", + "value": "Truck" + } + ] + } + }, + "com.amazonaws.georoutes#IsolineTravelModeOptions": { + "type": "structure", + "members": { + "Car": { + "target": "com.amazonaws.georoutes#IsolineCarOptions", + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Car\"

" + } + }, + "Scooter": { + "target": "com.amazonaws.georoutes#IsolineScooterOptions", + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Scooter\"

" + } + }, + "Truck": { + "target": "com.amazonaws.georoutes#IsolineTruckOptions", + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Truck\"

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

Travel mode related options for the provided travel mode.

" + } + }, + "com.amazonaws.georoutes#IsolineTruckOptions": { + "type": "structure", + "members": { + "AxleCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Total number of axles of the vehicle.

", + "smithy.api#range": { + "min": 2, + "max": 255 + } + } + }, + "EngineType": { + "target": "com.amazonaws.georoutes#IsolineEngineType", + "traits": { + "smithy.api#documentation": "

Engine type of the vehicle.

" + } + }, + "GrossWeight": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Gross weight of the vehicle including trailers, and goods at capacity.

\n

\n Unit: Kilograms\n

" + } + }, + "HazardousCargos": { + "target": "com.amazonaws.georoutes#IsolineHazardousCargoTypeList", + "traits": { + "smithy.api#documentation": "

List of Hazardous cargo contained in the vehicle.

" + } + }, + "Height": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Height of the vehicle.

\n

\n Unit: centimeters\n

", + "smithy.api#range": { + "min": 0, + "max": 5000 + } + } + }, + "HeightAboveFirstAxle": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Height of the vehicle above its first axle.

\n

\n Unit: centimeters\n

", + "smithy.api#range": { + "min": 0, + "max": 5000 + } + } + }, + "KpraLength": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Kingpin to rear axle length of the vehicle.

\n

\n Unit: centimeters\n

" + } + }, + "Length": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Length of the vehicle.

\n

\n Unit: centimeters\n

", + "smithy.api#range": { + "min": 0, + "max": 30000 + } + } + }, + "LicensePlate": { + "target": "com.amazonaws.georoutes#IsolineVehicleLicensePlate", + "traits": { + "smithy.api#documentation": "

The vehicle License Plate.

" + } + }, + "MaxSpeed": { + "target": "com.amazonaws.georoutes#SpeedKilometersPerHour", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Maximum speed specified.

\n

\n Unit: KilometersPerHour\n

", + "smithy.api#range": { + "min": 3.6, + "max": 252.0 + } + } + }, + "Occupancy": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

The number of occupants in the vehicle.

\n

Default Value: 1\n

", + "smithy.api#range": { + "min": 1 + } + } + }, + "PayloadCapacity": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Payload capacity of the vehicle and trailers attached.

\n

\n Unit: kilograms\n

" + } + }, + "TireCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Number of tires on the vehicle.

", + "smithy.api#range": { + "min": 1, + "max": 255 + } + } + }, + "Trailer": { + "target": "com.amazonaws.georoutes#IsolineTrailerOptions", + "traits": { + "smithy.api#documentation": "

Trailer options corresponding to the vehicle.

" + } + }, + "TruckType": { + "target": "com.amazonaws.georoutes#IsolineTruckType", + "traits": { + "smithy.api#documentation": "

Type of the truck.

" + } + }, + "TunnelRestrictionCode": { + "target": "com.amazonaws.georoutes#TunnelRestrictionCode", + "traits": { + "smithy.api#documentation": "

The tunnel restriction code.

\n

Tunnel categories in this list indicate the restrictions which apply to certain tunnels in Great Britain. \n They relate to the types of dangerous goods that can be transported through them.

\n
    \n
  • \n

    \n Tunnel Category B\n

    \n
      \n
    • \n

      \n Risk Level: Limited risk

      \n
    • \n
    • \n

      \n Restrictions: Few restrictions

      \n
    • \n
    \n
  • \n
  • \n

    \n Tunnel Category C\n

    \n
      \n
    • \n

      \n Risk Level: Medium risk

      \n
    • \n
    • \n

      \n Restrictions: Some restrictions

      \n
    • \n
    \n
  • \n
  • \n

    \n Tunnel Category D\n

    \n
      \n
    • \n

      \n Risk Level: High risk

      \n
    • \n
    • \n

      \n Restrictions: Many restrictions occur

      \n
    • \n
    \n
  • \n
  • \n

    \n Tunnel Category E\n

    \n
      \n
    • \n

      \n Risk Level: Very high risk

      \n
    • \n
    • \n

      \n Restrictions: Restricted tunnel

      \n
    • \n
    \n
  • \n
" + } + }, + "WeightPerAxle": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Heaviest weight per axle irrespective of the axle type or the axle group. Meant for usage in countries where the differences in axle types or axle groups are not distinguished.

\n

\n Unit: Kilograms\n

" + } + }, + "WeightPerAxleGroup": { + "target": "com.amazonaws.georoutes#WeightPerAxleGroup", + "traits": { + "smithy.api#documentation": "

Specifies the total weight for the specified axle group. Meant for usage in countries that have different regulations based on the axle group type.

\n

\n Unit: Kilograms\n

" + } + }, + "Width": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Width of the vehicle.

\n

\n Unit: centimeters\n

", + "smithy.api#range": { + "min": 0, + "max": 5000 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Truck\"

" + } + }, + "com.amazonaws.georoutes#IsolineTruckType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "LIGHT_TRUCK", + "value": "LightTruck" + }, + { + "name": "STRAIGHT_TRUCK", + "value": "StraightTruck" + }, + { + "name": "TRACTOR", + "value": "Tractor" + } + ] + } + }, + "com.amazonaws.georoutes#IsolineVehicleLicensePlate": { + "type": "structure", + "members": { + "LastCharacter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The last character of the License Plate.

", + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

The vehicle license plate.

" + } + }, + "com.amazonaws.georoutes#IsolineZoneCategory": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "CONGESTION_PRICING", + "value": "CongestionPricing" + }, + { + "name": "ENVIRONMENTAL", + "value": "Environmental" + }, + { + "name": "VIGNETTE", + "value": "Vignette" + } + ] + } + }, + "com.amazonaws.georoutes#LanguageTag": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 35 + } + } + }, + "com.amazonaws.georoutes#LanguageTagList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#LanguageTag" + } + }, + "com.amazonaws.georoutes#LineString": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#Position" + }, + "traits": { + "smithy.api#externalDocumentation": { + "Documentation": "https://tools.ietf.org/html/rfc7946#section-3.1.4" + }, + "smithy.api#length": { + "min": 2 + } + } + }, + "com.amazonaws.georoutes#LinearRing": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#Position" + }, + "traits": { + "smithy.api#externalDocumentation": { + "Documentation": "https://tools.ietf.org/html/rfc7946#section-3.1.6" + }, + "smithy.api#length": { + "min": 4 + } + } + }, + "com.amazonaws.georoutes#LinearRings": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#LinearRing" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.georoutes#LocalizedString": { + "type": "structure", + "members": { + "Language": { + "target": "com.amazonaws.georoutes#LanguageTag", + "traits": { + "smithy.api#documentation": "

A list of BCP 47 compliant language codes for the results to be rendered in. The request\n uses the regional default as the fallback if the requested language can't be\n provided.

" + } + }, + "Value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The value of the localized string.

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

The localized string.

" + } + }, + "com.amazonaws.georoutes#LocalizedStringList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#LocalizedString" + } + }, + "com.amazonaws.georoutes#MatchingStrategy": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "MATCH_ANY", + "value": "MatchAny" + }, + { + "name": "MATCH_MOST_SIGNIFICANT_ROAD", + "value": "MatchMostSignificantRoad" + } + ] + } + }, + "com.amazonaws.georoutes#MeasurementSystem": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "METRIC", + "value": "Metric" + }, + { + "name": "IMPERIAL", + "value": "Imperial" + } + ] + } + }, + "com.amazonaws.georoutes#OptimizeWaypoints": { + "type": "operation", + "input": { + "target": "com.amazonaws.georoutes#OptimizeWaypointsRequest" + }, + "output": { + "target": "com.amazonaws.georoutes#OptimizeWaypointsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.georoutes#AccessDeniedException" + }, + { + "target": "com.amazonaws.georoutes#InternalServerException" + }, + { + "target": "com.amazonaws.georoutes#ThrottlingException" + }, + { + "target": "com.amazonaws.georoutes#ValidationException" + } + ], + "traits": { + "aws.api#dataPlane": {}, + "smithy.api#documentation": "

Calculates the optimal order to travel between a set of waypoints to minimize either the\n travel time or the distance travelled during the journey, based on road network\n restrictions and the traffic pattern data.

", + "smithy.api#http": { + "uri": "/optimize-waypoints", + "method": "POST" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "OptimizeWaypointsSuccess", + "params": { + "Origin": [ + -123.253374, + 49.351673 + ], + "Destination": [ + -123.930756, + 49.1314 + ] + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.georoutes#OptimizeWaypointsRequest": { + "type": "structure", + "members": { + "Avoid": { + "target": "com.amazonaws.georoutes#WaypointOptimizationAvoidanceOptions", + "traits": { + "smithy.api#documentation": "

Features that are avoided while calculating a route. Avoidance is on a best-case basis. If an\n avoidance can't be satisfied for a particular case, this setting is ignored.

" + } + }, + "DepartureTime": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

Departure time from the waypoint.

\n

Time format:YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm\n

\n

Examples:

\n

\n 2020-04-22T17:57:24Z\n

\n

\n 2020-04-22T17:57:24+02:00\n

" + } + }, + "Destination": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

The final position for the route in the World Geodetic System (WGS 84) format:\n [longitude, latitude].

" + } + }, + "DestinationOptions": { + "target": "com.amazonaws.georoutes#WaypointOptimizationDestinationOptions", + "traits": { + "smithy.api#documentation": "

Destination related options.

" + } + }, + "Driver": { + "target": "com.amazonaws.georoutes#WaypointOptimizationDriverOptions", + "traits": { + "smithy.api#documentation": "

Driver related options.

" + } + }, + "Exclude": { + "target": "com.amazonaws.georoutes#WaypointOptimizationExclusionOptions", + "traits": { + "smithy.api#documentation": "

Features to be strictly excluded while calculating the route.

" + } + }, + "Key": { + "target": "com.amazonaws.georoutes#ApiKey", + "traits": { + "smithy.api#documentation": "

Optional: The API key to be used for authorization. Either an API key or valid SigV4\n signature must be provided when making a request.

", + "smithy.api#httpQuery": "key" + } + }, + "OptimizeSequencingFor": { + "target": "com.amazonaws.georoutes#WaypointOptimizationSequencingObjective", + "traits": { + "smithy.api#documentation": "

Specifies the optimization criteria for the calculated sequence.

\n

Default Value: FastestRoute.

" + } + }, + "Origin": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

The start position for the route.

", + "smithy.api#required": {} + } + }, + "OriginOptions": { + "target": "com.amazonaws.georoutes#WaypointOptimizationOriginOptions", + "traits": { + "smithy.api#documentation": "

Origin related options.

" + } + }, + "Traffic": { + "target": "com.amazonaws.georoutes#WaypointOptimizationTrafficOptions", + "traits": { + "smithy.api#documentation": "

Traffic-related options.

" + } + }, + "TravelMode": { + "target": "com.amazonaws.georoutes#WaypointOptimizationTravelMode", + "traits": { + "smithy.api#documentation": "

Specifies the mode of transport when calculating a route. \n Used in estimating the speed of travel and road compatibility.

\n

Default Value: Car\n

" + } + }, + "TravelModeOptions": { + "target": "com.amazonaws.georoutes#WaypointOptimizationTravelModeOptions", + "traits": { + "smithy.api#documentation": "

Travel mode related options for the provided travel mode.

" + } + }, + "Waypoints": { + "target": "com.amazonaws.georoutes#WaypointOptimizationWaypointList", + "traits": { + "smithy.api#documentation": "

List of waypoints between the Origin and Destination.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.georoutes#OptimizeWaypointsResponse": { + "type": "structure", + "members": { + "Connections": { + "target": "com.amazonaws.georoutes#WaypointOptimizationConnectionList", + "traits": { + "smithy.api#documentation": "

Details about the connection from one waypoint to the next, within the optimized sequence.

", + "smithy.api#required": {} + } + }, + "Distance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Overall distance to travel the whole sequence.

", + "smithy.api#required": {} + } + }, + "Duration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Overall duration to travel the whole sequence.

\n

\n Unit: seconds\n

", + "smithy.api#required": {} + } + }, + "ImpedingWaypoints": { + "target": "com.amazonaws.georoutes#WaypointOptimizationImpedingWaypointList", + "traits": { + "smithy.api#documentation": "

Returns waypoints that caused the optimization problem to fail, and the constraints that were unsatisfied leading to the failure.

", + "smithy.api#required": {} + } + }, + "OptimizedWaypoints": { + "target": "com.amazonaws.georoutes#WaypointOptimizationOptimizedWaypointList", + "traits": { + "smithy.api#documentation": "

Waypoints in the order of the optimized sequence.

", + "smithy.api#required": {} + } + }, + "PricingBucket": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pricing bucket for which the query is charged at.

", + "smithy.api#httpHeader": "x-amz-geo-pricing-bucket", + "smithy.api#required": {} + } + }, + "TimeBreakdown": { + "target": "com.amazonaws.georoutes#WaypointOptimizationTimeBreakdown", + "traits": { + "smithy.api#documentation": "

Time breakdown for the sequence.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.georoutes#Polyline": { + "type": "string", + "traits": { + "smithy.api#externalDocumentation": { + "Documentation": "https://developers.google.com/maps/documentation/utilities/polylinealgorithm" + }, + "smithy.api#length": { + "min": 1 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.georoutes#PolylineCorridor": { + "type": "structure", + "members": { + "Polyline": { + "target": "com.amazonaws.georoutes#Polyline", + "traits": { + "smithy.api#documentation": "

An ordered list of positions used to plot a route on a map in a lossy compression format.

\n \n

LineString and Polyline are mutually exclusive properties.

\n
", + "smithy.api#required": {} + } + }, + "Radius": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.

\n

\n Unit: Meters\n

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

Geometry defined as an encoded corridor - an encoded polyline with a radius that defines\n the width of the corridor.

", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.georoutes#PolylineRing": { + "type": "string", + "traits": { + "smithy.api#externalDocumentation": { + "Documentation": "https://tools.ietf.org/html/rfc7946#section-3.1.6" + }, + "smithy.api#length": { + "min": 1 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.georoutes#PolylineRingList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#PolylineRing" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.georoutes#Position": { + "type": "list", + "member": { + "target": "smithy.api#Double" + }, + "traits": { + "smithy.api#externalDocumentation": { + "Documentation": "https://tools.ietf.org/html/rfc7946#section-3.1.1" + }, + "smithy.api#length": { + "min": 2, + "max": 2 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.georoutes#Position23": { + "type": "list", + "member": { + "target": "smithy.api#Double" + }, + "traits": { + "smithy.api#externalDocumentation": { + "Documentation": "https://tools.ietf.org/html/rfc7946#section-3.1.1" + }, + "smithy.api#length": { + "min": 2, + "max": 3 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.georoutes#ProviderResource": { + "type": "resource", + "operations": [ + { + "target": "com.amazonaws.georoutes#CalculateIsolines" + }, + { + "target": "com.amazonaws.georoutes#CalculateRouteMatrix" + }, + { + "target": "com.amazonaws.georoutes#CalculateRoutes" + }, + { + "target": "com.amazonaws.georoutes#OptimizeWaypoints" + }, + { + "target": "com.amazonaws.georoutes#SnapToRoads" + } + ] + }, + "com.amazonaws.georoutes#RoadSnapHazardousCargoType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "COMBUSTIBLE", + "value": "Combustible" + }, + { + "name": "CORROSIVE", + "value": "Corrosive" + }, + { + "name": "EXPLOSIVE", + "value": "Explosive" + }, + { + "name": "FLAMMABLE", + "value": "Flammable" + }, + { + "name": "GAS", + "value": "Gas" + }, + { + "name": "HARMFUL_TO_WATER", + "value": "HarmfulToWater" + }, + { + "name": "ORGANIC", + "value": "Organic" + }, + { + "name": "OTHER", + "value": "Other" + }, + { + "name": "POISON", + "value": "Poison" + }, + { + "name": "POISONOUS_INHALATION", + "value": "PoisonousInhalation" + }, + { + "name": "RADIOACTIVE", + "value": "Radioactive" + } + ] + } + }, + "com.amazonaws.georoutes#RoadSnapHazardousCargoTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RoadSnapHazardousCargoType" + }, + "traits": { + "smithy.api#length": { + "max": 11 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.georoutes#RoadSnapNotice": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.georoutes#RoadSnapNoticeCode", + "traits": { + "smithy.api#documentation": "

Code corresponding to the issue.

", + "smithy.api#required": {} + } + }, + "Title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The notice title.

", + "smithy.api#required": {} + } + }, + "TracePointIndexes": { + "target": "com.amazonaws.georoutes#RoadSnapTracePointIndexList", + "traits": { + "smithy.api#documentation": "

TracePoint indices for which the provided notice code corresponds to.

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

Notices provide information around factors that may have influenced snapping in a manner atypical to the standard use cases.

" + } + }, + "com.amazonaws.georoutes#RoadSnapNoticeCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "TRACE_POINTS_HEADING_IGNORED", + "value": "TracePointsHeadingIgnored" + }, + { + "name": "TRACE_POINTS_IGNORED", + "value": "TracePointsIgnored" + }, + { + "name": "TRACE_POINTS_MOVED_BY_LARGE_DISTANCE", + "value": "TracePointsMovedByLargeDistance" + }, + { + "name": "TRACE_POINTS_NOT_MATCHED", + "value": "TracePointsNotMatched" + }, + { + "name": "TRACE_POINTS_OUT_OF_SEQUENCE", + "value": "TracePointsOutOfSequence" + }, + { + "name": "TRACE_POINTS_SPEED_ESTIMATED", + "value": "TracePointsSpeedEstimated" + }, + { + "name": "TRACE_POINTS_SPEED_IGNORED", + "value": "TracePointsSpeedIgnored" + } + ] + } + }, + "com.amazonaws.georoutes#RoadSnapNoticeList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RoadSnapNotice" + } + }, + "com.amazonaws.georoutes#RoadSnapSnappedGeometry": { + "type": "structure", + "members": { + "LineString": { + "target": "com.amazonaws.georoutes#LineString", + "traits": { + "smithy.api#documentation": "

An ordered list of positions used to plot a route on a map.

\n \n

LineString and Polyline are mutually exclusive properties.

\n
" + } + }, + "Polyline": { + "target": "com.amazonaws.georoutes#Polyline", + "traits": { + "smithy.api#documentation": "

An ordered list of positions used to plot a route on a map in a lossy compression format.

\n \n

LineString and Polyline are mutually exclusive properties.

\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

Interpolated geometry for the snapped route that is overlay-able onto a map.

" + } + }, + "com.amazonaws.georoutes#RoadSnapSnappedTracePoint": { + "type": "structure", + "members": { + "Confidence": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "

Confidence value for the correctness of this point match.

", + "smithy.api#range": { + "min": 0, + "max": 1 + }, + "smithy.api#required": {} + } + }, + "OriginalPosition": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

Position of the TracePoint provided within the request, at the same index.

", + "smithy.api#required": {} + } + }, + "SnappedPosition": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

Snapped position of the TracePoint provided within the request, at the same index.

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

TracePoints snapped onto the road network.

" + } + }, + "com.amazonaws.georoutes#RoadSnapSnappedTracePointList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RoadSnapSnappedTracePoint" + } + }, + "com.amazonaws.georoutes#RoadSnapTracePoint": { + "type": "structure", + "members": { + "Heading": { + "target": "com.amazonaws.georoutes#Heading", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

GPS Heading at the position.

" + } + }, + "Position": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

Position defined as [longitude, latitude].

", + "smithy.api#required": {} + } + }, + "Speed": { + "target": "com.amazonaws.georoutes#SpeedKilometersPerHour", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Speed at the specified trace point .

\n

\n Unit: KilometersPerHour\n

" + } + }, + "Timestamp": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

Timestamp of the event.

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

TracePoint indices for which the provided notice code corresponds to.

" + } + }, + "com.amazonaws.georoutes#RoadSnapTracePointIndexList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1000 + } + } + }, + "com.amazonaws.georoutes#RoadSnapTracePointList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RoadSnapTracePoint" + } + }, + "com.amazonaws.georoutes#RoadSnapTrailerOptions": { + "type": "structure", + "members": { + "TrailerCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Number of trailers attached to the vehicle.

\n

Default Value: 0\n

", + "smithy.api#range": { + "min": 0, + "max": 255 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Trailer options corresponding to the vehicle.

" + } + }, + "com.amazonaws.georoutes#RoadSnapTravelMode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "CAR", + "value": "Car" + }, + { + "name": "PEDESTRIAN", + "value": "Pedestrian" + }, + { + "name": "SCOOTER", + "value": "Scooter" + }, + { + "name": "TRUCK", + "value": "Truck" + } + ] + } + }, + "com.amazonaws.georoutes#RoadSnapTravelModeOptions": { + "type": "structure", + "members": { + "Truck": { + "target": "com.amazonaws.georoutes#RoadSnapTruckOptions", + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Truck\".

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

Travel mode related options for the provided travel mode.

" + } + }, + "com.amazonaws.georoutes#RoadSnapTruckOptions": { + "type": "structure", + "members": { + "GrossWeight": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Gross weight of the vehicle including trailers, and goods at capacity.

\n

\n Unit: Kilograms\n

" + } + }, + "HazardousCargos": { + "target": "com.amazonaws.georoutes#RoadSnapHazardousCargoTypeList", + "traits": { + "smithy.api#documentation": "

List of Hazardous cargos contained in the vehicle.

" + } + }, + "Height": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Height of the vehicle.

\n

\n Unit: centimeters\n

", + "smithy.api#range": { + "min": 0, + "max": 5000 + } + } + }, + "Length": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Length of the vehicle.

\n

\n Unit: centimeters\n

", + "smithy.api#range": { + "min": 0, + "max": 30000 + } + } + }, + "Trailer": { + "target": "com.amazonaws.georoutes#RoadSnapTrailerOptions", + "traits": { + "smithy.api#documentation": "

Trailer options corresponding to the vehicle.

" + } + }, + "TunnelRestrictionCode": { + "target": "com.amazonaws.georoutes#TunnelRestrictionCode", + "traits": { + "smithy.api#documentation": "

The tunnel restriction code.

\n

Tunnel categories in this list indicate the restrictions which apply to certain tunnels in Great Britain. \n They relate to the types of dangerous goods that can be transported through them.

\n
    \n
  • \n

    \n Tunnel Category B\n

    \n
      \n
    • \n

      \n Risk Level: Limited risk

      \n
    • \n
    • \n

      \n Restrictions: Few restrictions

      \n
    • \n
    \n
  • \n
  • \n

    \n Tunnel Category C\n

    \n
      \n
    • \n

      \n Risk Level: Medium risk

      \n
    • \n
    • \n

      \n Restrictions: Some restrictions

      \n
    • \n
    \n
  • \n
  • \n

    \n Tunnel Category D\n

    \n
      \n
    • \n

      \n Risk Level: High risk

      \n
    • \n
    • \n

      \n Restrictions: Many restrictions occur

      \n
    • \n
    \n
  • \n
  • \n

    \n Tunnel Category E\n

    \n
      \n
    • \n

      \n Risk Level: Very high risk

      \n
    • \n
    • \n

      \n Restrictions: Restricted tunnel

      \n
    • \n
    \n
  • \n
" + } + }, + "Width": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Width of the vehicle in centimenters.

", + "smithy.api#range": { + "min": 0, + "max": 5000 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Truck\".

" + } + }, + "com.amazonaws.georoutes#RoundaboutAngle": { + "type": "double", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": -360, + "max": 360 + } + } + }, + "com.amazonaws.georoutes#Route": { + "type": "structure", + "members": { + "Legs": { + "target": "com.amazonaws.georoutes#RouteLegList", + "traits": { + "smithy.api#documentation": "

A leg is a section of a route from one waypoint to the next. A leg could be of type Vehicle, Pedestrian or Ferry.\nLegs of different types could occur together within a single route. For example, a car employing the use of a Ferry will contain Vehicle legs corresponding to journey on land, and Ferry legs corresponding to the journey via Ferry.

", + "smithy.api#required": {} + } + }, + "MajorRoadLabels": { + "target": "com.amazonaws.georoutes#RouteMajorRoadLabelList", + "traits": { + "smithy.api#documentation": "

Important labels including names and route numbers that differentiate the current route from the alternatives presented.

", + "smithy.api#length": { + "min": 0, + "max": 2 + }, + "smithy.api#required": {} + } + }, + "Summary": { + "target": "com.amazonaws.georoutes#RouteSummary", + "traits": { + "smithy.api#documentation": "

Summarized details of the leg.

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

The route.

" + } + }, + "com.amazonaws.georoutes#RouteAllowOptions": { + "type": "structure", + "members": { + "Hot": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Allow Hot (High Occupancy Toll) lanes while calculating the route.

" + } + }, + "Hov": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Allow Hov (High Occupancy vehicle) lanes while calculating the route.

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

Features that are allowed while calculating. a route

" + } + }, + "com.amazonaws.georoutes#RouteAvoidanceArea": { + "type": "structure", + "members": { + "Except": { + "target": "com.amazonaws.georoutes#RouteAvoidanceAreaGeometryList", + "traits": { + "smithy.api#documentation": "

Exceptions to the provided avoidance geometry, to be included while calculating the route.

" + } + }, + "Geometry": { + "target": "com.amazonaws.georoutes#RouteAvoidanceAreaGeometry", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Areas to be avoided.

" + } + }, + "com.amazonaws.georoutes#RouteAvoidanceAreaGeometry": { + "type": "structure", + "members": { + "Corridor": { + "target": "com.amazonaws.georoutes#Corridor", + "traits": { + "smithy.api#documentation": "

Geometry defined as a corridor - a LineString with a radius that defines the width of the corridor.

" + } + }, + "BoundingBox": { + "target": "com.amazonaws.georoutes#BoundingBox", + "traits": { + "smithy.api#documentation": "

Geometry defined as a bounding box. The first pair represents the X and Y coordinates\n (longitude and latitude,) of the southwest corner of the bounding box; the second pair\n represents the X and Y coordinates (longitude and latitude) of the northeast corner.

" + } + }, + "Polygon": { + "target": "com.amazonaws.georoutes#LinearRings", + "traits": { + "smithy.api#documentation": "

Geometry defined as a polygon with only one linear ring.

", + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "PolylineCorridor": { + "target": "com.amazonaws.georoutes#PolylineCorridor", + "traits": { + "smithy.api#documentation": "

Geometry defined as an encoded corridor - an encoded polyline with a radius that defines\n the width of the corridor.

" + } + }, + "PolylinePolygon": { + "target": "com.amazonaws.georoutes#PolylineRingList", + "traits": { + "smithy.api#documentation": "

A list of Isoline PolylinePolygon, for each isoline PolylinePolygon, it contains PolylinePolygon \n of the first linear ring (the outer ring) and from 2nd item to the last item (the inner rings). \n For more information on polyline encoding, see https://github.com/heremaps/flexiblepolyline/blob/master/README.md.

", + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Geometry of the area to be avoided.

" + } + }, + "com.amazonaws.georoutes#RouteAvoidanceAreaGeometryList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteAvoidanceAreaGeometry" + } + }, + "com.amazonaws.georoutes#RouteAvoidanceAreaList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteAvoidanceArea" + } + }, + "com.amazonaws.georoutes#RouteAvoidanceOptions": { + "type": "structure", + "members": { + "Areas": { + "target": "com.amazonaws.georoutes#RouteAvoidanceAreaList", + "traits": { + "smithy.api#documentation": "

Areas to be avoided.

" + } + }, + "CarShuttleTrains": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid car-shuttle-trains while calculating the route.

" + } + }, + "ControlledAccessHighways": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid controlled access highways while calculating the route.

" + } + }, + "DirtRoads": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid dirt roads while calculating the route.

" + } + }, + "Ferries": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid ferries while calculating the route.

" + } + }, + "SeasonalClosure": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid roads that have seasonal closure while calculating the route.

" + } + }, + "TollRoads": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoids roads where the specified toll transponders are the only mode of payment.

" + } + }, + "TollTransponders": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoids roads where the specified toll transponders are the only mode of payment.

" + } + }, + "TruckRoadTypes": { + "target": "com.amazonaws.georoutes#TruckRoadTypeList", + "traits": { + "smithy.api#documentation": "

Truck road type identifiers. BK1 through BK4 apply only to Sweden. \n A2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico.

\n \n

There are currently no other supported values as of 26th April 2024.

\n
" + } + }, + "Tunnels": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid tunnels while calculating the route.

" + } + }, + "UTurns": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid U-turns for calculation on highways and motorways.

" + } + }, + "ZoneCategories": { + "target": "com.amazonaws.georoutes#RouteAvoidanceZoneCategoryList", + "traits": { + "smithy.api#documentation": "

Zone categories to be avoided.

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

Options related to areas to be avoided.

" + } + }, + "com.amazonaws.georoutes#RouteAvoidanceZoneCategory": { + "type": "structure", + "members": { + "Category": { + "target": "com.amazonaws.georoutes#RouteZoneCategory", + "traits": { + "smithy.api#documentation": "

Zone category to be avoided.

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

Zone categories to be avoided.

" + } + }, + "com.amazonaws.georoutes#RouteAvoidanceZoneCategoryList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteAvoidanceZoneCategory" + }, + "traits": { + "smithy.api#length": { + "max": 3 + } + } + }, + "com.amazonaws.georoutes#RouteCarOptions": { + "type": "structure", + "members": { + "EngineType": { + "target": "com.amazonaws.georoutes#RouteEngineType", + "traits": { + "smithy.api#documentation": "

Engine type of the vehicle.

" + } + }, + "LicensePlate": { + "target": "com.amazonaws.georoutes#RouteVehicleLicensePlate", + "traits": { + "smithy.api#documentation": "

The vehicle License Plate.

" + } + }, + "MaxSpeed": { + "target": "com.amazonaws.georoutes#SpeedKilometersPerHour", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Maximum speed specified.

\n

\n Unit: KilometersPerHour\n

", + "smithy.api#range": { + "min": 3.6, + "max": 252.0 + } + } + }, + "Occupancy": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

The number of occupants in the vehicle.

\n

Default Value: 1\n

", + "smithy.api#range": { + "min": 1 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Car\"

" + } + }, + "com.amazonaws.georoutes#RouteContinueHighwayStepDetails": { + "type": "structure", + "members": { + "Intersection": { + "target": "com.amazonaws.georoutes#LocalizedStringList", + "traits": { + "smithy.api#documentation": "

Name of the intersection, if applicable to the step.

", + "smithy.api#required": {} + } + }, + "SteeringDirection": { + "target": "com.amazonaws.georoutes#RouteSteeringDirection", + "traits": { + "smithy.api#documentation": "

Steering direction for the step.

" + } + }, + "TurnAngle": { + "target": "com.amazonaws.georoutes#TurnAngle", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Angle of the turn.

" + } + }, + "TurnIntensity": { + "target": "com.amazonaws.georoutes#RouteTurnIntensity", + "traits": { + "smithy.api#documentation": "

Intensity of the turn.

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

Details related to the continue highway step.

" + } + }, + "com.amazonaws.georoutes#RouteContinueStepDetails": { + "type": "structure", + "members": { + "Intersection": { + "target": "com.amazonaws.georoutes#LocalizedStringList", + "traits": { + "smithy.api#documentation": "

Name of the intersection, if applicable to the step.

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

Details related to the continue step.

" + } + }, + "com.amazonaws.georoutes#RouteDestinationOptions": { + "type": "structure", + "members": { + "AvoidActionsForDistance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Avoids actions for the provided distance. This is typically to consider for users in moving vehicles who may not have sufficient time to make an action at an origin or a destination.

", + "smithy.api#range": { + "max": 2000 + } + } + }, + "AvoidUTurns": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid U-turns for calculation on highways and motorways.

" + } + }, + "Heading": { + "target": "com.amazonaws.georoutes#Heading", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

GPS Heading at the position.

" + } + }, + "Matching": { + "target": "com.amazonaws.georoutes#RouteMatchingOptions", + "traits": { + "smithy.api#documentation": "

Options to configure matching the provided position to the road network.

" + } + }, + "SideOfStreet": { + "target": "com.amazonaws.georoutes#RouteSideOfStreetOptions", + "traits": { + "smithy.api#documentation": "

Options to configure matching the provided position to a side of the street.

" + } + }, + "StopDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the stop.

\n

\n Unit: seconds\n

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

Options related to the destination.

" + } + }, + "com.amazonaws.georoutes#RouteDirection": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "EAST", + "value": "East" + }, + { + "name": "NORTH", + "value": "North" + }, + { + "name": "SOUTH", + "value": "South" + }, + { + "name": "WEST", + "value": "West" + } + ] + } + }, + "com.amazonaws.georoutes#RouteDriverOptions": { + "type": "structure", + "members": { + "Schedule": { + "target": "com.amazonaws.georoutes#RouteDriverScheduleIntervalList", + "traits": { + "smithy.api#documentation": "

Driver work-rest schedule. Stops are added to fulfil the provided rest schedule.

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

Driver related options.

" + } + }, + "com.amazonaws.georoutes#RouteDriverScheduleInterval": { + "type": "structure", + "members": { + "DriveDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Maximum allowed driving time before stopping to rest.

\n

\n Unit: seconds\n

", + "smithy.api#required": {} + } + }, + "RestDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Resting time before the driver can continue driving.

\n

\n Unit: seconds\n

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

Interval of the driver work-rest schedule. \n Stops are added to fulfil the provided rest schedule.

" + } + }, + "com.amazonaws.georoutes#RouteDriverScheduleIntervalList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteDriverScheduleInterval" + } + }, + "com.amazonaws.georoutes#RouteEmissionType": { + "type": "structure", + "members": { + "Co2EmissionClass": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The CO 2 emission classes.

" + } + }, + "Type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Type of the emission.

\n

\n Valid values: Euro1, Euro2, Euro3, Euro4, Euro5, Euro6, EuroEev\n

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

Type of the emission.

\n

\n Valid values: Euro1, Euro2, Euro3, Euro4, Euro5, Euro6, EuroEev\n

" + } + }, + "com.amazonaws.georoutes#RouteEngineType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "ELECTRIC", + "value": "Electric" + }, + { + "name": "INTERNAL_COMBUSTION", + "value": "InternalCombustion" + }, + { + "name": "PLUGIN_HYBRID", + "value": "PluginHybrid" + } + ] + } + }, + "com.amazonaws.georoutes#RouteEnterHighwayStepDetails": { + "type": "structure", + "members": { + "Intersection": { + "target": "com.amazonaws.georoutes#LocalizedStringList", + "traits": { + "smithy.api#documentation": "

Name of the intersection, if applicable to the step.

", + "smithy.api#required": {} + } + }, + "SteeringDirection": { + "target": "com.amazonaws.georoutes#RouteSteeringDirection", + "traits": { + "smithy.api#documentation": "

Steering direction for the step.

" + } + }, + "TurnAngle": { + "target": "com.amazonaws.georoutes#TurnAngle", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Angle of the turn.

" + } + }, + "TurnIntensity": { + "target": "com.amazonaws.georoutes#RouteTurnIntensity", + "traits": { + "smithy.api#documentation": "

Intensity of the turn.

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

Details related to the enter highway step.

" + } + }, + "com.amazonaws.georoutes#RouteExclusionOptions": { + "type": "structure", + "members": { + "Countries": { + "target": "com.amazonaws.georoutes#CountryCodeList", + "traits": { + "smithy.api#documentation": "

List of countries to be avoided defined by two-letter or three-letter country codes.

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

Exclusion options for the route.

" + } + }, + "com.amazonaws.georoutes#RouteExitStepDetails": { + "type": "structure", + "members": { + "Intersection": { + "target": "com.amazonaws.georoutes#LocalizedStringList", + "traits": { + "smithy.api#documentation": "

Name of the intersection, if applicable to the step.

", + "smithy.api#required": {} + } + }, + "RelativeExit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Exit to be taken.

", + "smithy.api#range": { + "min": 1, + "max": 12 + } + } + }, + "SteeringDirection": { + "target": "com.amazonaws.georoutes#RouteSteeringDirection", + "traits": { + "smithy.api#documentation": "

Steering direction for the step.

" + } + }, + "TurnAngle": { + "target": "com.amazonaws.georoutes#TurnAngle", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Angle of the turn.

" + } + }, + "TurnIntensity": { + "target": "com.amazonaws.georoutes#RouteTurnIntensity", + "traits": { + "smithy.api#documentation": "

Intensity of the turn.

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

Details related to the exit step.

" + } + }, + "com.amazonaws.georoutes#RouteFerryAfterTravelStep": { + "type": "structure", + "members": { + "Duration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the step.

\n

\n Unit: seconds\n

", + "smithy.api#required": {} + } + }, + "Instruction": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Brief description of the step in the requested language.

\n \n

Only available when the TravelStepType is Default.

\n
" + } + }, + "Type": { + "target": "com.amazonaws.georoutes#RouteFerryAfterTravelStepType", + "traits": { + "smithy.api#documentation": "

Type of the step.

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

Steps of a leg that must be performed after the travel portion of the leg.

" + } + }, + "com.amazonaws.georoutes#RouteFerryAfterTravelStepList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteFerryAfterTravelStep" + } + }, + "com.amazonaws.georoutes#RouteFerryAfterTravelStepType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "DEBOARD", + "value": "Deboard" + } + ] + } + }, + "com.amazonaws.georoutes#RouteFerryArrival": { + "type": "structure", + "members": { + "Place": { + "target": "com.amazonaws.georoutes#RouteFerryPlace", + "traits": { + "smithy.api#documentation": "

The place details.

", + "smithy.api#required": {} + } + }, + "Time": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

The time.

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

Details corresponding to the arrival for the leg.

" + } + }, + "com.amazonaws.georoutes#RouteFerryBeforeTravelStep": { + "type": "structure", + "members": { + "Duration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the step.

\n

\n Unit: seconds\n

", + "smithy.api#required": {} + } + }, + "Instruction": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Brief description of the step in the requested language.

\n \n

Only available when the TravelStepType is Default.

\n
" + } + }, + "Type": { + "target": "com.amazonaws.georoutes#RouteFerryBeforeTravelStepType", + "traits": { + "smithy.api#documentation": "

Type of the step.

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

Steps of a leg that must be performed before the travel portion of the leg.

" + } + }, + "com.amazonaws.georoutes#RouteFerryBeforeTravelStepList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteFerryBeforeTravelStep" + } + }, + "com.amazonaws.georoutes#RouteFerryBeforeTravelStepType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "BOARD", + "value": "Board" + } + ] + } + }, + "com.amazonaws.georoutes#RouteFerryDeparture": { + "type": "structure", + "members": { + "Place": { + "target": "com.amazonaws.georoutes#RouteFerryPlace", + "traits": { + "smithy.api#documentation": "

The place details.

", + "smithy.api#required": {} + } + }, + "Time": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

The time.

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

Details corresponding to the departure for the leg.

" + } + }, + "com.amazonaws.georoutes#RouteFerryLegDetails": { + "type": "structure", + "members": { + "AfterTravelSteps": { + "target": "com.amazonaws.georoutes#RouteFerryAfterTravelStepList", + "traits": { + "smithy.api#documentation": "

Steps of a leg that must be performed after the travel portion of the leg.

", + "smithy.api#required": {} + } + }, + "Arrival": { + "target": "com.amazonaws.georoutes#RouteFerryArrival", + "traits": { + "smithy.api#documentation": "

Details corresponding to the arrival for the leg.

", + "smithy.api#required": {} + } + }, + "BeforeTravelSteps": { + "target": "com.amazonaws.georoutes#RouteFerryBeforeTravelStepList", + "traits": { + "smithy.api#documentation": "

Steps of a leg that must be performed before the travel portion of the leg.

", + "smithy.api#required": {} + } + }, + "Departure": { + "target": "com.amazonaws.georoutes#RouteFerryDeparture", + "traits": { + "smithy.api#documentation": "

Details corresponding to the departure for the leg.

", + "smithy.api#required": {} + } + }, + "Notices": { + "target": "com.amazonaws.georoutes#RouteFerryNoticeList", + "traits": { + "smithy.api#documentation": "

Notices are additional information returned that indicate issues that occurred during route calculation.

", + "smithy.api#required": {} + } + }, + "PassThroughWaypoints": { + "target": "com.amazonaws.georoutes#RoutePassThroughWaypointList", + "traits": { + "smithy.api#documentation": "

Waypoints that were passed through during the leg. This includes the waypoints that were configured with the PassThrough option.

", + "smithy.api#required": {} + } + }, + "RouteName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Route name of the ferry line.

" + } + }, + "Spans": { + "target": "com.amazonaws.georoutes#RouteFerrySpanList", + "traits": { + "smithy.api#documentation": "

Spans that were computed for the requested SpanAdditionalFeatures.

", + "smithy.api#required": {} + } + }, + "Summary": { + "target": "com.amazonaws.georoutes#RouteFerrySummary", + "traits": { + "smithy.api#documentation": "

Summarized details of the leg.

" + } + }, + "TravelSteps": { + "target": "com.amazonaws.georoutes#RouteFerryTravelStepList", + "traits": { + "smithy.api#documentation": "

Steps of a leg that must be performed before the travel portion of the leg.

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

FerryLegDetails is populated when the Leg type is Ferry, and provides additional\n information that is specific

" + } + }, + "com.amazonaws.georoutes#RouteFerryNotice": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.georoutes#RouteFerryNoticeCode", + "traits": { + "smithy.api#documentation": "

Code corresponding to the issue.

", + "smithy.api#required": {} + } + }, + "Impact": { + "target": "com.amazonaws.georoutes#RouteNoticeImpact", + "traits": { + "smithy.api#documentation": "

Impact corresponding to the issue. While Low impact notices can be safely ignored, High impact notices must be evaluated further to determine the impact.

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

Notices are additional information returned that indicate issues that occurred during route calculation.

" + } + }, + "com.amazonaws.georoutes#RouteFerryNoticeCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "ACCURATE_POLYLINE_UNAVAILABLE", + "value": "AccuratePolylineUnavailable" + }, + { + "name": "NO_SCHEDULE", + "value": "NoSchedule" + }, + { + "name": "OTHER", + "value": "Other" + }, + { + "name": "VIOLATED_AVOID_FERRY", + "value": "ViolatedAvoidFerry" + }, + { + "name": "VIOLATED_AVOID_RAIL_FERRY", + "value": "ViolatedAvoidRailFerry" + } + ] + } + }, + "com.amazonaws.georoutes#RouteFerryNoticeList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteFerryNotice" + } + }, + "com.amazonaws.georoutes#RouteFerryOverviewSummary": { + "type": "structure", + "members": { + "Distance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Distance of the step.

", + "smithy.api#required": {} + } + }, + "Duration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the step.

\n

\n Unit: seconds\n

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

Summarized details of the leg.

" + } + }, + "com.amazonaws.georoutes#RouteFerryPlace": { + "type": "structure", + "members": { + "Name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the place.

" + } + }, + "OriginalPosition": { + "target": "com.amazonaws.georoutes#Position23", + "traits": { + "smithy.api#documentation": "

Position provided in the request.

" + } + }, + "Position": { + "target": "com.amazonaws.georoutes#Position23", + "traits": { + "smithy.api#documentation": "

Position defined as [longitude, latitude].

", + "smithy.api#required": {} + } + }, + "WaypointIndex": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Index of the waypoint in the request.

", + "smithy.api#range": { + "min": 0 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Position provided in the request.

" + } + }, + "com.amazonaws.georoutes#RouteFerrySpan": { + "type": "structure", + "members": { + "Country": { + "target": "com.amazonaws.georoutes#CountryCode3", + "traits": { + "smithy.api#documentation": "

3 letter Country code corresponding to the Span.

" + } + }, + "Distance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Distance of the computed span. This feature doesn't split a span, but is always computed on a span split by other properties.

" + } + }, + "Duration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the computed span. This feature doesn't split a span, but is always computed on a span split by other properties.

\n

\n Unit: seconds\n

" + } + }, + "GeometryOffset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Offset in the leg geometry corresponding to the start of this span.

", + "smithy.api#range": { + "min": 0 + } + } + }, + "Names": { + "target": "com.amazonaws.georoutes#LocalizedStringList", + "traits": { + "smithy.api#documentation": "

Provides an array of names of the ferry span in available languages.

" + } + }, + "Region": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

2-3 letter Region code corresponding to the Span. This is either a province or a state.

", + "smithy.api#length": { + "min": 0, + "max": 3 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Span computed for the requested SpanAdditionalFeatures.

" + } + }, + "com.amazonaws.georoutes#RouteFerrySpanList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteFerrySpan" + } + }, + "com.amazonaws.georoutes#RouteFerrySummary": { + "type": "structure", + "members": { + "Overview": { + "target": "com.amazonaws.georoutes#RouteFerryOverviewSummary", + "traits": { + "smithy.api#documentation": "

Summarized details for the leg including before travel, travel and after travel steps.

" + } + }, + "TravelOnly": { + "target": "com.amazonaws.georoutes#RouteFerryTravelOnlySummary", + "traits": { + "smithy.api#documentation": "

Summarized details for the leg including travel steps only. The Distance for the travel only portion of the journey is in meters

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

Summarized details for the leg including travel steps only. The Distance for the travel only portion of the journey is the same as the Distance within the Overview summary.

" + } + }, + "com.amazonaws.georoutes#RouteFerryTravelOnlySummary": { + "type": "structure", + "members": { + "Duration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Total duration in free flowing traffic, which is the best case or shortest duration possible to cover the leg.

\n

\n Unit: seconds\n

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

Summarized details for the leg including travel steps only. The Distance for the travel only portion of the journey is the same as the Distance within the Overview summary.

" + } + }, + "com.amazonaws.georoutes#RouteFerryTravelStep": { + "type": "structure", + "members": { + "Distance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Distance of the step.

" + } + }, + "Duration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the step.

\n

\n Unit: seconds\n

", + "smithy.api#required": {} + } + }, + "GeometryOffset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Offset in the leg geometry corresponding to the start of this step.

", + "smithy.api#range": { + "min": 0 + } + } + }, + "Instruction": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Brief description of the step in the requested language.

\n \n

Only available when the TravelStepType is Default.

\n
" + } + }, + "Type": { + "target": "com.amazonaws.georoutes#RouteFerryTravelStepType", + "traits": { + "smithy.api#documentation": "

Type of the step.

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

Steps of a leg that must be performed during the travel portion of the leg.

" + } + }, + "com.amazonaws.georoutes#RouteFerryTravelStepList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteFerryTravelStep" + } + }, + "com.amazonaws.georoutes#RouteFerryTravelStepType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "DEPART", + "value": "Depart" + }, + { + "name": "CONTINUE", + "value": "Continue" + }, + { + "name": "ARRIVE", + "value": "Arrive" + } + ] + } + }, + "com.amazonaws.georoutes#RouteHazardousCargoType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "COMBUSTIBLE", + "value": "Combustible" + }, + { + "name": "CORROSIVE", + "value": "Corrosive" + }, + { + "name": "EXPLOSIVE", + "value": "Explosive" + }, + { + "name": "FLAMMABLE", + "value": "Flammable" + }, + { + "name": "GAS", + "value": "Gas" + }, + { + "name": "HARMFUL_TO_WATER", + "value": "HarmfulToWater" + }, + { + "name": "ORGANIC", + "value": "Organic" + }, + { + "name": "OTHER", + "value": "Other" + }, + { + "name": "POISON", + "value": "Poison" + }, + { + "name": "POISONOUS_INHALATION", + "value": "PoisonousInhalation" + }, + { + "name": "RADIOACTIVE", + "value": "Radioactive" + } + ] + } + }, + "com.amazonaws.georoutes#RouteHazardousCargoTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteHazardousCargoType" + }, + "traits": { + "smithy.api#length": { + "max": 11 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.georoutes#RouteKeepStepDetails": { + "type": "structure", + "members": { + "Intersection": { + "target": "com.amazonaws.georoutes#LocalizedStringList", + "traits": { + "smithy.api#documentation": "

Name of the intersection, if applicable to the step.

", + "smithy.api#required": {} + } + }, + "SteeringDirection": { + "target": "com.amazonaws.georoutes#RouteSteeringDirection", + "traits": { + "smithy.api#documentation": "

Steering direction for the step.

" + } + }, + "TurnAngle": { + "target": "com.amazonaws.georoutes#TurnAngle", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Angle of the turn.

" + } + }, + "TurnIntensity": { + "target": "com.amazonaws.georoutes#RouteTurnIntensity", + "traits": { + "smithy.api#documentation": "

Intensity of the turn.

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

Details that are specific to a Keep step.

" + } + }, + "com.amazonaws.georoutes#RouteLeg": { + "type": "structure", + "members": { + "FerryLegDetails": { + "target": "com.amazonaws.georoutes#RouteFerryLegDetails", + "traits": { + "smithy.api#documentation": "

FerryLegDetails is populated when the Leg type is Ferry, and provides additional\n information that is specific

" + } + }, + "Geometry": { + "target": "com.amazonaws.georoutes#RouteLegGeometry", + "traits": { + "smithy.api#documentation": "

Geometry of the area to be avoided.

", + "smithy.api#required": {} + } + }, + "Language": { + "target": "com.amazonaws.georoutes#LanguageTag", + "traits": { + "smithy.api#documentation": "

List of languages for instructions within steps in the response.

" + } + }, + "PedestrianLegDetails": { + "target": "com.amazonaws.georoutes#RoutePedestrianLegDetails", + "traits": { + "smithy.api#documentation": "

Details related to the pedestrian leg.

" + } + }, + "TravelMode": { + "target": "com.amazonaws.georoutes#RouteLegTravelMode", + "traits": { + "smithy.api#documentation": "

Specifies the mode of transport when calculating a route. \n Used in estimating the speed of travel and road compatibility.

\n

Default Value: Car\n

", + "smithy.api#required": {} + } + }, + "Type": { + "target": "com.amazonaws.georoutes#RouteLegType", + "traits": { + "smithy.api#documentation": "

Type of the leg.

", + "smithy.api#required": {} + } + }, + "VehicleLegDetails": { + "target": "com.amazonaws.georoutes#RouteVehicleLegDetails", + "traits": { + "smithy.api#documentation": "

Details related to the vehicle leg.

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

A leg is a section of a route from one waypoint to the next. A leg could be of type Vehicle, Pedestrian or Ferry.\nLegs of different types could occur together within a single route. For example, a car employing the use of a Ferry will contain Vehicle legs corresponding to journey on land, and Ferry legs corresponding to the journey via Ferry.

" + } + }, + "com.amazonaws.georoutes#RouteLegAdditionalFeature": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "ELEVATION", + "value": "Elevation" + }, + { + "name": "INCIDENTS", + "value": "Incidents" + }, + { + "name": "PASS_THROUGH_WAYPOINTS", + "value": "PassThroughWaypoints" + }, + { + "name": "SUMMARY", + "value": "Summary" + }, + { + "name": "TOLLS", + "value": "Tolls" + }, + { + "name": "TRAVEL_STEP_INSTRUCTIONS", + "value": "TravelStepInstructions" + }, + { + "name": "TRUCK_ROAD_TYPES", + "value": "TruckRoadTypes" + }, + { + "name": "TYPICAL_DURATION", + "value": "TypicalDuration" + }, + { + "name": "ZONES", + "value": "Zones" + } + ] + } + }, + "com.amazonaws.georoutes#RouteLegAdditionalFeatureList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteLegAdditionalFeature" + }, + "traits": { + "smithy.api#length": { + "max": 9 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.georoutes#RouteLegGeometry": { + "type": "structure", + "members": { + "LineString": { + "target": "com.amazonaws.georoutes#LineString", + "traits": { + "smithy.api#documentation": "

An ordered list of positions used to plot a route on a map.

\n \n

LineString and Polyline are mutually exclusive properties.

\n
" + } + }, + "Polyline": { + "target": "com.amazonaws.georoutes#Polyline", + "traits": { + "smithy.api#documentation": "

An ordered list of positions used to plot a route on a map in a lossy compression format.

\n \n

LineString and Polyline are mutually exclusive properties.

\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

The returned Route leg geometry.

" + } + }, + "com.amazonaws.georoutes#RouteLegList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteLeg" + } + }, + "com.amazonaws.georoutes#RouteLegTravelMode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "CAR", + "value": "Car" + }, + { + "name": "FERRY", + "value": "Ferry" + }, + { + "name": "PEDESTRIAN", + "value": "Pedestrian" + }, + { + "name": "SCOOTER", + "value": "Scooter" + }, + { + "name": "TRUCK", + "value": "Truck" + } + ] + } + }, + "com.amazonaws.georoutes#RouteLegType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "FERRY", + "value": "Ferry" + }, + { + "name": "PEDESTRIAN", + "value": "Pedestrian" + }, + { + "name": "VEHICLE", + "value": "Vehicle" + } + ] + } + }, + "com.amazonaws.georoutes#RouteList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#Route" + } + }, + "com.amazonaws.georoutes#RouteMajorRoadLabel": { + "type": "structure", + "members": { + "RoadName": { + "target": "com.amazonaws.georoutes#LocalizedString", + "traits": { + "smithy.api#documentation": "

Name of the road (localized).

" + } + }, + "RouteNumber": { + "target": "com.amazonaws.georoutes#RouteNumber", + "traits": { + "smithy.api#documentation": "

Route number of the road.

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

Important labels including names and route numbers that differentiate the current route from the alternatives presented.

" + } + }, + "com.amazonaws.georoutes#RouteMajorRoadLabelList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteMajorRoadLabel" + } + }, + "com.amazonaws.georoutes#RouteMatchingOptions": { + "type": "structure", + "members": { + "NameHint": { + "target": "com.amazonaws.georoutes#SensitiveString", + "traits": { + "smithy.api#documentation": "

Attempts to match the provided position to a road similar to the provided name.

", + "smithy.api#length": { + "max": 100 + } + } + }, + "OnRoadThreshold": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

If the distance to a highway/bridge/tunnel/sliproad is within threshold, the waypoint will be snapped to the highway/bridge/tunnel/sliproad.

\n

\n Unit: meters\n

" + } + }, + "Radius": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.

\n

\n Unit: Meters\n

" + } + }, + "Strategy": { + "target": "com.amazonaws.georoutes#MatchingStrategy", + "traits": { + "smithy.api#documentation": "

Strategy that defines matching of the position onto the road network. MatchAny considers all roads possible, whereas MatchMostSignificantRoad matches to the most significant road.

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

Options related to route matching.

" + } + }, + "com.amazonaws.georoutes#RouteMatrix": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteMatrixRow" + } + }, + "com.amazonaws.georoutes#RouteMatrixAllowOptions": { + "type": "structure", + "members": { + "Hot": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Allow Hot (High Occupancy Toll) lanes while calculating the route.

" + } + }, + "Hov": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Allow Hov (High Occupancy vehicle) lanes while calculating the route.

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

Allow Options related to the route matrix.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixAutoCircle": { + "type": "structure", + "members": { + "Margin": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The margin provided for the calculation.

", + "smithy.api#range": { + "min": 0, + "max": 200000 + } + } + }, + "MaxRadius": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The maximum size of the radius provided for the calculation.

", + "smithy.api#range": { + "min": 0, + "max": 200000 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Provides the circle that was used while calculating the route.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixAvoidanceArea": { + "type": "structure", + "members": { + "Geometry": { + "target": "com.amazonaws.georoutes#RouteMatrixAvoidanceAreaGeometry", + "traits": { + "smithy.api#documentation": "

Geometry of the area to be avoided.

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

Area to be avoided.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixAvoidanceAreaGeometry": { + "type": "structure", + "members": { + "BoundingBox": { + "target": "com.amazonaws.georoutes#BoundingBox", + "traits": { + "smithy.api#documentation": "

Geometry defined as a bounding box. The first pair represents the X and Y coordinates\n (longitude and latitude,) of the southwest corner of the bounding box; the second pair\n represents the X and Y coordinates (longitude and latitude) of the northeast corner.

" + } + }, + "Polygon": { + "target": "com.amazonaws.georoutes#LinearRings", + "traits": { + "smithy.api#documentation": "

Geometry defined as a polygon with only one linear ring.

", + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "PolylinePolygon": { + "target": "com.amazonaws.georoutes#PolylineRingList", + "traits": { + "smithy.api#documentation": "

A list of Isoline PolylinePolygon, for each isoline PolylinePolygon, it contains\n PolylinePolygon of the first linear ring (the outer ring) and from second item to the last\n item (the inner rings). For more information on polyline encoding, see https://github.com/heremaps/flexiblepolyline/blob/master/README.md.

", + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Geometry of the area to be avoided.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixAvoidanceAreaList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteMatrixAvoidanceArea" + } + }, + "com.amazonaws.georoutes#RouteMatrixAvoidanceOptions": { + "type": "structure", + "members": { + "Areas": { + "target": "com.amazonaws.georoutes#RouteMatrixAvoidanceAreaList", + "traits": { + "smithy.api#documentation": "

Areas to be avoided.

", + "smithy.api#length": { + "max": 250 + } + } + }, + "CarShuttleTrains": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid car-shuttle-trains while calculating the route.

" + } + }, + "ControlledAccessHighways": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid controlled access highways while calculating the route.

" + } + }, + "DirtRoads": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid dirt roads while calculating the route.

" + } + }, + "Ferries": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid ferries while calculating the route.

" + } + }, + "TollRoads": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoids roads where the specified toll transponders are the only mode of payment.

" + } + }, + "TollTransponders": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoids roads where the specified toll transponders are the only mode of payment.

" + } + }, + "TruckRoadTypes": { + "target": "com.amazonaws.georoutes#TruckRoadTypeList", + "traits": { + "smithy.api#documentation": "

Truck road type identifiers. BK1 through BK4 apply only to Sweden. \n A2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico.

\n \n

There are currently no other supported values as of 26th April 2024.

\n
" + } + }, + "Tunnels": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid tunnels while calculating the route.

" + } + }, + "UTurns": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid U-turns for calculation on highways and motorways.

" + } + }, + "ZoneCategories": { + "target": "com.amazonaws.georoutes#RouteMatrixAvoidanceZoneCategoryList", + "traits": { + "smithy.api#documentation": "

Zone categories to be avoided.

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

Options related to the route matrix.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixAvoidanceZoneCategory": { + "type": "structure", + "members": { + "Category": { + "target": "com.amazonaws.georoutes#RouteMatrixZoneCategory", + "traits": { + "smithy.api#documentation": "

Zone category to be avoided.

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

Zone categories to be avoided.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixAvoidanceZoneCategoryList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteMatrixAvoidanceZoneCategory" + }, + "traits": { + "smithy.api#length": { + "max": 3 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.georoutes#RouteMatrixBoundary": { + "type": "structure", + "members": { + "Geometry": { + "target": "com.amazonaws.georoutes#RouteMatrixBoundaryGeometry", + "traits": { + "smithy.api#documentation": "

Geometry of the area to be avoided.

" + } + }, + "Unbounded": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

No restrictions in terms of a routing boundary, and is typically used for longer routes.

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

Boundary within which the matrix is to be calculated. All data, origins and destinations outside the boundary are considered invalid.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixBoundaryGeometry": { + "type": "structure", + "members": { + "AutoCircle": { + "target": "com.amazonaws.georoutes#RouteMatrixAutoCircle", + "traits": { + "smithy.api#documentation": "

Provides the circle that was used while calculating the route.

" + } + }, + "Circle": { + "target": "com.amazonaws.georoutes#Circle", + "traits": { + "smithy.api#documentation": "

Geometry defined as a circle. When request routing boundary was set as AutoCircle, the response routing boundary will return Circle derived from the AutoCircle settings.

" + } + }, + "BoundingBox": { + "target": "com.amazonaws.georoutes#BoundingBox", + "traits": { + "smithy.api#documentation": "

Geometry defined as a bounding box. The first pair represents the X and Y coordinates\n (longitude and latitude,) of the southwest corner of the bounding box; the second pair\n represents the X and Y coordinates (longitude and latitude) of the northeast corner.

" + } + }, + "Polygon": { + "target": "com.amazonaws.georoutes#LinearRings", + "traits": { + "smithy.api#documentation": "

Geometry defined as a polygon with only one linear ring.

", + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Geometry of the routing boundary.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixCarOptions": { + "type": "structure", + "members": { + "LicensePlate": { + "target": "com.amazonaws.georoutes#RouteMatrixVehicleLicensePlate", + "traits": { + "smithy.api#documentation": "

The vehicle License Plate.

" + } + }, + "MaxSpeed": { + "target": "com.amazonaws.georoutes#SpeedKilometersPerHour", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Maximum speed

\n

\n Unit: KilometersPerHour\n

", + "smithy.api#range": { + "min": 3.6, + "max": 252.0 + } + } + }, + "Occupancy": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

The number of occupants in the vehicle.

\n

Default Value: 1\n

", + "smithy.api#range": { + "min": 1 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Options related to the car.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixDestination": { + "type": "structure", + "members": { + "Options": { + "target": "com.amazonaws.georoutes#RouteMatrixDestinationOptions", + "traits": { + "smithy.api#documentation": "

Destination related options.

" + } + }, + "Position": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

Position defined as [longitude, latitude].

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

The route destination.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixDestinationList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteMatrixDestination" + } + }, + "com.amazonaws.georoutes#RouteMatrixDestinationOptions": { + "type": "structure", + "members": { + "AvoidActionsForDistance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Avoids actions for the provided distance. This is typically to consider for users in moving vehicles who may not have sufficient time to make an action at an origin or a destination.

", + "smithy.api#range": { + "min": 0 + } + } + }, + "Heading": { + "target": "com.amazonaws.georoutes#Heading", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

GPS Heading at the position.

" + } + }, + "Matching": { + "target": "com.amazonaws.georoutes#RouteMatrixMatchingOptions", + "traits": { + "smithy.api#documentation": "

Options to configure matching the provided position to the road network.

" + } + }, + "SideOfStreet": { + "target": "com.amazonaws.georoutes#RouteMatrixSideOfStreetOptions", + "traits": { + "smithy.api#documentation": "

Options to configure matching the provided position to a side of the street.

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

Options related to the destination.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixEntry": { + "type": "structure", + "members": { + "Distance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The total distance of travel for the route.

", + "smithy.api#required": {} + } + }, + "Duration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The expected duration of travel for the route.

\n

\n Unit: seconds\n

", + "smithy.api#required": {} + } + }, + "Error": { + "target": "com.amazonaws.georoutes#RouteMatrixErrorCode", + "traits": { + "smithy.api#documentation": "

Error code that occurred during calculation of the route.

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

The calculated route matrix containing the results for all pairs of Origins to Destination positions. Each row corresponds to one entry in Origins. Each entry in the row corresponds to the route from that entry in Origins to an entry in Destination positions.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixErrorCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "NO_MATCH", + "value": "NoMatch" + }, + { + "name": "NO_MATCH_DESTINATION", + "value": "NoMatchDestination" + }, + { + "name": "NO_MATCH_ORIGIN", + "value": "NoMatchOrigin" + }, + { + "name": "NO_ROUTE", + "value": "NoRoute" + }, + { + "name": "OUT_OF_BOUNDS", + "value": "OutOfBounds" + }, + { + "name": "OUT_OF_BOUNDS_DESTINATION", + "value": "OutOfBoundsDestination" + }, + { + "name": "OUT_OF_BOUNDS_ORIGIN", + "value": "OutOfBoundsOrigin" + }, + { + "name": "OTHER", + "value": "Other" + }, + { + "name": "VIOLATION", + "value": "Violation" + } + ] + } + }, + "com.amazonaws.georoutes#RouteMatrixExclusionOptions": { + "type": "structure", + "members": { + "Countries": { + "target": "com.amazonaws.georoutes#CountryCodeList", + "traits": { + "smithy.api#documentation": "

List of countries to be avoided defined by two-letter or three-letter country codes.

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

Exclusion options.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixHazardousCargoType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "COMBUSTIBLE", + "value": "Combustible" + }, + { + "name": "CORROSIVE", + "value": "Corrosive" + }, + { + "name": "EXPLOSIVE", + "value": "Explosive" + }, + { + "name": "FLAMMABLE", + "value": "Flammable" + }, + { + "name": "GAS", + "value": "Gas" + }, + { + "name": "HARMFUL_TO_WATER", + "value": "HarmfulToWater" + }, + { + "name": "ORGANIC", + "value": "Organic" + }, + { + "name": "OTHER", + "value": "Other" + }, + { + "name": "POISON", + "value": "Poison" + }, + { + "name": "POISONOUS_INHALATION", + "value": "PoisonousInhalation" + }, + { + "name": "RADIOACTIVE", + "value": "Radioactive" + } + ] + } + }, + "com.amazonaws.georoutes#RouteMatrixHazardousCargoTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteMatrixHazardousCargoType" + }, + "traits": { + "smithy.api#length": { + "max": 11 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.georoutes#RouteMatrixMatchingOptions": { + "type": "structure", + "members": { + "NameHint": { + "target": "com.amazonaws.georoutes#SensitiveString", + "traits": { + "smithy.api#documentation": "

Attempts to match the provided position to a road similar to the provided name.

" + } + }, + "OnRoadThreshold": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

If the distance to a highway/bridge/tunnel/sliproad is within threshold, the waypoint will be snapped to the highway/bridge/tunnel/sliproad.

\n

\n Unit: meters\n

", + "smithy.api#range": { + "min": 0 + } + } + }, + "Radius": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Considers all roads within the provided radius to match the provided destination to. The roads that are considered are determined by the provided Strategy.

\n

\n Unit: Meters\n

" + } + }, + "Strategy": { + "target": "com.amazonaws.georoutes#MatchingStrategy", + "traits": { + "smithy.api#documentation": "

Strategy that defines matching of the position onto the road network. MatchAny considers all roads possible, whereas MatchMostSignificantRoad matches to the most significant road.

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

Matching options.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixOrigin": { + "type": "structure", + "members": { + "Options": { + "target": "com.amazonaws.georoutes#RouteMatrixOriginOptions", + "traits": { + "smithy.api#documentation": "

Origin related options.

" + } + }, + "Position": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

Position defined as [longitude, latitude].

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

The start position for the route.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixOriginList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteMatrixOrigin" + } + }, + "com.amazonaws.georoutes#RouteMatrixOriginOptions": { + "type": "structure", + "members": { + "AvoidActionsForDistance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Avoids actions for the provided distance. This is typically to consider for users in moving vehicles who may not have sufficient time to make an action at an origin or a destination.

", + "smithy.api#range": { + "min": 0 + } + } + }, + "Heading": { + "target": "com.amazonaws.georoutes#Heading", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

GPS Heading at the position.

" + } + }, + "Matching": { + "target": "com.amazonaws.georoutes#RouteMatrixMatchingOptions", + "traits": { + "smithy.api#documentation": "

Options to configure matching the provided position to the road network.

" + } + }, + "SideOfStreet": { + "target": "com.amazonaws.georoutes#RouteMatrixSideOfStreetOptions", + "traits": { + "smithy.api#documentation": "

Options to configure matching the provided position to a side of the street.

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

Origin related options.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixRow": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteMatrixEntry" + } + }, + "com.amazonaws.georoutes#RouteMatrixScooterOptions": { + "type": "structure", + "members": { + "LicensePlate": { + "target": "com.amazonaws.georoutes#RouteMatrixVehicleLicensePlate", + "traits": { + "smithy.api#documentation": "

The vehicle License Plate.

" + } + }, + "MaxSpeed": { + "target": "com.amazonaws.georoutes#SpeedKilometersPerHour", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Maximum speed.

\n

\n Unit: KilometersPerHour\n

", + "smithy.api#range": { + "min": 3.6, + "max": 252.0 + } + } + }, + "Occupancy": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

The number of occupants in the vehicle.

\n

Default Value: 1\n

", + "smithy.api#range": { + "min": 1 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Scooter\"

" + } + }, + "com.amazonaws.georoutes#RouteMatrixSideOfStreetOptions": { + "type": "structure", + "members": { + "Position": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

Position defined as [longitude, latitude].

", + "smithy.api#required": {} + } + }, + "UseWith": { + "target": "com.amazonaws.georoutes#SideOfStreetMatchingStrategy", + "traits": { + "smithy.api#documentation": "

Strategy that defines when the side of street position should be used. AnyStreet will always use the provided position.

\n

Default Value: DividedStreetOnly\n

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

Options to configure matching the provided position to a side of the street.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixTrafficOptions": { + "type": "structure", + "members": { + "FlowEventThresholdOverride": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration for which flow traffic is considered valid. \n For this period, the flow traffic is used over historical traffic data. \n Flow traffic refers to congestion, which changes very quickly. \n Duration in seconds for which flow traffic event would be considered valid. \n While flow traffic event is valid it will be used over the historical traffic data.

" + } + }, + "Usage": { + "target": "com.amazonaws.georoutes#TrafficUsage", + "traits": { + "smithy.api#documentation": "

Determines if traffic should be used or ignored while calculating the route.

\n

Default Value: UseTrafficData\n

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

Traffic related options.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixTrailerOptions": { + "type": "structure", + "members": { + "TrailerCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Number of trailers attached to the vehicle.

\n

Default Value: 0\n

", + "smithy.api#range": { + "min": 0, + "max": 255 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Trailer options corresponding to the vehicle.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixTravelMode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "CAR", + "value": "Car" + }, + { + "name": "PEDESTRIAN", + "value": "Pedestrian" + }, + { + "name": "SCOOTER", + "value": "Scooter" + }, + { + "name": "TRUCK", + "value": "Truck" + } + ] + } + }, + "com.amazonaws.georoutes#RouteMatrixTravelModeOptions": { + "type": "structure", + "members": { + "Car": { + "target": "com.amazonaws.georoutes#RouteMatrixCarOptions", + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Car\"

" + } + }, + "Scooter": { + "target": "com.amazonaws.georoutes#RouteMatrixScooterOptions", + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Scooter\"

" + } + }, + "Truck": { + "target": "com.amazonaws.georoutes#RouteMatrixTruckOptions", + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Truck\"

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

Travel mode related options for the provided travel mode.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixTruckOptions": { + "type": "structure", + "members": { + "AxleCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Total number of axles of the vehicle.

", + "smithy.api#range": { + "min": 2, + "max": 255 + } + } + }, + "GrossWeight": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Gross weight of the vehicle including trailers, and goods at capacity.

\n

\n Unit: Kilograms\n

" + } + }, + "HazardousCargos": { + "target": "com.amazonaws.georoutes#RouteMatrixHazardousCargoTypeList", + "traits": { + "smithy.api#documentation": "

List of Hazardous cargo contained in the vehicle.

" + } + }, + "Height": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Height of the vehicle.

\n

\n Unit: centimeters\n

", + "smithy.api#range": { + "min": 0, + "max": 5000 + } + } + }, + "KpraLength": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Kingpin to rear axle length of the vehicle

\n

\n Unit: centimeters\n

" + } + }, + "Length": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Length of the vehicle.

\n

\n Unit: centimeters\n

", + "smithy.api#range": { + "min": 0, + "max": 30000 + } + } + }, + "LicensePlate": { + "target": "com.amazonaws.georoutes#RouteMatrixVehicleLicensePlate", + "traits": { + "smithy.api#documentation": "

The vehicle License Plate.

" + } + }, + "MaxSpeed": { + "target": "com.amazonaws.georoutes#SpeedKilometersPerHour", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Maximum speed

\n

\n Unit: KilometersPerHour\n

", + "smithy.api#range": { + "min": 3.6, + "max": 252.0 + } + } + }, + "Occupancy": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

The number of occupants in the vehicle.

\n

Default Value: 1\n

", + "smithy.api#range": { + "min": 1 + } + } + }, + "PayloadCapacity": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Payload capacity of the vehicle and trailers attached.

\n

\n Unit: kilograms\n

" + } + }, + "Trailer": { + "target": "com.amazonaws.georoutes#RouteMatrixTrailerOptions", + "traits": { + "smithy.api#documentation": "

Trailer options corresponding to the vehicle.

" + } + }, + "TruckType": { + "target": "com.amazonaws.georoutes#RouteMatrixTruckType", + "traits": { + "smithy.api#documentation": "

Type of the truck.

" + } + }, + "TunnelRestrictionCode": { + "target": "com.amazonaws.georoutes#TunnelRestrictionCode", + "traits": { + "smithy.api#documentation": "

The tunnel restriction code.

\n

Tunnel categories in this list indicate the restrictions which apply to certain tunnels in Great Britain. \n They relate to the types of dangerous goods that can be transported through them.

\n
    \n
  • \n

    \n Tunnel Category B\n

    \n
      \n
    • \n

      \n Risk Level: Limited risk

      \n
    • \n
    • \n

      \n Restrictions: Few restrictions

      \n
    • \n
    \n
  • \n
  • \n

    \n Tunnel Category C\n

    \n
      \n
    • \n

      \n Risk Level: Medium risk

      \n
    • \n
    • \n

      \n Restrictions: Some restrictions

      \n
    • \n
    \n
  • \n
  • \n

    \n Tunnel Category D\n

    \n
      \n
    • \n

      \n Risk Level: High risk

      \n
    • \n
    • \n

      \n Restrictions: Many restrictions occur

      \n
    • \n
    \n
  • \n
  • \n

    \n Tunnel Category E\n

    \n
      \n
    • \n

      \n Risk Level: Very high risk

      \n
    • \n
    • \n

      \n Restrictions: Restricted tunnel

      \n
    • \n
    \n
  • \n
" + } + }, + "WeightPerAxle": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Heaviest weight per axle irrespective of the axle type or the axle group. Meant for usage in countries where the differences in axle types or axle groups are not distinguished.

\n

\n Unit: Kilograms\n

" + } + }, + "WeightPerAxleGroup": { + "target": "com.amazonaws.georoutes#WeightPerAxleGroup", + "traits": { + "smithy.api#documentation": "

Specifies the total weight for the specified axle group. Meant for usage in countries that have different regulations based on the axle group type.

" + } + }, + "Width": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Width of the vehicle.

\n

\n Unit: centimeters\n

", + "smithy.api#range": { + "min": 0, + "max": 5000 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Truck\"

" + } + }, + "com.amazonaws.georoutes#RouteMatrixTruckType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "LIGHT_TRUCK", + "value": "LightTruck" + }, + { + "name": "STRAIGHT_TRUCK", + "value": "StraightTruck" + }, + { + "name": "TRACTOR", + "value": "Tractor" + } + ] + } + }, + "com.amazonaws.georoutes#RouteMatrixVehicleLicensePlate": { + "type": "structure", + "members": { + "LastCharacter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The last character of the License Plate.

", + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

The vehicle License Plate.

" + } + }, + "com.amazonaws.georoutes#RouteMatrixZoneCategory": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "CONGESTION_PRICING", + "value": "CongestionPricing" + }, + { + "name": "ENVIRONMENTAL", + "value": "Environmental" + }, + { + "name": "VIGNETTE", + "value": "Vignette" + } + ] + } + }, + "com.amazonaws.georoutes#RouteNoticeDetailRange": { + "type": "structure", + "members": { + "Min": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Minimum value for the range.

", + "smithy.api#range": { + "min": 0 + } + } + }, + "Max": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Maximum value for the range.

", + "smithy.api#range": { + "min": 0 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Notice Detail that is a range.

" + } + }, + "com.amazonaws.georoutes#RouteNoticeImpact": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "HIGH", + "value": "High" + }, + { + "name": "LOW", + "value": "Low" + } + ] + } + }, + "com.amazonaws.georoutes#RouteNumber": { + "type": "structure", + "members": { + "Direction": { + "target": "com.amazonaws.georoutes#RouteDirection", + "traits": { + "smithy.api#documentation": "

Directional identifier of the route.

" + } + }, + "Language": { + "target": "com.amazonaws.georoutes#LanguageTag", + "traits": { + "smithy.api#documentation": "

List of languages for instructions corresponding to the route number.

" + } + }, + "Value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The route number.

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

The route number.

" + } + }, + "com.amazonaws.georoutes#RouteNumberList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteNumber" + } + }, + "com.amazonaws.georoutes#RouteOriginOptions": { + "type": "structure", + "members": { + "AvoidActionsForDistance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Avoids actions for the provided distance. This is typically to consider for users in moving vehicles who may not have sufficient time to make an action at an origin or a destination.

", + "smithy.api#range": { + "max": 2000 + } + } + }, + "AvoidUTurns": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid U-turns for calculation on highways and motorways.

" + } + }, + "Heading": { + "target": "com.amazonaws.georoutes#Heading", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

GPS Heading at the position.

" + } + }, + "Matching": { + "target": "com.amazonaws.georoutes#RouteMatchingOptions", + "traits": { + "smithy.api#documentation": "

Options to configure matching the provided position to the road network.

" + } + }, + "SideOfStreet": { + "target": "com.amazonaws.georoutes#RouteSideOfStreetOptions", + "traits": { + "smithy.api#documentation": "

Options to configure matching the provided position to a side of the street.

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

Origin related options.

" + } + }, + "com.amazonaws.georoutes#RoutePassThroughPlace": { + "type": "structure", + "members": { + "OriginalPosition": { + "target": "com.amazonaws.georoutes#Position23", + "traits": { + "smithy.api#documentation": "

Position provided in the request.

" + } + }, + "Position": { + "target": "com.amazonaws.georoutes#Position23", + "traits": { + "smithy.api#documentation": "

Position defined as [longitude, latitude].

", + "smithy.api#required": {} + } + }, + "WaypointIndex": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Index of the waypoint in the request.

", + "smithy.api#range": { + "min": 0 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

The place where the waypoint is passed through and not treated as a stop.

" + } + }, + "com.amazonaws.georoutes#RoutePassThroughWaypoint": { + "type": "structure", + "members": { + "GeometryOffset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Offset in the leg geometry corresponding to the start of this step.

", + "smithy.api#range": { + "min": 0 + } + } + }, + "Place": { + "target": "com.amazonaws.georoutes#RoutePassThroughPlace", + "traits": { + "smithy.api#documentation": "

The place details.

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

If the waypoint should be treated as a stop. If yes, the route is split up into different legs around the stop.

" + } + }, + "com.amazonaws.georoutes#RoutePassThroughWaypointList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RoutePassThroughWaypoint" + } + }, + "com.amazonaws.georoutes#RoutePedestrianArrival": { + "type": "structure", + "members": { + "Place": { + "target": "com.amazonaws.georoutes#RoutePedestrianPlace", + "traits": { + "smithy.api#documentation": "

The place details.

", + "smithy.api#required": {} + } + }, + "Time": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

The time.

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

Details corresponding to the arrival for a leg.

\n

Time format:YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm\n

\n

Examples:

\n

\n 2020-04-22T17:57:24Z\n

\n

\n 2020-04-22T17:57:24+02:00\n

" + } + }, + "com.amazonaws.georoutes#RoutePedestrianDeparture": { + "type": "structure", + "members": { + "Place": { + "target": "com.amazonaws.georoutes#RoutePedestrianPlace", + "traits": { + "smithy.api#documentation": "

The place details.

", + "smithy.api#required": {} + } + }, + "Time": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

The time.

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

Details corresponding to the departure for a leg.

\n

Time format:YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm\n

\n

Examples:

\n

\n 2020-04-22T17:57:24Z\n

\n

\n 2020-04-22T17:57:24+02:00\n

" + } + }, + "com.amazonaws.georoutes#RoutePedestrianLegDetails": { + "type": "structure", + "members": { + "Arrival": { + "target": "com.amazonaws.georoutes#RoutePedestrianArrival", + "traits": { + "smithy.api#documentation": "

Details corresponding to the arrival for the leg.

", + "smithy.api#required": {} + } + }, + "Departure": { + "target": "com.amazonaws.georoutes#RoutePedestrianDeparture", + "traits": { + "smithy.api#documentation": "

Details corresponding to the departure for the leg.

", + "smithy.api#required": {} + } + }, + "Notices": { + "target": "com.amazonaws.georoutes#RoutePedestrianNoticeList", + "traits": { + "smithy.api#documentation": "

Notices are additional information returned that indicate issues that occurred during route calculation.

", + "smithy.api#required": {} + } + }, + "PassThroughWaypoints": { + "target": "com.amazonaws.georoutes#RoutePassThroughWaypointList", + "traits": { + "smithy.api#documentation": "

Waypoints that were passed through during the leg. This includes the waypoints that were configured with the PassThrough option.

", + "smithy.api#required": {} + } + }, + "Spans": { + "target": "com.amazonaws.georoutes#RoutePedestrianSpanList", + "traits": { + "smithy.api#documentation": "

Spans that were computed for the requested SpanAdditionalFeatures.

", + "smithy.api#required": {} + } + }, + "Summary": { + "target": "com.amazonaws.georoutes#RoutePedestrianSummary", + "traits": { + "smithy.api#documentation": "

Summarized details of the leg.

" + } + }, + "TravelSteps": { + "target": "com.amazonaws.georoutes#RoutePedestrianTravelStepList", + "traits": { + "smithy.api#documentation": "

Steps of a leg that must be performed before the travel portion of the leg.

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

Details that are specific to a pedestrian leg.

" + } + }, + "com.amazonaws.georoutes#RoutePedestrianNotice": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.georoutes#RoutePedestrianNoticeCode", + "traits": { + "smithy.api#documentation": "

Code corresponding to the issue.

", + "smithy.api#required": {} + } + }, + "Impact": { + "target": "com.amazonaws.georoutes#RouteNoticeImpact", + "traits": { + "smithy.api#documentation": "

Impact corresponding to the issue. While Low impact notices can be safely ignored, High impact notices must be evaluated further to determine the impact.

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

Notices are additional information returned that indicate issues that occurred during route calculation.

" + } + }, + "com.amazonaws.georoutes#RoutePedestrianNoticeCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "ACCURATE_POLYLINE_UNAVAILABLE", + "value": "AccuratePolylineUnavailable" + }, + { + "name": "OTHER", + "value": "Other" + }, + { + "name": "VIOLATED_AVOID_DIRT_ROAD", + "value": "ViolatedAvoidDirtRoad" + }, + { + "name": "VIOLATED_AVOID_TUNNEL", + "value": "ViolatedAvoidTunnel" + }, + { + "name": "VIOLATED_PEDESTRIAN_OPTION", + "value": "ViolatedPedestrianOption" + } + ] + } + }, + "com.amazonaws.georoutes#RoutePedestrianNoticeList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RoutePedestrianNotice" + } + }, + "com.amazonaws.georoutes#RoutePedestrianOptions": { + "type": "structure", + "members": { + "Speed": { + "target": "com.amazonaws.georoutes#SpeedKilometersPerHour", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Walking speed in Kilometers per hour.

", + "smithy.api#range": { + "min": 1.8, + "max": 7.2 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Options related to the pedestrian.

" + } + }, + "com.amazonaws.georoutes#RoutePedestrianOverviewSummary": { + "type": "structure", + "members": { + "Distance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Distance of the step.

", + "smithy.api#required": {} + } + }, + "Duration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the step.

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

Provides a summary of a pedestrian route step.

" + } + }, + "com.amazonaws.georoutes#RoutePedestrianPlace": { + "type": "structure", + "members": { + "Name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the place.

" + } + }, + "OriginalPosition": { + "target": "com.amazonaws.georoutes#Position23", + "traits": { + "smithy.api#documentation": "

Position provided in the request.

" + } + }, + "Position": { + "target": "com.amazonaws.georoutes#Position23", + "traits": { + "smithy.api#documentation": "

Position defined as [longitude, latitude].

", + "smithy.api#required": {} + } + }, + "SideOfStreet": { + "target": "com.amazonaws.georoutes#RouteSideOfStreet", + "traits": { + "smithy.api#documentation": "

Options to configure matching the provided position to a side of the street.

" + } + }, + "WaypointIndex": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Index of the waypoint in the request.

", + "smithy.api#range": { + "min": 0 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Place details corresponding to the arrival or departure.

" + } + }, + "com.amazonaws.georoutes#RoutePedestrianSpan": { + "type": "structure", + "members": { + "BestCaseDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the computed span without traffic congestion.

\n

\n Unit: seconds\n

" + } + }, + "Country": { + "target": "com.amazonaws.georoutes#CountryCode3", + "traits": { + "smithy.api#documentation": "

3 letter Country code corresponding to the Span.

" + } + }, + "Distance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Distance of the computed span. This feature doesn't split a span, but is always computed on a span split by other properties.

" + } + }, + "Duration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the computed span. This feature doesn't split a span, but is always computed on a span split by other properties.

\n

\n Unit: seconds\n

" + } + }, + "DynamicSpeed": { + "target": "com.amazonaws.georoutes#RouteSpanDynamicSpeedDetails", + "traits": { + "smithy.api#documentation": "

Dynamic speed details corresponding to the span.

\n

\n Unit: KilometersPerHour\n

" + } + }, + "FunctionalClassification": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Functional classification of the road segment corresponding to the span.

", + "smithy.api#range": { + "min": 1, + "max": 5 + } + } + }, + "GeometryOffset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Offset in the leg geometry corresponding to the start of this span.

", + "smithy.api#range": { + "min": 0 + } + } + }, + "Incidents": { + "target": "com.amazonaws.georoutes#IndexList", + "traits": { + "smithy.api#documentation": "

Incidents corresponding to the span. These index into the Incidents in the parent Leg.

" + } + }, + "Names": { + "target": "com.amazonaws.georoutes#LocalizedStringList", + "traits": { + "smithy.api#documentation": "

Provides an array of names of the pedestrian span in available languages.

" + } + }, + "PedestrianAccess": { + "target": "com.amazonaws.georoutes#RouteSpanPedestrianAccessAttributeList", + "traits": { + "smithy.api#documentation": "

Access attributes for a pedestrian corresponding to the span.

" + } + }, + "Region": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

2-3 letter Region code corresponding to the Span. This is either a province or a state.

", + "smithy.api#length": { + "min": 0, + "max": 3 + } + } + }, + "RoadAttributes": { + "target": "com.amazonaws.georoutes#RouteSpanRoadAttributeList", + "traits": { + "smithy.api#documentation": "

Attributes for the road segment corresponding to the span.

" + } + }, + "RouteNumbers": { + "target": "com.amazonaws.georoutes#RouteNumberList", + "traits": { + "smithy.api#documentation": "

Designated route name or number corresponding to the span.

" + } + }, + "SpeedLimit": { + "target": "com.amazonaws.georoutes#RouteSpanSpeedLimitDetails", + "traits": { + "smithy.api#documentation": "

Speed limit details corresponding to the span.

\n

\n Unit: KilometersPerHour\n

" + } + }, + "TypicalDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the computed span under typical traffic congestion.

\n

\n Unit: seconds\n

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

Span computed for the requested SpanAdditionalFeatures.

" + } + }, + "com.amazonaws.georoutes#RoutePedestrianSpanList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RoutePedestrianSpan" + } + }, + "com.amazonaws.georoutes#RoutePedestrianSummary": { + "type": "structure", + "members": { + "Overview": { + "target": "com.amazonaws.georoutes#RoutePedestrianOverviewSummary", + "traits": { + "smithy.api#documentation": "

Summarized details for the leg including before travel, travel and after travel steps.

" + } + }, + "TravelOnly": { + "target": "com.amazonaws.georoutes#RoutePedestrianTravelOnlySummary", + "traits": { + "smithy.api#documentation": "

Summarized details for the leg including travel steps only. The Distance for the travel only portion of the journey is in meters

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

Summarized details for the leg including before travel, travel and after travel steps.

" + } + }, + "com.amazonaws.georoutes#RoutePedestrianTravelOnlySummary": { + "type": "structure", + "members": { + "Duration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the step.

\n

\n Unit: seconds\n

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

Summarized details for the leg including travel steps.

" + } + }, + "com.amazonaws.georoutes#RoutePedestrianTravelStep": { + "type": "structure", + "members": { + "ContinueStepDetails": { + "target": "com.amazonaws.georoutes#RouteContinueStepDetails", + "traits": { + "smithy.api#documentation": "

Details related to the continue step.

" + } + }, + "CurrentRoad": { + "target": "com.amazonaws.georoutes#RouteRoad", + "traits": { + "smithy.api#documentation": "

Details of the current road. See RouteRoad for details of sub-attributes.

" + } + }, + "Distance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Distance of the step.

" + } + }, + "Duration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the step.

\n

\n Unit: seconds\n

", + "smithy.api#required": {} + } + }, + "ExitNumber": { + "target": "com.amazonaws.georoutes#LocalizedStringList", + "traits": { + "smithy.api#documentation": "

Exit number of the road exit, if applicable.

" + } + }, + "GeometryOffset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Offset in the leg geometry corresponding to the start of this step.

", + "smithy.api#range": { + "min": 0 + } + } + }, + "Instruction": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Brief description of the step in the requested language.

\n \n

Only available when the TravelStepType is Default.

\n
" + } + }, + "KeepStepDetails": { + "target": "com.amazonaws.georoutes#RouteKeepStepDetails", + "traits": { + "smithy.api#documentation": "

Details that are specific to a Keep step.

" + } + }, + "NextRoad": { + "target": "com.amazonaws.georoutes#RouteRoad", + "traits": { + "smithy.api#documentation": "

Details of the next road. See RouteRoad for details of sub-attributes.

" + } + }, + "RoundaboutEnterStepDetails": { + "target": "com.amazonaws.georoutes#RouteRoundaboutEnterStepDetails", + "traits": { + "smithy.api#documentation": "

Details that are specific to a Roundabout Enter step.

" + } + }, + "RoundaboutExitStepDetails": { + "target": "com.amazonaws.georoutes#RouteRoundaboutExitStepDetails", + "traits": { + "smithy.api#documentation": "

Details that are specific to a Roundabout Exit step.

" + } + }, + "RoundaboutPassStepDetails": { + "target": "com.amazonaws.georoutes#RouteRoundaboutPassStepDetails", + "traits": { + "smithy.api#documentation": "

Details that are specific to a Roundabout Pass step.

" + } + }, + "Signpost": { + "target": "com.amazonaws.georoutes#RouteSignpost", + "traits": { + "smithy.api#documentation": "

Sign post information of the action, applicable only for TurnByTurn steps. See RouteSignpost for details of sub-attributes.

" + } + }, + "TurnStepDetails": { + "target": "com.amazonaws.georoutes#RouteTurnStepDetails", + "traits": { + "smithy.api#documentation": "

Details that are specific to a turn step.

" + } + }, + "Type": { + "target": "com.amazonaws.georoutes#RoutePedestrianTravelStepType", + "traits": { + "smithy.api#documentation": "

Type of the step.

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

Steps of a leg that must be performed during the travel portion of the leg.

" + } + }, + "com.amazonaws.georoutes#RoutePedestrianTravelStepList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RoutePedestrianTravelStep" + } + }, + "com.amazonaws.georoutes#RoutePedestrianTravelStepType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "ARRIVE", + "value": "Arrive" + }, + { + "name": "CONTINUE", + "value": "Continue" + }, + { + "name": "DEPART", + "value": "Depart" + }, + { + "name": "KEEP", + "value": "Keep" + }, + { + "name": "ROUNDABOUT_ENTER", + "value": "RoundaboutEnter" + }, + { + "name": "ROUNDABOUT_EXIT", + "value": "RoundaboutExit" + }, + { + "name": "ROUNDABOUT_PASS", + "value": "RoundaboutPass" + }, + { + "name": "TURN", + "value": "Turn" + }, + { + "name": "EXIT", + "value": "Exit" + }, + { + "name": "RAMP", + "value": "Ramp" + }, + { + "name": "U_TURN", + "value": "UTurn" + } + ] + } + }, + "com.amazonaws.georoutes#RouteRampStepDetails": { + "type": "structure", + "members": { + "Intersection": { + "target": "com.amazonaws.georoutes#LocalizedStringList", + "traits": { + "smithy.api#documentation": "

Name of the intersection, if applicable to the step.

", + "smithy.api#required": {} + } + }, + "SteeringDirection": { + "target": "com.amazonaws.georoutes#RouteSteeringDirection", + "traits": { + "smithy.api#documentation": "

Steering direction for the step.

" + } + }, + "TurnAngle": { + "target": "com.amazonaws.georoutes#TurnAngle", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Angle of the turn.

" + } + }, + "TurnIntensity": { + "target": "com.amazonaws.georoutes#RouteTurnIntensity", + "traits": { + "smithy.api#documentation": "

Intensity of the turn.

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

Details that are specific to a ramp step.

" + } + }, + "com.amazonaws.georoutes#RouteResponseNotice": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.georoutes#RouteResponseNoticeCode", + "traits": { + "smithy.api#documentation": "

Code corresponding to the issue.

", + "smithy.api#required": {} + } + }, + "Impact": { + "target": "com.amazonaws.georoutes#RouteNoticeImpact", + "traits": { + "smithy.api#documentation": "

Impact corresponding to the issue. While Low impact notices can be safely ignored, High impact notices must be evaluated further to determine the impact.

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

Notices are additional information returned that indicate issues that occurred during route calculation.

" + } + }, + "com.amazonaws.georoutes#RouteResponseNoticeCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "MAIN_LANGUAGE_NOT_FOUND", + "value": "MainLanguageNotFound" + }, + { + "name": "OTHER", + "value": "Other" + }, + { + "name": "TRAVEL_TIME_EXCEEDS_DRIVER_WORK_HOURS", + "value": "TravelTimeExceedsDriverWorkHours" + } + ] + } + }, + "com.amazonaws.georoutes#RouteResponseNoticeList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteResponseNotice" + } + }, + "com.amazonaws.georoutes#RouteRoad": { + "type": "structure", + "members": { + "RoadName": { + "target": "com.amazonaws.georoutes#LocalizedStringList", + "traits": { + "smithy.api#documentation": "

Name of the road (localized).

", + "smithy.api#required": {} + } + }, + "RouteNumber": { + "target": "com.amazonaws.georoutes#RouteNumberList", + "traits": { + "smithy.api#documentation": "

Route number of the road.

", + "smithy.api#required": {} + } + }, + "Towards": { + "target": "com.amazonaws.georoutes#LocalizedStringList", + "traits": { + "smithy.api#documentation": "

Names of destinations that can be reached when traveling on the road.

", + "smithy.api#required": {} + } + }, + "Type": { + "target": "com.amazonaws.georoutes#RouteRoadType", + "traits": { + "smithy.api#documentation": "

The type of road.

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

The road on the route.

" + } + }, + "com.amazonaws.georoutes#RouteRoadType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "HIGHWAY", + "value": "Highway" + }, + { + "name": "RURAL", + "value": "Rural" + }, + { + "name": "URBAN", + "value": "Urban" + } + ] + } + }, + "com.amazonaws.georoutes#RouteRoundaboutEnterStepDetails": { + "type": "structure", + "members": { + "Intersection": { + "target": "com.amazonaws.georoutes#LocalizedStringList", + "traits": { + "smithy.api#documentation": "

Name of the intersection, if applicable to the step.

", + "smithy.api#required": {} + } + }, + "SteeringDirection": { + "target": "com.amazonaws.georoutes#RouteSteeringDirection", + "traits": { + "smithy.api#documentation": "

Steering direction for the step.

" + } + }, + "TurnAngle": { + "target": "com.amazonaws.georoutes#TurnAngle", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Angle of the turn.

" + } + }, + "TurnIntensity": { + "target": "com.amazonaws.georoutes#RouteTurnIntensity", + "traits": { + "smithy.api#documentation": "

Intensity of the turn.

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

Details about the roundabout leg.

" + } + }, + "com.amazonaws.georoutes#RouteRoundaboutExitStepDetails": { + "type": "structure", + "members": { + "Intersection": { + "target": "com.amazonaws.georoutes#LocalizedStringList", + "traits": { + "smithy.api#documentation": "

Name of the intersection, if applicable to the step.

", + "smithy.api#required": {} + } + }, + "RelativeExit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Exit to be taken.

", + "smithy.api#range": { + "min": 1, + "max": 12 + } + } + }, + "RoundaboutAngle": { + "target": "com.amazonaws.georoutes#RoundaboutAngle", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Angle of the roundabout.

" + } + }, + "SteeringDirection": { + "target": "com.amazonaws.georoutes#RouteSteeringDirection", + "traits": { + "smithy.api#documentation": "

Steering direction for the step.

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

Details about the roundabout step.

" + } + }, + "com.amazonaws.georoutes#RouteRoundaboutPassStepDetails": { + "type": "structure", + "members": { + "Intersection": { + "target": "com.amazonaws.georoutes#LocalizedStringList", + "traits": { + "smithy.api#documentation": "

Name of the intersection, if applicable to the step.

", + "smithy.api#required": {} + } + }, + "SteeringDirection": { + "target": "com.amazonaws.georoutes#RouteSteeringDirection", + "traits": { + "smithy.api#documentation": "

Steering direction for the step.

" + } + }, + "TurnAngle": { + "target": "com.amazonaws.georoutes#TurnAngle", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Angle of the turn.

" + } + }, + "TurnIntensity": { + "target": "com.amazonaws.georoutes#RouteTurnIntensity", + "traits": { + "smithy.api#documentation": "

Intensity of the turn.

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

Details about the step.

" + } + }, + "com.amazonaws.georoutes#RouteScooterOptions": { + "type": "structure", + "members": { + "EngineType": { + "target": "com.amazonaws.georoutes#RouteEngineType", + "traits": { + "smithy.api#documentation": "

Engine type of the vehicle.

" + } + }, + "LicensePlate": { + "target": "com.amazonaws.georoutes#RouteVehicleLicensePlate", + "traits": { + "smithy.api#documentation": "

The vehicle License Plate.

" + } + }, + "MaxSpeed": { + "target": "com.amazonaws.georoutes#SpeedKilometersPerHour", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Maximum speed

\n

\n Unit: KilometersPerHour\n

", + "smithy.api#range": { + "min": 3.6, + "max": 252.0 + } + } + }, + "Occupancy": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

The number of occupants in the vehicle.

\n

Default Value: 1\n

", + "smithy.api#range": { + "min": 1 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Scooter\"

" + } + }, + "com.amazonaws.georoutes#RouteSideOfStreet": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "LEFT", + "value": "Left" + }, + { + "name": "RIGHT", + "value": "Right" + } + ] + } + }, + "com.amazonaws.georoutes#RouteSideOfStreetOptions": { + "type": "structure", + "members": { + "Position": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

Position defined as [longitude, latitude].

", + "smithy.api#required": {} + } + }, + "UseWith": { + "target": "com.amazonaws.georoutes#SideOfStreetMatchingStrategy", + "traits": { + "smithy.api#documentation": "

Strategy that defines when the side of street position should be used.

\n

Default Value: DividedStreetOnly\n

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

Options to configure matching the provided position to a side of the street.

" + } + }, + "com.amazonaws.georoutes#RouteSignpost": { + "type": "structure", + "members": { + "Labels": { + "target": "com.amazonaws.georoutes#RouteSignpostLabelList", + "traits": { + "smithy.api#documentation": "

Labels present on the sign post.

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

Sign post information of the action, applicable only for TurnByTurn steps. See RouteSignpost for details of sub-attributes.

" + } + }, + "com.amazonaws.georoutes#RouteSignpostLabel": { + "type": "structure", + "members": { + "RouteNumber": { + "target": "com.amazonaws.georoutes#RouteNumber", + "traits": { + "smithy.api#documentation": "

Route number of the road.

" + } + }, + "Text": { + "target": "com.amazonaws.georoutes#LocalizedString", + "traits": { + "smithy.api#documentation": "

The Signpost text.

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

Labels presented on the sign post.

" + } + }, + "com.amazonaws.georoutes#RouteSignpostLabelList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteSignpostLabel" + } + }, + "com.amazonaws.georoutes#RouteSpanAdditionalFeature": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "BEST_CASE_DURATION", + "value": "BestCaseDuration" + }, + { + "name": "CAR_ACCESS", + "value": "CarAccess" + }, + { + "name": "COUNTRY", + "value": "Country" + }, + { + "name": "DISTANCE", + "value": "Distance" + }, + { + "name": "DURATION", + "value": "Duration" + }, + { + "name": "DYNAMIC_SPEED", + "value": "DynamicSpeed" + }, + { + "name": "FUNCTIONAL_CLASSIFICATION", + "value": "FunctionalClassification" + }, + { + "name": "GATES", + "value": "Gates" + }, + { + "name": "INCIDENTS", + "value": "Incidents" + }, + { + "name": "NAMES", + "value": "Names" + }, + { + "name": "NOTICES", + "value": "Notices" + }, + { + "name": "PEDESTRIAN_ACCESS", + "value": "PedestrianAccess" + }, + { + "name": "RAILWAY_CROSSINGS", + "value": "RailwayCrossings" + }, + { + "name": "REGION", + "value": "Region" + }, + { + "name": "ROAD_ATTRIBUTES", + "value": "RoadAttributes" + }, + { + "name": "ROUTE_NUMBERS", + "value": "RouteNumbers" + }, + { + "name": "SCOOTER_ACCESS", + "value": "ScooterAccess" + }, + { + "name": "SPEED_LIMIT", + "value": "SpeedLimit" + }, + { + "name": "TOLL_SYSTEMS", + "value": "TollSystems" + }, + { + "name": "TRUCK_ACCESS", + "value": "TruckAccess" + }, + { + "name": "TRUCK_ROAD_TYPES", + "value": "TruckRoadTypes" + }, + { + "name": "TYPICAL_DURATION", + "value": "TypicalDuration" + }, + { + "name": "ZONES", + "value": "Zones" + }, + { + "name": "CONSUMPTION", + "value": "Consumption" + } + ] + } + }, + "com.amazonaws.georoutes#RouteSpanAdditionalFeatureList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteSpanAdditionalFeature" + }, + "traits": { + "smithy.api#length": { + "max": 24 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.georoutes#RouteSpanCarAccessAttribute": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "ALLOWED", + "value": "Allowed" + }, + { + "name": "NO_THROUGH_TRAFFIC", + "value": "NoThroughTraffic" + }, + { + "name": "TOLL_ROAD", + "value": "TollRoad" + } + ] + } + }, + "com.amazonaws.georoutes#RouteSpanCarAccessAttributeList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteSpanCarAccessAttribute" + }, + "traits": { + "smithy.api#length": { + "max": 3 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.georoutes#RouteSpanDynamicSpeedDetails": { + "type": "structure", + "members": { + "BestCaseSpeed": { + "target": "com.amazonaws.georoutes#SpeedKilometersPerHour", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Estimated speed while traversing the span without traffic congestion.

\n

\n Unit: KilometersPerHour\n

" + } + }, + "TurnDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Estimated time to turn from this span into the next.

\n

\n Unit: seconds\n

" + } + }, + "TypicalSpeed": { + "target": "com.amazonaws.georoutes#SpeedKilometersPerHour", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Estimated speed while traversing the span under typical traffic congestion.

\n

\n Unit: KilometersPerHour\n

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

Details about the dynamic speed.

\n

\n Unit: KilometersPerHour\n

" + } + }, + "com.amazonaws.georoutes#RouteSpanGateAttribute": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "EMERGENCY", + "value": "Emergency" + }, + { + "name": "KEY_ACCESS", + "value": "KeyAccess" + }, + { + "name": "PERMISSION_REQUIRED", + "value": "PermissionRequired" + } + ] + } + }, + "com.amazonaws.georoutes#RouteSpanPedestrianAccessAttribute": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "ALLOWED", + "value": "Allowed" + }, + { + "name": "INDOORS", + "value": "Indoors" + }, + { + "name": "NO_THROUGH_TRAFFIC", + "value": "NoThroughTraffic" + }, + { + "name": "PARK", + "value": "Park" + }, + { + "name": "STAIRS", + "value": "Stairs" + }, + { + "name": "TOLL_ROAD", + "value": "TollRoad" + } + ] + } + }, + "com.amazonaws.georoutes#RouteSpanPedestrianAccessAttributeList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteSpanPedestrianAccessAttribute" + }, + "traits": { + "smithy.api#length": { + "max": 6 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.georoutes#RouteSpanRailwayCrossingAttribute": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "PROTECTED", + "value": "Protected" + }, + { + "name": "UNPROTECTED", + "value": "Unprotected" + } + ] + } + }, + "com.amazonaws.georoutes#RouteSpanRoadAttribute": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "BRIDGE", + "value": "Bridge" + }, + { + "name": "BUILT_UP_AREA", + "value": "BuiltUpArea" + }, + { + "name": "CONTROLLED_ACCESS_HIGHWAY", + "value": "ControlledAccessHighway" + }, + { + "name": "DIRT_ROAD", + "value": "DirtRoad" + }, + { + "name": "DIVIDED_ROAD", + "value": "DividedRoad" + }, + { + "name": "MOTORWAY", + "value": "Motorway" + }, + { + "name": "PRIVATE_ROAD", + "value": "PrivateRoad" + }, + { + "name": "RAMP", + "value": "Ramp" + }, + { + "name": "RIGHT_HAND_TRAFFIC", + "value": "RightHandTraffic" + }, + { + "name": "ROUNDABOUT", + "value": "Roundabout" + }, + { + "name": "TUNNEL", + "value": "Tunnel" + }, + { + "name": "UNDER_CONSTRUCTION", + "value": "UnderConstruction" + } + ] + } + }, + "com.amazonaws.georoutes#RouteSpanRoadAttributeList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteSpanRoadAttribute" + }, + "traits": { + "smithy.api#length": { + "max": 12 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.georoutes#RouteSpanScooterAccessAttribute": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "ALLOWED", + "value": "Allowed" + }, + { + "name": "NO_THROUGH_TRAFFIC", + "value": "NoThroughTraffic" + }, + { + "name": "TOLL_ROAD", + "value": "TollRoad" + } + ] + } + }, + "com.amazonaws.georoutes#RouteSpanScooterAccessAttributeList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteSpanScooterAccessAttribute" + }, + "traits": { + "smithy.api#length": { + "max": 3 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.georoutes#RouteSpanSpeedLimitDetails": { + "type": "structure", + "members": { + "MaxSpeed": { + "target": "com.amazonaws.georoutes#SpeedKilometersPerHour", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Maximum speed.

\n

\n Unit: KilometersPerHour\n

" + } + }, + "Unlimited": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

If the span doesn't have a speed limit like the Autobahn.

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

Details about the speed limit corresponding to the span.

\n

\n Unit: KilometersPerHour\n

" + } + }, + "com.amazonaws.georoutes#RouteSpanTruckAccessAttribute": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "ALLOWED", + "value": "Allowed" + }, + { + "name": "NO_THROUGH_TRAFFIC", + "value": "NoThroughTraffic" + }, + { + "name": "TOLL_ROAD", + "value": "TollRoad" + } + ] + } + }, + "com.amazonaws.georoutes#RouteSpanTruckAccessAttributeList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteSpanTruckAccessAttribute" + }, + "traits": { + "smithy.api#length": { + "max": 3 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.georoutes#RouteSteeringDirection": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "LEFT", + "value": "Left" + }, + { + "name": "RIGHT", + "value": "Right" + }, + { + "name": "STRAIGHT", + "value": "Straight" + } + ] + } + }, + "com.amazonaws.georoutes#RouteSummary": { + "type": "structure", + "members": { + "Distance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Distance of the route.

" + } + }, + "Duration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the route.

\n

\n Unit: seconds\n

" + } + }, + "Tolls": { + "target": "com.amazonaws.georoutes#RouteTollSummary", + "traits": { + "smithy.api#documentation": "

Toll summary for the complete route.

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

Summarized details for the leg including travel steps only. The Distance for the travel only portion of the journey is the same as the Distance within the Overview summary.

" + } + }, + "com.amazonaws.georoutes#RouteToll": { + "type": "structure", + "members": { + "Country": { + "target": "com.amazonaws.georoutes#CountryCode3", + "traits": { + "smithy.api#documentation": "

The alpha-2 or alpha-3 character code for the country.

" + } + }, + "PaymentSites": { + "target": "com.amazonaws.georoutes#RouteTollPaymentSiteList", + "traits": { + "smithy.api#documentation": "

Locations or sites where the toll fare is collected.

", + "smithy.api#required": {} + } + }, + "Rates": { + "target": "com.amazonaws.georoutes#RouteTollRateList", + "traits": { + "smithy.api#documentation": "

Toll rates that need to be paid to travel this leg of the route.

", + "smithy.api#required": {} + } + }, + "Systems": { + "target": "com.amazonaws.georoutes#IndexList", + "traits": { + "smithy.api#documentation": "

Toll systems are authorities that collect payments for the toll.

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

Provides details about toll information along a route, including the payment sites, applicable toll rates, toll systems, and the country associated with the toll collection.

" + } + }, + "com.amazonaws.georoutes#RouteTollList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteToll" + } + }, + "com.amazonaws.georoutes#RouteTollOptions": { + "type": "structure", + "members": { + "AllTransponders": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Specifies if the user has valid transponder with access to all toll systems. This\n impacts toll calculation, and if true the price with transponders is used.

" + } + }, + "AllVignettes": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Specifies if the user has valid vignettes with access for all toll roads. If a user has a vignette for a toll road, then toll cost for that road is omitted since no further payment is necessary.

" + } + }, + "Currency": { + "target": "com.amazonaws.georoutes#CurrencyCode", + "traits": { + "smithy.api#documentation": "

Currency code corresponding to the price. This is the same as Currency specified in the request.

" + } + }, + "EmissionType": { + "target": "com.amazonaws.georoutes#RouteEmissionType", + "traits": { + "smithy.api#documentation": "

Emission type of the vehicle for toll cost calculation.

\n

\n Valid values: Euro1, Euro2, Euro3, Euro4, Euro5, Euro6, EuroEev\n

" + } + }, + "VehicleCategory": { + "target": "com.amazonaws.georoutes#RouteTollVehicleCategory", + "traits": { + "smithy.api#documentation": "

Vehicle category for toll cost calculation.

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

Options related to Tolls on a route.

" + } + }, + "com.amazonaws.georoutes#RouteTollPass": { + "type": "structure", + "members": { + "IncludesReturnTrip": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

If the pass includes the rate for the return leg of the trip.

" + } + }, + "SeniorPass": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

If the pass is only valid for senior persons.

" + } + }, + "TransferCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

If the toll pass can be transferred, and how many times.

", + "smithy.api#range": { + "min": 0 + } + } + }, + "TripCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Number of trips the pass is valid for.

", + "smithy.api#range": { + "min": 0 + } + } + }, + "ValidityPeriod": { + "target": "com.amazonaws.georoutes#RouteTollPassValidityPeriod", + "traits": { + "smithy.api#documentation": "

Period for which the pass is valid.

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

Details if the toll rate can be a pass that supports multiple trips.

" + } + }, + "com.amazonaws.georoutes#RouteTollPassValidityPeriod": { + "type": "structure", + "members": { + "Period": { + "target": "com.amazonaws.georoutes#RouteTollPassValidityPeriodType", + "traits": { + "smithy.api#documentation": "

Validity period.

", + "smithy.api#required": {} + } + }, + "PeriodCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Counts for the validity period.

", + "smithy.api#range": { + "min": 0 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Period for which the pass is valid.

" + } + }, + "com.amazonaws.georoutes#RouteTollPassValidityPeriodType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "ANNUAL", + "value": "Annual" + }, + { + "name": "DAYS", + "value": "Days" + }, + { + "name": "EXTENDED_ANNUAL", + "value": "ExtendedAnnual" + }, + { + "name": "MINUTES", + "value": "Minutes" + }, + { + "name": "MONTHS", + "value": "Months" + } + ] + } + }, + "com.amazonaws.georoutes#RouteTollPaymentMethod": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "BANK_CARD", + "value": "BankCard" + }, + { + "name": "CASH", + "value": "Cash" + }, + { + "name": "CASH_EXACT", + "value": "CashExact" + }, + { + "name": "CREDIT_CARD", + "value": "CreditCard" + }, + { + "name": "PASS_SUBSCRIPTION", + "value": "PassSubscription" + }, + { + "name": "TRAVEL_CARD", + "value": "TravelCard" + }, + { + "name": "TRANSPONDER", + "value": "Transponder" + }, + { + "name": "VIDEO_TOLL", + "value": "VideoToll" + } + ] + } + }, + "com.amazonaws.georoutes#RouteTollPaymentMethodList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteTollPaymentMethod" + }, + "traits": { + "smithy.api#length": { + "max": 8 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.georoutes#RouteTollPaymentSite": { + "type": "structure", + "members": { + "Name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Name of the payment site.

" + } + }, + "Position": { + "target": "com.amazonaws.georoutes#Position23", + "traits": { + "smithy.api#documentation": "

Position defined as [longitude, latitude].

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

Locations or sites where the toll fare is collected.

" + } + }, + "com.amazonaws.georoutes#RouteTollPaymentSiteList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteTollPaymentSite" + } + }, + "com.amazonaws.georoutes#RouteTollPrice": { + "type": "structure", + "members": { + "Currency": { + "target": "com.amazonaws.georoutes#CurrencyCode", + "traits": { + "smithy.api#documentation": "

Currency code corresponding to the price. This is the same as Currency specified in the request.

", + "smithy.api#required": {} + } + }, + "Estimate": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

If the price is an estimate or an exact value.

", + "smithy.api#required": {} + } + }, + "PerDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration for which the price corresponds to.

\n

\n Unit: seconds\n

" + } + }, + "Range": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

If the price is a range or an exact value. If any of the toll fares making up the route is a range, the overall price is also a range.

", + "smithy.api#required": {} + } + }, + "RangeValue": { + "target": "com.amazonaws.georoutes#RouteTollPriceValueRange", + "traits": { + "smithy.api#documentation": "

Price range with a minimum and maximum value, if a range.

" + } + }, + "Value": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "

Exact price, if not a range.

", + "smithy.api#range": { + "min": 0.0 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The toll price.

" + } + }, + "com.amazonaws.georoutes#RouteTollPriceSummary": { + "type": "structure", + "members": { + "Currency": { + "target": "com.amazonaws.georoutes#CurrencyCode", + "traits": { + "smithy.api#documentation": "

Currency code corresponding to the price. This is the same as Currency specified in the request.

", + "smithy.api#required": {} + } + }, + "Estimate": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

If the price is an estimate or an exact value.

", + "smithy.api#required": {} + } + }, + "Range": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

If the price is a range or an exact value. If any of the toll fares making up the route is a range, the overall price is also a range.

", + "smithy.api#required": {} + } + }, + "RangeValue": { + "target": "com.amazonaws.georoutes#RouteTollPriceValueRange", + "traits": { + "smithy.api#documentation": "

Price range with a minimum and maximum value, if a range.

" + } + }, + "Value": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "

Exact price, if not a range.

", + "smithy.api#range": { + "min": 0.0 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary of the route and toll price.

" + } + }, + "com.amazonaws.georoutes#RouteTollPriceValueRange": { + "type": "structure", + "members": { + "Min": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "

Minimum price.

", + "smithy.api#range": { + "min": 0.0 + }, + "smithy.api#required": {} + } + }, + "Max": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "

Maximum price.

", + "smithy.api#range": { + "min": 0.0 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Price range with a minimum and maximum value, if a range.

" + } + }, + "com.amazonaws.georoutes#RouteTollRate": { + "type": "structure", + "members": { + "ApplicableTimes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Time when the rate is valid.

" + } + }, + "ConvertedPrice": { + "target": "com.amazonaws.georoutes#RouteTollPrice", + "traits": { + "smithy.api#documentation": "

Price in the converted currency as specified in the request.

" + } + }, + "Id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Toll rate Id.

", + "smithy.api#required": {} + } + }, + "LocalPrice": { + "target": "com.amazonaws.georoutes#RouteTollPrice", + "traits": { + "smithy.api#documentation": "

Price in the local regional currency.

", + "smithy.api#required": {} + } + }, + "Name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the toll.

", + "smithy.api#required": {} + } + }, + "Pass": { + "target": "com.amazonaws.georoutes#RouteTollPass", + "traits": { + "smithy.api#documentation": "

Details if the toll rate can be a pass that supports multiple trips.

" + } + }, + "PaymentMethods": { + "target": "com.amazonaws.georoutes#RouteTollPaymentMethodList", + "traits": { + "smithy.api#documentation": "

Accepted payment methods at the toll.

", + "smithy.api#required": {} + } + }, + "Transponders": { + "target": "com.amazonaws.georoutes#RouteTransponderList", + "traits": { + "smithy.api#documentation": "

Transponders for which this toll can be applied.

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

The toll rate.

" + } + }, + "com.amazonaws.georoutes#RouteTollRateList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteTollRate" + } + }, + "com.amazonaws.georoutes#RouteTollSummary": { + "type": "structure", + "members": { + "Total": { + "target": "com.amazonaws.georoutes#RouteTollPriceSummary", + "traits": { + "smithy.api#documentation": "

Total toll summary for the complete route. Total is the only summary available\n today.

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

The toll summary for the complete route.

" + } + }, + "com.amazonaws.georoutes#RouteTollSystem": { + "type": "structure", + "members": { + "Name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The toll system name.

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

Toll systems are authorities that collect payments for the toll.

" + } + }, + "com.amazonaws.georoutes#RouteTollSystemList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteTollSystem" + } + }, + "com.amazonaws.georoutes#RouteTollVehicleCategory": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "MINIBUS", + "value": "Minibus" + } + ] + } + }, + "com.amazonaws.georoutes#RouteTrafficOptions": { + "type": "structure", + "members": { + "FlowEventThresholdOverride": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration for which flow \n traffic is considered valid. \n For this period, the flow traffic is used over historical traffic data. \n Flow traffic refers to congestion, which changes very quickly. \n Duration in seconds for which flow traffic event would be considered valid. \n While flow traffic event is valid it will be used over the historical traffic data.

" + } + }, + "Usage": { + "target": "com.amazonaws.georoutes#TrafficUsage", + "traits": { + "smithy.api#documentation": "

Determines if traffic should be used or ignored while calculating the route.

\n

Default Value: UseTrafficData\n

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

Traffic options for the route.

" + } + }, + "com.amazonaws.georoutes#RouteTrailerOptions": { + "type": "structure", + "members": { + "AxleCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Total number of axles of the vehicle.

", + "smithy.api#range": { + "min": 1 + } + } + }, + "TrailerCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Number of trailers attached to the vehicle.

\n

Default Value: 0\n

", + "smithy.api#range": { + "min": 1, + "max": 255 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Trailer options corresponding to the vehicle.

" + } + }, + "com.amazonaws.georoutes#RouteTransponder": { + "type": "structure", + "members": { + "SystemName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Names of the toll system collecting the toll.

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

Transponders for which this toll can be applied.

" + } + }, + "com.amazonaws.georoutes#RouteTransponderList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteTransponder" + } + }, + "com.amazonaws.georoutes#RouteTravelMode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "CAR", + "value": "Car" + }, + { + "name": "PEDESTRIAN", + "value": "Pedestrian" + }, + { + "name": "SCOOTER", + "value": "Scooter" + }, + { + "name": "TRUCK", + "value": "Truck" + } + ] + } + }, + "com.amazonaws.georoutes#RouteTravelModeOptions": { + "type": "structure", + "members": { + "Car": { + "target": "com.amazonaws.georoutes#RouteCarOptions", + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Car\"

" + } + }, + "Pedestrian": { + "target": "com.amazonaws.georoutes#RoutePedestrianOptions", + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Pedestrian\"

" + } + }, + "Scooter": { + "target": "com.amazonaws.georoutes#RouteScooterOptions", + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Scooter\"

" + } + }, + "Truck": { + "target": "com.amazonaws.georoutes#RouteTruckOptions", + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Truck\"

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

Travel mode related options for the provided travel mode.

" + } + }, + "com.amazonaws.georoutes#RouteTravelStepType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "DEFAULT", + "value": "Default" + }, + { + "name": "TURN_BY_TURN", + "value": "TurnByTurn" + } + ] + } + }, + "com.amazonaws.georoutes#RouteTruckOptions": { + "type": "structure", + "members": { + "AxleCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Total number of axles of the vehicle.

", + "smithy.api#range": { + "min": 2, + "max": 255 + } + } + }, + "EngineType": { + "target": "com.amazonaws.georoutes#RouteEngineType", + "traits": { + "smithy.api#documentation": "

Engine type of the vehicle.

" + } + }, + "GrossWeight": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Gross weight of the vehicle including trailers, and goods at capacity.

\n

\n Unit: Kilograms\n

" + } + }, + "HazardousCargos": { + "target": "com.amazonaws.georoutes#RouteHazardousCargoTypeList", + "traits": { + "smithy.api#documentation": "

List of Hazardous cargo contained in the vehicle.

" + } + }, + "Height": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Height of the vehicle.

\n

\n Unit: centimeters\n

", + "smithy.api#range": { + "min": 0, + "max": 5000 + } + } + }, + "HeightAboveFirstAxle": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Height of the vehicle above its first axle.

\n

\n Unit: centimeters\n

", + "smithy.api#range": { + "min": 0, + "max": 5000 + } + } + }, + "KpraLength": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Kingpin to rear axle length of the vehicle.

\n

\n Unit: centimeters\n

" + } + }, + "Length": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Length of the vehicle.

\n

\n Unit: c\n

", + "smithy.api#range": { + "min": 0, + "max": 30000 + } + } + }, + "LicensePlate": { + "target": "com.amazonaws.georoutes#RouteVehicleLicensePlate", + "traits": { + "smithy.api#documentation": "

The vehicle License Plate.

" + } + }, + "MaxSpeed": { + "target": "com.amazonaws.georoutes#SpeedKilometersPerHour", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Maximum speed

\n

\n Unit: KilometersPerHour\n

", + "smithy.api#range": { + "min": 3.6, + "max": 252.0 + } + } + }, + "Occupancy": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

The number of occupants in the vehicle.

\n

Default Value: 1\n

", + "smithy.api#range": { + "min": 1 + } + } + }, + "PayloadCapacity": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Payload capacity of the vehicle and trailers attached.

\n

\n Unit: kilograms\n

" + } + }, + "TireCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Number of tires on the vehicle.

", + "smithy.api#range": { + "min": 1, + "max": 255 + } + } + }, + "Trailer": { + "target": "com.amazonaws.georoutes#RouteTrailerOptions", + "traits": { + "smithy.api#documentation": "

Trailer options corresponding to the vehicle.

" + } + }, + "TruckType": { + "target": "com.amazonaws.georoutes#RouteTruckType", + "traits": { + "smithy.api#documentation": "

Type of the truck.

" + } + }, + "TunnelRestrictionCode": { + "target": "com.amazonaws.georoutes#TunnelRestrictionCode", + "traits": { + "smithy.api#documentation": "

The tunnel restriction code.

\n

Tunnel categories in this list indicate the restrictions which apply to certain tunnels in Great Britain. \n They relate to the types of dangerous goods that can be transported through them.

\n
    \n
  • \n

    \n Tunnel Category B\n

    \n
      \n
    • \n

      \n Risk Level: Limited risk

      \n
    • \n
    • \n

      \n Restrictions: Few restrictions

      \n
    • \n
    \n
  • \n
  • \n

    \n Tunnel Category C\n

    \n
      \n
    • \n

      \n Risk Level: Medium risk

      \n
    • \n
    • \n

      \n Restrictions: Some restrictions

      \n
    • \n
    \n
  • \n
  • \n

    \n Tunnel Category D\n

    \n
      \n
    • \n

      \n Risk Level: High risk

      \n
    • \n
    • \n

      \n Restrictions: Many restrictions occur

      \n
    • \n
    \n
  • \n
  • \n

    \n Tunnel Category E\n

    \n
      \n
    • \n

      \n Risk Level: Very high risk

      \n
    • \n
    • \n

      \n Restrictions: Restricted tunnel

      \n
    • \n
    \n
  • \n
", + "smithy.api#length": { + "max": 20 + } + } + }, + "WeightPerAxle": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Heaviest weight per axle irrespective of the axle type or the axle group. Meant for usage in countries where the differences in axle types or axle groups are not distinguished.

\n

\n Unit: Kilograms\n

" + } + }, + "WeightPerAxleGroup": { + "target": "com.amazonaws.georoutes#WeightPerAxleGroup", + "traits": { + "smithy.api#documentation": "

Specifies the total weight for the specified axle group. Meant for usage in countries that have different regulations based on the axle group type.

\n

\n Unit: Kilograms\n

" + } + }, + "Width": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Width of the vehicle.

\n

\n Unit: centimeters\n

", + "smithy.api#range": { + "min": 0, + "max": 5000 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Truck\"

" + } + }, + "com.amazonaws.georoutes#RouteTruckType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "LIGHT_TRUCK", + "value": "LightTruck" + }, + { + "name": "STRAIGHT_TRUCK", + "value": "StraightTruck" + }, + { + "name": "TRACTOR", + "value": "Tractor" + } + ] + } + }, + "com.amazonaws.georoutes#RouteTurnIntensity": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "SHARP", + "value": "Sharp" + }, + { + "name": "SLIGHT", + "value": "Slight" + }, + { + "name": "TYPICAL", + "value": "Typical" + } + ] + } + }, + "com.amazonaws.georoutes#RouteTurnStepDetails": { + "type": "structure", + "members": { + "Intersection": { + "target": "com.amazonaws.georoutes#LocalizedStringList", + "traits": { + "smithy.api#documentation": "

Name of the intersection, if applicable to the step.

", + "smithy.api#required": {} + } + }, + "SteeringDirection": { + "target": "com.amazonaws.georoutes#RouteSteeringDirection", + "traits": { + "smithy.api#documentation": "

Steering direction for the step.

" + } + }, + "TurnAngle": { + "target": "com.amazonaws.georoutes#TurnAngle", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Angle of the turn.

" + } + }, + "TurnIntensity": { + "target": "com.amazonaws.georoutes#RouteTurnIntensity", + "traits": { + "smithy.api#documentation": "

Intensity of the turn.

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

Details related to the turn step.

" + } + }, + "com.amazonaws.georoutes#RouteUTurnStepDetails": { + "type": "structure", + "members": { + "Intersection": { + "target": "com.amazonaws.georoutes#LocalizedStringList", + "traits": { + "smithy.api#documentation": "

Name of the intersection, if applicable to the step.

", + "smithy.api#required": {} + } + }, + "SteeringDirection": { + "target": "com.amazonaws.georoutes#RouteSteeringDirection", + "traits": { + "smithy.api#documentation": "

Steering direction for the step.

" + } + }, + "TurnAngle": { + "target": "com.amazonaws.georoutes#TurnAngle", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Angle of the turn.

" + } + }, + "TurnIntensity": { + "target": "com.amazonaws.georoutes#RouteTurnIntensity", + "traits": { + "smithy.api#documentation": "

Intensity of the turn.

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

Details related to the U-turn step.

" + } + }, + "com.amazonaws.georoutes#RouteVehicleArrival": { + "type": "structure", + "members": { + "Place": { + "target": "com.amazonaws.georoutes#RouteVehiclePlace", + "traits": { + "smithy.api#documentation": "

The place details.

", + "smithy.api#required": {} + } + }, + "Time": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

The time.

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

Details corresponding to the arrival for a leg.

" + } + }, + "com.amazonaws.georoutes#RouteVehicleDeparture": { + "type": "structure", + "members": { + "Place": { + "target": "com.amazonaws.georoutes#RouteVehiclePlace", + "traits": { + "smithy.api#documentation": "

The place details.

", + "smithy.api#required": {} + } + }, + "Time": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

The departure time.

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

Details corresponding to the departure for the leg.

" + } + }, + "com.amazonaws.georoutes#RouteVehicleIncident": { + "type": "structure", + "members": { + "Description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Brief readable description of the incident.

" + } + }, + "EndTime": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

End timestamp of the incident.

" + } + }, + "Severity": { + "target": "com.amazonaws.georoutes#RouteVehicleIncidentSeverity", + "traits": { + "smithy.api#documentation": "

Severity of the incident\nCritical - The part of the route the incident affects is unusable.\nMajor- Major impact on the leg duration, for example stop and go\nMinor- Minor impact on the leg duration, for example traffic jam\nLow - Low on duration, for example slightly increased traffic

" + } + }, + "StartTime": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

Start time of the incident.

" + } + }, + "Type": { + "target": "com.amazonaws.georoutes#RouteVehicleIncidentType", + "traits": { + "smithy.api#documentation": "

Type of the incident.

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

Incidents corresponding to this leg of the route.

" + } + }, + "com.amazonaws.georoutes#RouteVehicleIncidentList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteVehicleIncident" + } + }, + "com.amazonaws.georoutes#RouteVehicleIncidentSeverity": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "CRITICAL", + "value": "Critical" + }, + { + "name": "HIGH", + "value": "High" + }, + { + "name": "MEDIUM", + "value": "Medium" + }, + { + "name": "LOW", + "value": "Low" + } + ] + } + }, + "com.amazonaws.georoutes#RouteVehicleIncidentType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "ACCIDENT", + "value": "Accident" + }, + { + "name": "CONGESTION", + "value": "Congestion" + }, + { + "name": "CONSTRUCTION", + "value": "Construction" + }, + { + "name": "DISABLED_VEHICLE", + "value": "DisabledVehicle" + }, + { + "name": "LANE_RESTRICTION", + "value": "LaneRestriction" + }, + { + "name": "MASS_TRANSIT", + "value": "MassTransit" + }, + { + "name": "OTHER", + "value": "Other" + }, + { + "name": "PLANNED_EVENT", + "value": "PlannedEvent" + }, + { + "name": "ROAD_CLOSURE", + "value": "RoadClosure" + }, + { + "name": "ROAD_HAZARD", + "value": "RoadHazard" + }, + { + "name": "WEATHER", + "value": "Weather" + } + ] + } + }, + "com.amazonaws.georoutes#RouteVehicleLegDetails": { + "type": "structure", + "members": { + "Arrival": { + "target": "com.amazonaws.georoutes#RouteVehicleArrival", + "traits": { + "smithy.api#documentation": "

Details corresponding to the arrival for the leg.

", + "smithy.api#required": {} + } + }, + "Departure": { + "target": "com.amazonaws.georoutes#RouteVehicleDeparture", + "traits": { + "smithy.api#documentation": "

Details corresponding to the departure for the leg.

", + "smithy.api#required": {} + } + }, + "Incidents": { + "target": "com.amazonaws.georoutes#RouteVehicleIncidentList", + "traits": { + "smithy.api#documentation": "

Incidents corresponding to this leg of the route.

", + "smithy.api#required": {} + } + }, + "Notices": { + "target": "com.amazonaws.georoutes#RouteVehicleNoticeList", + "traits": { + "smithy.api#documentation": "

Notices are additional information returned that indicate issues that occurred during route calculation.

", + "smithy.api#required": {} + } + }, + "PassThroughWaypoints": { + "target": "com.amazonaws.georoutes#RoutePassThroughWaypointList", + "traits": { + "smithy.api#documentation": "

Waypoints that were passed through during the leg. This includes the waypoints that were configured with the PassThrough option.

", + "smithy.api#required": {} + } + }, + "Spans": { + "target": "com.amazonaws.georoutes#RouteVehicleSpanList", + "traits": { + "smithy.api#documentation": "

Spans that were computed for the requested SpanAdditionalFeatures.

", + "smithy.api#required": {} + } + }, + "Summary": { + "target": "com.amazonaws.georoutes#RouteVehicleSummary", + "traits": { + "smithy.api#documentation": "

Summarized details of the leg.

" + } + }, + "Tolls": { + "target": "com.amazonaws.georoutes#RouteTollList", + "traits": { + "smithy.api#documentation": "

Toll related options.

", + "smithy.api#required": {} + } + }, + "TollSystems": { + "target": "com.amazonaws.georoutes#RouteTollSystemList", + "traits": { + "smithy.api#documentation": "

Toll systems are authorities that collect payments for the toll.

", + "smithy.api#required": {} + } + }, + "TravelSteps": { + "target": "com.amazonaws.georoutes#RouteVehicleTravelStepList", + "traits": { + "smithy.api#documentation": "

Steps of a leg that must be performed before the travel portion of the leg.

", + "smithy.api#required": {} + } + }, + "TruckRoadTypes": { + "target": "com.amazonaws.georoutes#TruckRoadTypeList", + "traits": { + "smithy.api#documentation": "

Truck road type identifiers. BK1 through BK4 apply only to Sweden. \n A2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico.

\n \n

There are currently no other supported values as of 26th April 2024.

\n
", + "smithy.api#required": {} + } + }, + "Zones": { + "target": "com.amazonaws.georoutes#RouteZoneList", + "traits": { + "smithy.api#documentation": "

Zones corresponding to this leg of the route.

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

Steps of a leg that correspond to the travel portion of the leg.

" + } + }, + "com.amazonaws.georoutes#RouteVehicleLicensePlate": { + "type": "structure", + "members": { + "LastCharacter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The last character of the License Plate.

", + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

License plate information of the vehicle. Currently, only the last character is used\n where license plate based controlled access is enforced.

" + } + }, + "com.amazonaws.georoutes#RouteVehicleNotice": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.georoutes#RouteVehicleNoticeCode", + "traits": { + "smithy.api#documentation": "

Code corresponding to the issue.

", + "smithy.api#required": {} + } + }, + "Details": { + "target": "com.amazonaws.georoutes#RouteVehicleNoticeDetailList", + "traits": { + "smithy.api#documentation": "

Additional details of the notice.

", + "smithy.api#required": {} + } + }, + "Impact": { + "target": "com.amazonaws.georoutes#RouteNoticeImpact", + "traits": { + "smithy.api#documentation": "

Impact corresponding to the issue. While Low impact notices can be safely ignored, High impact notices must be evaluated further to determine the impact.

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

Notices are additional information returned that indicate issues that occurred during route calculation.

" + } + }, + "com.amazonaws.georoutes#RouteVehicleNoticeCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "ACCURATE_POLYLINE_UNAVAILABLE", + "value": "AccuratePolylineUnavailable" + }, + { + "name": "OTHER", + "value": "Other" + }, + { + "name": "POTENTIAL_VIOLATED_AVOID_TOLL_ROAD_USAGE", + "value": "PotentialViolatedAvoidTollRoadUsage" + }, + { + "name": "POTENTIAL_VIOLATED_CARPOOL_USAGE", + "value": "PotentialViolatedCarpoolUsage" + }, + { + "name": "POTENTIAL_VIOLATED_TURN_RESTRICTION_USAGE", + "value": "PotentialViolatedTurnRestrictionUsage" + }, + { + "name": "POTENTIAL_VIOLATED_VEHICLE_RESTRICTION_USAGE", + "value": "PotentialViolatedVehicleRestrictionUsage" + }, + { + "name": "POTENTIAL_VIOLATED_ZONE_RESTRICTION_USAGE", + "value": "PotentialViolatedZoneRestrictionUsage" + }, + { + "name": "SEASONAL_CLOSURE", + "value": "SeasonalClosure" + }, + { + "name": "TOLLS_DATA_TEMPORARILY_UNAVAILABLE", + "value": "TollsDataTemporarilyUnavailable" + }, + { + "name": "TOLLS_DATA_UNAVAILABLE", + "value": "TollsDataUnavailable" + }, + { + "name": "TOLL_TRANSPONDER", + "value": "TollTransponder" + }, + { + "name": "VIOLATED_AVOID_CONTROLLED_ACCESS_HIGHWAY", + "value": "ViolatedAvoidControlledAccessHighway" + }, + { + "name": "VIOLATED_AVOID_DIFFICULT_TURNS", + "value": "ViolatedAvoidDifficultTurns" + }, + { + "name": "VIOLATED_AVOID_DIRT_ROAD", + "value": "ViolatedAvoidDirtRoad" + }, + { + "name": "VIOLATED_AVOID_SEASONAL_CLOSURE", + "value": "ViolatedAvoidSeasonalClosure" + }, + { + "name": "VIOLATED_AVOID_TOLL_ROAD", + "value": "ViolatedAvoidTollRoad" + }, + { + "name": "VIOLATED_AVOID_TOLL_TRANSPONDER", + "value": "ViolatedAvoidTollTransponder" + }, + { + "name": "VIOLATED_AVOID_TRUCK_ROAD_TYPE", + "value": "ViolatedAvoidTruckRoadType" + }, + { + "name": "VIOLATED_AVOID_TUNNEL", + "value": "ViolatedAvoidTunnel" + }, + { + "name": "VIOLATED_AVOID_U_TURNS", + "value": "ViolatedAvoidUTurns" + }, + { + "name": "VIOLATED_BLOCKED_ROAD", + "value": "ViolatedBlockedRoad" + }, + { + "name": "VIOLATED_CARPOOL", + "value": "ViolatedCarpool" + }, + { + "name": "VIOLATED_EMERGENCY_GATE", + "value": "ViolatedEmergencyGate" + }, + { + "name": "VIOLATED_START_DIRECTION", + "value": "ViolatedStartDirection" + }, + { + "name": "VIOLATED_TURN_RESTRICTION", + "value": "ViolatedTurnRestriction" + }, + { + "name": "VIOLATED_VEHICLE_RESTRICTION", + "value": "ViolatedVehicleRestriction" + }, + { + "name": "VIOLATED_ZONE_RESTRICTION", + "value": "ViolatedZoneRestriction" + } + ] + } + }, + "com.amazonaws.georoutes#RouteVehicleNoticeDetail": { + "type": "structure", + "members": { + "Title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The notice title.

" + } + }, + "ViolatedConstraints": { + "target": "com.amazonaws.georoutes#RouteViolatedConstraints", + "traits": { + "smithy.api#documentation": "

Any violated constraints.

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

Additional details of the notice.

" + } + }, + "com.amazonaws.georoutes#RouteVehicleNoticeDetailList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteVehicleNoticeDetail" + } + }, + "com.amazonaws.georoutes#RouteVehicleNoticeList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteVehicleNotice" + } + }, + "com.amazonaws.georoutes#RouteVehicleOverviewSummary": { + "type": "structure", + "members": { + "BestCaseDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Total duration in free flowing traffic, which is the best case or shortest duration possible to cover the leg.

\n

\n Unit: seconds\n

" + } + }, + "Distance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Distance of the step.

", + "smithy.api#required": {} + } + }, + "Duration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the step.

\n

\n Unit: seconds\n

", + "smithy.api#required": {} + } + }, + "TypicalDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the computed span under typical traffic congestion.

\n

\n Unit: seconds\n

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

Summarized details of the leg.

" + } + }, + "com.amazonaws.georoutes#RouteVehiclePlace": { + "type": "structure", + "members": { + "Name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the place.

" + } + }, + "OriginalPosition": { + "target": "com.amazonaws.georoutes#Position23", + "traits": { + "smithy.api#documentation": "

Position provided in the request.

" + } + }, + "Position": { + "target": "com.amazonaws.georoutes#Position23", + "traits": { + "smithy.api#documentation": "

Position defined as [longitude, latitude].

", + "smithy.api#required": {} + } + }, + "SideOfStreet": { + "target": "com.amazonaws.georoutes#RouteSideOfStreet", + "traits": { + "smithy.api#documentation": "

Options to configure matching the provided position to a side of the street.

" + } + }, + "WaypointIndex": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Index of the waypoint in the request.

", + "smithy.api#range": { + "min": 0 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Place details corresponding to the arrival or departure.

" + } + }, + "com.amazonaws.georoutes#RouteVehicleSpan": { + "type": "structure", + "members": { + "BestCaseDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the computed span without traffic congestion.

\n

\n Unit: seconds\n

" + } + }, + "CarAccess": { + "target": "com.amazonaws.georoutes#RouteSpanCarAccessAttributeList", + "traits": { + "smithy.api#documentation": "

Access attributes for a car corresponding to the span.

" + } + }, + "Country": { + "target": "com.amazonaws.georoutes#CountryCode3", + "traits": { + "smithy.api#documentation": "

3 letter Country code corresponding to the Span.

" + } + }, + "Distance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Distance of the computed span. This feature doesn't split a span, but is always computed on a span split by other properties.

" + } + }, + "Duration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the computed span. This feature doesn't split a span, but is always computed on a span split by other properties.

\n

\n Unit: seconds\n

" + } + }, + "DynamicSpeed": { + "target": "com.amazonaws.georoutes#RouteSpanDynamicSpeedDetails", + "traits": { + "smithy.api#documentation": "

Dynamic speed details corresponding to the span.

\n

\n Unit: KilometersPerHour\n

" + } + }, + "FunctionalClassification": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Functional classification of the road segment corresponding to the span.

", + "smithy.api#range": { + "min": 1, + "max": 5 + } + } + }, + "Gate": { + "target": "com.amazonaws.georoutes#RouteSpanGateAttribute", + "traits": { + "smithy.api#documentation": "

Attributes corresponding to a gate. The gate is present at the end of the returned span.

" + } + }, + "GeometryOffset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Offset in the leg geometry corresponding to the start of this span.

", + "smithy.api#range": { + "min": 0 + } + } + }, + "Incidents": { + "target": "com.amazonaws.georoutes#IndexList", + "traits": { + "smithy.api#documentation": "

Incidents corresponding to the span. These index into the Incidents in the parent Leg.

" + } + }, + "Names": { + "target": "com.amazonaws.georoutes#LocalizedStringList", + "traits": { + "smithy.api#documentation": "

Provides an array of names of the vehicle span in available languages.

" + } + }, + "Notices": { + "target": "com.amazonaws.georoutes#IndexList", + "traits": { + "smithy.api#documentation": "

Notices are additional information returned that indicate issues that occurred during route calculation.

" + } + }, + "RailwayCrossing": { + "target": "com.amazonaws.georoutes#RouteSpanRailwayCrossingAttribute", + "traits": { + "smithy.api#documentation": "

Attributes corresponding to a railway crossing. The gate is present at the end of the returned span.

" + } + }, + "Region": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

2-3 letter Region code corresponding to the Span. This is either a province or a state.

", + "smithy.api#length": { + "min": 0, + "max": 3 + } + } + }, + "RoadAttributes": { + "target": "com.amazonaws.georoutes#RouteSpanRoadAttributeList", + "traits": { + "smithy.api#documentation": "

Attributes for the road segment corresponding to the span.

" + } + }, + "RouteNumbers": { + "target": "com.amazonaws.georoutes#RouteNumberList", + "traits": { + "smithy.api#documentation": "

Designated route name or number corresponding to the span.

" + } + }, + "ScooterAccess": { + "target": "com.amazonaws.georoutes#RouteSpanScooterAccessAttributeList", + "traits": { + "smithy.api#documentation": "

Access attributes for a scooter corresponding to the span.

" + } + }, + "SpeedLimit": { + "target": "com.amazonaws.georoutes#RouteSpanSpeedLimitDetails", + "traits": { + "smithy.api#documentation": "

Speed limit details corresponding to the span.

\n

\n Unit: KilometersPerHour\n

" + } + }, + "TollSystems": { + "target": "com.amazonaws.georoutes#IndexList", + "traits": { + "smithy.api#documentation": "

Toll systems are authorities that collect payments for the toll.

" + } + }, + "TruckAccess": { + "target": "com.amazonaws.georoutes#RouteSpanTruckAccessAttributeList", + "traits": { + "smithy.api#documentation": "

Access attributes for a truck corresponding to the span.

" + } + }, + "TruckRoadTypes": { + "target": "com.amazonaws.georoutes#IndexList", + "traits": { + "smithy.api#documentation": "

Truck road type identifiers. BK1 through BK4 apply only to Sweden. \n A2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico.

\n \n

There are currently no other supported values as of 26th April 2024.

\n
" + } + }, + "TypicalDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the computed span under typical traffic congestion.

\n

\n Unit: seconds\n

" + } + }, + "Zones": { + "target": "com.amazonaws.georoutes#IndexList", + "traits": { + "smithy.api#documentation": "

Zones corresponding to this leg of the route.

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

Span computed for the requested SpanAdditionalFeatures.

" + } + }, + "com.amazonaws.georoutes#RouteVehicleSpanList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteVehicleSpan" + } + }, + "com.amazonaws.georoutes#RouteVehicleSummary": { + "type": "structure", + "members": { + "Overview": { + "target": "com.amazonaws.georoutes#RouteVehicleOverviewSummary", + "traits": { + "smithy.api#documentation": "

Summarized details for the leg including before travel, travel and after travel steps.

" + } + }, + "TravelOnly": { + "target": "com.amazonaws.georoutes#RouteVehicleTravelOnlySummary", + "traits": { + "smithy.api#documentation": "

Summarized details for the leg including travel steps only. The Distance for the travel only portion of the journey is in meters

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

Summarized details of the route.

" + } + }, + "com.amazonaws.georoutes#RouteVehicleTravelOnlySummary": { + "type": "structure", + "members": { + "BestCaseDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Total duration in free flowing traffic, which is the best case or shortest duration possible to cover the leg.

\n

\n Unit: seconds\n

" + } + }, + "Duration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the step.

\n

\n Unit: seconds\n

", + "smithy.api#required": {} + } + }, + "TypicalDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the computed span under typical traffic congestion.

\n

\n Unit: seconds\n

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

Summarized details of the route.

" + } + }, + "com.amazonaws.georoutes#RouteVehicleTravelStep": { + "type": "structure", + "members": { + "ContinueHighwayStepDetails": { + "target": "com.amazonaws.georoutes#RouteContinueHighwayStepDetails", + "traits": { + "smithy.api#documentation": "

Details that are specific to a Continue Highway step.

" + } + }, + "ContinueStepDetails": { + "target": "com.amazonaws.georoutes#RouteContinueStepDetails", + "traits": { + "smithy.api#documentation": "

Details that are specific to a Continue step.

" + } + }, + "CurrentRoad": { + "target": "com.amazonaws.georoutes#RouteRoad", + "traits": { + "smithy.api#documentation": "

Details of the current road.

" + } + }, + "Distance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Distance of the step.

" + } + }, + "Duration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the step.

\n

\n Unit: seconds\n

", + "smithy.api#required": {} + } + }, + "EnterHighwayStepDetails": { + "target": "com.amazonaws.georoutes#RouteEnterHighwayStepDetails", + "traits": { + "smithy.api#documentation": "

Details that are specific to a Enter Highway step.

" + } + }, + "ExitNumber": { + "target": "com.amazonaws.georoutes#LocalizedStringList", + "traits": { + "smithy.api#documentation": "

Exit number of the road exit, if applicable.

" + } + }, + "ExitStepDetails": { + "target": "com.amazonaws.georoutes#RouteExitStepDetails", + "traits": { + "smithy.api#documentation": "

Details that are specific to a Roundabout Exit step.

" + } + }, + "GeometryOffset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Offset in the leg geometry corresponding to the start of this step.

", + "smithy.api#range": { + "min": 0 + } + } + }, + "Instruction": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Brief description of the step in the requested language.

\n \n

Only available when the TravelStepType is Default.

\n
" + } + }, + "KeepStepDetails": { + "target": "com.amazonaws.georoutes#RouteKeepStepDetails", + "traits": { + "smithy.api#documentation": "

Details that are specific to a Keep step.

" + } + }, + "NextRoad": { + "target": "com.amazonaws.georoutes#RouteRoad", + "traits": { + "smithy.api#documentation": "

Details of the next road. See RouteRoad for details of sub-attributes.

" + } + }, + "RampStepDetails": { + "target": "com.amazonaws.georoutes#RouteRampStepDetails", + "traits": { + "smithy.api#documentation": "

Details that are specific to a Ramp step.

" + } + }, + "RoundaboutEnterStepDetails": { + "target": "com.amazonaws.georoutes#RouteRoundaboutEnterStepDetails", + "traits": { + "smithy.api#documentation": "

Details that are specific to a Roundabout Enter step.

" + } + }, + "RoundaboutExitStepDetails": { + "target": "com.amazonaws.georoutes#RouteRoundaboutExitStepDetails", + "traits": { + "smithy.api#documentation": "

Details that are specific to a Roundabout Exit step.

" + } + }, + "RoundaboutPassStepDetails": { + "target": "com.amazonaws.georoutes#RouteRoundaboutPassStepDetails", + "traits": { + "smithy.api#documentation": "

Details that are specific to a Roundabout Pass step.

" + } + }, + "Signpost": { + "target": "com.amazonaws.georoutes#RouteSignpost", + "traits": { + "smithy.api#documentation": "

Sign post information of the action, applicable only for TurnByTurn steps. See RouteSignpost for details of sub-attributes.

" + } + }, + "TurnStepDetails": { + "target": "com.amazonaws.georoutes#RouteTurnStepDetails", + "traits": { + "smithy.api#documentation": "

Details that are specific to a Turn step.

" + } + }, + "Type": { + "target": "com.amazonaws.georoutes#RouteVehicleTravelStepType", + "traits": { + "smithy.api#documentation": "

Type of the step.

", + "smithy.api#required": {} + } + }, + "UTurnStepDetails": { + "target": "com.amazonaws.georoutes#RouteUTurnStepDetails", + "traits": { + "smithy.api#documentation": "

Details that are specific to a Turn step.

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

Steps of a leg that correspond to the travel portion of the leg.

" + } + }, + "com.amazonaws.georoutes#RouteVehicleTravelStepList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteVehicleTravelStep" + } + }, + "com.amazonaws.georoutes#RouteVehicleTravelStepType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "ARRIVE", + "value": "Arrive" + }, + { + "name": "CONTINUE", + "value": "Continue" + }, + { + "name": "CONTINUE_HIGHWAY", + "value": "ContinueHighway" + }, + { + "name": "DEPART", + "value": "Depart" + }, + { + "name": "ENTER_HIGHWAY", + "value": "EnterHighway" + }, + { + "name": "EXIT", + "value": "Exit" + }, + { + "name": "KEEP", + "value": "Keep" + }, + { + "name": "RAMP", + "value": "Ramp" + }, + { + "name": "ROUNDABOUT_ENTER", + "value": "RoundaboutEnter" + }, + { + "name": "ROUNDABOUT_EXIT", + "value": "RoundaboutExit" + }, + { + "name": "ROUNDABOUT_PASS", + "value": "RoundaboutPass" + }, + { + "name": "TURN", + "value": "Turn" + }, + { + "name": "U_TURN", + "value": "UTurn" + } + ] + } + }, + "com.amazonaws.georoutes#RouteViolatedConstraints": { + "type": "structure", + "members": { + "AllHazardsRestricted": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

This restriction applies to truck cargo, where the resulting route excludes roads on which hazardous materials are prohibited from being transported.

" + } + }, + "AxleCount": { + "target": "com.amazonaws.georoutes#RouteNoticeDetailRange", + "traits": { + "smithy.api#documentation": "

Total number of axles of the vehicle.

" + } + }, + "HazardousCargos": { + "target": "com.amazonaws.georoutes#RouteHazardousCargoTypeList", + "traits": { + "smithy.api#documentation": "

List of Hazardous cargo contained in the vehicle.

", + "smithy.api#required": {} + } + }, + "MaxHeight": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The maximum height of the vehicle.

" + } + }, + "MaxKpraLength": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The maximum Kpra length of the vehicle.

\n

\n Unit: centimeters\n

" + } + }, + "MaxLength": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The maximum length of the vehicle.

" + } + }, + "MaxPayloadCapacity": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The maximum load capacity of the vehicle.

\n

\n Unit: kilograms\n

" + } + }, + "MaxWeight": { + "target": "com.amazonaws.georoutes#RouteWeightConstraint", + "traits": { + "smithy.api#documentation": "

The maximum weight of the route.

\n

\n Unit: Kilograms\n

" + } + }, + "MaxWeightPerAxle": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The maximum weight per axle of the vehicle.

\n

\n Unit: Kilograms\n

" + } + }, + "MaxWeightPerAxleGroup": { + "target": "com.amazonaws.georoutes#WeightPerAxleGroup", + "traits": { + "smithy.api#documentation": "

The maximum weight per axle group of the vehicle.

\n

\n Unit: Kilograms\n

" + } + }, + "MaxWidth": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The maximum width of the vehicle.

" + } + }, + "Occupancy": { + "target": "com.amazonaws.georoutes#RouteNoticeDetailRange", + "traits": { + "smithy.api#documentation": "

The number of occupants in the vehicle.

\n

Default Value: 1\n

" + } + }, + "RestrictedTimes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Access radius restrictions based on time.

" + } + }, + "TimeDependent": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

The time dependent constraint.

" + } + }, + "TrailerCount": { + "target": "com.amazonaws.georoutes#RouteNoticeDetailRange", + "traits": { + "smithy.api#documentation": "

Number of trailers attached to the vehicle.

\n

Default Value: 0\n

" + } + }, + "TravelMode": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Travel mode corresponding to the leg.

" + } + }, + "TruckRoadType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Truck road type identifiers. BK1 through BK4 apply only to Sweden. \n A2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico.

\n \n

There are currently no other supported values as of 26th April 2024.

\n
" + } + }, + "TruckType": { + "target": "com.amazonaws.georoutes#RouteTruckType", + "traits": { + "smithy.api#documentation": "

Type of the truck.

" + } + }, + "TunnelRestrictionCode": { + "target": "com.amazonaws.georoutes#TunnelRestrictionCode", + "traits": { + "smithy.api#documentation": "

The tunnel restriction code.

\n

Tunnel categories in this list indicate the restrictions which apply to certain tunnels in Great Britain. \n They relate to the types of dangerous goods that can be transported through them.

\n
    \n
  • \n

    \n Tunnel Category B\n

    \n
      \n
    • \n

      \n Risk Level: Limited risk

      \n
    • \n
    • \n

      \n Restrictions: Few restrictions

      \n
    • \n
    \n
  • \n
  • \n

    \n Tunnel Category C\n

    \n
      \n
    • \n

      \n Risk Level: Medium risk

      \n
    • \n
    • \n

      \n Restrictions: Some restrictions

      \n
    • \n
    \n
  • \n
  • \n

    \n Tunnel Category D\n

    \n
      \n
    • \n

      \n Risk Level: High risk

      \n
    • \n
    • \n

      \n Restrictions: Many restrictions occur

      \n
    • \n
    \n
  • \n
  • \n

    \n Tunnel Category E\n

    \n
      \n
    • \n

      \n Risk Level: Very high risk

      \n
    • \n
    • \n

      \n Restrictions: Restricted tunnel

      \n
    • \n
    \n
  • \n
" + } + } + }, + "traits": { + "smithy.api#documentation": "

This property contains a \n summary of violated constraints.

" + } + }, + "com.amazonaws.georoutes#RouteWaypoint": { + "type": "structure", + "members": { + "AvoidActionsForDistance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Avoids actions for the provided distance. This is typically to consider for users in moving vehicles who may not have sufficient time to make an action at an origin or a destination.

", + "smithy.api#range": { + "max": 2000 + } + } + }, + "AvoidUTurns": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid U-turns for calculation on highways and motorways.

" + } + }, + "Heading": { + "target": "com.amazonaws.georoutes#Heading", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

GPS Heading at the position.

" + } + }, + "Matching": { + "target": "com.amazonaws.georoutes#RouteMatchingOptions", + "traits": { + "smithy.api#documentation": "

Options to configure matching the provided position to the road network.

" + } + }, + "PassThrough": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

If the waypoint should not be treated as a stop. If yes, the waypoint is passed through and doesn't split the route into different legs.

" + } + }, + "Position": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

Position defined as [longitude, latitude].

", + "smithy.api#required": {} + } + }, + "SideOfStreet": { + "target": "com.amazonaws.georoutes#RouteSideOfStreetOptions", + "traits": { + "smithy.api#documentation": "

Options to configure matching the provided position to a side of the street.

" + } + }, + "StopDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of the stop.

\n

\n Unit: seconds\n

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

Waypoint between the Origin and Destination.

" + } + }, + "com.amazonaws.georoutes#RouteWaypointList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteWaypoint" + } + }, + "com.amazonaws.georoutes#RouteWeightConstraint": { + "type": "structure", + "members": { + "Type": { + "target": "com.amazonaws.georoutes#RouteWeightConstraintType", + "traits": { + "smithy.api#documentation": "

The type of constraint.

", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The constraint value.

\n

\n Unit: Kilograms\n

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

The weight constraint for the route.

\n

\n Unit: Kilograms\n

" + } + }, + "com.amazonaws.georoutes#RouteWeightConstraintType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "CURRENT", + "value": "Current" + }, + { + "name": "GROSS", + "value": "Gross" + }, + { + "name": "UNKNOWN", + "value": "Unknown" + } + ] + } + }, + "com.amazonaws.georoutes#RouteZone": { + "type": "structure", + "members": { + "Category": { + "target": "com.amazonaws.georoutes#RouteZoneCategory", + "traits": { + "smithy.api#documentation": "

The zone category.

" + } + }, + "Name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the zone.

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

The zone.

" + } + }, + "com.amazonaws.georoutes#RouteZoneCategory": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "CONGESTION_PRICING", + "value": "CongestionPricing" + }, + { + "name": "ENVIRONMENTAL", + "value": "Environmental" + }, + { + "name": "VIGNETTE", + "value": "Vignette" + } + ] + } + }, + "com.amazonaws.georoutes#RouteZoneList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#RouteZone" + } + }, + "com.amazonaws.georoutes#RoutesService": { + "type": "service", + "version": "2020-11-19", + "resources": [ + { + "target": "com.amazonaws.georoutes#ProviderResource" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Geo Routes", + "arnNamespace": "geo-routes", + "cloudTrailEventSource": "geo-routes.amazonaws.com" + }, + "aws.auth#sigv4": { + "name": "geo-routes" + }, + "aws.endpoints#standardRegionalEndpoints": { + "partitionSpecialCases": { + "aws": [ + { + "endpoint": "https://routes.geo.{region}.{dnsSuffix}/v2" + }, + { + "endpoint": "https://routes.geo-fips.{region}.{dualStackDnsSuffix}/v2", + "fips": true, + "dualStack": true + }, + { + "endpoint": "https://routes.geo-fips.{region}.{dnsSuffix}/v2", + "fips": true, + "dualStack": false + }, + { + "endpoint": "https://routes.geo.{region}.{dualStackDnsSuffix}/v2", + "fips": false, + "dualStack": true + } + ], + "aws-us-gov": [ + { + "endpoint": "https://routes.geo.{region}.us-gov.{dnsSuffix}/v2" + }, + { + "endpoint": "https://routes.geo-fips.{region}.us-gov.{dualStackDnsSuffix}/v2", + "fips": true, + "dualStack": true + }, + { + "endpoint": "https://routes.geo-fips.{region}.us-gov.{dnsSuffix}/v2", + "fips": true, + "dualStack": false + }, + { + "endpoint": "https://routes.geo.{region}.us-gov.{dualStackDnsSuffix}/v2", + "fips": false, + "dualStack": true + } + ] + } + }, + "aws.protocols#restJson1": {}, + "smithy.api#cors": { + "additionalAllowedHeaders": [ + "x-amz-content-sha256", + "x-amz-user-agent", + "content-type" + ] + }, + "smithy.api#documentation": "

With the Amazon Location Routes API you can calculate\n routes and estimate travel time based on up-to-date road network and live \n traffic information.

\n

Calculate optimal travel routes and estimate travel times using up-to-date road network and traffic data. Key features include:

\n
    \n
  • \n

    Point-to-point routing with estimated travel time, distance, and turn-by-turn directions

    \n
  • \n
  • \n

    Multi-point route optimization to minimize travel time or distance

    \n
  • \n
  • \n

    Route matrices for efficient multi-destination planning

    \n
  • \n
  • \n

    Isoline calculations to determine reachable areas within specified time or distance thresholds

    \n
  • \n
  • \n

    Map-matching to align GPS traces with the road network

    \n
  • \n
", + "smithy.api#title": "Amazon Location Service Routes V2", + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "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" + }, + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the 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": [], + "rules": [ + { + "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" + } + ], + "type": "tree" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://routes.geo.{Region}.{PartitionResult#dnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "endpoint": { + "url": "https://routes.geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://routes.geo-fips.{Region}.{PartitionResult#dnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "endpoint": { + "url": "https://routes.geo.{Region}.{PartitionResult#dualStackDnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://routes.geo.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "endpoint": { + "url": "https://routes.geo-fips.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://routes.geo-fips.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "endpoint": { + "url": "https://routes.geo.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "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://geo-routes-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 + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://geo-routes-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": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://geo-routes.{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://geo-routes.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ], + "type": "tree" + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For custom endpoint with region not set and fips disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Endpoint": "https://example.com", + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with fips enabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Endpoint": "https://example.com", + "UseFIPS": true + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Endpoint": "https://example.com", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://routes.geo-fips.us-east-1.api.aws/v2" + } + }, + "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://routes.geo-fips.us-east-1.amazonaws.com/v2" + } + }, + "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://routes.geo.us-east-1.api.aws/v2" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://routes.geo.us-east-1.amazonaws.com/v2" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://geo-routes-fips.cn-northwest-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-routes-fips.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://geo-routes.cn-northwest-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-routes.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://routes.geo-fips.us-gov-west-1.us-gov.api.aws/v2" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://routes.geo-fips.us-gov-west-1.us-gov.amazonaws.com/v2" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://routes.geo.us-gov-west-1.us-gov.api.aws/v2" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://routes.geo.us-gov-west-1.us-gov.amazonaws.com/v2" + } + }, + "params": { + "Region": "us-gov-west-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://geo-routes-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://geo-routes.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://geo-routes-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://geo-routes.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-isoe-west-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": "eu-isoe-west-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-routes-fips.eu-isoe-west-1.cloud.adc-e.uk" + } + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-routes.eu-isoe-west-1.cloud.adc-e.uk" + } + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isof-south-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-isof-south-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-routes-fips.us-isof-south-1.csp.hci.ic.gov" + } + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://geo-routes.us-isof-south-1.csp.hci.ic.gov" + } + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.georoutes#RoutingObjective": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "FASTEST_ROUTE", + "value": "FastestRoute" + }, + { + "name": "SHORTEST_ROUTE", + "value": "ShortestRoute" + } + ] + } + }, + "com.amazonaws.georoutes#SensitiveString": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.georoutes#SideOfStreetMatchingStrategy": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "ANY_STREET", + "value": "AnyStreet" + }, + { + "name": "DIVIDED_STREET_ONLY", + "value": "DividedStreetOnly" + } + ] + } + }, + "com.amazonaws.georoutes#SnapToRoads": { + "type": "operation", + "input": { + "target": "com.amazonaws.georoutes#SnapToRoadsRequest" + }, + "output": { + "target": "com.amazonaws.georoutes#SnapToRoadsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.georoutes#AccessDeniedException" + }, + { + "target": "com.amazonaws.georoutes#InternalServerException" + }, + { + "target": "com.amazonaws.georoutes#ThrottlingException" + }, + { + "target": "com.amazonaws.georoutes#ValidationException" + } + ], + "traits": { + "aws.api#dataPlane": {}, + "smithy.api#documentation": "

The SnapToRoads action matches GPS trace to roads most likely traveled on.

", + "smithy.api#http": { + "uri": "/snap-to-roads", + "method": "POST" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "SnapToRoadsSuccess", + "params": { + "TracePoints": [ + { + "Position": [ + 8.53404, + 50.16364 + ] + }, + { + "Position": [ + 8.53379056, + 50.16352417 + ] + } + ] + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-west-2" + } + } + ] + } + }, + "com.amazonaws.georoutes#SnapToRoadsRequest": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.georoutes#ApiKey", + "traits": { + "smithy.api#documentation": "

Optional: The API key to be used for authorization. Either an API key or valid SigV4\n signature must be provided when making a request.

", + "smithy.api#httpQuery": "key" + } + }, + "SnappedGeometryFormat": { + "target": "com.amazonaws.georoutes#GeometryFormat", + "traits": { + "smithy.api#documentation": "

Chooses what the returned SnappedGeometry format should be.

\n

Default Value: FlexiblePolyline\n

" + } + }, + "SnapRadius": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The radius around the provided tracepoint that is considered for snapping.

\n

\n Unit: meters\n

\n

Default value: 300\n

", + "smithy.api#range": { + "min": 0, + "max": 10000 + } + } + }, + "TracePoints": { + "target": "com.amazonaws.georoutes#RoadSnapTracePointList", + "traits": { + "smithy.api#documentation": "

List of trace points to be snapped onto the road network.

", + "smithy.api#length": { + "min": 2, + "max": 5000 + }, + "smithy.api#required": {} + } + }, + "TravelMode": { + "target": "com.amazonaws.georoutes#RoadSnapTravelMode", + "traits": { + "smithy.api#documentation": "

Specifies the mode of transport when calculating a route. \n Used in estimating the speed of travel and road compatibility.

\n

Default Value: Car\n

" + } + }, + "TravelModeOptions": { + "target": "com.amazonaws.georoutes#RoadSnapTravelModeOptions", + "traits": { + "smithy.api#documentation": "

Travel mode related options for the provided travel mode.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.georoutes#SnapToRoadsResponse": { + "type": "structure", + "members": { + "Notices": { + "target": "com.amazonaws.georoutes#RoadSnapNoticeList", + "traits": { + "smithy.api#documentation": "

Notices are additional information returned that indicate issues that occurred during route calculation.

", + "smithy.api#required": {} + } + }, + "PricingBucket": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pricing bucket for which the query is charged at.

", + "smithy.api#httpHeader": "x-amz-geo-pricing-bucket", + "smithy.api#required": {} + } + }, + "SnappedGeometry": { + "target": "com.amazonaws.georoutes#RoadSnapSnappedGeometry", + "traits": { + "smithy.api#documentation": "

The interpolated geometry for the snapped route onto the road network.

" + } + }, + "SnappedGeometryFormat": { + "target": "com.amazonaws.georoutes#GeometryFormat", + "traits": { + "smithy.api#documentation": "

Specifies the format of the geometry returned for each leg of the route.

", + "smithy.api#required": {} + } + }, + "SnappedTracePoints": { + "target": "com.amazonaws.georoutes#RoadSnapSnappedTracePointList", + "traits": { + "smithy.api#documentation": "

The trace points snapped onto the road network.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.georoutes#SpeedKilometersPerHour": { + "type": "double", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0.0 + } + } + }, + "com.amazonaws.georoutes#ThrottlingException": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The request was denied due to request throttling.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.georoutes#TimeOfDay": { + "type": "string", + "traits": { + "smithy.api#pattern": "^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](Z|[+-]([0-1]?[0-9]|2[0-3]):[0-5][0-9])$" + } + }, + "com.amazonaws.georoutes#TimeThresholdList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#range": { + "min": 0, + "max": 10800 + } + } + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 5 + } + } + }, + "com.amazonaws.georoutes#TimestampWithTimezoneOffset": { + "type": "string", + "traits": { + "smithy.api#pattern": "^([1-2][0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]{0,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$" + } + }, + "com.amazonaws.georoutes#TrafficUsage": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "IGNORE_TRAFFIC_DATA", + "value": "IgnoreTrafficData" + }, + { + "name": "USE_TRAFFIC_DATA", + "value": "UseTrafficData" + } + ] + } + }, + "com.amazonaws.georoutes#TruckRoadType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 3 + } + } + }, + "com.amazonaws.georoutes#TruckRoadTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#TruckRoadType" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 12 + }, + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.georoutes#TunnelRestrictionCode": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "com.amazonaws.georoutes#TurnAngle": { + "type": "double", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": -180, + "max": 180 + } + } + }, + "com.amazonaws.georoutes#ValidationException": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + }, + "Reason": { + "target": "com.amazonaws.georoutes#ValidationExceptionReason", + "traits": { + "smithy.api#documentation": "

A message with the reason for the validation exception error.

", + "smithy.api#jsonName": "reason", + "smithy.api#required": {} + } + }, + "FieldList": { + "target": "com.amazonaws.georoutes#ValidationExceptionFieldList", + "traits": { + "smithy.api#documentation": "

The field where the invalid entry was detected.

", + "smithy.api#jsonName": "fieldList", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The input fails to satisfy the constraints specified by an AWS service.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.georoutes#ValidationExceptionField": { + "type": "structure", + "members": { + "Name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the Validation Exception Field.

", + "smithy.api#jsonName": "name", + "smithy.api#required": {} + } + }, + "Message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The error message.

", + "smithy.api#jsonName": "message", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The input fails to satisfy the constraints specified by the Amazon Location service.

" + } + }, + "com.amazonaws.georoutes#ValidationExceptionFieldList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#ValidationExceptionField" + } + }, + "com.amazonaws.georoutes#ValidationExceptionReason": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "UNKNOWN_OPERATION", + "value": "UnknownOperation", + "documentation": "No such operation is supported." + }, + { + "name": "MISSING", + "value": "Missing", + "documentation": "The required input is missing." + }, + { + "name": "CANNOT_PARSE", + "value": "CannotParse", + "documentation": " The input cannot be parsed. For example a required JSON document, ARN identifier,\n date value, or numeric field cannot be parsed.\n" + }, + { + "name": "FIELD_VALIDATION_FAILED", + "value": "FieldValidationFailed", + "documentation": " The input is present and parsable, but it is otherwise invalid. For example, a\n required numeric argument is outside the allowed range.\n" + }, + { + "name": "OTHER", + "value": "Other", + "documentation": "The input is invalid but no more specific reason is applicable." + }, + { + "name": "UNKNOWN_FIELD", + "value": "UnknownField", + "documentation": "No such field is supported." + } + ] + } + }, + "com.amazonaws.georoutes#WaypointId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.georoutes#WaypointIndex": { + "type": "integer", + "traits": { + "smithy.api#default": 0 + } + }, + "com.amazonaws.georoutes#WaypointOptimizationAccessHours": { + "type": "structure", + "members": { + "From": { + "target": "com.amazonaws.georoutes#WaypointOptimizationAccessHoursEntry", + "traits": { + "smithy.api#documentation": "

Contains the ID of the starting waypoint in this connection.

", + "smithy.api#required": {} + } + }, + "To": { + "target": "com.amazonaws.georoutes#WaypointOptimizationAccessHoursEntry", + "traits": { + "smithy.api#documentation": "

Contains the ID of the ending waypoint in this connection.

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

Access hours corresponding to when a destination can be visited.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationAccessHoursEntry": { + "type": "structure", + "members": { + "DayOfWeek": { + "target": "com.amazonaws.georoutes#DayOfWeek", + "traits": { + "smithy.api#documentation": "

Day of the week.

", + "smithy.api#required": {} + } + }, + "TimeOfDay": { + "target": "com.amazonaws.georoutes#TimeOfDay", + "traits": { + "smithy.api#documentation": "

Time of the day.

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

Hours of entry.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationAvoidanceArea": { + "type": "structure", + "members": { + "Geometry": { + "target": "com.amazonaws.georoutes#WaypointOptimizationAvoidanceAreaGeometry", + "traits": { + "smithy.api#documentation": "

Geometry of the area to be avoided.

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

The area to be avoided.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationAvoidanceAreaGeometry": { + "type": "structure", + "members": { + "BoundingBox": { + "target": "com.amazonaws.georoutes#BoundingBox", + "traits": { + "smithy.api#documentation": "

Geometry defined as a bounding box. The first pair represents the X and Y coordinates\n (longitude and latitude,) of the southwest corner of the bounding box; the second pair\n represents the X and Y coordinates (longitude and latitude) of the northeast corner.

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

Geometry of the area to be avoided.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationAvoidanceAreaList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#WaypointOptimizationAvoidanceArea" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationAvoidanceOptions": { + "type": "structure", + "members": { + "Areas": { + "target": "com.amazonaws.georoutes#WaypointOptimizationAvoidanceAreaList", + "traits": { + "smithy.api#documentation": "

Areas to be avoided.

", + "smithy.api#length": { + "max": 20 + } + } + }, + "CarShuttleTrains": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoidance options for cars-shuttles-trains.

" + } + }, + "ControlledAccessHighways": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid controlled access highways while calculating the route.

" + } + }, + "DirtRoads": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid dirt roads while calculating the route.

" + } + }, + "Ferries": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoidance options for ferries.

" + } + }, + "TollRoads": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoids roads where the specified toll transponders are the only mode of payment.

" + } + }, + "Tunnels": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid tunnels while calculating the route.

" + } + }, + "UTurns": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Avoid U-turns for calculation on highways and motorways.

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

Options for WaypointOptimizationAvoidance.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationConnection": { + "type": "structure", + "members": { + "Distance": { + "target": "com.amazonaws.georoutes#DistanceMeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Distance of the step.

", + "smithy.api#required": {} + } + }, + "From": { + "target": "com.amazonaws.georoutes#WaypointId", + "traits": { + "smithy.api#documentation": "

contains the ID of the starting waypoint in this connection.

", + "smithy.api#required": {} + } + }, + "RestDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Resting time before the driver can continue driving.

", + "smithy.api#required": {} + } + }, + "To": { + "target": "com.amazonaws.georoutes#WaypointId", + "traits": { + "smithy.api#documentation": "

Contains the ID of the ending waypoint in this connection.

", + "smithy.api#required": {} + } + }, + "TravelDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Total duration.

\n

\n Unit: seconds\n

", + "smithy.api#required": {} + } + }, + "WaitDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Duration of a wait step.

\n

\n Unit: seconds\n

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

This contains information such as distance and duration from one waypoint to the next waypoint in the sequence.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationConnectionList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#WaypointOptimizationConnection" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationConstraint": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "ACCESS_HOURS", + "value": "AccessHours" + }, + { + "name": "APPOINTMENT_TIME", + "value": "AppointmentTime" + }, + { + "name": "BEFORE", + "value": "Before" + }, + { + "name": "HEADING", + "value": "Heading" + }, + { + "name": "SERVICE_DURATION", + "value": "ServiceDuration" + }, + { + "name": "SIDE_OF_STREET", + "value": "SideOfStreet" + } + ] + } + }, + "com.amazonaws.georoutes#WaypointOptimizationDestinationOptions": { + "type": "structure", + "members": { + "AccessHours": { + "target": "com.amazonaws.georoutes#WaypointOptimizationAccessHours", + "traits": { + "smithy.api#documentation": "

Access hours corresponding to when a waypoint can be visited.

" + } + }, + "AppointmentTime": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

Appointment time at the destination.

" + } + }, + "Heading": { + "target": "com.amazonaws.georoutes#Heading", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

GPS Heading at the position.

" + } + }, + "Id": { + "target": "com.amazonaws.georoutes#WaypointId", + "traits": { + "smithy.api#documentation": "

The waypoint Id.

" + } + }, + "ServiceDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Service time spent at the destination. At an appointment, the service time should be the appointment duration.

\n

\n Unit: seconds\n

" + } + }, + "SideOfStreet": { + "target": "com.amazonaws.georoutes#WaypointOptimizationSideOfStreetOptions", + "traits": { + "smithy.api#documentation": "

Options to configure matching the provided position to a side of the street.

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

Destination related options.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationDriverOptions": { + "type": "structure", + "members": { + "RestCycles": { + "target": "com.amazonaws.georoutes#WaypointOptimizationRestCycles", + "traits": { + "smithy.api#documentation": "

Driver work-rest schedules defined by a short and long cycle. A rest needs to be taken after the short work duration. The short cycle can be repeated until you hit the long work duration, at which point the long rest duration should be taken before restarting.

" + } + }, + "RestProfile": { + "target": "com.amazonaws.georoutes#WaypointOptimizationRestProfile", + "traits": { + "smithy.api#documentation": "

Pre defined rest profiles for a driver schedule. The only currently supported profile is\n EU.

" + } + }, + "TreatServiceTimeAs": { + "target": "com.amazonaws.georoutes#WaypointOptimizationServiceTimeTreatment", + "traits": { + "smithy.api#documentation": "

If the service time provided at a waypoint/destination should be considered as rest or work. This contributes to the total time breakdown returned within the response.

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

Driver related options.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationExclusionOptions": { + "type": "structure", + "members": { + "Countries": { + "target": "com.amazonaws.georoutes#CountryCodeList", + "traits": { + "smithy.api#documentation": "

List of countries to be avoided defined by two-letter or three-letter country codes.

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

Exclusion options.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationFailedConstraint": { + "type": "structure", + "members": { + "Constraint": { + "target": "com.amazonaws.georoutes#WaypointOptimizationConstraint", + "traits": { + "smithy.api#documentation": "

The failed constraint.

" + } + }, + "Reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Reason for the failed constraint.

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

The failed constraint.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationFailedConstraintList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#WaypointOptimizationFailedConstraint" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationHazardousCargoType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "COMBUSTIBLE", + "value": "Combustible" + }, + { + "name": "CORROSIVE", + "value": "Corrosive" + }, + { + "name": "EXPLOSIVE", + "value": "Explosive" + }, + { + "name": "FLAMMABLE", + "value": "Flammable" + }, + { + "name": "GAS", + "value": "Gas" + }, + { + "name": "HARMFUL_TO_WATER", + "value": "HarmfulToWater" + }, + { + "name": "ORGANIC", + "value": "Organic" + }, + { + "name": "OTHER", + "value": "Other" + }, + { + "name": "POISON", + "value": "Poison" + }, + { + "name": "POISONOUS_INHALATION", + "value": "PoisonousInhalation" + }, + { + "name": "RADIOACTIVE", + "value": "Radioactive" + } + ] + } + }, + "com.amazonaws.georoutes#WaypointOptimizationHazardousCargoTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#WaypointOptimizationHazardousCargoType" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.georoutes#WaypointOptimizationImpedingWaypoint": { + "type": "structure", + "members": { + "FailedConstraints": { + "target": "com.amazonaws.georoutes#WaypointOptimizationFailedConstraintList", + "traits": { + "smithy.api#documentation": "

Failed constraints for an impeding waypoint.

", + "smithy.api#required": {} + } + }, + "Id": { + "target": "com.amazonaws.georoutes#WaypointId", + "traits": { + "smithy.api#documentation": "

The waypoint Id.

", + "smithy.api#required": {} + } + }, + "Position": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

Position defined as [longitude, latitude].

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

The impeding waypoint.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationImpedingWaypointList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#WaypointOptimizationImpedingWaypoint" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationOptimizedWaypoint": { + "type": "structure", + "members": { + "ArrivalTime": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

Estimated time of arrival at the destination.

\n

Time format:YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm\n

\n

Examples:

\n

\n 2020-04-22T17:57:24Z\n

\n

\n 2020-04-22T17:57:24+02:00\n

" + } + }, + "DepartureTime": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

Estimated time of departure from thr origin.

\n

Time format:YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm\n

\n

Examples:

\n

\n 2020-04-22T17:57:24Z\n

\n

\n 2020-04-22T17:57:24+02:00\n

", + "smithy.api#required": {} + } + }, + "Id": { + "target": "com.amazonaws.georoutes#WaypointId", + "traits": { + "smithy.api#documentation": "

The waypoint Id.

", + "smithy.api#required": {} + } + }, + "Position": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

Position defined as [longitude, latitude].

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

The optimized waypoint.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationOptimizedWaypointList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#WaypointOptimizationOptimizedWaypoint" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationOriginOptions": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.georoutes#WaypointId", + "traits": { + "smithy.api#documentation": "

The Origin Id.

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

Options related to the origin.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationPedestrianOptions": { + "type": "structure", + "members": { + "Speed": { + "target": "com.amazonaws.georoutes#SpeedKilometersPerHour", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "

Walking speed.

\n

\n Unit: KilometersPerHour\n

", + "smithy.api#range": { + "min": 1.8, + "max": 7.2 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Options related to a pedestrian.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationRestCycleDurations": { + "type": "structure", + "members": { + "RestDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Resting phase of the cycle.

\n

\n Unit: seconds\n

", + "smithy.api#required": {} + } + }, + "WorkDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Working phase of the cycle.

\n

\n Unit: seconds\n

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

Driver work-rest schedules defined by a short and long cycle. A rest needs to be taken after the short work duration. The short cycle can be repeated until you hit the long work duration, at which point the long rest duration should be taken before restarting.

\n

\n Unit: seconds\n

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationRestCycles": { + "type": "structure", + "members": { + "LongCycle": { + "target": "com.amazonaws.georoutes#WaypointOptimizationRestCycleDurations", + "traits": { + "smithy.api#documentation": "

Long cycle for a driver work-rest schedule.

", + "smithy.api#required": {} + } + }, + "ShortCycle": { + "target": "com.amazonaws.georoutes#WaypointOptimizationRestCycleDurations", + "traits": { + "smithy.api#documentation": "

Short cycle for a driver work-rest schedule

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

Resting phase of the cycle.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationRestProfile": { + "type": "structure", + "members": { + "Profile": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Pre defined rest profiles for a driver schedule. The only currently supported profile is\n EU.

", + "smithy.api#length": { + "min": 2, + "max": 2 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Pre defined rest profiles for a driver schedule. The only currently supported profile is\n EU.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationSequencingObjective": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "FASTEST_ROUTE", + "value": "FastestRoute" + }, + { + "name": "SHORTEST_ROUTE", + "value": "ShortestRoute" + } + ] + } + }, + "com.amazonaws.georoutes#WaypointOptimizationServiceTimeTreatment": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "REST", + "value": "Rest" + }, + { + "name": "WORK", + "value": "Work" + } + ] + } + }, + "com.amazonaws.georoutes#WaypointOptimizationSideOfStreetOptions": { + "type": "structure", + "members": { + "Position": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

Position defined as [longitude, latitude].

", + "smithy.api#required": {} + } + }, + "UseWith": { + "target": "com.amazonaws.georoutes#SideOfStreetMatchingStrategy", + "traits": { + "smithy.api#documentation": "

Strategy that defines when the side of street position should be used. AnyStreet will always use the provided position.

\n

Default Value: DividedStreetOnly\n

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

Options to configure matching the provided position to a side of the street.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationTimeBreakdown": { + "type": "structure", + "members": { + "RestDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Resting phase of the cycle.

\n

\n Unit: seconds\n

", + "smithy.api#required": {} + } + }, + "ServiceDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Service time spent at the destination. At an appointment, the service time should be the appointment duration.

\n

\n Unit: seconds\n

", + "smithy.api#required": {} + } + }, + "TravelDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Traveling phase of the cycle.

\n

\n Unit: seconds\n

", + "smithy.api#required": {} + } + }, + "WaitDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Waiting phase of the cycle.

\n

\n Unit: seconds\n

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

Time breakdown for the sequence.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationTrafficOptions": { + "type": "structure", + "members": { + "Usage": { + "target": "com.amazonaws.georoutes#TrafficUsage", + "traits": { + "smithy.api#documentation": "

Determines if traffic should be used or ignored while calculating the route.

\n

Default Value: UseTrafficData\n

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

Options related to traffic.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationTrailerOptions": { + "type": "structure", + "members": { + "TrailerCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

Number of trailers attached to the vehicle.

\n

Default Value: 0\n

", + "smithy.api#range": { + "min": 0, + "max": 255 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Trailer options corresponding to the vehicle.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationTravelMode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "CAR", + "value": "Car" + }, + { + "name": "PEDESTRIAN", + "value": "Pedestrian" + }, + { + "name": "SCOOTER", + "value": "Scooter" + }, + { + "name": "TRUCK", + "value": "Truck" + } + ] + } + }, + "com.amazonaws.georoutes#WaypointOptimizationTravelModeOptions": { + "type": "structure", + "members": { + "Pedestrian": { + "target": "com.amazonaws.georoutes#WaypointOptimizationPedestrianOptions", + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Pedestrian\"

" + } + }, + "Truck": { + "target": "com.amazonaws.georoutes#WaypointOptimizationTruckOptions", + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Truck\"

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

Travel mode related options for the provided travel mode.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationTruckOptions": { + "type": "structure", + "members": { + "GrossWeight": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Gross weight of the vehicle including trailers, and goods at capacity.

\n

\n Unit: Kilograms\n

" + } + }, + "HazardousCargos": { + "target": "com.amazonaws.georoutes#WaypointOptimizationHazardousCargoTypeList", + "traits": { + "smithy.api#documentation": "

List of Hazardous cargo contained in the vehicle.

" + } + }, + "Height": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Height of the vehicle.

\n

\n Unit: centimeters\n

", + "smithy.api#range": { + "min": 0, + "max": 5000 + } + } + }, + "Length": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Length of the vehicle.

\n

\n Unit: centimeters\n

", + "smithy.api#range": { + "min": 0, + "max": 30000 + } + } + }, + "Trailer": { + "target": "com.amazonaws.georoutes#WaypointOptimizationTrailerOptions", + "traits": { + "smithy.api#documentation": "

Trailer options corresponding to the vehicle.

" + } + }, + "TruckType": { + "target": "com.amazonaws.georoutes#WaypointOptimizationTruckType", + "traits": { + "smithy.api#documentation": "

Type of the truck.

" + } + }, + "TunnelRestrictionCode": { + "target": "com.amazonaws.georoutes#TunnelRestrictionCode", + "traits": { + "smithy.api#documentation": "

The tunnel restriction code.

\n

Tunnel categories in this list indicate the restrictions which apply to certain tunnels in Great Britain. \n They relate to the types of dangerous goods that can be transported through them.

\n
    \n
  • \n

    \n Tunnel Category B\n

    \n
      \n
    • \n

      \n Risk Level: Limited risk

      \n
    • \n
    • \n

      \n Restrictions: Few restrictions

      \n
    • \n
    \n
  • \n
  • \n

    \n Tunnel Category C\n

    \n
      \n
    • \n

      \n Risk Level: Medium risk

      \n
    • \n
    • \n

      \n Restrictions: Some restrictions

      \n
    • \n
    \n
  • \n
  • \n

    \n Tunnel Category D\n

    \n
      \n
    • \n

      \n Risk Level: High risk

      \n
    • \n
    • \n

      \n Restrictions: Many restrictions occur

      \n
    • \n
    \n
  • \n
  • \n

    \n Tunnel Category E\n

    \n
      \n
    • \n

      \n Risk Level: Very high risk

      \n
    • \n
    • \n

      \n Restrictions: Restricted tunnel

      \n
    • \n
    \n
  • \n
" + } + }, + "WeightPerAxle": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Heaviest weight per axle irrespective of the axle type or the axle group. Meant for usage in countries where the differences in axle types or axle groups are not distinguished.

\n

\n Unit: Kilograms\n

" + } + }, + "Width": { + "target": "com.amazonaws.georoutes#DimensionCentimeters", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Width of the vehicle.

\n

\n Unit: centimeters\n

", + "smithy.api#range": { + "min": 0, + "max": 5000 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Travel mode options when the provided travel mode is \"Truck\"

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationTruckType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "STRAIGHT_TRUCK", + "value": "StraightTruck" + }, + { + "name": "TRACTOR", + "value": "Tractor" + } + ] + } + }, + "com.amazonaws.georoutes#WaypointOptimizationWaypoint": { + "type": "structure", + "members": { + "AccessHours": { + "target": "com.amazonaws.georoutes#WaypointOptimizationAccessHours", + "traits": { + "smithy.api#documentation": "

Access hours corresponding to when a waypoint can be visited.

" + } + }, + "AppointmentTime": { + "target": "com.amazonaws.georoutes#TimestampWithTimezoneOffset", + "traits": { + "smithy.api#documentation": "

Appointment time at the waypoint.

" + } + }, + "Before": { + "target": "com.amazonaws.georoutes#BeforeWaypointsList", + "traits": { + "smithy.api#documentation": "

Constraint defining what waypoints are to be visited after this waypoint.

" + } + }, + "Heading": { + "target": "com.amazonaws.georoutes#Heading", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

GPS Heading at the position.

" + } + }, + "Id": { + "target": "com.amazonaws.georoutes#WaypointId", + "traits": { + "smithy.api#documentation": "

The waypoint Id.

" + } + }, + "Position": { + "target": "com.amazonaws.georoutes#Position", + "traits": { + "smithy.api#documentation": "

Position defined as [longitude, latitude].

", + "smithy.api#required": {} + } + }, + "ServiceDuration": { + "target": "com.amazonaws.georoutes#DurationSeconds", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Service time spent at the waypoint. At an appointment, the service time should be the appointment duration.

\n

\n Unit: seconds\n

" + } + }, + "SideOfStreet": { + "target": "com.amazonaws.georoutes#WaypointOptimizationSideOfStreetOptions", + "traits": { + "smithy.api#documentation": "

Options to configure matching the provided position to a side of the street.

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

Waypoint between the Origin and Destination.

" + } + }, + "com.amazonaws.georoutes#WaypointOptimizationWaypointList": { + "type": "list", + "member": { + "target": "com.amazonaws.georoutes#WaypointOptimizationWaypoint" + } + }, + "com.amazonaws.georoutes#WeightKilograms": { + "type": "long", + "traits": { + "smithy.api#default": 0, + "smithy.api#range": { + "min": 0, + "max": 4294967295 + } + } + }, + "com.amazonaws.georoutes#WeightPerAxleGroup": { + "type": "structure", + "members": { + "Single": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Weight for single axle group.

\n

\n Unit: Kilograms\n

" + } + }, + "Tandem": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Weight for tandem axle group.

\n

\n Unit: Kilograms\n

" + } + }, + "Triple": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Weight for triple axle group.

\n

\n Unit: Kilograms\n

" + } + }, + "Quad": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Weight for quad axle group.

\n

\n Unit: Kilograms\n

" + } + }, + "Quint": { + "target": "com.amazonaws.georoutes#WeightKilograms", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

Weight for quad quint group.

\n

\n Unit: Kilograms\n

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

Specifies the total weight for the specified axle group. Meant for usage in countries that have different regulations based on the axle group type.

\n

\n Unit: Kilograms\n

" + } + } + } +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/keyspaces.json b/codegen/sdk-codegen/aws-models/keyspaces.json index 663b39ae1e3..652acb659bc 100644 --- a/codegen/sdk-codegen/aws-models/keyspaces.json +++ b/codegen/sdk-codegen/aws-models/keyspaces.json @@ -320,7 +320,7 @@ } ], "traits": { - "smithy.api#documentation": "

The CreateKeyspace operation adds a new keyspace to your account. In an Amazon Web Services account, keyspace names\n must be unique within each Region.

\n

\n CreateKeyspace is an asynchronous operation. You can monitor the creation status of the new keyspace \n by using the GetKeyspace operation.

\n

For more information, see Creating keyspaces in the Amazon Keyspaces Developer\n Guide.

" + "smithy.api#documentation": "

The CreateKeyspace operation adds a new keyspace to your account. In an Amazon Web Services account, keyspace names\n must be unique within each Region.

\n

\n CreateKeyspace is an asynchronous operation. You can monitor the creation status of the new keyspace \n by using the GetKeyspace operation.

\n

For more information, see Create a keyspace in the Amazon Keyspaces Developer\n Guide.

" } }, "com.amazonaws.keyspaces#CreateKeyspaceRequest": { @@ -388,7 +388,7 @@ } ], "traits": { - "smithy.api#documentation": "

The CreateTable operation adds a new table to the specified keyspace. Within a keyspace, table names\n must be unique.

\n

\n CreateTable is an asynchronous operation. When the request is received, the status of the table is set to CREATING.\n You can monitor the creation status of the new table by using the GetTable \n operation, which returns the current status of the table. You can start using a table when the status is ACTIVE.

\n

For more information, see Creating tables in the Amazon Keyspaces Developer\n Guide.

" + "smithy.api#documentation": "

The CreateTable operation adds a new table to the specified keyspace. Within a keyspace, table names\n must be unique.

\n

\n CreateTable is an asynchronous operation. When the request is received, the status of the table is set to CREATING.\n You can monitor the creation status of the new table by using the GetTable \n operation, which returns the current status of the table. You can start using a table when the status is ACTIVE.

\n

For more information, see Create a table in the Amazon Keyspaces Developer\n Guide.

" } }, "com.amazonaws.keyspaces#CreateTableRequest": { @@ -489,6 +489,89 @@ } } }, + "com.amazonaws.keyspaces#CreateType": { + "type": "operation", + "input": { + "target": "com.amazonaws.keyspaces#CreateTypeRequest" + }, + "output": { + "target": "com.amazonaws.keyspaces#CreateTypeResponse" + }, + "errors": [ + { + "target": "com.amazonaws.keyspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.keyspaces#ConflictException" + }, + { + "target": "com.amazonaws.keyspaces#InternalServerException" + }, + { + "target": "com.amazonaws.keyspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.keyspaces#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.keyspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

\n The CreateType operation creates a new user-defined type in the specified keyspace.\n

\n

For more information, see User-defined types (UDTs) in the Amazon Keyspaces Developer\n Guide.

" + } + }, + "com.amazonaws.keyspaces#CreateTypeRequest": { + "type": "structure", + "members": { + "keyspaceName": { + "target": "com.amazonaws.keyspaces#KeyspaceName", + "traits": { + "smithy.api#documentation": "

\n The name of the keyspace.\n

", + "smithy.api#required": {} + } + }, + "typeName": { + "target": "com.amazonaws.keyspaces#TypeName", + "traits": { + "smithy.api#documentation": "

\n The name of the user-defined type.\n

\n

UDT names must contain 48 characters or less, must begin with an alphabetic character, and \n can only contain alpha-numeric characters and underscores. Amazon Keyspaces converts upper case characters automatically\n into lower case characters.

\n

Alternatively, you can declare a UDT name in double quotes. When declaring a UDT name inside double quotes,\n Amazon Keyspaces preserves upper casing and allows special characters.

\n

You can also use double quotes as part of the \n name when you create the UDT, but you must escape each double quote character with an additional \n double quote character.

", + "smithy.api#required": {} + } + }, + "fieldDefinitions": { + "target": "com.amazonaws.keyspaces#FieldList", + "traits": { + "smithy.api#documentation": "

\n The field definitions, consisting of names and types, that define this type. \n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.keyspaces#CreateTypeResponse": { + "type": "structure", + "members": { + "keyspaceArn": { + "target": "com.amazonaws.keyspaces#ARN", + "traits": { + "smithy.api#documentation": "

\n The unique identifier of the keyspace that contains the new type in the format of an Amazon Resource Name (ARN). \n

", + "smithy.api#required": {} + } + }, + "typeName": { + "target": "com.amazonaws.keyspaces#TypeName", + "traits": { + "smithy.api#documentation": "

\n The formatted name of the user-defined type that was created. Note that Amazon Keyspaces requires the formatted name of the type for\n other operations, for example GetType.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.keyspaces#DefaultTimeToLive": { "type": "integer", "traits": { @@ -601,6 +684,88 @@ "type": "structure", "members": {} }, + "com.amazonaws.keyspaces#DeleteType": { + "type": "operation", + "input": { + "target": "com.amazonaws.keyspaces#DeleteTypeRequest" + }, + "output": { + "target": "com.amazonaws.keyspaces#DeleteTypeResponse" + }, + "errors": [ + { + "target": "com.amazonaws.keyspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.keyspaces#ConflictException" + }, + { + "target": "com.amazonaws.keyspaces#InternalServerException" + }, + { + "target": "com.amazonaws.keyspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.keyspaces#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.keyspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

\n The DeleteType operation deletes a user-defined type (UDT). You can only delete a type that is not used in a table\n or another UDT.\n

" + } + }, + "com.amazonaws.keyspaces#DeleteTypeRequest": { + "type": "structure", + "members": { + "keyspaceName": { + "target": "com.amazonaws.keyspaces#KeyspaceName", + "traits": { + "smithy.api#documentation": "

\n The name of the keyspace of the to be deleted type.\n

", + "smithy.api#required": {} + } + }, + "typeName": { + "target": "com.amazonaws.keyspaces#TypeName", + "traits": { + "smithy.api#documentation": "

\n The name of the type to be deleted.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.keyspaces#DeleteTypeResponse": { + "type": "structure", + "members": { + "keyspaceArn": { + "target": "com.amazonaws.keyspaces#ARN", + "traits": { + "smithy.api#documentation": "

\n The unique identifier of the keyspace from which the type was deleted in the format of an Amazon Resource Name (ARN).\n

", + "smithy.api#required": {} + } + }, + "typeName": { + "target": "com.amazonaws.keyspaces#TypeName", + "traits": { + "smithy.api#documentation": "

\n The name of the type that was deleted.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.keyspaces#Depth": { + "type": "integer", + "traits": { + "smithy.api#default": 0 + } + }, "com.amazonaws.keyspaces#DoubleObject": { "type": "double", "traits": { @@ -643,6 +808,43 @@ ] } }, + "com.amazonaws.keyspaces#FieldDefinition": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.keyspaces#GenericString", + "traits": { + "smithy.api#documentation": "

\n The identifier.\n

", + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.keyspaces#GenericString", + "traits": { + "smithy.api#documentation": "

\n Any supported Cassandra data type, including collections and other user-defined types that are \n contained in the same keyspace.\n

\n

For more information, see Cassandra data type support in the Amazon Keyspaces Developer\n Guide.

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

\n A field definition consists out of a name and a type.\n

" + } + }, + "com.amazonaws.keyspaces#FieldList": { + "type": "list", + "member": { + "target": "com.amazonaws.keyspaces#FieldDefinition" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, "com.amazonaws.keyspaces#GenericString": { "type": "string" }, @@ -745,7 +947,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns information about the table, including the table's name and current status, the keyspace name, \n configuration settings, and metadata.

\n

To read table metadata using GetTable, Select action \n permissions for the table and system tables are required to complete the operation.

" + "smithy.api#documentation": "

Returns information about the table, including the table's name and current status, the keyspace name, \n configuration settings, and metadata.

\n

To read table metadata using GetTable, the \n IAM principal needs Select action \n permissions for the table and the system keyspace.

" } }, "com.amazonaws.keyspaces#GetTableAutoScalingSettings": { @@ -951,6 +1153,123 @@ } } }, + "com.amazonaws.keyspaces#GetType": { + "type": "operation", + "input": { + "target": "com.amazonaws.keyspaces#GetTypeRequest" + }, + "output": { + "target": "com.amazonaws.keyspaces#GetTypeResponse" + }, + "errors": [ + { + "target": "com.amazonaws.keyspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.keyspaces#InternalServerException" + }, + { + "target": "com.amazonaws.keyspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.keyspaces#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.keyspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

\n The GetType operation returns information about the type, for example the field definitions, the timestamp when the type\n was last modified, the level of nesting, the status, and details about if the type is used in other types and tables.\n

\n

To read keyspace metadata using GetType, the \n IAM principal needs Select action \n permissions for the system keyspace.

" + } + }, + "com.amazonaws.keyspaces#GetTypeRequest": { + "type": "structure", + "members": { + "keyspaceName": { + "target": "com.amazonaws.keyspaces#KeyspaceName", + "traits": { + "smithy.api#documentation": "

\n The name of the keyspace that contains this type.\n

", + "smithy.api#required": {} + } + }, + "typeName": { + "target": "com.amazonaws.keyspaces#TypeName", + "traits": { + "smithy.api#documentation": "

The formatted name of the type. For example, if the name of the type was created\n without double quotes, Amazon Keyspaces saved the name in lower-case characters. If the name was\n created in double quotes, you must use double quotes to specify the type name.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.keyspaces#GetTypeResponse": { + "type": "structure", + "members": { + "keyspaceName": { + "target": "com.amazonaws.keyspaces#KeyspaceName", + "traits": { + "smithy.api#documentation": "

\n The name of the keyspace that contains this type.\n

", + "smithy.api#required": {} + } + }, + "typeName": { + "target": "com.amazonaws.keyspaces#TypeName", + "traits": { + "smithy.api#documentation": "

\n The name of the type.\n

", + "smithy.api#required": {} + } + }, + "fieldDefinitions": { + "target": "com.amazonaws.keyspaces#FieldList", + "traits": { + "smithy.api#documentation": "

\n The names and types that define this type.\n

" + } + }, + "lastModifiedTimestamp": { + "target": "com.amazonaws.keyspaces#Timestamp", + "traits": { + "smithy.api#documentation": "

\n The timestamp that shows when this type was last modified.\n

" + } + }, + "status": { + "target": "com.amazonaws.keyspaces#TypeStatus", + "traits": { + "smithy.api#documentation": "

\n The status of this type.\n

" + } + }, + "directReferringTables": { + "target": "com.amazonaws.keyspaces#TableNameList", + "traits": { + "smithy.api#documentation": "

\n The tables that use this type.\n

" + } + }, + "directParentTypes": { + "target": "com.amazonaws.keyspaces#TypeNameList", + "traits": { + "smithy.api#documentation": "

\n The types that use this type.\n

" + } + }, + "maxNestingDepth": { + "target": "com.amazonaws.keyspaces#Depth", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

\n The level of nesting implemented for this type.\n

" + } + }, + "keyspaceArn": { + "target": "com.amazonaws.keyspaces#ARN", + "traits": { + "smithy.api#documentation": "

\n The unique identifier of the keyspace that contains this type in the format of an Amazon Resource Name (ARN).\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.keyspaces#IntegerObject": { "type": "integer", "traits": { @@ -1038,12 +1357,18 @@ { "target": "com.amazonaws.keyspaces#CreateTable" }, + { + "target": "com.amazonaws.keyspaces#CreateType" + }, { "target": "com.amazonaws.keyspaces#DeleteKeyspace" }, { "target": "com.amazonaws.keyspaces#DeleteTable" }, + { + "target": "com.amazonaws.keyspaces#DeleteType" + }, { "target": "com.amazonaws.keyspaces#GetKeyspace" }, @@ -1053,6 +1378,9 @@ { "target": "com.amazonaws.keyspaces#GetTableAutoScalingSettings" }, + { + "target": "com.amazonaws.keyspaces#GetType" + }, { "target": "com.amazonaws.keyspaces#ListKeyspaces" }, @@ -1062,6 +1390,9 @@ { "target": "com.amazonaws.keyspaces#ListTagsForResource" }, + { + "target": "com.amazonaws.keyspaces#ListTypes" + }, { "target": "com.amazonaws.keyspaces#RestoreTable" }, @@ -2030,7 +2361,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of keyspaces.

", + "smithy.api#documentation": "

The ListKeyspaces operation returns a list of keyspaces.

", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -2100,7 +2431,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of tables for a specified keyspace.

", + "smithy.api#documentation": "

The ListTables operation returns a list of tables for a specified keyspace.

\n

To read keyspace metadata using ListTables, the \n IAM principal needs Select action \n permissions for the system keyspace.

", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -2176,7 +2507,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of all tags associated with the specified Amazon Keyspaces resource.

", + "smithy.api#documentation": "

Returns a list of all tags associated with the specified Amazon Keyspaces resource.

\n

To read keyspace metadata using ListTagsForResource, the \n IAM principal needs Select action \n permissions for the specified resource and the system keyspace.

", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -2226,6 +2557,89 @@ } } }, + "com.amazonaws.keyspaces#ListTypes": { + "type": "operation", + "input": { + "target": "com.amazonaws.keyspaces#ListTypesRequest" + }, + "output": { + "target": "com.amazonaws.keyspaces#ListTypesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.keyspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.keyspaces#InternalServerException" + }, + { + "target": "com.amazonaws.keyspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.keyspaces#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.keyspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

\n The ListTypes operation returns a list of types for a specified keyspace.\n

\n

To read keyspace metadata using ListTypes, the \n IAM principal needs Select action \n permissions for the system keyspace.

", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "types" + } + } + }, + "com.amazonaws.keyspaces#ListTypesRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.keyspaces#NextToken", + "traits": { + "smithy.api#documentation": "

\n The pagination token. To resume pagination, provide the NextToken value as an argument of a subsequent API invocation.\n

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

\n The total number of types to return in the output. If the total number of types available is more than the value specified,\n a NextToken is provided in the output. To resume pagination, provide the NextToken value as an \n argument of a subsequent API invocation.\n

" + } + }, + "keyspaceName": { + "target": "com.amazonaws.keyspaces#KeyspaceName", + "traits": { + "smithy.api#documentation": "

\n The name of the keyspace that contains the listed types.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.keyspaces#ListTypesResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.keyspaces#NextToken", + "traits": { + "smithy.api#documentation": "

\n The pagination token. To resume pagination, provide the NextToken value as an argument of a subsequent API invocation.\n

" + } + }, + "types": { + "target": "com.amazonaws.keyspaces#TypeNameList", + "traits": { + "smithy.api#documentation": "

\n The list of types contained in the specified keyspace.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.keyspaces#MaxResults": { "type": "integer", "traits": { @@ -2469,7 +2883,7 @@ "resourceArn": { "target": "com.amazonaws.keyspaces#ARN", "traits": { - "smithy.api#documentation": "

The unique identifier in the format of Amazon Resource Name (ARN), for the resource not found.

" + "smithy.api#documentation": "

The unique identifier in the format of Amazon Resource Name (ARN) for the resource could't be found.

" } } }, @@ -2478,7 +2892,7 @@ "code": "ResourceNotFoundException", "httpResponseCode": 404 }, - "smithy.api#documentation": "

The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE.

", + "smithy.api#documentation": "

The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, \n or its status might not be ACTIVE.

", "smithy.api#error": "client", "smithy.api#httpError": 404 } @@ -2702,6 +3116,12 @@ "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9_]{0,47}$" } }, + "com.amazonaws.keyspaces#TableNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.keyspaces#TableName" + } + }, "com.amazonaws.keyspaces#TableStatus": { "type": "string", "traits": { @@ -2827,6 +3247,9 @@ { "target": "com.amazonaws.keyspaces#AccessDeniedException" }, + { + "target": "com.amazonaws.keyspaces#ConflictException" + }, { "target": "com.amazonaws.keyspaces#InternalServerException" }, @@ -2957,6 +3380,44 @@ "com.amazonaws.keyspaces#Timestamp": { "type": "timestamp" }, + "com.amazonaws.keyspaces#TypeName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 48 + } + } + }, + "com.amazonaws.keyspaces#TypeNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.keyspaces#TypeName" + } + }, + "com.amazonaws.keyspaces#TypeStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "CREATING", + "name": "CREATING" + }, + { + "value": "DELETING", + "name": "DELETING" + }, + { + "value": "RESTORING", + "name": "RESTORING" + } + ] + } + }, "com.amazonaws.keyspaces#UntagResource": { "type": "operation", "input": { diff --git a/codegen/sdk-codegen/aws-models/network-firewall.json b/codegen/sdk-codegen/aws-models/network-firewall.json index 63ff40ba387..7d936974e93 100644 --- a/codegen/sdk-codegen/aws-models/network-firewall.json +++ b/codegen/sdk-codegen/aws-models/network-firewall.json @@ -2371,6 +2371,20 @@ "target": "com.amazonaws.networkfirewall#TCPFlag" } }, + "com.amazonaws.networkfirewall#FlowTimeouts": { + "type": "structure", + "members": { + "TcpIdleTimeoutSeconds": { + "target": "com.amazonaws.networkfirewall#TcpIdleTimeoutRangeBound", + "traits": { + "smithy.api#documentation": "

The number of seconds that can pass without any TCP traffic sent through the firewall before the firewall determines that the connection is idle.\n After the idle timeout passes, data packets are dropped, however, the next TCP SYN packet is considered a new flow and is processed by the firewall. \n Clients or targets can use TCP keepalive packets to reset the idle timeout.\n

\n

You can define the TcpIdleTimeoutSeconds value to be between 60 and 6000 seconds. If no value is provided, it defaults to 350 seconds.\n

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

Describes the amount of time that can pass without any traffic sent through the firewall before the firewall determines that the connection is idle and Network Firewall removes the flow entry from its flow table. \n Existing connections and flows are not impacted when you update this value. Only new connections after you update this value are impacted.\n

" + } + }, "com.amazonaws.networkfirewall#GeneratedRulesType": { "type": "enum", "members": { @@ -3360,7 +3374,7 @@ "name": "network-firewall" }, "aws.protocols#awsJson1_0": {}, - "smithy.api#documentation": "

This is the API Reference for Network Firewall. This guide is for developers who need\n detailed information about the Network Firewall API actions, data types, and errors.

\n
    \n
  • \n

    The REST API requires you to handle connection details, such as calculating\n signatures, handling request retries, and error handling. For general information\n about using the Amazon Web Services REST APIs, see Amazon Web Services APIs.

    \n

    To access Network Firewall using the REST API endpoint:\n https://network-firewall..amazonaws.com \n

    \n
  • \n
  • \n

    Alternatively, you can use one of the Amazon Web Services SDKs to access an API that's tailored to\n the programming language or platform that you're using. For more information, see\n Amazon Web Services SDKs.

    \n
  • \n
  • \n

    For descriptions of Network Firewall features, including and step-by-step\n instructions on how to use them through the Network Firewall console, see the Network Firewall Developer\n Guide.

    \n
  • \n
\n

Network Firewall is a stateful, managed, network firewall and intrusion detection and\n prevention service for Amazon Virtual Private Cloud (Amazon VPC). With Network Firewall, you can filter traffic at the\n perimeter of your VPC. This includes filtering traffic going to and coming from an internet\n gateway, NAT gateway, or over VPN or Direct Connect. Network Firewall uses rules that are compatible\n with Suricata, a free, open source network analysis and threat detection engine.\n Network Firewall supports Suricata version 6.0.9. For information about Suricata,\n see the Suricata website.

\n

You can use Network Firewall to monitor and protect your VPC traffic in a number of ways.\n The following are just a few examples:

\n
    \n
  • \n

    Allow domains or IP addresses for known Amazon Web Services service endpoints, such as Amazon S3, and\n block all other forms of traffic.

    \n
  • \n
  • \n

    Use custom lists of known bad domains to limit the types of domain names that your\n applications can access.

    \n
  • \n
  • \n

    Perform deep packet inspection on traffic entering or leaving your VPC.

    \n
  • \n
  • \n

    Use stateful protocol detection to filter protocols like HTTPS, regardless of the\n port used.

    \n
  • \n
\n

To enable Network Firewall for your VPCs, you perform steps in both Amazon VPC and in\n Network Firewall. For information about using Amazon VPC, see Amazon VPC User Guide.

\n

To start using Network Firewall, do the following:

\n
    \n
  1. \n

    (Optional) If you don't already have a VPC that you want to protect, create it in\n Amazon VPC.

    \n
  2. \n
  3. \n

    In Amazon VPC, in each Availability Zone where you want to have a firewall endpoint, create a\n subnet for the sole use of Network Firewall.

    \n
  4. \n
  5. \n

    In Network Firewall, create stateless and stateful rule groups,\n to define the components of the network traffic filtering behavior that you want your firewall to have.

    \n
  6. \n
  7. \n

    In Network Firewall, create a firewall policy that uses your rule groups and\n specifies additional default traffic filtering behavior.

    \n
  8. \n
  9. \n

    In Network Firewall, create a firewall and specify your new firewall policy and\n VPC subnets. Network Firewall creates a firewall endpoint in each subnet that you\n specify, with the behavior that's defined in the firewall policy.

    \n
  10. \n
  11. \n

    In Amazon VPC, use ingress routing enhancements to route traffic through the new firewall\n endpoints.

    \n
  12. \n
", + "smithy.api#documentation": "

This is the API Reference for Network Firewall. This guide is for developers who need\n detailed information about the Network Firewall API actions, data types, and errors.

\n
    \n
  • \n

    The REST API requires you to handle connection details, such as calculating\n signatures, handling request retries, and error handling. For general information\n about using the Amazon Web Services REST APIs, see Amazon Web Services APIs.

    \n

    To access Network Firewall using the REST API endpoint:\n https://network-firewall..amazonaws.com \n

    \n
  • \n
  • \n

    Alternatively, you can use one of the Amazon Web Services SDKs to access an API that's tailored to\n the programming language or platform that you're using. For more information, see\n Amazon Web Services SDKs.

    \n
  • \n
  • \n

    For descriptions of Network Firewall features, including and step-by-step\n instructions on how to use them through the Network Firewall console, see the Network Firewall Developer\n Guide.

    \n
  • \n
\n

Network Firewall is a stateful, managed, network firewall and intrusion detection and\n prevention service for Amazon Virtual Private Cloud (Amazon VPC). With Network Firewall, you can filter traffic at the\n perimeter of your VPC. This includes filtering traffic going to and coming from an internet\n gateway, NAT gateway, or over VPN or Direct Connect. Network Firewall uses rules that are compatible\n with Suricata, a free, open source network analysis and threat detection engine.

\n

You can use Network Firewall to monitor and protect your VPC traffic in a number of ways.\n The following are just a few examples:

\n
    \n
  • \n

    Allow domains or IP addresses for known Amazon Web Services service endpoints, such as Amazon S3, and\n block all other forms of traffic.

    \n
  • \n
  • \n

    Use custom lists of known bad domains to limit the types of domain names that your\n applications can access.

    \n
  • \n
  • \n

    Perform deep packet inspection on traffic entering or leaving your VPC.

    \n
  • \n
  • \n

    Use stateful protocol detection to filter protocols like HTTPS, regardless of the\n port used.

    \n
  • \n
\n

To enable Network Firewall for your VPCs, you perform steps in both Amazon VPC and in\n Network Firewall. For information about using Amazon VPC, see Amazon VPC User Guide.

\n

To start using Network Firewall, do the following:

\n
    \n
  1. \n

    (Optional) If you don't already have a VPC that you want to protect, create it in\n Amazon VPC.

    \n
  2. \n
  3. \n

    In Amazon VPC, in each Availability Zone where you want to have a firewall endpoint, create a\n subnet for the sole use of Network Firewall.

    \n
  4. \n
  5. \n

    In Network Firewall, create stateless and stateful rule groups,\n to define the components of the network traffic filtering behavior that you want your firewall to have.

    \n
  6. \n
  7. \n

    In Network Firewall, create a firewall policy that uses your rule groups and\n specifies additional default traffic filtering behavior.

    \n
  8. \n
  9. \n

    In Network Firewall, create a firewall and specify your new firewall policy and\n VPC subnets. Network Firewall creates a firewall endpoint in each subnet that you\n specify, with the behavior that's defined in the firewall policy.

    \n
  10. \n
  11. \n

    In Amazon VPC, use ingress routing enhancements to route traffic through the new firewall\n endpoints.

    \n
  12. \n
", "smithy.api#title": "AWS Network Firewall", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -5304,6 +5318,12 @@ "traits": { "smithy.api#documentation": "

Configures how Network Firewall processes traffic when a network connection breaks midstream. Network connections can break due to disruptions in external networks or within the firewall itself.

\n
    \n
  • \n

    \n DROP - Network Firewall fails closed and drops all subsequent traffic going to the firewall. This is the default behavior.

    \n
  • \n
  • \n

    \n CONTINUE - Network Firewall continues to apply rules to the subsequent traffic without context from traffic before the break. This impacts the behavior of rules that depend on this context. For example, if you have a stateful rule to drop http traffic, Network Firewall won't match the traffic for this rule because the service won't have the context from session initialization defining the application layer protocol as HTTP. However, this behavior is rule dependent—a TCP-layer rule using a flow:stateless rule would still match, as would the aws:drop_strict default action.

    \n
  • \n
  • \n

    \n REJECT - Network Firewall fails closed and drops all subsequent traffic going to the firewall. Network Firewall also sends a TCP reject packet back to your client so that the client can immediately establish a new session. Network Firewall will have context about the new session and will apply rules to the subsequent traffic.

    \n
  • \n
" } + }, + "FlowTimeouts": { + "target": "com.amazonaws.networkfirewall#FlowTimeouts", + "traits": { + "smithy.api#documentation": "

Configures the amount of time that can pass without any traffic sent through the firewall before the firewall determines that the connection is idle.\n

" + } } }, "traits": { @@ -6073,6 +6093,9 @@ "target": "com.amazonaws.networkfirewall#TargetType" } }, + "com.amazonaws.networkfirewall#TcpIdleTimeoutRangeBound": { + "type": "integer" + }, "com.amazonaws.networkfirewall#ThrottlingException": { "type": "structure", "members": { diff --git a/codegen/sdk-codegen/aws-models/opensearch.json b/codegen/sdk-codegen/aws-models/opensearch.json index 7996aef72ae..68a2361902f 100644 --- a/codegen/sdk-codegen/aws-models/opensearch.json +++ b/codegen/sdk-codegen/aws-models/opensearch.json @@ -118,6 +118,17 @@ "smithy.api#documentation": "

Information about an Amazon OpenSearch Service domain.

" } }, + "com.amazonaws.opensearch#AWSServicePrincipal": { + "type": "enum", + "members": { + "application_opensearchservice_amazonaws_com": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "application.opensearchservice.amazonaws.com" + } + } + } + }, "com.amazonaws.opensearch#AcceptInboundConnection": { "type": "operation", "input": { @@ -644,6 +655,9 @@ { "target": "com.amazonaws.opensearch#CancelServiceSoftwareUpdate" }, + { + "target": "com.amazonaws.opensearch#CreateApplication" + }, { "target": "com.amazonaws.opensearch#CreateDomain" }, @@ -656,6 +670,9 @@ { "target": "com.amazonaws.opensearch#CreateVpcEndpoint" }, + { + "target": "com.amazonaws.opensearch#DeleteApplication" + }, { "target": "com.amazonaws.opensearch#DeleteDataSource" }, @@ -722,6 +739,9 @@ { "target": "com.amazonaws.opensearch#DissociatePackage" }, + { + "target": "com.amazonaws.opensearch#GetApplication" + }, { "target": "com.amazonaws.opensearch#GetCompatibleVersions" }, @@ -740,6 +760,9 @@ { "target": "com.amazonaws.opensearch#GetUpgradeStatus" }, + { + "target": "com.amazonaws.opensearch#ListApplications" + }, { "target": "com.amazonaws.opensearch#ListDataSources" }, @@ -794,6 +817,9 @@ { "target": "com.amazonaws.opensearch#StartServiceSoftwareUpdate" }, + { + "target": "com.amazonaws.opensearch#UpdateApplication" + }, { "target": "com.amazonaws.opensearch#UpdateDataSource" }, @@ -1899,6 +1925,168 @@ } } }, + "com.amazonaws.opensearch#AppConfig": { + "type": "structure", + "members": { + "key": { + "target": "com.amazonaws.opensearch#AppConfigType", + "traits": { + "smithy.api#documentation": "

Specify the item to configure, such as admin role for the OpenSearch Application.

" + } + }, + "value": { + "target": "com.amazonaws.opensearch#AppConfigValue", + "traits": { + "smithy.api#documentation": "

Specifies the value to configure for the key, such as an IAM user ARN.

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

Configurations of the OpenSearch Application.

" + } + }, + "com.amazonaws.opensearch#AppConfigType": { + "type": "enum", + "members": { + "OpensearchDashboardAdminUsers": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "opensearchDashboards.dashboardAdmin.users" + } + }, + "OpensearchDashboardAdminGroups": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "opensearchDashboards.dashboardAdmin.groups" + } + } + } + }, + "com.amazonaws.opensearch#AppConfigValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4096 + } + } + }, + "com.amazonaws.opensearch#AppConfigs": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#AppConfig" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.opensearch#ApplicationName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 30 + }, + "smithy.api#pattern": "^[a-z][a-z0-9\\-]+$" + } + }, + "com.amazonaws.opensearch#ApplicationStatus": { + "type": "enum", + "members": { + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" + } + }, + "UPDATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATING" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + } + } + }, + "com.amazonaws.opensearch#ApplicationStatuses": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#ApplicationStatus" + } + }, + "com.amazonaws.opensearch#ApplicationSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#ApplicationSummary" + } + }, + "com.amazonaws.opensearch#ApplicationSummary": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.opensearch#Id", + "traits": { + "smithy.api#documentation": "

Unique identifier for an OpenSearch application.

" + } + }, + "arn": { + "target": "com.amazonaws.opensearch#ARN" + }, + "name": { + "target": "com.amazonaws.opensearch#ApplicationName", + "traits": { + "smithy.api#documentation": "

Name of an OpenSearch Application.

" + } + }, + "endpoint": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

Endpoint URL of an OpenSearch Application.

" + } + }, + "status": { + "target": "com.amazonaws.opensearch#ApplicationStatus", + "traits": { + "smithy.api#documentation": "

Status of an OpenSearch Application. Possible values are CREATING, UPDATING, DELETING, FAILED, ACTIVE, and DELETED.

" + } + }, + "createdAt": { + "target": "com.amazonaws.opensearch#Timestamp", + "traits": { + "smithy.api#documentation": "

Timestamp at which an OpenSearch Application was created.

" + } + }, + "lastUpdatedAt": { + "target": "com.amazonaws.opensearch#Timestamp", + "traits": { + "smithy.api#documentation": "

Timestamp at which an OpenSearch Application was last updated.

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

Basic information of the OpenSearch Application.

" + } + }, "com.amazonaws.opensearch#AssociatePackage": { "type": "operation", "input": { @@ -2027,8 +2215,13 @@ "Account": { "target": "com.amazonaws.opensearch#AWSAccount", "traits": { - "smithy.api#documentation": "

The Amazon Web Services account ID to grant access to.

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

The Amazon Web Services account ID to grant access to.

" + } + }, + "Service": { + "target": "com.amazonaws.opensearch#AWSServicePrincipal", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services service SP to grant access to.

" } } }, @@ -3212,6 +3405,136 @@ "com.amazonaws.opensearch#ConnectionStatusMessage": { "type": "string" }, + "com.amazonaws.opensearch#CreateApplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#CreateApplicationRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#CreateApplicationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#AccessDeniedException" + }, + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#ConflictException" + }, + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates an OpenSearch Application.

", + "smithy.api#http": { + "method": "POST", + "uri": "/2021-01-01/opensearch/application", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#CreateApplicationRequest": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.opensearch#ClientToken", + "traits": { + "smithy.api#documentation": "

A unique client idempotency token. It will be auto generated if not provided.

", + "smithy.api#idempotencyToken": {} + } + }, + "name": { + "target": "com.amazonaws.opensearch#ApplicationName", + "traits": { + "smithy.api#documentation": "

Name of the OpenSearch Appication to create. Application names are unique across the applications\n owned by an account within an Amazon Web Services Region.

", + "smithy.api#required": {} + } + }, + "dataSources": { + "target": "com.amazonaws.opensearch#DataSources", + "traits": { + "smithy.api#documentation": "

Data sources to be associated with the OpenSearch Application.

" + } + }, + "iamIdentityCenterOptions": { + "target": "com.amazonaws.opensearch#IamIdentityCenterOptionsInput", + "traits": { + "smithy.api#documentation": "

Settings of IAM Identity Center for the OpenSearch Application.

" + } + }, + "appConfigs": { + "target": "com.amazonaws.opensearch#AppConfigs", + "traits": { + "smithy.api#documentation": "

Configurations of the OpenSearch Application, inlcuding admin configuration.

" + } + }, + "tagList": { + "target": "com.amazonaws.opensearch#TagList" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.opensearch#CreateApplicationResponse": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.opensearch#Id", + "traits": { + "smithy.api#documentation": "

Unique identifier for the created OpenSearch Application.

" + } + }, + "name": { + "target": "com.amazonaws.opensearch#ApplicationName", + "traits": { + "smithy.api#documentation": "

Name of the created OpenSearch Application.

" + } + }, + "arn": { + "target": "com.amazonaws.opensearch#ARN" + }, + "dataSources": { + "target": "com.amazonaws.opensearch#DataSources", + "traits": { + "smithy.api#documentation": "

Data sources associated with the created OpenSearch Application.

" + } + }, + "iamIdentityCenterOptions": { + "target": "com.amazonaws.opensearch#IamIdentityCenterOptions", + "traits": { + "smithy.api#documentation": "

Settings of IAM Identity Center for the created OpenSearch Application.

" + } + }, + "appConfigs": { + "target": "com.amazonaws.opensearch#AppConfigs", + "traits": { + "smithy.api#documentation": "

Configurations of the OpenSearch Application, inlcuding admin configuration.

" + } + }, + "tagList": { + "target": "com.amazonaws.opensearch#TagList" + }, + "createdAt": { + "target": "com.amazonaws.opensearch#Timestamp", + "traits": { + "smithy.api#documentation": "

Timestamp when the OpenSearch Application was created.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.opensearch#CreateDomain": { "type": "operation", "input": { @@ -3346,6 +3669,12 @@ "smithy.api#documentation": "

Options for fine-grained access control.

" } }, + "IdentityCenterOptions": { + "target": "com.amazonaws.opensearch#IdentityCenterOptionsInput", + "traits": { + "smithy.api#documentation": "

Options for IAM Identity Center Option control for the domain.

" + } + }, "TagList": { "target": "com.amazonaws.opensearch#TagList", "traits": { @@ -3708,6 +4037,23 @@ "smithy.api#documentation": "

Cross-cluster search specific connection properties.

" } }, + "com.amazonaws.opensearch#DataSource": { + "type": "structure", + "members": { + "dataSourceArn": { + "target": "com.amazonaws.opensearch#ARN" + }, + "dataSourceDescription": { + "target": "com.amazonaws.opensearch#DataSourceDescription", + "traits": { + "smithy.api#documentation": "

Detailed description of a data source.

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

Data sources that are associated with an OpenSearch Application.

" + } + }, "com.amazonaws.opensearch#DataSourceDescription": { "type": "string", "traits": { @@ -3797,20 +4143,29 @@ "smithy.api#documentation": "

The type of data source.

" } }, - "com.amazonaws.opensearch#DeleteDataSource": { + "com.amazonaws.opensearch#DataSources": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#DataSource" + } + }, + "com.amazonaws.opensearch#DeleteApplication": { "type": "operation", "input": { - "target": "com.amazonaws.opensearch#DeleteDataSourceRequest" + "target": "com.amazonaws.opensearch#DeleteApplicationRequest" }, "output": { - "target": "com.amazonaws.opensearch#DeleteDataSourceResponse" + "target": "com.amazonaws.opensearch#DeleteApplicationResponse" }, "errors": [ + { + "target": "com.amazonaws.opensearch#AccessDeniedException" + }, { "target": "com.amazonaws.opensearch#BaseException" }, { - "target": "com.amazonaws.opensearch#DependencyFailureException" + "target": "com.amazonaws.opensearch#ConflictException" }, { "target": "com.amazonaws.opensearch#DisabledOperationException" @@ -3826,25 +4181,85 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a direct-query data source. For more information, see Deleting an Amazon OpenSearch Service data source with Amazon S3.

", + "smithy.api#documentation": "

Deletes an existing OpenSearch Application.

", "smithy.api#http": { "method": "DELETE", - "uri": "/2021-01-01/opensearch/domain/{DomainName}/dataSource/{Name}", + "uri": "/2021-01-01/opensearch/application/{id}", "code": 200 } } }, - "com.amazonaws.opensearch#DeleteDataSourceRequest": { + "com.amazonaws.opensearch#DeleteApplicationRequest": { "type": "structure", "members": { - "DomainName": { - "target": "com.amazonaws.opensearch#DomainName", + "id": { + "target": "com.amazonaws.opensearch#Id", "traits": { - "smithy.api#documentation": "

The name of the domain.

", + "smithy.api#documentation": "

Unique identifier for the OpenSearch Application that you want to delete.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } - }, + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.opensearch#DeleteApplicationResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.opensearch#DeleteDataSource": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#DeleteDataSourceRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#DeleteDataSourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#DependencyFailureException" + }, + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a direct-query data source. For more information, see Deleting an Amazon OpenSearch Service data source with Amazon S3.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/2021-01-01/opensearch/domain/{DomainName}/dataSource/{Name}", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#DeleteDataSourceRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#documentation": "

The name of the domain.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, "Name": { "target": "com.amazonaws.opensearch#DataSourceName", "traits": { @@ -5738,6 +6153,12 @@ "smithy.api#documentation": "

Container for fine-grained access control settings for the domain.

" } }, + "IdentityCenterOptions": { + "target": "com.amazonaws.opensearch#IdentityCenterOptionsStatus", + "traits": { + "smithy.api#documentation": "

Container for IAM Identity Center Option control for the domain.

" + } + }, "AutoTuneOptions": { "target": "com.amazonaws.opensearch#AutoTuneOptionsStatus", "traits": { @@ -6414,6 +6835,12 @@ "smithy.api#documentation": "

Settings for fine-grained access control.

" } }, + "IdentityCenterOptions": { + "target": "com.amazonaws.opensearch#IdentityCenterOptions", + "traits": { + "smithy.api#documentation": "

Container for IAM Identity Center Option control for the domain.

" + } + }, "AutoTuneOptions": { "target": "com.amazonaws.opensearch#AutoTuneOptionsOutput", "traits": { @@ -6813,6 +7240,124 @@ "target": "com.amazonaws.opensearch#GUID" } }, + "com.amazonaws.opensearch#GetApplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#GetApplicationRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#GetApplicationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#AccessDeniedException" + }, + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Check the configuration and status of an existing OpenSearch Application.

", + "smithy.api#http": { + "method": "GET", + "uri": "/2021-01-01/opensearch/application/{id}", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#GetApplicationRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.opensearch#Id", + "traits": { + "smithy.api#documentation": "

Unique identifier of the checked OpenSearch Application.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.opensearch#GetApplicationResponse": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.opensearch#Id", + "traits": { + "smithy.api#documentation": "

Unique identifier of the checked OpenSearch Application.

" + } + }, + "arn": { + "target": "com.amazonaws.opensearch#ARN" + }, + "name": { + "target": "com.amazonaws.opensearch#ApplicationName", + "traits": { + "smithy.api#documentation": "

Name of the checked OpenSearch Application.

" + } + }, + "endpoint": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

Endpoint URL of the checked OpenSearch Application.

" + } + }, + "status": { + "target": "com.amazonaws.opensearch#ApplicationStatus", + "traits": { + "smithy.api#documentation": "

Current status of the checked OpenSearch Application. Possible values are CREATING, UPDATING, DELETING, FAILED, ACTIVE, and DELETED.

" + } + }, + "iamIdentityCenterOptions": { + "target": "com.amazonaws.opensearch#IamIdentityCenterOptions", + "traits": { + "smithy.api#documentation": "

IAM Identity Center settings for the checked OpenSearch Application.

" + } + }, + "dataSources": { + "target": "com.amazonaws.opensearch#DataSources", + "traits": { + "smithy.api#documentation": "

Associated data sources to the checked OpenSearch Application.

" + } + }, + "appConfigs": { + "target": "com.amazonaws.opensearch#AppConfigs", + "traits": { + "smithy.api#documentation": "

App configurations of the checked OpenSearch Application.

" + } + }, + "createdAt": { + "target": "com.amazonaws.opensearch#Timestamp", + "traits": { + "smithy.api#documentation": "

Timestamp at which the checked OpenSearch Application was created.

" + } + }, + "lastUpdatedAt": { + "target": "com.amazonaws.opensearch#Timestamp", + "traits": { + "smithy.api#documentation": "

Timestamp at which the checked OpenSearch Application was last updated.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.opensearch#GetCompatibleVersions": { "type": "operation", "input": { @@ -7301,89 +7846,262 @@ } } }, - "com.amazonaws.opensearch#GetUpgradeStatusRequest": { + "com.amazonaws.opensearch#GetUpgradeStatusRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#documentation": "

The domain of the domain to get upgrade status information for.

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

Container for the request parameters to the GetUpgradeStatus operation.

", + "smithy.api#input": {} + } + }, + "com.amazonaws.opensearch#GetUpgradeStatusResponse": { + "type": "structure", + "members": { + "UpgradeStep": { + "target": "com.amazonaws.opensearch#UpgradeStep", + "traits": { + "smithy.api#documentation": "

One of three steps that an upgrade or upgrade eligibility check goes through.

" + } + }, + "StepStatus": { + "target": "com.amazonaws.opensearch#UpgradeStatus", + "traits": { + "smithy.api#documentation": "

The status of the current step that an upgrade is on.

" + } + }, + "UpgradeName": { + "target": "com.amazonaws.opensearch#UpgradeName", + "traits": { + "smithy.api#documentation": "

A string that describes the update.

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

Container for the response returned by the GetUpgradeStatus operation.

", + "smithy.api#output": {} + } + }, + "com.amazonaws.opensearch#HostedZoneId": { + "type": "string" + }, + "com.amazonaws.opensearch#IPAddressType": { + "type": "enum", + "members": { + "IPV4": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ipv4" + } + }, + "DUALSTACK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dualstack" + } + } + } + }, + "com.amazonaws.opensearch#IPAddressTypeStatus": { + "type": "structure", + "members": { + "Options": { + "target": "com.amazonaws.opensearch#IPAddressType", + "traits": { + "smithy.api#documentation": "

The IP address options for the domain.

", + "smithy.api#required": {} + } + }, + "Status": { + "target": "com.amazonaws.opensearch#OptionStatus", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The IP address type status for the domain.

" + } + }, + "com.amazonaws.opensearch#IamIdentityCenterOptions": { + "type": "structure", + "members": { + "enabled": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

IAM Identity Center is enabled for the OpenSearch Application.

" + } + }, + "iamIdentityCenterInstanceArn": { + "target": "com.amazonaws.opensearch#ARN" + }, + "iamRoleForIdentityCenterApplicationArn": { + "target": "com.amazonaws.opensearch#RoleArn", + "traits": { + "smithy.api#documentation": "

Amazon Resource Name of the IAM Identity Center's Application created for the OpenSearch Application after enabling IAM Identity Center.

" + } + }, + "iamIdentityCenterApplicationArn": { + "target": "com.amazonaws.opensearch#ARN" + } + }, + "traits": { + "smithy.api#documentation": "

Settings for IAM Identity Center for an OpenSearch Application.

" + } + }, + "com.amazonaws.opensearch#IamIdentityCenterOptionsInput": { + "type": "structure", + "members": { + "enabled": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

Enable/disable settings for IAM Identity Center.

" + } + }, + "iamIdentityCenterInstanceArn": { + "target": "com.amazonaws.opensearch#ARN" + }, + "iamRoleForIdentityCenterApplicationArn": { + "target": "com.amazonaws.opensearch#RoleArn", + "traits": { + "smithy.api#documentation": "

Amazon Resource Name of IAM Identity Center's application.

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

Settings for IAM Identity Center.

" + } + }, + "com.amazonaws.opensearch#Id": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[a-z0-9]{3,30}$" + } + }, + "com.amazonaws.opensearch#IdentityCenterApplicationARN": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws[a-z\\\\-]*:[a-z]+:[a-z0-9\\\\-]*:[0-9]*:[a-z0-9\\\\-]+\\/[a-z0-9\\\\-]+\\/[a-z0-9\\\\-]+$" + } + }, + "com.amazonaws.opensearch#IdentityCenterInstanceARN": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws[a-z\\\\-]*:[a-z]+:[a-z0-9\\\\-]*:[0-9]*:[a-z0-9\\\\-]+\\/[a-z0-9\\\\-]+$" + } + }, + "com.amazonaws.opensearch#IdentityCenterOptions": { "type": "structure", "members": { - "DomainName": { - "target": "com.amazonaws.opensearch#DomainName", + "EnabledAPIAccess": { + "target": "com.amazonaws.opensearch#Boolean", "traits": { - "smithy.api#documentation": "

The domain of the domain to get upgrade status information for.

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

True to enable IAM Identity Center for API access in Amazon OpenSearch Service.

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

Container for the request parameters to the GetUpgradeStatus operation.

", - "smithy.api#input": {} - } - }, - "com.amazonaws.opensearch#GetUpgradeStatusResponse": { - "type": "structure", - "members": { - "UpgradeStep": { - "target": "com.amazonaws.opensearch#UpgradeStep", + }, + "IdentityCenterInstanceARN": { + "target": "com.amazonaws.opensearch#IdentityCenterInstanceARN", "traits": { - "smithy.api#documentation": "

One of three steps that an upgrade or upgrade eligibility check goes through.

" + "smithy.api#documentation": "

The ARN for IAM Identity Center Instance.

" } }, - "StepStatus": { - "target": "com.amazonaws.opensearch#UpgradeStatus", + "SubjectKey": { + "target": "com.amazonaws.opensearch#SubjectKeyIdCOption", "traits": { - "smithy.api#documentation": "

The status of the current step that an upgrade is on.

" + "smithy.api#documentation": "

Specify the attribute that contains the subject (username, userID, email) of IAM Identity Center.

" } }, - "UpgradeName": { - "target": "com.amazonaws.opensearch#UpgradeName", + "RolesKey": { + "target": "com.amazonaws.opensearch#RolesKeyIdCOption", "traits": { - "smithy.api#documentation": "

A string that describes the update.

" + "smithy.api#documentation": "

Specify the attribute that contains the backend role (groupName, groupID) of IAM Identity Center

" + } + }, + "IdentityCenterApplicationARN": { + "target": "com.amazonaws.opensearch#IdentityCenterApplicationARN", + "traits": { + "smithy.api#documentation": "

The ARN for IAM Identity Center Application which will integrate with Amazon OpenSearch Service.

" + } + }, + "IdentityStoreId": { + "target": "com.amazonaws.opensearch#IdentityStoreId", + "traits": { + "smithy.api#documentation": "

The ID of IAM Identity Store.

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

Container for the response returned by the GetUpgradeStatus operation.

", - "smithy.api#output": {} + "smithy.api#documentation": "

Container for IAM Identity Center Options settings.

" } }, - "com.amazonaws.opensearch#HostedZoneId": { - "type": "string" - }, - "com.amazonaws.opensearch#IPAddressType": { - "type": "enum", + "com.amazonaws.opensearch#IdentityCenterOptionsInput": { + "type": "structure", "members": { - "IPV4": { - "target": "smithy.api#Unit", + "EnabledAPIAccess": { + "target": "com.amazonaws.opensearch#Boolean", "traits": { - "smithy.api#enumValue": "ipv4" + "smithy.api#documentation": "

True to enable IAM Identity Center for API access in Amazon OpenSearch Service.

" } }, - "DUALSTACK": { - "target": "smithy.api#Unit", + "IdentityCenterInstanceARN": { + "target": "com.amazonaws.opensearch#IdentityCenterInstanceARN", "traits": { - "smithy.api#enumValue": "dualstack" + "smithy.api#documentation": "

The ARN for IAM Identity Center Instance which will be used for IAM Identity Center Application creation.

" + } + }, + "SubjectKey": { + "target": "com.amazonaws.opensearch#SubjectKeyIdCOption", + "traits": { + "smithy.api#documentation": "

Specify the attribute that contains the subject (username, userID, email) of IAM Identity Center.

" + } + }, + "RolesKey": { + "target": "com.amazonaws.opensearch#RolesKeyIdCOption", + "traits": { + "smithy.api#documentation": "

Specify the attribute that contains the backend role (groupName, groupID) of IAM Identity Center

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

Container for IAM Identity Center Options settings.

" } }, - "com.amazonaws.opensearch#IPAddressTypeStatus": { + "com.amazonaws.opensearch#IdentityCenterOptionsStatus": { "type": "structure", "members": { "Options": { - "target": "com.amazonaws.opensearch#IPAddressType", + "target": "com.amazonaws.opensearch#IdentityCenterOptions", "traits": { - "smithy.api#documentation": "

The IP address options for the domain.

", + "smithy.api#documentation": "

Container for IAM Identity Center Options settings.

", "smithy.api#required": {} } }, "Status": { "target": "com.amazonaws.opensearch#OptionStatus", "traits": { + "smithy.api#documentation": "

The status of IAM Identity Center Options settings for a domain.

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

The IP address type status for the domain.

" + "smithy.api#documentation": "

The status of IAM Identity Center Options settings for a domain.

" } }, "com.amazonaws.opensearch#IdentityPoolId": { @@ -7396,6 +8114,16 @@ "smithy.api#pattern": "^[\\w-]+:[0-9a-f-]+$" } }, + "com.amazonaws.opensearch#IdentityStoreId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^d-[0-9a-f]{10}$|^[0-9a-f]{8}\\\\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\\\\b[0-9a-f]{12}$" + } + }, "com.amazonaws.opensearch#InboundConnection": { "type": "structure", "members": { @@ -7865,6 +8593,94 @@ "smithy.api#documentation": "

The role of a given instance and all applicable limits. The role performed by a given OpenSearch instance can\n be one of the following:

\n
    \n
  • \n

    \n data - A data node.

    \n
  • \n
  • \n

    \n master - A dedicated master node.

    \n
  • \n
  • \n

    \n ultra_warm - An UltraWarm node.

    \n
  • \n
" } }, + "com.amazonaws.opensearch#ListApplications": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#ListApplicationsRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#ListApplicationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#AccessDeniedException" + }, + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

List all OpenSearch Applications under your account.

", + "smithy.api#http": { + "method": "GET", + "uri": "/2021-01-01/opensearch/list-applications", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "ApplicationSummaries", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.opensearch#ListApplicationsRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.opensearch#NextToken", + "traits": { + "smithy.api#httpQuery": "nextToken" + } + }, + "statuses": { + "target": "com.amazonaws.opensearch#ApplicationStatuses", + "traits": { + "smithy.api#documentation": "

OpenSearch Application Status can be used as filters for the listing request. Possible values are CREATING, UPDATING, DELETING, FAILED, ACTIVE, and DELETED.

", + "smithy.api#httpQuery": "statuses" + } + }, + "maxResults": { + "target": "com.amazonaws.opensearch#MaxResults", + "traits": { + "smithy.api#default": 0, + "smithy.api#httpQuery": "maxResults" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.opensearch#ListApplicationsResponse": { + "type": "structure", + "members": { + "ApplicationSummaries": { + "target": "com.amazonaws.opensearch#ApplicationSummaries", + "traits": { + "smithy.api#documentation": "

Summary of the OpenSearch Applications, including ID, ARN, name, endpoint, status, create time and last update time.

" + } + }, + "nextToken": { + "target": "com.amazonaws.opensearch#NextToken" + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.opensearch#ListDataSources": { "type": "operation", "input": { @@ -11234,8 +12050,13 @@ "Account": { "target": "com.amazonaws.opensearch#AWSAccount", "traits": { - "smithy.api#documentation": "

The account ID to revoke access from.

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

The account ID to revoke access from.

" + } + }, + "Service": { + "target": "com.amazonaws.opensearch#AWSServicePrincipal", + "traits": { + "smithy.api#documentation": "

The service SP to revoke access from.

" } } }, @@ -11269,6 +12090,23 @@ } } }, + "com.amazonaws.opensearch#RolesKeyIdCOption": { + "type": "enum", + "members": { + "GroupName": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GroupName" + } + }, + "GroupId": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GroupId" + } + } + } + }, "com.amazonaws.opensearch#RollbackOnDisable": { "type": "enum", "members": { @@ -12092,6 +12930,29 @@ } } }, + "com.amazonaws.opensearch#SubjectKeyIdCOption": { + "type": "enum", + "members": { + "UserName": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UserName" + } + }, + "UserId": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UserId" + } + }, + "Email": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Email" + } + } + } + }, "com.amazonaws.opensearch#TLSSecurityPolicy": { "type": "enum", "members": { @@ -12182,6 +13043,9 @@ "smithy.api#documentation": "

The unit of a maintenance schedule duration. Valid value is HOUR.

" } }, + "com.amazonaws.opensearch#Timestamp": { + "type": "timestamp" + }, "com.amazonaws.opensearch#TotalNumberOfStages": { "type": "integer", "traits": { @@ -12200,6 +13064,127 @@ "com.amazonaws.opensearch#UncompressedPluginSizeInBytes": { "type": "long" }, + "com.amazonaws.opensearch#UpdateApplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#UpdateApplicationRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#UpdateApplicationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#AccessDeniedException" + }, + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#ConflictException" + }, + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Update the OpenSearch Application.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/2021-01-01/opensearch/application/{id}", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#UpdateApplicationRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.opensearch#Id", + "traits": { + "smithy.api#documentation": "

Unique identifier of the OpenSearch Application to be updated.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "dataSources": { + "target": "com.amazonaws.opensearch#DataSources", + "traits": { + "smithy.api#documentation": "

Data sources to be associated with the OpenSearch Application.

" + } + }, + "appConfigs": { + "target": "com.amazonaws.opensearch#AppConfigs", + "traits": { + "smithy.api#documentation": "

Configurations to be changed for the OpenSearch Application.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.opensearch#UpdateApplicationResponse": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.opensearch#Id", + "traits": { + "smithy.api#documentation": "

Unique identifier of the updated OpenSearch Application.

" + } + }, + "name": { + "target": "com.amazonaws.opensearch#ApplicationName", + "traits": { + "smithy.api#documentation": "

Name of the updated OpenSearch Application.

" + } + }, + "arn": { + "target": "com.amazonaws.opensearch#ARN" + }, + "dataSources": { + "target": "com.amazonaws.opensearch#DataSources", + "traits": { + "smithy.api#documentation": "

Data sources associated with the updated OpenSearch Application.

" + } + }, + "iamIdentityCenterOptions": { + "target": "com.amazonaws.opensearch#IamIdentityCenterOptions", + "traits": { + "smithy.api#documentation": "

IAM Identity Center settings for the updated OpenSearch Application.

" + } + }, + "appConfigs": { + "target": "com.amazonaws.opensearch#AppConfigs", + "traits": { + "smithy.api#documentation": "

Configurations for the updated OpenSearch Application.

" + } + }, + "createdAt": { + "target": "com.amazonaws.opensearch#Timestamp", + "traits": { + "smithy.api#documentation": "

Timestamp at which the OpenSearch Application was created.

" + } + }, + "lastUpdatedAt": { + "target": "com.amazonaws.opensearch#Timestamp", + "traits": { + "smithy.api#documentation": "

Timestamp at which the OpenSearch Application was last updated.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.opensearch#UpdateDataSource": { "type": "operation", "input": { @@ -12422,6 +13407,9 @@ "smithy.api#documentation": "

Options for fine-grained access control.

" } }, + "IdentityCenterOptions": { + "target": "com.amazonaws.opensearch#IdentityCenterOptionsInput" + }, "AutoTuneOptions": { "target": "com.amazonaws.opensearch#AutoTuneOptions", "traits": { diff --git a/codegen/sdk-codegen/aws-models/opensearchserverless.json b/codegen/sdk-codegen/aws-models/opensearchserverless.json index 9f0bd25054a..2b274c6f770 100644 --- a/codegen/sdk-codegen/aws-models/opensearchserverless.json +++ b/codegen/sdk-codegen/aws-models/opensearchserverless.json @@ -1005,6 +1005,33 @@ } } }, + "com.amazonaws.opensearchserverless#CreateIamIdentityCenterConfigOptions": { + "type": "structure", + "members": { + "instanceArn": { + "target": "com.amazonaws.opensearchserverless#IamIdentityCenterInstanceArn", + "traits": { + "smithy.api#documentation": "

The ARN of the IAM Identity Center instance used to integrate with OpenSearch Serverless.

", + "smithy.api#required": {} + } + }, + "userAttribute": { + "target": "com.amazonaws.opensearchserverless#IamIdentityCenterUserAttribute", + "traits": { + "smithy.api#documentation": "

The user attribute for this IAM Identity Center integration. Defaults to UserId.

" + } + }, + "groupAttribute": { + "target": "com.amazonaws.opensearchserverless#IamIdentityCenterGroupAttribute", + "traits": { + "smithy.api#documentation": "

The group attribute for this IAM Identity Center integration. Defaults to GroupId.

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

Describes IAM Identity Center options for creating an OpenSearch Serverless security configuration in the form of a key-value map.

" + } + }, "com.amazonaws.opensearchserverless#CreateLifecyclePolicy": { "type": "operation", "input": { @@ -1145,6 +1172,12 @@ "smithy.api#documentation": "

Describes SAML options in in the form of a key-value map. This field is required if\n you specify saml for the type parameter.

" } }, + "iamIdentityCenterOptions": { + "target": "com.amazonaws.opensearchserverless#CreateIamIdentityCenterConfigOptions", + "traits": { + "smithy.api#documentation": "

Describes IAM Identity Center options in the form of a key-value map. This field is required if you specify iamidentitycenter for the type parameter.

" + } + }, "clientToken": { "target": "com.amazonaws.opensearchserverless#ClientToken", "traits": { @@ -2082,6 +2115,109 @@ } } }, + "com.amazonaws.opensearchserverless#IamIdentityCenterApplicationArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 10, + "max": 1224 + }, + "smithy.api#pattern": "^arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b):sso::\\d{12}:application/(sso)?ins-[a-zA-Z0-9-.]{16}/apl-[a-zA-Z0-9]{16}$" + } + }, + "com.amazonaws.opensearchserverless#IamIdentityCenterConfigOptions": { + "type": "structure", + "members": { + "instanceArn": { + "target": "com.amazonaws.opensearchserverless#IamIdentityCenterInstanceArn", + "traits": { + "smithy.api#documentation": "

The ARN of the IAM Identity Center instance used to integrate with OpenSearch Serverless.

" + } + }, + "applicationArn": { + "target": "com.amazonaws.opensearchserverless#IamIdentityCenterApplicationArn", + "traits": { + "smithy.api#documentation": "

The ARN of the IAM Identity Center application used to integrate with OpenSearch Serverless.

" + } + }, + "applicationName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the IAM Identity Center application used to integrate with OpenSearch Serverless.

" + } + }, + "applicationDescription": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The description of the IAM Identity Center application used to integrate with OpenSearch Serverless.

" + } + }, + "userAttribute": { + "target": "com.amazonaws.opensearchserverless#IamIdentityCenterUserAttribute", + "traits": { + "smithy.api#documentation": "

The user attribute for this IAM Identity Center integration. Defaults to UserId\n

" + } + }, + "groupAttribute": { + "target": "com.amazonaws.opensearchserverless#IamIdentityCenterGroupAttribute", + "traits": { + "smithy.api#documentation": "

The group attribute for this IAM Identity Center integration. Defaults to GroupId.

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

Describes IAM Identity Center options for an OpenSearch Serverless security configuration in the form of a key-value map.

" + } + }, + "com.amazonaws.opensearchserverless#IamIdentityCenterGroupAttribute": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "GroupId", + "value": "GroupId", + "documentation": "Group ID" + }, + { + "name": "GroupName", + "value": "GroupName", + "documentation": "Group Name" + } + ] + } + }, + "com.amazonaws.opensearchserverless#IamIdentityCenterInstanceArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 10, + "max": 1224 + }, + "smithy.api#pattern": "^arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b):sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}$" + } + }, + "com.amazonaws.opensearchserverless#IamIdentityCenterUserAttribute": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "UserId", + "value": "UserId", + "documentation": "User ID" + }, + { + "name": "UserName", + "value": "UserName", + "documentation": "User Name" + }, + { + "name": "Email", + "value": "Email", + "documentation": "Email" + } + ] + } + }, "com.amazonaws.opensearchserverless#IndexingCapacityValue": { "type": "integer", "traits": { @@ -3825,6 +3961,12 @@ "smithy.api#documentation": "

SAML options for the security configuration in the form of a key-value map.

" } }, + "iamIdentityCenterOptions": { + "target": "com.amazonaws.opensearchserverless#IamIdentityCenterConfigOptions", + "traits": { + "smithy.api#documentation": "

Describes IAM Identity Center options in the form of a key-value map.

" + } + }, "createdDate": { "target": "smithy.api#Long", "traits": { @@ -3923,6 +4065,11 @@ "name": "saml", "value": "saml", "documentation": "saml provider" + }, + { + "name": "iamidentitycenter", + "value": "iamidentitycenter", + "documentation": "iam identity center" } ] } @@ -4603,6 +4750,26 @@ } } }, + "com.amazonaws.opensearchserverless#UpdateIamIdentityCenterConfigOptions": { + "type": "structure", + "members": { + "userAttribute": { + "target": "com.amazonaws.opensearchserverless#IamIdentityCenterUserAttribute", + "traits": { + "smithy.api#documentation": "

The user attribute for this IAM Identity Center integration. Defaults to UserId.

" + } + }, + "groupAttribute": { + "target": "com.amazonaws.opensearchserverless#IamIdentityCenterGroupAttribute", + "traits": { + "smithy.api#documentation": "

The group attribute for this IAM Identity Center integration. Defaults to GroupId.

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

Describes IAM Identity Center options for updating an OpenSearch Serverless security configuration in the form of a key-value map.

" + } + }, "com.amazonaws.opensearchserverless#UpdateLifecyclePolicy": { "type": "operation", "input": { @@ -4752,6 +4919,12 @@ "smithy.api#documentation": "

SAML options in in the form of a key-value map.

" } }, + "iamIdentityCenterOptionsUpdates": { + "target": "com.amazonaws.opensearchserverless#UpdateIamIdentityCenterConfigOptions", + "traits": { + "smithy.api#documentation": "

Describes IAM Identity Center options in the form of a key-value map.

" + } + }, "clientToken": { "target": "com.amazonaws.opensearchserverless#ClientToken", "traits": { diff --git a/codegen/sdk-codegen/aws-models/redshift-serverless.json b/codegen/sdk-codegen/aws-models/redshift-serverless.json index 3cdf696223a..df11b9fbb99 100644 --- a/codegen/sdk-codegen/aws-models/redshift-serverless.json +++ b/codegen/sdk-codegen/aws-models/redshift-serverless.json @@ -993,6 +993,12 @@ "smithy.api#documentation": "

The maximum data-warehouse capacity Amazon Redshift Serverless uses to serve queries. The max capacity is specified in RPUs.

" } }, + "pricePerformanceTarget": { + "target": "com.amazonaws.redshiftserverless#PerformanceTarget", + "traits": { + "smithy.api#documentation": "

An object that represents the price performance target settings for the workgroup.

" + } + }, "ipAddressType": { "target": "com.amazonaws.redshiftserverless#IpAddressType", "traits": { @@ -3669,6 +3675,45 @@ "com.amazonaws.redshiftserverless#ParameterValue": { "type": "string" }, + "com.amazonaws.redshiftserverless#PerformanceTarget": { + "type": "structure", + "members": { + "status": { + "target": "com.amazonaws.redshiftserverless#PerformanceTargetStatus", + "traits": { + "smithy.api#documentation": "

Whether the price performance target is enabled for the workgroup.

" + } + }, + "level": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The target price performance level for the workgroup. Valid values include 1, 25, 50, 75, and 100. These\n correspond to the price performance levels LOW_COST, ECONOMICAL, BALANCED, RESOURCEFUL, and HIGH_PERFORMANCE.

", + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

An object that represents the price performance target settings for the workgroup.

" + } + }, + "com.amazonaws.redshiftserverless#PerformanceTargetStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "ENABLED", + "value": "ENABLED" + }, + { + "name": "DISABLED", + "value": "DISABLED" + } + ] + } + }, "com.amazonaws.redshiftserverless#PutResourcePolicy": { "type": "operation", "input": { @@ -6566,6 +6611,12 @@ "traits": { "smithy.api#documentation": "

The IP address type that the workgroup supports. Possible values are ipv4 and dualstack.

" } + }, + "pricePerformanceTarget": { + "target": "com.amazonaws.redshiftserverless#PerformanceTarget", + "traits": { + "smithy.api#documentation": "

An object that represents the price performance target settings for the workgroup.

" + } } }, "traits": { @@ -6947,6 +6998,12 @@ "traits": { "smithy.api#documentation": "

The IP address type that the workgroup supports. Possible values are ipv4 and dualstack.

" } + }, + "pricePerformanceTarget": { + "target": "com.amazonaws.redshiftserverless#PerformanceTarget", + "traits": { + "smithy.api#documentation": "

An object that represents the price performance target settings for the workgroup.

" + } } }, "traits": { diff --git a/codegen/sdk-codegen/aws-models/redshift.json b/codegen/sdk-codegen/aws-models/redshift.json index 673acc0057a..3290049e528 100644 --- a/codegen/sdk-codegen/aws-models/redshift.json +++ b/codegen/sdk-codegen/aws-models/redshift.json @@ -3852,14 +3852,14 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a zero-ETL integration with Amazon Redshift.

" + "smithy.api#documentation": "

Creates a zero-ETL integration or S3 event integration with Amazon Redshift.

" } }, "com.amazonaws.redshift#CreateIntegrationMessage": { "type": "structure", "members": { "SourceArn": { - "target": "com.amazonaws.redshift#String", + "target": "com.amazonaws.redshift#SourceArn", "traits": { "smithy.api#clientOptional": {}, "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the database to use as the source for replication.

", @@ -3867,7 +3867,7 @@ } }, "TargetArn": { - "target": "com.amazonaws.redshift#String", + "target": "com.amazonaws.redshift#TargetArn", "traits": { "smithy.api#clientOptional": {}, "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon Redshift data warehouse to use as the target for replication.

", @@ -5372,7 +5372,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a zero-ETL integration with Amazon Redshift.

" + "smithy.api#documentation": "

Deletes a zero-ETL integration or S3 event integration with Amazon Redshift.

" } }, "com.amazonaws.redshift#DeleteIntegrationMessage": { @@ -7327,13 +7327,13 @@ "type": "structure", "members": { "IntegrationArn": { - "target": "com.amazonaws.redshift#String", + "target": "com.amazonaws.redshift#InboundIntegrationArn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the inbound integration.

" } }, "TargetArn": { - "target": "com.amazonaws.redshift#String", + "target": "com.amazonaws.redshift#TargetArn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the target of an inbound integration.

" } @@ -7372,7 +7372,7 @@ } ], "traits": { - "smithy.api#documentation": "

Describes one or more zero-ETL integrations with Amazon Redshift.

", + "smithy.api#documentation": "

Describes one or more zero-ETL or S3 event integrations with Amazon Redshift.

", "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -8385,7 +8385,7 @@ "ResourceType": { "target": "com.amazonaws.redshift#String", "traits": { - "smithy.api#documentation": "

The type of resource with which you want to view tags. Valid resource types are:

\n
    \n
  • \n

    Cluster

    \n
  • \n
  • \n

    CIDR/IP

    \n
  • \n
  • \n

    EC2 security group

    \n
  • \n
  • \n

    Snapshot

    \n
  • \n
  • \n

    Cluster security group

    \n
  • \n
  • \n

    Subnet group

    \n
  • \n
  • \n

    HSM connection

    \n
  • \n
  • \n

    HSM certificate

    \n
  • \n
  • \n

    Parameter group

    \n
  • \n
  • \n

    Snapshot copy grant

    \n
  • \n
  • \n

    Integration (zero-ETL integration)

    \n \n

    To describe the tags associated with an integration, don't specify ResourceType, \n instead specify the ResourceName of the integration.

    \n
    \n
  • \n
\n

For more information about Amazon Redshift resource types and constructing ARNs, go to\n Specifying Policy Elements: Actions, Effects, Resources, and Principals in\n the Amazon Redshift Cluster Management Guide.

" + "smithy.api#documentation": "

The type of resource with which you want to view tags. Valid resource types are:

\n
    \n
  • \n

    Cluster

    \n
  • \n
  • \n

    CIDR/IP

    \n
  • \n
  • \n

    EC2 security group

    \n
  • \n
  • \n

    Snapshot

    \n
  • \n
  • \n

    Cluster security group

    \n
  • \n
  • \n

    Subnet group

    \n
  • \n
  • \n

    HSM connection

    \n
  • \n
  • \n

    HSM certificate

    \n
  • \n
  • \n

    Parameter group

    \n
  • \n
  • \n

    Snapshot copy grant

    \n
  • \n
  • \n

    Integration (zero-ETL integration or S3 event integration)

    \n \n

    To describe the tags associated with an integration, don't specify ResourceType, \n instead specify the ResourceName of the integration.

    \n
    \n
  • \n
\n

For more information about Amazon Redshift resource types and constructing ARNs, go to\n Specifying Policy Elements: Actions, Effects, Resources, and Principals in\n the Amazon Redshift Cluster Management Guide.

" } }, "MaxRecords": { @@ -10333,7 +10333,7 @@ "type": "structure", "members": { "IntegrationArn": { - "target": "com.amazonaws.redshift#String", + "target": "com.amazonaws.redshift#InboundIntegrationArn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an inbound integration.

" } @@ -10345,7 +10345,7 @@ } }, "TargetArn": { - "target": "com.amazonaws.redshift#String", + "target": "com.amazonaws.redshift#TargetArn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the target of an inbound integration.

" } @@ -10373,6 +10373,16 @@ "smithy.api#documentation": "

The content of an inbound integration.

" } }, + "com.amazonaws.redshift#InboundIntegrationArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^arn:aws[a-z\\-]*:.+:[a-z0-9\\-]*:[0-9]*:integration:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" + } + }, "com.amazonaws.redshift#InboundIntegrationList": { "type": "list", "member": { @@ -10463,7 +10473,7 @@ "type": "structure", "members": { "IntegrationArn": { - "target": "com.amazonaws.redshift#String", + "target": "com.amazonaws.redshift#IntegrationArn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the integration.

" } @@ -10475,13 +10485,13 @@ } }, "SourceArn": { - "target": "com.amazonaws.redshift#String", + "target": "com.amazonaws.redshift#SourceArn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the database used as the source for\n replication.

" } }, "TargetArn": { - "target": "com.amazonaws.redshift#String", + "target": "com.amazonaws.redshift#TargetArn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon Redshift data warehouse to use as the target for replication.

" } @@ -10680,7 +10690,7 @@ "code": "IntegrationQuotaExceededFault", "httpResponseCode": 400 }, - "smithy.api#documentation": "

You can't create any more zero-ETL integrations because the quota has been reached.

", + "smithy.api#documentation": "

You can't create any more zero-ETL or S3 event integrations because the quota has been reached.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -12655,7 +12665,7 @@ } ], "traits": { - "smithy.api#documentation": "

Modifies a zero-ETL integration with Amazon Redshift.

" + "smithy.api#documentation": "

Modifies a zero-ETL integration or S3 event integration with Amazon Redshift.

" } }, "com.amazonaws.redshift#ModifyIntegrationMessage": { @@ -18623,6 +18633,16 @@ } } }, + "com.amazonaws.redshift#SourceArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^arn:aws[a-z\\-]*:(s3|dynamodb):.*:.*:[a-zA-Z0-9._\\-\\/]+$" + } + }, "com.amazonaws.redshift#SourceIdsList": { "type": "list", "member": { @@ -19199,6 +19219,16 @@ "smithy.api#output": {} } }, + "com.amazonaws.redshift#TargetArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws[a-z\\-]*:redshift(-serverless)?:[a-z0-9\\-]+:[0-9]{12}:(namespace\\/|namespace:)[a-z0-9\\-]+$" + } + }, "com.amazonaws.redshift#TrackList": { "type": "list", "member": { diff --git a/codegen/sdk-codegen/aws-models/route-53.json b/codegen/sdk-codegen/aws-models/route-53.json index 16b78b0838d..205ae35f0f4 100644 --- a/codegen/sdk-codegen/aws-models/route-53.json +++ b/codegen/sdk-codegen/aws-models/route-53.json @@ -4039,7 +4039,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a configuration for DNS query logging. After you create a query logging\n\t\t\tconfiguration, Amazon Route 53 begins to publish log data to an Amazon CloudWatch Logs\n\t\t\tlog group.

\n

DNS query logs contain information about the queries that Route 53 receives for a\n\t\t\tspecified public hosted zone, such as the following:

\n
    \n
  • \n

    Route 53 edge location that responded to the DNS query

    \n
  • \n
  • \n

    Domain or subdomain that was requested

    \n
  • \n
  • \n

    DNS record type, such as A or AAAA

    \n
  • \n
  • \n

    DNS response code, such as NoError or\n\t\t\t\t\tServFail\n

    \n
  • \n
\n
\n
Log Group and Resource Policy
\n
\n

Before you create a query logging configuration, perform the following\n\t\t\t\t\t\toperations.

\n \n

If you create a query logging configuration using the Route 53\n\t\t\t\t\t\t\tconsole, Route 53 performs these operations automatically.

\n
\n
    \n
  1. \n

    Create a CloudWatch Logs log group, and make note of the ARN,\n\t\t\t\t\t\t\t\twhich you specify when you create a query logging configuration.\n\t\t\t\t\t\t\t\tNote the following:

    \n
      \n
    • \n

      You must create the log group in the us-east-1\n\t\t\t\t\t\t\t\t\t\tregion.

      \n
    • \n
    • \n

      You must use the same Amazon Web Services account to create\n\t\t\t\t\t\t\t\t\t\tthe log group and the hosted zone that you want to configure\n\t\t\t\t\t\t\t\t\t\tquery logging for.

      \n
    • \n
    • \n

      When you create log groups for query logging, we recommend\n\t\t\t\t\t\t\t\t\t\tthat you use a consistent prefix, for example:

      \n

      \n /aws/route53/hosted zone\n\t\t\t\t\t\t\t\t\t\t\tname\n \n

      \n

      In the next step, you'll create a resource policy, which\n\t\t\t\t\t\t\t\t\t\tcontrols access to one or more log groups and the associated\n\t\t\t\t\t\t\t\t\t\t\tAmazon Web Services resources, such as Route 53 hosted\n\t\t\t\t\t\t\t\t\t\tzones. There's a limit on the number of resource policies\n\t\t\t\t\t\t\t\t\t\tthat you can create, so we recommend that you use a\n\t\t\t\t\t\t\t\t\t\tconsistent prefix so you can use the same resource policy\n\t\t\t\t\t\t\t\t\t\tfor all the log groups that you create for query\n\t\t\t\t\t\t\t\t\t\tlogging.

      \n
    • \n
    \n
  2. \n
  3. \n

    Create a CloudWatch Logs resource policy, and give it the\n\t\t\t\t\t\t\t\tpermissions that Route 53 needs to create log streams and to send\n\t\t\t\t\t\t\t\tquery logs to log streams. For the value of Resource,\n\t\t\t\t\t\t\t\tspecify the ARN for the log group that you created in the previous\n\t\t\t\t\t\t\t\tstep. To use the same resource policy for all the CloudWatch Logs\n\t\t\t\t\t\t\t\tlog groups that you created for query logging configurations,\n\t\t\t\t\t\t\t\treplace the hosted zone name with *, for\n\t\t\t\t\t\t\t\texample:

    \n

    \n arn:aws:logs:us-east-1:123412341234:log-group:/aws/route53/*\n

    \n

    To avoid the confused deputy problem, a security issue where an\n\t\t\t\t\t\t\t\tentity without a permission for an action can coerce a\n\t\t\t\t\t\t\t\tmore-privileged entity to perform it, you can optionally limit the\n\t\t\t\t\t\t\t\tpermissions that a service has to a resource in a resource-based\n\t\t\t\t\t\t\t\tpolicy by supplying the following values:

    \n
      \n
    • \n

      For aws:SourceArn, supply the hosted zone ARN\n\t\t\t\t\t\t\t\t\t\tused in creating the query logging configuration. For\n\t\t\t\t\t\t\t\t\t\texample, aws:SourceArn:\n\t\t\t\t\t\t\t\t\t\t\tarn:aws:route53:::hostedzone/hosted zone\n\t\t\t\t\t\t\t\t\t\tID.

      \n
    • \n
    • \n

      For aws:SourceAccount, supply the account ID\n\t\t\t\t\t\t\t\t\t\tfor the account that creates the query logging\n\t\t\t\t\t\t\t\t\t\tconfiguration. For example,\n\t\t\t\t\t\t\t\t\t\t\taws:SourceAccount:111111111111.

      \n
    • \n
    \n

    For more information, see The confused\n\t\t\t\t\t\t\t\t\tdeputy problem in the Amazon Web Services\n\t\t\t\t\t\t\t\t\tIAM User Guide.

    \n \n

    You can't use the CloudWatch console to create or edit a\n\t\t\t\t\t\t\t\t\tresource policy. You must use the CloudWatch API, one of the\n\t\t\t\t\t\t\t\t\t\tAmazon Web Services SDKs, or the CLI.

    \n
    \n
  4. \n
\n
\n
Log Streams and Edge Locations
\n
\n

When Route 53 finishes creating the configuration for DNS query logging,\n\t\t\t\t\t\tit does the following:

\n
    \n
  • \n

    Creates a log stream for an edge location the first time that the\n\t\t\t\t\t\t\t\tedge location responds to DNS queries for the specified hosted zone.\n\t\t\t\t\t\t\t\tThat log stream is used to log all queries that Route 53 responds to\n\t\t\t\t\t\t\t\tfor that edge location.

    \n
  • \n
  • \n

    Begins to send query logs to the applicable log stream.

    \n
  • \n
\n

The name of each log stream is in the following format:

\n

\n \n hosted zone ID/edge location\n\t\t\t\t\t\t\t\tcode\n \n

\n

The edge location code is a three-letter code and an arbitrarily assigned\n\t\t\t\t\t\tnumber, for example, DFW3. The three-letter code typically corresponds with\n\t\t\t\t\t\tthe International Air Transport Association airport code for an airport near\n\t\t\t\t\t\tthe edge location. (These abbreviations might change in the future.) For a\n\t\t\t\t\t\tlist of edge locations, see \"The Route 53 Global Network\" on the Route 53 Product Details\n\t\t\t\t\t\tpage.

\n
\n
Queries That Are Logged
\n
\n

Query logs contain only the queries that DNS resolvers forward to Route\n\t\t\t\t\t\t53. If a DNS resolver has already cached the response to a query (such as\n\t\t\t\t\t\tthe IP address for a load balancer for example.com), the resolver will\n\t\t\t\t\t\tcontinue to return the cached response. It doesn't forward another query to\n\t\t\t\t\t\tRoute 53 until the TTL for the corresponding resource record set expires.\n\t\t\t\t\t\tDepending on how many DNS queries are submitted for a resource record set,\n\t\t\t\t\t\tand depending on the TTL for that resource record set, query logs might\n\t\t\t\t\t\tcontain information about only one query out of every several thousand\n\t\t\t\t\t\tqueries that are submitted to DNS. For more information about how DNS works,\n\t\t\t\t\t\tsee Routing\n\t\t\t\t\t\t\tInternet Traffic to Your Website or Web Application in the\n\t\t\t\t\t\t\tAmazon Route 53 Developer Guide.

\n
\n
Log File Format
\n
\n

For a list of the values in each query log and the format of each value,\n\t\t\t\t\t\tsee Logging DNS\n\t\t\t\t\t\t\tQueries in the Amazon Route 53 Developer\n\t\t\t\t\t\t\tGuide.

\n
\n
Pricing
\n
\n

For information about charges for query logs, see Amazon CloudWatch Pricing.

\n
\n
How to Stop Logging
\n
\n

If you want Route 53 to stop sending query logs to CloudWatch Logs, delete\n\t\t\t\t\t\tthe query logging configuration. For more information, see DeleteQueryLoggingConfig.

\n
\n
", + "smithy.api#documentation": "

Creates a configuration for DNS query logging. After you create a query logging\n\t\t\tconfiguration, Amazon Route 53 begins to publish log data to an Amazon CloudWatch Logs\n\t\t\tlog group.

\n

DNS query logs contain information about the queries that Route 53 receives for a\n\t\t\tspecified public hosted zone, such as the following:

\n
    \n
  • \n

    Route 53 edge location that responded to the DNS query

    \n
  • \n
  • \n

    Domain or subdomain that was requested

    \n
  • \n
  • \n

    DNS record type, such as A or AAAA

    \n
  • \n
  • \n

    DNS response code, such as NoError or\n\t\t\t\t\tServFail\n

    \n
  • \n
\n
\n
Log Group and Resource Policy
\n
\n

Before you create a query logging configuration, perform the following\n\t\t\t\t\t\toperations.

\n \n

If you create a query logging configuration using the Route 53\n\t\t\t\t\t\t\tconsole, Route 53 performs these operations automatically.

\n
\n
    \n
  1. \n

    Create a CloudWatch Logs log group, and make note of the ARN,\n\t\t\t\t\t\t\t\twhich you specify when you create a query logging configuration.\n\t\t\t\t\t\t\t\tNote the following:

    \n
      \n
    • \n

      You must create the log group in the us-east-1\n\t\t\t\t\t\t\t\t\t\tregion.

      \n
    • \n
    • \n

      You must use the same Amazon Web Services account to create\n\t\t\t\t\t\t\t\t\t\tthe log group and the hosted zone that you want to configure\n\t\t\t\t\t\t\t\t\t\tquery logging for.

      \n
    • \n
    • \n

      When you create log groups for query logging, we recommend\n\t\t\t\t\t\t\t\t\t\tthat you use a consistent prefix, for example:

      \n

      \n /aws/route53/hosted zone\n\t\t\t\t\t\t\t\t\t\t\tname\n \n

      \n

      In the next step, you'll create a resource policy, which\n\t\t\t\t\t\t\t\t\t\tcontrols access to one or more log groups and the associated\n\t\t\t\t\t\t\t\t\t\t\tAmazon Web Services resources, such as Route 53 hosted\n\t\t\t\t\t\t\t\t\t\tzones. There's a limit on the number of resource policies\n\t\t\t\t\t\t\t\t\t\tthat you can create, so we recommend that you use a\n\t\t\t\t\t\t\t\t\t\tconsistent prefix so you can use the same resource policy\n\t\t\t\t\t\t\t\t\t\tfor all the log groups that you create for query\n\t\t\t\t\t\t\t\t\t\tlogging.

      \n
    • \n
    \n
  2. \n
  3. \n

    Create a CloudWatch Logs resource policy, and give it the\n\t\t\t\t\t\t\t\tpermissions that Route 53 needs to create log streams and to send\n\t\t\t\t\t\t\t\tquery logs to log streams. You must create the CloudWatch Logs resource policy in the us-east-1\n\t\t\t\t\t\t\t\t\tregion. For the value of Resource,\n\t\t\t\t\t\t\t\tspecify the ARN for the log group that you created in the previous\n\t\t\t\t\t\t\t\tstep. To use the same resource policy for all the CloudWatch Logs\n\t\t\t\t\t\t\t\tlog groups that you created for query logging configurations,\n\t\t\t\t\t\t\t\treplace the hosted zone name with *, for\n\t\t\t\t\t\t\t\texample:

    \n

    \n arn:aws:logs:us-east-1:123412341234:log-group:/aws/route53/*\n

    \n

    To avoid the confused deputy problem, a security issue where an\n\t\t\t\t\t\t\t\tentity without a permission for an action can coerce a\n\t\t\t\t\t\t\t\tmore-privileged entity to perform it, you can optionally limit the\n\t\t\t\t\t\t\t\tpermissions that a service has to a resource in a resource-based\n\t\t\t\t\t\t\t\tpolicy by supplying the following values:

    \n
      \n
    • \n

      For aws:SourceArn, supply the hosted zone ARN\n\t\t\t\t\t\t\t\t\t\tused in creating the query logging configuration. For\n\t\t\t\t\t\t\t\t\t\texample, aws:SourceArn:\n\t\t\t\t\t\t\t\t\t\t\tarn:aws:route53:::hostedzone/hosted zone\n\t\t\t\t\t\t\t\t\t\tID.

      \n
    • \n
    • \n

      For aws:SourceAccount, supply the account ID\n\t\t\t\t\t\t\t\t\t\tfor the account that creates the query logging\n\t\t\t\t\t\t\t\t\t\tconfiguration. For example,\n\t\t\t\t\t\t\t\t\t\t\taws:SourceAccount:111111111111.

      \n
    • \n
    \n

    For more information, see The confused\n\t\t\t\t\t\t\t\t\tdeputy problem in the Amazon Web Services\n\t\t\t\t\t\t\t\t\tIAM User Guide.

    \n \n

    You can't use the CloudWatch console to create or edit a\n\t\t\t\t\t\t\t\t\tresource policy. You must use the CloudWatch API, one of the\n\t\t\t\t\t\t\t\t\t\tAmazon Web Services SDKs, or the CLI.

    \n
    \n
  4. \n
\n
\n
Log Streams and Edge Locations
\n
\n

When Route 53 finishes creating the configuration for DNS query logging,\n\t\t\t\t\t\tit does the following:

\n
    \n
  • \n

    Creates a log stream for an edge location the first time that the\n\t\t\t\t\t\t\t\tedge location responds to DNS queries for the specified hosted zone.\n\t\t\t\t\t\t\t\tThat log stream is used to log all queries that Route 53 responds to\n\t\t\t\t\t\t\t\tfor that edge location.

    \n
  • \n
  • \n

    Begins to send query logs to the applicable log stream.

    \n
  • \n
\n

The name of each log stream is in the following format:

\n

\n \n hosted zone ID/edge location\n\t\t\t\t\t\t\t\tcode\n \n

\n

The edge location code is a three-letter code and an arbitrarily assigned\n\t\t\t\t\t\tnumber, for example, DFW3. The three-letter code typically corresponds with\n\t\t\t\t\t\tthe International Air Transport Association airport code for an airport near\n\t\t\t\t\t\tthe edge location. (These abbreviations might change in the future.) For a\n\t\t\t\t\t\tlist of edge locations, see \"The Route 53 Global Network\" on the Route 53 Product Details\n\t\t\t\t\t\tpage.

\n
\n
Queries That Are Logged
\n
\n

Query logs contain only the queries that DNS resolvers forward to Route\n\t\t\t\t\t\t53. If a DNS resolver has already cached the response to a query (such as\n\t\t\t\t\t\tthe IP address for a load balancer for example.com), the resolver will\n\t\t\t\t\t\tcontinue to return the cached response. It doesn't forward another query to\n\t\t\t\t\t\tRoute 53 until the TTL for the corresponding resource record set expires.\n\t\t\t\t\t\tDepending on how many DNS queries are submitted for a resource record set,\n\t\t\t\t\t\tand depending on the TTL for that resource record set, query logs might\n\t\t\t\t\t\tcontain information about only one query out of every several thousand\n\t\t\t\t\t\tqueries that are submitted to DNS. For more information about how DNS works,\n\t\t\t\t\t\tsee Routing\n\t\t\t\t\t\t\tInternet Traffic to Your Website or Web Application in the\n\t\t\t\t\t\t\tAmazon Route 53 Developer Guide.

\n
\n
Log File Format
\n
\n

For a list of the values in each query log and the format of each value,\n\t\t\t\t\t\tsee Logging DNS\n\t\t\t\t\t\t\tQueries in the Amazon Route 53 Developer\n\t\t\t\t\t\t\tGuide.

\n
\n
Pricing
\n
\n

For information about charges for query logs, see Amazon CloudWatch Pricing.

\n
\n
How to Stop Logging
\n
\n

If you want Route 53 to stop sending query logs to CloudWatch Logs, delete\n\t\t\t\t\t\tthe query logging configuration. For more information, see DeleteQueryLoggingConfig.

\n
\n
", "smithy.api#http": { "method": "POST", "uri": "/2013-04-01/queryloggingconfig", @@ -6356,7 +6356,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about a specified hosted zone including the four name servers\n\t\t\tassigned to the hosted zone.

", + "smithy.api#documentation": "

Gets information about a specified hosted zone including the four name servers\n\t\t\tassigned to the hosted zone.

\n

\n returns the VPCs associated with the specified hosted zone and does not reflect the VPC\n\t\t\tassociations by Route 53 Profiles. To get the associations to a Profile, call the ListProfileAssociations API.

", "smithy.api#examples": [ { "title": "To get information about a hosted zone", @@ -7013,7 +7013,7 @@ "Type": { "target": "com.amazonaws.route53#HealthCheckType", "traits": { - "smithy.api#documentation": "

The type of health check that you want to create, which indicates how Amazon Route 53\n\t\t\tdetermines whether an endpoint is healthy.

\n \n

You can't change the value of Type after you create a health\n\t\t\t\tcheck.

\n
\n

You can create the following types of health checks:

\n
    \n
  • \n

    \n HTTP: Route 53 tries to establish a TCP\n\t\t\t\t\tconnection. If successful, Route 53 submits an HTTP request and waits for an\n\t\t\t\t\tHTTP status code of 200 or greater and less than 400.

    \n
  • \n
  • \n

    \n HTTPS: Route 53 tries to establish a TCP\n\t\t\t\t\tconnection. If successful, Route 53 submits an HTTPS request and waits for an\n\t\t\t\t\tHTTP status code of 200 or greater and less than 400.

    \n \n

    If you specify HTTPS for the value of Type, the\n\t\t\t\t\t\tendpoint must support TLS v1.0 or later.

    \n
    \n
  • \n
  • \n

    \n HTTP_STR_MATCH: Route 53 tries to establish a\n\t\t\t\t\tTCP connection. If successful, Route 53 submits an HTTP request and searches the\n\t\t\t\t\tfirst 5,120 bytes of the response body for the string that you specify in\n\t\t\t\t\t\tSearchString.

    \n
  • \n
  • \n

    \n HTTPS_STR_MATCH: Route 53 tries to establish\n\t\t\t\t\ta TCP connection. If successful, Route 53 submits an HTTPS request\n\t\t\t\t\tand searches the first 5,120 bytes of the response body for the string that you\n\t\t\t\t\tspecify in SearchString.

    \n
  • \n
  • \n

    \n TCP: Route 53 tries to establish a TCP\n\t\t\t\t\tconnection.

    \n
  • \n
  • \n

    \n CLOUDWATCH_METRIC: The health check is\n\t\t\t\t\tassociated with a CloudWatch alarm. If the state of the alarm is\n\t\t\t\t\tOK, the health check is considered healthy. If the state is\n\t\t\t\t\t\tALARM, the health check is considered unhealthy. If CloudWatch\n\t\t\t\t\tdoesn't have sufficient data to determine whether the state is OK\n\t\t\t\t\tor ALARM, the health check status depends on the setting for\n\t\t\t\t\t\tInsufficientDataHealthStatus: Healthy,\n\t\t\t\t\t\tUnhealthy, or LastKnownStatus.

    \n
  • \n
  • \n

    \n CALCULATED: For health checks that monitor\n\t\t\t\t\tthe status of other health checks, Route 53 adds up the number of health checks\n\t\t\t\t\tthat Route 53 health checkers consider to be healthy and compares that number\n\t\t\t\t\twith the value of HealthThreshold.

    \n
  • \n
  • \n

    \n RECOVERY_CONTROL: The health check is associated with a\n\t\t\t\t\tRoute53 Application Recovery Controller routing control. If the routing control\n\t\t\t\t\tstate is ON, the health check is considered healthy. If the state\n\t\t\t\t\tis OFF, the health check is considered unhealthy.

    \n
  • \n
\n

For more information, see How Route 53 Determines Whether an Endpoint Is Healthy in the\n\t\t\t\tAmazon Route 53 Developer Guide.

", + "smithy.api#documentation": "

The type of health check that you want to create, which indicates how Amazon Route 53\n\t\t\tdetermines whether an endpoint is healthy.

\n \n

You can't change the value of Type after you create a health\n\t\t\t\tcheck.

\n
\n

You can create the following types of health checks:

\n
    \n
  • \n

    \n HTTP: Route 53 tries to establish a TCP\n\t\t\t\t\tconnection. If successful, Route 53 submits an HTTP request and waits for an\n\t\t\t\t\tHTTP status code of 200 or greater and less than 400.

    \n
  • \n
  • \n

    \n HTTPS: Route 53 tries to establish a TCP\n\t\t\t\t\tconnection. If successful, Route 53 submits an HTTPS request and waits for an\n\t\t\t\t\tHTTP status code of 200 or greater and less than 400.

    \n \n

    If you specify HTTPS for the value of Type, the endpoint must\n\t\t\t\t\t\tsupport TLS v1.0, v1.1, or v1.2.

    \n
    \n
  • \n
  • \n

    \n HTTP_STR_MATCH: Route 53 tries to establish a\n\t\t\t\t\tTCP connection. If successful, Route 53 submits an HTTP request and searches the\n\t\t\t\t\tfirst 5,120 bytes of the response body for the string that you specify in\n\t\t\t\t\t\tSearchString.

    \n
  • \n
  • \n

    \n HTTPS_STR_MATCH: Route 53 tries to establish\n\t\t\t\t\ta TCP connection. If successful, Route 53 submits an HTTPS request\n\t\t\t\t\tand searches the first 5,120 bytes of the response body for the string that you\n\t\t\t\t\tspecify in SearchString.

    \n
  • \n
  • \n

    \n TCP: Route 53 tries to establish a TCP\n\t\t\t\t\tconnection.

    \n
  • \n
  • \n

    \n CLOUDWATCH_METRIC: The health check is\n\t\t\t\t\tassociated with a CloudWatch alarm. If the state of the alarm is\n\t\t\t\t\tOK, the health check is considered healthy. If the state is\n\t\t\t\t\t\tALARM, the health check is considered unhealthy. If CloudWatch\n\t\t\t\t\tdoesn't have sufficient data to determine whether the state is OK\n\t\t\t\t\tor ALARM, the health check status depends on the setting for\n\t\t\t\t\t\tInsufficientDataHealthStatus: Healthy,\n\t\t\t\t\t\tUnhealthy, or LastKnownStatus.

    \n
  • \n
  • \n

    \n CALCULATED: For health checks that monitor\n\t\t\t\t\tthe status of other health checks, Route 53 adds up the number of health checks\n\t\t\t\t\tthat Route 53 health checkers consider to be healthy and compares that number\n\t\t\t\t\twith the value of HealthThreshold.

    \n
  • \n
  • \n

    \n RECOVERY_CONTROL: The health check is associated with a\n\t\t\t\t\tRoute53 Application Recovery Controller routing control. If the routing control\n\t\t\t\t\tstate is ON, the health check is considered healthy. If the state\n\t\t\t\t\tis OFF, the health check is considered unhealthy.

    \n
  • \n
\n

For more information, see How Route 53 Determines Whether an Endpoint Is Healthy in the\n\t\t\t\tAmazon Route 53 Developer Guide.

", "smithy.api#required": {} } }, @@ -8711,7 +8711,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists all the private hosted zones that a specified VPC is associated with, regardless\n\t\t\tof which Amazon Web Services account or Amazon Web Services service owns the hosted zones.\n\t\t\tThe HostedZoneOwner structure in the response contains one of the following\n\t\t\tvalues:

\n
    \n
  • \n

    An OwningAccount element, which contains the account number of\n\t\t\t\t\teither the current Amazon Web Services account or another Amazon Web Services account. Some services, such as Cloud Map, create\n\t\t\t\t\thosted zones using the current account.

    \n
  • \n
  • \n

    An OwningService element, which identifies the Amazon Web Services\n\t\t\t\t\tservice that created and owns the hosted zone. For example, if a hosted zone was\n\t\t\t\t\tcreated by Amazon Elastic File System (Amazon EFS), the value of\n\t\t\t\t\t\tOwner is efs.amazonaws.com.

    \n
  • \n
\n \n

When listing private hosted zones, the hosted zone and the Amazon VPC must\n\t\t\t\tbelong to the same partition where the hosted zones were created. A partition is a\n\t\t\t\tgroup of Amazon Web Services Regions. Each Amazon Web Services account is scoped to\n\t\t\t\tone partition.

\n

The following are the supported partitions:

\n
    \n
  • \n

    \n aws - Amazon Web Services Regions

    \n
  • \n
  • \n

    \n aws-cn - China Regions

    \n
  • \n
  • \n

    \n aws-us-gov - Amazon Web Services GovCloud (US) Region

    \n
  • \n
\n

For more information, see Access Management\n\t\t\t\tin the Amazon Web Services General Reference.

\n
", + "smithy.api#documentation": "

Lists all the private hosted zones that a specified VPC is associated with, regardless\n\t\t\tof which Amazon Web Services account or Amazon Web Services service owns the hosted zones.\n\t\t\tThe HostedZoneOwner structure in the response contains one of the following\n\t\t\tvalues:

\n
    \n
  • \n

    An OwningAccount element, which contains the account number of\n\t\t\t\t\teither the current Amazon Web Services account or another Amazon Web Services account. Some services, such as Cloud Map, create\n\t\t\t\t\thosted zones using the current account.

    \n
  • \n
  • \n

    An OwningService element, which identifies the Amazon Web Services\n\t\t\t\t\tservice that created and owns the hosted zone. For example, if a hosted zone was\n\t\t\t\t\tcreated by Amazon Elastic File System (Amazon EFS), the value of\n\t\t\t\t\t\tOwner is efs.amazonaws.com.

    \n
  • \n
\n

\n ListHostedZonesByVPC returns the hosted zones associated with the specified VPC and does not reflect the hosted zone\n\t\t\tassociations to VPCs via Route 53 Profiles. To get the associations to a Profile, call the ListProfileResourceAssociations API.

\n \n

When listing private hosted zones, the hosted zone and the Amazon VPC must\n\t\t\t\tbelong to the same partition where the hosted zones were created. A partition is a\n\t\t\t\tgroup of Amazon Web Services Regions. Each Amazon Web Services account is scoped to\n\t\t\t\tone partition.

\n

The following are the supported partitions:

\n
    \n
  • \n

    \n aws - Amazon Web Services Regions

    \n
  • \n
  • \n

    \n aws-cn - China Regions

    \n
  • \n
  • \n

    \n aws-us-gov - Amazon Web Services GovCloud (US) Region

    \n
  • \n
\n

For more information, see Access Management\n\t\t\t\tin the Amazon Web Services General Reference.

\n
", "smithy.api#http": { "method": "GET", "uri": "/2013-04-01/hostedzonesbyvpc", @@ -10417,6 +10417,30 @@ "traits": { "smithy.api#enumValue": "DS" } + }, + "TLSA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TLSA" + } + }, + "SSHFP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SSHFP" + } + }, + "SVCB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SVCB" + } + }, + "HTTPS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HTTPS" + } } } }, @@ -10553,7 +10577,7 @@ "Type": { "target": "com.amazonaws.route53#RRType", "traits": { - "smithy.api#documentation": "

The DNS record type. For information about different record types and how data is\n\t\t\tencoded for them, see Supported DNS Resource\n\t\t\t\tRecord Types in the Amazon Route 53 Developer\n\t\t\tGuide.

\n

Valid values for basic resource record sets: A | AAAA |\n\t\t\t\tCAA | CNAME | DS |MX |\n\t\t\t\tNAPTR | NS | PTR | SOA |\n\t\t\t\tSPF | SRV | TXT\n

\n

Values for weighted, latency, geolocation, and failover resource record sets:\n\t\t\t\tA | AAAA | CAA | CNAME |\n\t\t\t\tMX | NAPTR | PTR | SPF |\n\t\t\t\tSRV | TXT. When creating a group of weighted, latency,\n\t\t\tgeolocation, or failover resource record sets, specify the same value for all of the\n\t\t\tresource record sets in the group.

\n

Valid values for multivalue answer resource record sets: A |\n\t\t\t\tAAAA | MX | NAPTR | PTR |\n\t\t\t\tSPF | SRV | TXT\n

\n \n

SPF records were formerly used to verify the identity of the sender of email\n\t\t\t\tmessages. However, we no longer recommend that you create resource record sets for\n\t\t\t\twhich the value of Type is SPF. RFC 7208, Sender\n\t\t\t\t\tPolicy Framework (SPF) for Authorizing Use of Domains in Email, Version\n\t\t\t\t\t1, has been updated to say, \"...[I]ts existence and mechanism defined\n\t\t\t\tin [RFC4408] have led to some interoperability issues. Accordingly, its use is no\n\t\t\t\tlonger appropriate for SPF version 1; implementations are not to use it.\" In RFC\n\t\t\t\t7208, see section 14.1, The SPF DNS Record Type.

\n
\n

Values for alias resource record sets:

\n
    \n
  • \n

    \n Amazon API Gateway custom regional APIs and\n\t\t\t\t\t\tedge-optimized APIs:\n A\n

    \n
  • \n
  • \n

    \n CloudFront distributions:\n A\n

    \n

    If IPv6 is enabled for the distribution, create two resource record sets to\n\t\t\t\t\troute traffic to your distribution, one with a value of A and one\n\t\t\t\t\twith a value of AAAA.

    \n
  • \n
  • \n

    \n Amazon API Gateway environment that has a regionalized\n\t\t\t\t\t\tsubdomain: A\n

    \n
  • \n
  • \n

    \n ELB load balancers:\n A | AAAA\n

    \n
  • \n
  • \n

    \n Amazon S3 buckets:\n A\n

    \n
  • \n
  • \n

    \n Amazon Virtual Private Cloud interface VPC\n\t\t\t\t\t\tendpoints\n A\n

    \n
  • \n
  • \n

    \n Another resource record set in this hosted\n\t\t\t\t\t\tzone: Specify the type of the resource record set that you're\n\t\t\t\t\tcreating the alias for. All values are supported except NS and\n\t\t\t\t\t\tSOA.

    \n \n

    If you're creating an alias record that has the same name as the hosted\n\t\t\t\t\t\tzone (known as the zone apex), you can't route traffic to a record for which\n\t\t\t\t\t\tthe value of Type is CNAME. This is because the\n\t\t\t\t\t\talias record must have the same type as the record you're routing traffic\n\t\t\t\t\t\tto, and creating a CNAME record for the zone apex isn't supported even for\n\t\t\t\t\t\tan alias record.

    \n
    \n
  • \n
", + "smithy.api#documentation": "

The DNS record type. For information about different record types and how data is\n\t\t\tencoded for them, see Supported DNS Resource\n\t\t\t\tRecord Types in the Amazon Route 53 Developer\n\t\t\tGuide.

\n

Valid values for basic resource record sets: A | AAAA |\n\t\t\t\tCAA | CNAME | DS |MX |\n\t\t\t\tNAPTR | NS | PTR | SOA |\n\t\t\tSPF | SRV | TXT| TLSA| SSHFP| SVCB| HTTPS\n

\n

Values for weighted, latency, geolocation, and failover resource record sets: A\n\t\t\t| AAAA | CAA | CNAME | MX |\n\t\t\t\tNAPTR | PTR | SPF | SRV |\n\t\t\t\tTXT| TLSA| SSHFP| SVCB|\n\t\t\t\tHTTPS. When creating a group of weighted, latency, geolocation,\n\t\t\tor\n\t\t\tfailover resource record sets, specify the same value for all of the resource record\n\t\t\tsets in the group.

\n

Valid values for multivalue answer resource record sets: A |\n\t\t\t\tAAAA | MX | NAPTR | PTR |\n\t\t\tSPF | SRV | TXT| CAA| TLSA| SSHFP| SVCB| HTTPS\n

\n \n

SPF records were formerly used to verify the identity of the sender of email\n\t\t\t\tmessages. However, we no longer recommend that you create resource record sets for\n\t\t\t\twhich the value of Type is SPF. RFC 7208, Sender\n\t\t\t\t\tPolicy Framework (SPF) for Authorizing Use of Domains in Email, Version\n\t\t\t\t\t1, has been updated to say, \"...[I]ts existence and mechanism defined\n\t\t\t\tin [RFC4408] have led to some interoperability issues. Accordingly, its use is no\n\t\t\t\tlonger appropriate for SPF version 1; implementations are not to use it.\" In RFC\n\t\t\t\t7208, see section 14.1, The SPF DNS Record Type.

\n
\n

Values for alias resource record sets:

\n
    \n
  • \n

    \n Amazon API Gateway custom regional APIs and\n\t\t\t\t\t\tedge-optimized APIs:\n A\n

    \n
  • \n
  • \n

    \n CloudFront distributions:\n A\n

    \n

    If IPv6 is enabled for the distribution, create two resource record sets to\n\t\t\t\t\troute traffic to your distribution, one with a value of A and one\n\t\t\t\t\twith a value of AAAA.

    \n
  • \n
  • \n

    \n Amazon API Gateway environment that has a regionalized\n\t\t\t\t\t\tsubdomain: A\n

    \n
  • \n
  • \n

    \n ELB load balancers:\n A | AAAA\n

    \n
  • \n
  • \n

    \n Amazon S3 buckets:\n A\n

    \n
  • \n
  • \n

    \n Amazon Virtual Private Cloud interface VPC\n\t\t\t\t\t\tendpoints\n A\n

    \n
  • \n
  • \n

    \n Another resource record set in this hosted\n\t\t\t\t\t\tzone: Specify the type of the resource record set that you're\n\t\t\t\t\tcreating the alias for. All values are supported except NS and\n\t\t\t\t\t\tSOA.

    \n \n

    If you're creating an alias record that has the same name as the hosted\n\t\t\t\t\t\tzone (known as the zone apex), you can't route traffic to a record for which\n\t\t\t\t\t\tthe value of Type is CNAME. This is because the\n\t\t\t\t\t\talias record must have the same type as the record you're routing traffic\n\t\t\t\t\t\tto, and creating a CNAME record for the zone apex isn't supported even for\n\t\t\t\t\t\tan alias record.

    \n
    \n
  • \n
", "smithy.api#required": {} } }, @@ -12447,6 +12471,12 @@ "smithy.api#enumValue": "cn-north-1" } }, + "cn_northwest_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cn-northwest-1" + } + }, "af_south_1": { "target": "smithy.api#Unit", "traits": { diff --git a/codegen/sdk-codegen/aws-models/sagemaker.json b/codegen/sdk-codegen/aws-models/sagemaker.json index 73ee37f4f18..473b0ab6f62 100644 --- a/codegen/sdk-codegen/aws-models/sagemaker.json +++ b/codegen/sdk-codegen/aws-models/sagemaker.json @@ -7624,7 +7624,7 @@ "BuiltInLifecycleConfigArn": { "target": "com.amazonaws.sagemaker#StudioLifecycleConfigArn", "traits": { - "smithy.api#documentation": "

The lifecycle configuration that runs before the default lifecycle configuration. It can override changes made in the default \n lifecycle configuration.

" + "smithy.api#documentation": "

The lifecycle configuration that runs before the default lifecycle configuration. It can\n override changes made in the default lifecycle configuration.

" } } }, @@ -9922,7 +9922,7 @@ "TagPropagation": { "target": "com.amazonaws.sagemaker#TagPropagation", "traits": { - "smithy.api#documentation": "

Indicates whether custom tag propagation is supported for the domain. Defaults to DISABLED.

" + "smithy.api#documentation": "

Indicates whether custom tag propagation is supported for the domain. Defaults to\n DISABLED.

" } }, "DefaultSpaceSettings": { @@ -12319,6 +12319,12 @@ "traits": { "smithy.api#documentation": "

The model card associated with the model package. Since ModelPackageModelCard is\n tied to a model package, it is a specific usage of a model card and its schema is\n simplified compared to the schema of ModelCard. The \n ModelPackageModelCard schema does not include model_package_details,\n and model_overview is composed of the model_creator and\n model_artifact properties. For more information about the model package model\n card schema, see Model\n package model card schema. For more information about\n the model card associated with the model package, see View\n the Details of a Model Version.

" } + }, + "ModelLifeCycle": { + "target": "com.amazonaws.sagemaker#ModelLifeCycle", + "traits": { + "smithy.api#documentation": "

\n A structure describing the current state of the model in its life cycle.\n

" + } } }, "traits": { @@ -12955,7 +12961,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a URL for a specified UserProfile in a Domain. When accessed in a web browser, the\n user will be automatically signed in to the domain, and granted access to all of the Apps and\n files associated with the Domain's Amazon Elastic File System volume. This operation can only be\n called when the authentication mode equals IAM.

\n

The IAM role or user passed to this API defines the permissions to access\n the app. Once the presigned URL is created, no additional permission is required to access\n this URL. IAM authorization policies for this API are also enforced for every\n HTTP request and WebSocket frame that attempts to connect to the app.

\n

You can restrict access to this API and to the URL that it returns to a list of IP\n addresses, Amazon VPCs or Amazon VPC Endpoints that you specify. For more\n information, see Connect to Amazon SageMaker\n Studio Through an Interface VPC Endpoint .

\n \n

The URL that you get from a call to CreatePresignedDomainUrl has a default\n timeout of 5 minutes. You can configure this value using ExpiresInSeconds. If\n you try to use the URL after the timeout limit expires, you are directed to the Amazon Web Services console sign-in page.

\n
" + "smithy.api#documentation": "

Creates a URL for a specified UserProfile in a Domain. When accessed in a web browser, the\n user will be automatically signed in to the domain, and granted access to all of the Apps and\n files associated with the Domain's Amazon Elastic File System volume. This operation can only be\n called when the authentication mode equals IAM.

\n

The IAM role or user passed to this API defines the permissions to access\n the app. Once the presigned URL is created, no additional permission is required to access\n this URL. IAM authorization policies for this API are also enforced for every\n HTTP request and WebSocket frame that attempts to connect to the app.

\n

You can restrict access to this API and to the URL that it returns to a list of IP\n addresses, Amazon VPCs or Amazon VPC Endpoints that you specify. For more\n information, see Connect to Amazon SageMaker\n Studio Through an Interface VPC Endpoint .

\n \n
    \n
  • \n

    The URL that you get from a call to CreatePresignedDomainUrl has a\n default timeout of 5 minutes. You can configure this value using\n ExpiresInSeconds. If you try to use the URL after the timeout limit\n expires, you are directed to the Amazon Web Services console sign-in page.

    \n
  • \n
  • \n

    The JupyterLab session default expiration time is 12 hours. You can configure this\n value using SessionExpirationDurationInSeconds.

    \n
  • \n
\n
" } }, "com.amazonaws.sagemaker#CreatePresignedDomainUrlRequest": { @@ -14281,7 +14287,7 @@ } }, "traits": { - "smithy.api#documentation": "

A file system, created by you, that you assign to a user profile or space for an\n Amazon SageMaker Domain. Permitted users can access this file system in Amazon SageMaker Studio.

" + "smithy.api#documentation": "

A file system, created by you, that you assign to a user profile or space for an Amazon SageMaker Domain. Permitted users can access this file system in Amazon SageMaker\n Studio.

" } }, "com.amazonaws.sagemaker#CustomFileSystemConfig": { @@ -14295,7 +14301,7 @@ } }, "traits": { - "smithy.api#documentation": "

The settings for assigning a custom file system to a user profile or space for an\n Amazon SageMaker Domain. Permitted users can access this file system in Amazon SageMaker Studio.

" + "smithy.api#documentation": "

The settings for assigning a custom file system to a user profile or space for an Amazon SageMaker Domain. Permitted users can access this file system in Amazon SageMaker\n Studio.

" } }, "com.amazonaws.sagemaker#CustomFileSystemConfigs": { @@ -15085,7 +15091,7 @@ } }, "traits": { - "smithy.api#documentation": "

The default settings for shared spaces that users create in the domain.

\n

SageMaker applies these settings only to shared spaces. It doesn't apply them to private spaces.

" + "smithy.api#documentation": "

The default settings for shared spaces that users create in the domain.

\n

SageMaker applies these settings only to shared spaces. It doesn't apply them to private\n spaces.

" } }, "com.amazonaws.sagemaker#DefaultSpaceStorageSettings": { @@ -23010,6 +23016,12 @@ "traits": { "smithy.api#documentation": "

The model card associated with the model package. Since ModelPackageModelCard is\n tied to a model package, it is a specific usage of a model card and its schema is\n simplified compared to the schema of ModelCard. The \n ModelPackageModelCard schema does not include model_package_details,\n and model_overview is composed of the model_creator and\n model_artifact properties. For more information about the model package model\n card schema, see Model\n package model card schema. For more information about\n the model card associated with the model package, see View\n the Details of a Model Version.

" } + }, + "ModelLifeCycle": { + "target": "com.amazonaws.sagemaker#ModelLifeCycle", + "traits": { + "smithy.api#documentation": "

\n A structure describing the current state of the model in its life cycle.\n

" + } } }, "traits": { @@ -26747,7 +26759,7 @@ } }, "traits": { - "smithy.api#documentation": "

A file system, created by you in Amazon EFS, that you assign to a user profile\n or space for an Amazon SageMaker Domain. Permitted users can access this file\n system in Amazon SageMaker Studio.

" + "smithy.api#documentation": "

A file system, created by you in Amazon EFS, that you assign to a user profile or\n space for an Amazon SageMaker Domain. Permitted users can access this file system in\n Amazon SageMaker Studio.

" } }, "com.amazonaws.sagemaker#EFSFileSystemConfig": { @@ -26764,12 +26776,12 @@ "FileSystemPath": { "target": "com.amazonaws.sagemaker#FileSystemPath", "traits": { - "smithy.api#documentation": "

The path to the file system directory that is accessible in Amazon SageMaker\n Studio. Permitted users can access only this directory and below.

" + "smithy.api#documentation": "

The path to the file system directory that is accessible in Amazon SageMaker Studio.\n Permitted users can access only this directory and below.

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

The settings for assigning a custom Amazon EFS file system to a user profile\n or space for an Amazon SageMaker Domain.

" + "smithy.api#documentation": "

The settings for assigning a custom Amazon EFS file system to a user profile or\n space for an Amazon SageMaker Domain.

" } }, "com.amazonaws.sagemaker#EMRStepMetadata": { @@ -30395,13 +30407,13 @@ "SageMakerImageName": { "target": "com.amazonaws.sagemaker#SageMakerImageName", "traits": { - "smithy.api#documentation": "

\n The SageMaker image name that you are hiding from the Studio user interface.\n

" + "smithy.api#documentation": "

The SageMaker image name that you are hiding from the Studio user interface.

" } }, "VersionAliases": { "target": "com.amazonaws.sagemaker#VersionAliasesList", "traits": { - "smithy.api#documentation": "

\n The version aliases you are hiding from the Studio user interface.\n

" + "smithy.api#documentation": "

The version aliases you are hiding from the Studio user interface.

" } } }, @@ -35569,7 +35581,7 @@ "BuiltInLifecycleConfigArn": { "target": "com.amazonaws.sagemaker#StudioLifecycleConfigArn", "traits": { - "smithy.api#documentation": "

The lifecycle configuration that runs before the default lifecycle configuration. It can override changes made in the default \n lifecycle configuration.

" + "smithy.api#documentation": "

The lifecycle configuration that runs before the default lifecycle configuration. It can\n override changes made in the default lifecycle configuration.

" } } }, @@ -46108,6 +46120,36 @@ } } }, + "com.amazonaws.sagemaker#ModelLifeCycle": { + "type": "structure", + "members": { + "Stage": { + "target": "com.amazonaws.sagemaker#EntityName", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#documentation": "

\n The current stage in the model life cycle.\n

", + "smithy.api#required": {} + } + }, + "StageStatus": { + "target": "com.amazonaws.sagemaker#EntityName", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#documentation": "

\n The current status of a stage in model life cycle.\n

", + "smithy.api#required": {} + } + }, + "StageDescription": { + "target": "com.amazonaws.sagemaker#StageDescription", + "traits": { + "smithy.api#documentation": "

\n Describes the stage related details.\n

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

\n A structure describing the current state of the model in its life cycle.\n

" + } + }, "com.amazonaws.sagemaker#ModelMetadataFilter": { "type": "structure", "members": { @@ -46446,6 +46488,12 @@ "ModelCard": { "target": "com.amazonaws.sagemaker#ModelPackageModelCard" }, + "ModelLifeCycle": { + "target": "com.amazonaws.sagemaker#ModelLifeCycle", + "traits": { + "smithy.api#documentation": "

\n A structure describing the current state of the model in its life cycle.\n

" + } + }, "Tags": { "target": "com.amazonaws.sagemaker#TagList", "traits": { @@ -61189,7 +61237,7 @@ "CustomFileSystems": { "target": "com.amazonaws.sagemaker#CustomFileSystems", "traits": { - "smithy.api#documentation": "

A file system, created by you, that you assign to a space for an Amazon SageMaker\n Domain. Permitted users can access this file system in Amazon SageMaker\n Studio.

" + "smithy.api#documentation": "

A file system, created by you, that you assign to a space for an Amazon SageMaker\n Domain. Permitted users can access this file system in Amazon SageMaker Studio.

" } } }, @@ -61362,6 +61410,16 @@ } } }, + "com.amazonaws.sagemaker#StageDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": "^.{0,1024}$" + } + }, "com.amazonaws.sagemaker#StageStatus": { "type": "enum", "members": { @@ -62755,13 +62813,13 @@ "HiddenInstanceTypes": { "target": "com.amazonaws.sagemaker#HiddenInstanceTypesList", "traits": { - "smithy.api#documentation": "

\n The instance types you are hiding from the Studio user interface.\n

" + "smithy.api#documentation": "

The instance types you are hiding from the Studio user interface.

" } }, "HiddenSageMakerImageVersionAliases": { "target": "com.amazonaws.sagemaker#HiddenSageMakerImageVersionAliasesList", "traits": { - "smithy.api#documentation": "

\n The version aliases you are hiding from the Studio user interface.\n

" + "smithy.api#documentation": "

The version aliases you are hiding from the Studio user interface.

" } } }, @@ -64617,12 +64675,6 @@ "smithy.api#enumValue": "ml.p5e.48xlarge" } }, - "ML_P5EN_48XLARGE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ml.p5en.48xlarge" - } - }, "ML_C5_XLARGE": { "target": "smithy.api#Unit", "traits": { @@ -64749,12 +64801,6 @@ "smithy.api#enumValue": "ml.trn1n.32xlarge" } }, - "ML_TRN2_48XLARGE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ml.trn2.48xlarge" - } - }, "ML_M6I_LARGE": { "target": "smithy.api#Unit", "traits": { @@ -68219,7 +68265,7 @@ "TagPropagation": { "target": "com.amazonaws.sagemaker#TagPropagation", "traits": { - "smithy.api#documentation": "

Indicates whether custom tag propagation is supported for the domain. Defaults to DISABLED.

" + "smithy.api#documentation": "

Indicates whether custom tag propagation is supported for the domain. Defaults to\n DISABLED.

" } } }, @@ -69243,6 +69289,18 @@ "traits": { "smithy.api#documentation": "

The model card associated with the model package. Since ModelPackageModelCard is\n tied to a model package, it is a specific usage of a model card and its schema is\n simplified compared to the schema of ModelCard. The \n ModelPackageModelCard schema does not include model_package_details,\n and model_overview is composed of the model_creator and\n model_artifact properties. For more information about the model package model\n card schema, see Model\n package model card schema. For more information about\n the model card associated with the model package, see View\n the Details of a Model Version.

" } + }, + "ModelLifeCycle": { + "target": "com.amazonaws.sagemaker#ModelLifeCycle", + "traits": { + "smithy.api#documentation": "

\n A structure describing the current state of the model in its life cycle.\n

" + } + }, + "ClientToken": { + "target": "com.amazonaws.sagemaker#ClientToken", + "traits": { + "smithy.api#documentation": "

\n A unique token that guarantees that the call to this API is idempotent.\n

" + } } }, "traits": { @@ -70544,7 +70602,7 @@ "CanvasAppSettings": { "target": "com.amazonaws.sagemaker#CanvasAppSettings", "traits": { - "smithy.api#documentation": "

The Canvas app settings.

\n

SageMaker applies these settings only to private spaces that SageMaker creates for the Canvas app.

" + "smithy.api#documentation": "

The Canvas app settings.

\n

SageMaker applies these settings only to private spaces that SageMaker creates for the Canvas\n app.

" } }, "CodeEditorAppSettings": { @@ -70828,7 +70886,7 @@ "min": 1, "max": 176 }, - "smithy.api#pattern": "^(arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:[a-z\\-]*\\/)?([a-zA-Z0-9]([a-zA-Z0-9-]){0,62})(?\n Creates the WorkMail application in IAM Identity Center that can be used later in the WorkMail - IdC integration. For more information, see PutIdentityProviderConfiguration. This action does not affect the authentication settings for any WorkMail organizations.\n

", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.workmail#CreateIdentityCenterApplicationRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.workmail#IdentityCenterApplicationName", + "traits": { + "smithy.api#documentation": "

\n The name of the IAM Identity Center application.\n \n \n

", + "smithy.api#required": {} + } + }, + "InstanceArn": { + "target": "com.amazonaws.workmail#InstanceArn", + "traits": { + "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) of the instance.\n

", + "smithy.api#required": {} + } + }, + "ClientToken": { + "target": "com.amazonaws.workmail#IdempotencyClientToken", + "traits": { + "smithy.api#documentation": "

\n The idempotency token associated with the request.\n \n \n

", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.workmail#CreateIdentityCenterApplicationResponse": { + "type": "structure", + "members": { + "ApplicationArn": { + "target": "com.amazonaws.workmail#ApplicationArn", + "traits": { + "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) of the application.\n

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.workmail#CreateImpersonationRole": { "type": "operation", "input": { @@ -1357,6 +1428,12 @@ "smithy.api#default": false, "smithy.api#documentation": "

If this parameter is enabled, the user will be hidden from the address book.

" } + }, + "IdentityProviderUserId": { + "target": "com.amazonaws.workmail#IdentityProviderUserId", + "traits": { + "smithy.api#documentation": "

User ID from the IAM Identity Center. If this parameter is empty it will be updated automatically when the user logs in for the first time to the mailbox associated with WorkMail.

" + } } }, "traits": { @@ -1675,6 +1752,95 @@ "smithy.api#output": {} } }, + "com.amazonaws.workmail#DeleteIdentityCenterApplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.workmail#DeleteIdentityCenterApplicationRequest" + }, + "output": { + "target": "com.amazonaws.workmail#DeleteIdentityCenterApplicationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.workmail#InvalidParameterException" + }, + { + "target": "com.amazonaws.workmail#OrganizationStateException" + } + ], + "traits": { + "smithy.api#documentation": "

\n Deletes the IAM Identity Center application from WorkMail. This action does not affect the authentication settings for any WorkMail organizations.\n

", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.workmail#DeleteIdentityCenterApplicationRequest": { + "type": "structure", + "members": { + "ApplicationArn": { + "target": "com.amazonaws.workmail#ApplicationArn", + "traits": { + "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) of the application.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.workmail#DeleteIdentityCenterApplicationResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.workmail#DeleteIdentityProviderConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.workmail#DeleteIdentityProviderConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.workmail#DeleteIdentityProviderConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.workmail#InvalidParameterException" + }, + { + "target": "com.amazonaws.workmail#OrganizationNotFoundException" + }, + { + "target": "com.amazonaws.workmail#OrganizationStateException" + } + ], + "traits": { + "smithy.api#documentation": "

\n Disables the integration between IdC and WorkMail. Authentication will continue with the directory as it was before the IdC integration. You might have to reset your directory passwords and reconfigure your desktop and mobile email clients.\n

", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.workmail#DeleteIdentityProviderConfigurationRequest": { + "type": "structure", + "members": { + "OrganizationId": { + "target": "com.amazonaws.workmail#OrganizationId", + "traits": { + "smithy.api#documentation": "

\nThe Organization ID.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.workmail#DeleteIdentityProviderConfigurationResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.workmail#DeleteImpersonationRole": { "type": "operation", "input": { @@ -1962,6 +2128,13 @@ "smithy.api#default": false, "smithy.api#documentation": "

Deletes a WorkMail organization even if the organization has enabled users.

" } + }, + "DeleteIdentityCenterApplication": { + "target": "com.amazonaws.workmail#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Deletes IAM Identity Center application for WorkMail. This action does not affect authentication settings for any organization.

" + } } }, "traits": { @@ -1988,6 +2161,59 @@ "smithy.api#output": {} } }, + "com.amazonaws.workmail#DeletePersonalAccessToken": { + "type": "operation", + "input": { + "target": "com.amazonaws.workmail#DeletePersonalAccessTokenRequest" + }, + "output": { + "target": "com.amazonaws.workmail#DeletePersonalAccessTokenResponse" + }, + "errors": [ + { + "target": "com.amazonaws.workmail#InvalidParameterException" + }, + { + "target": "com.amazonaws.workmail#OrganizationNotFoundException" + }, + { + "target": "com.amazonaws.workmail#OrganizationStateException" + } + ], + "traits": { + "smithy.api#documentation": "

\n Deletes the Personal Access Token from the provided WorkMail Organization.\n

", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.workmail#DeletePersonalAccessTokenRequest": { + "type": "structure", + "members": { + "OrganizationId": { + "target": "com.amazonaws.workmail#OrganizationId", + "traits": { + "smithy.api#documentation": "

\n The Organization ID.

", + "smithy.api#required": {} + } + }, + "PersonalAccessTokenId": { + "target": "com.amazonaws.workmail#PersonalAccessTokenId", + "traits": { + "smithy.api#documentation": "

\n The Personal Access Token ID.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.workmail#DeletePersonalAccessTokenResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.workmail#DeleteResource": { "type": "operation", "input": { @@ -2520,6 +2746,74 @@ "smithy.api#output": {} } }, + "com.amazonaws.workmail#DescribeIdentityProviderConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.workmail#DescribeIdentityProviderConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.workmail#DescribeIdentityProviderConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.workmail#InvalidParameterException" + }, + { + "target": "com.amazonaws.workmail#OrganizationNotFoundException" + }, + { + "target": "com.amazonaws.workmail#OrganizationStateException" + }, + { + "target": "com.amazonaws.workmail#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

\n Returns detailed information on the current IdC setup for the WorkMail organization.\n

", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.workmail#DescribeIdentityProviderConfigurationRequest": { + "type": "structure", + "members": { + "OrganizationId": { + "target": "com.amazonaws.workmail#OrganizationId", + "traits": { + "smithy.api#documentation": "

\n The Organization ID.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.workmail#DescribeIdentityProviderConfigurationResponse": { + "type": "structure", + "members": { + "AuthenticationMode": { + "target": "com.amazonaws.workmail#IdentityProviderAuthenticationMode", + "traits": { + "smithy.api#documentation": "

\nThe authentication mode used in WorkMail.

" + } + }, + "IdentityCenterConfiguration": { + "target": "com.amazonaws.workmail#IdentityCenterConfiguration", + "traits": { + "smithy.api#documentation": "

\n The details of the IAM Identity Center configuration. \n

" + } + }, + "PersonalAccessTokenConfiguration": { + "target": "com.amazonaws.workmail#PersonalAccessTokenConfiguration", + "traits": { + "smithy.api#documentation": "

\n The details of the Personal Access Token configuration.\n

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.workmail#DescribeInboundDmarcSettings": { "type": "operation", "input": { @@ -2942,6 +3236,12 @@ "target": "com.amazonaws.workmail#DescribeUserResponse" }, "errors": [ + { + "target": "com.amazonaws.workmail#DirectoryServiceAuthenticationFailedException" + }, + { + "target": "com.amazonaws.workmail#DirectoryUnavailableException" + }, { "target": "com.amazonaws.workmail#EntityNotFoundException" }, @@ -3123,6 +3423,18 @@ "traits": { "smithy.api#documentation": "

Office where the user is located.

" } + }, + "IdentityProviderUserId": { + "target": "com.amazonaws.workmail#IdentityProviderUserId", + "traits": { + "smithy.api#documentation": "

User ID from the IAM Identity Center. If this parameter is empty it will be updated automatically when the user logs in for the first time to the mailbox associated with WorkMail.

" + } + }, + "IdentityProviderIdentityStoreId": { + "target": "com.amazonaws.workmail#IdentityProviderIdentityStoreId", + "traits": { + "smithy.api#documentation": "

\n Identity Store ID from the IAM Identity Center. If this parameter is empty it will be updated automatically when the user logs in for the first time to the mailbox associated with WorkMail.\n

" + } } }, "traits": { @@ -4442,14 +4754,113 @@ "smithy.api#output": {} } }, - "com.amazonaws.workmail#Group": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.workmail#WorkMailIdentifier", - "traits": { - "smithy.api#documentation": "

The identifier of the group.

" - } + "com.amazonaws.workmail#GetPersonalAccessTokenMetadata": { + "type": "operation", + "input": { + "target": "com.amazonaws.workmail#GetPersonalAccessTokenMetadataRequest" + }, + "output": { + "target": "com.amazonaws.workmail#GetPersonalAccessTokenMetadataResponse" + }, + "errors": [ + { + "target": "com.amazonaws.workmail#InvalidParameterException" + }, + { + "target": "com.amazonaws.workmail#OrganizationNotFoundException" + }, + { + "target": "com.amazonaws.workmail#OrganizationStateException" + }, + { + "target": "com.amazonaws.workmail#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

\n Requests details of a specific Personal Access Token within the WorkMail organization.\n

", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.workmail#GetPersonalAccessTokenMetadataRequest": { + "type": "structure", + "members": { + "OrganizationId": { + "target": "com.amazonaws.workmail#OrganizationId", + "traits": { + "smithy.api#documentation": "

\n The Organization ID.

", + "smithy.api#required": {} + } + }, + "PersonalAccessTokenId": { + "target": "com.amazonaws.workmail#PersonalAccessTokenId", + "traits": { + "smithy.api#documentation": "

\n The Personal Access Token ID.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.workmail#GetPersonalAccessTokenMetadataResponse": { + "type": "structure", + "members": { + "PersonalAccessTokenId": { + "target": "com.amazonaws.workmail#PersonalAccessTokenId", + "traits": { + "smithy.api#documentation": "

\n The Personal Access Token ID.

" + } + }, + "UserId": { + "target": "com.amazonaws.workmail#WorkMailIdentifier", + "traits": { + "smithy.api#documentation": "

\n The WorkMail User ID. \n

" + } + }, + "Name": { + "target": "com.amazonaws.workmail#PersonalAccessTokenName", + "traits": { + "smithy.api#documentation": "

\n The Personal Access Token name.\n

" + } + }, + "DateCreated": { + "target": "com.amazonaws.workmail#Timestamp", + "traits": { + "smithy.api#documentation": "

\n The date when the Personal Access Token ID was created.\n

" + } + }, + "DateLastUsed": { + "target": "com.amazonaws.workmail#Timestamp", + "traits": { + "smithy.api#documentation": "

\n The date when the Personal Access Token ID was last used.\n

" + } + }, + "ExpiresTime": { + "target": "com.amazonaws.workmail#Timestamp", + "traits": { + "smithy.api#documentation": "

\n The time when the Personal Access Token ID will expire.\n

" + } + }, + "Scopes": { + "target": "com.amazonaws.workmail#PersonalAccessTokenScopeList", + "traits": { + "smithy.api#documentation": "

\n Lists all the Personal Access Token permissions for a mailbox.\n

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.workmail#Group": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.workmail#WorkMailIdentifier", + "traits": { + "smithy.api#documentation": "

The identifier of the group.

" + } }, "Email": { "target": "com.amazonaws.workmail#EmailAddress", @@ -4548,6 +4959,95 @@ "smithy.api#pattern": "^[\\x21-\\x7e]+$" } }, + "com.amazonaws.workmail#IdentityCenterApplicationName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 255 + }, + "smithy.api#pattern": "^[\\w+=,.@-]+$" + } + }, + "com.amazonaws.workmail#IdentityCenterConfiguration": { + "type": "structure", + "members": { + "InstanceArn": { + "target": "com.amazonaws.workmail#InstanceArn", + "traits": { + "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) of the of IAM Identity Center instance. Must be in the same AWS account and region as WorkMail organization.

", + "smithy.api#required": {} + } + }, + "ApplicationArn": { + "target": "com.amazonaws.workmail#ApplicationArn", + "traits": { + "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) of IAMIdentity Center Application for WorkMail. Must be created by the WorkMail API, see CreateIdentityCenterApplication.

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

\n The IAM Identity Center configuration.\n

" + } + }, + "com.amazonaws.workmail#IdentityProviderAuthenticationMode": { + "type": "enum", + "members": { + "IDENTITY_PROVIDER_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IDENTITY_PROVIDER_ONLY" + } + }, + "IDENTITY_PROVIDER_AND_DIRECTORY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IDENTITY_PROVIDER_AND_DIRECTORY" + } + } + } + }, + "com.amazonaws.workmail#IdentityProviderIdentityStoreId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 36 + }, + "smithy.api#pattern": "^d-[0-9a-f]{10}$|^[0-9a-f]{8}\\\\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\\\\b[0-9a-f]{12}$" + } + }, + "com.amazonaws.workmail#IdentityProviderUserId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 47 + }, + "smithy.api#pattern": "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$" + } + }, + "com.amazonaws.workmail#IdentityProviderUserIdForUpdate": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 47 + }, + "smithy.api#pattern": "^$|^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$" + } + }, + "com.amazonaws.workmail#IdentityProviderUserIdPrefix": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 47 + }, + "smithy.api#pattern": "^[A-Fa-f0-9-]+$" + } + }, "com.amazonaws.workmail#ImpersonationMatchedRule": { "type": "structure", "members": { @@ -4787,6 +5287,16 @@ "smithy.api#pattern": "^[\\x21-\\x7e]+$" } }, + "com.amazonaws.workmail#InstanceArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 10, + "max": 1124 + }, + "smithy.api#pattern": "^arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b):sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}$" + } + }, "com.amazonaws.workmail#InvalidConfigurationException": { "type": "structure", "members": { @@ -5067,6 +5577,9 @@ "target": "com.amazonaws.workmail#ListAvailabilityConfigurationsResponse" }, "errors": [ + { + "target": "com.amazonaws.workmail#InvalidParameterException" + }, { "target": "com.amazonaws.workmail#OrganizationNotFoundException" }, @@ -5958,6 +6471,95 @@ "smithy.api#output": {} } }, + "com.amazonaws.workmail#ListPersonalAccessTokens": { + "type": "operation", + "input": { + "target": "com.amazonaws.workmail#ListPersonalAccessTokensRequest" + }, + "output": { + "target": "com.amazonaws.workmail#ListPersonalAccessTokensResponse" + }, + "errors": [ + { + "target": "com.amazonaws.workmail#EntityNotFoundException" + }, + { + "target": "com.amazonaws.workmail#EntityStateException" + }, + { + "target": "com.amazonaws.workmail#InvalidParameterException" + }, + { + "target": "com.amazonaws.workmail#OrganizationNotFoundException" + }, + { + "target": "com.amazonaws.workmail#OrganizationStateException" + } + ], + "traits": { + "smithy.api#documentation": "

\n Returns a summary of your Personal Access Tokens.\n

", + "smithy.api#idempotent": {}, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "PersonalAccessTokenSummaries", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.workmail#ListPersonalAccessTokensRequest": { + "type": "structure", + "members": { + "OrganizationId": { + "target": "com.amazonaws.workmail#OrganizationId", + "traits": { + "smithy.api#documentation": "

\n The Organization ID.

", + "smithy.api#required": {} + } + }, + "UserId": { + "target": "com.amazonaws.workmail#EntityIdentifier", + "traits": { + "smithy.api#documentation": "

\n The WorkMail User ID. \n

" + } + }, + "NextToken": { + "target": "com.amazonaws.workmail#NextToken", + "traits": { + "smithy.api#documentation": "

\n The token from the previous response to query the next page.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.workmail#MaxResults", + "traits": { + "smithy.api#documentation": "

\n The maximum amount of items that should be returned in a response.\n

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.workmail#ListPersonalAccessTokensResponse": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.workmail#NextToken", + "traits": { + "smithy.api#documentation": "

\n The token from the previous response to query the next page.

" + } + }, + "PersonalAccessTokenSummaries": { + "target": "com.amazonaws.workmail#PersonalAccessTokenSummaryList", + "traits": { + "smithy.api#documentation": "

\n Lists all the personal tokens in an organization or user, if user ID is provided. \n

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.workmail#ListResourceDelegates": { "type": "operation", "input": { @@ -6262,6 +6864,12 @@ "traits": { "smithy.api#documentation": "

Filters only users with the provided state.

" } + }, + "IdentityProviderUserIdPrefix": { + "target": "com.amazonaws.workmail#IdentityProviderUserIdPrefix", + "traits": { + "smithy.api#documentation": "

Filters only users with the ID from the IAM Identity Center.

" + } } }, "traits": { @@ -6850,7 +7458,8 @@ "smithy.api#length": { "min": 0, "max": 64 - } + }, + "smithy.api#sensitive": {} } }, "com.amazonaws.workmail#NextToken": { @@ -7036,6 +7645,151 @@ "target": "com.amazonaws.workmail#Permission" } }, + "com.amazonaws.workmail#PersonalAccessTokenConfiguration": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.workmail#PersonalAccessTokenConfigurationStatus", + "traits": { + "smithy.api#documentation": "

\n The status of the Personal Access Token allowed for the organization.\n

\n
    \n
  • \n

    \n Active - Mailbox users can login to the web application and choose Settings to see the new Personal Access Tokens page to \n create and delete the Personal Access Tokens. Mailbox users can use the Personal Access Tokens to set up mailbox connection from desktop or mobile email clients.

    \n
  • \n
  • \n

    \n Inactive - Personal Access Tokens are disabled for your organization. Mailbox users can’t create, list, or delete Personal Access Tokens and can’t use them to connect to \n their mailboxes from desktop or mobile email clients.

    \n
  • \n
", + "smithy.api#required": {} + } + }, + "LifetimeInDays": { + "target": "com.amazonaws.workmail#PersonalAccessTokenLifetimeInDays", + "traits": { + "smithy.api#documentation": "

\n The validity of the Personal Access Token status in days.\n

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

\n Displays the Personal Access Token status.\n

" + } + }, + "com.amazonaws.workmail#PersonalAccessTokenConfigurationStatus": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INACTIVE" + } + } + } + }, + "com.amazonaws.workmail#PersonalAccessTokenId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_-]+$" + } + }, + "com.amazonaws.workmail#PersonalAccessTokenLifetimeInDays": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 3653 + } + } + }, + "com.amazonaws.workmail#PersonalAccessTokenName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[^\\x00-\\x1F\\x7F\\x3C\\x3E\\x5C]+$" + } + }, + "com.amazonaws.workmail#PersonalAccessTokenScope": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[^\\x00-\\x1F\\x7F\\x3C\\x3E\\x5C]+$" + } + }, + "com.amazonaws.workmail#PersonalAccessTokenScopeList": { + "type": "list", + "member": { + "target": "com.amazonaws.workmail#PersonalAccessTokenScope" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.workmail#PersonalAccessTokenSummary": { + "type": "structure", + "members": { + "PersonalAccessTokenId": { + "target": "com.amazonaws.workmail#PersonalAccessTokenId", + "traits": { + "smithy.api#documentation": "

\n The ID of the Personal Access Token.\n

" + } + }, + "UserId": { + "target": "com.amazonaws.workmail#WorkMailIdentifier", + "traits": { + "smithy.api#documentation": "

\n The user ID of the WorkMail user associated with the Personal Access Token.\n

" + } + }, + "Name": { + "target": "com.amazonaws.workmail#PersonalAccessTokenName", + "traits": { + "smithy.api#documentation": "

\n The name of the Personal Access Token.\n

" + } + }, + "DateCreated": { + "target": "com.amazonaws.workmail#Timestamp", + "traits": { + "smithy.api#documentation": "

\n The date when the Personal Access Token was created.\n

" + } + }, + "DateLastUsed": { + "target": "com.amazonaws.workmail#Timestamp", + "traits": { + "smithy.api#documentation": "

\n The date when the Personal Access Token was last used.\n

" + } + }, + "ExpiresTime": { + "target": "com.amazonaws.workmail#Timestamp", + "traits": { + "smithy.api#documentation": "

\n The date when the Personal Access Token will expire.\n

" + } + }, + "Scopes": { + "target": "com.amazonaws.workmail#PersonalAccessTokenScopeList", + "traits": { + "smithy.api#documentation": "

\n Lists all the Personal Access Token permissions for a mailbox.\n

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

\n The summary of the Personal Access Token.\n

" + } + }, + "com.amazonaws.workmail#PersonalAccessTokenSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.workmail#PersonalAccessTokenSummary" + } + }, "com.amazonaws.workmail#PolicyDescription": { "type": "string", "traits": { @@ -7233,6 +7987,76 @@ "smithy.api#output": {} } }, + "com.amazonaws.workmail#PutIdentityProviderConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.workmail#PutIdentityProviderConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.workmail#PutIdentityProviderConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.workmail#InvalidParameterException" + }, + { + "target": "com.amazonaws.workmail#OrganizationNotFoundException" + }, + { + "target": "com.amazonaws.workmail#OrganizationStateException" + }, + { + "target": "com.amazonaws.workmail#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

\n Enables integration between IAM Identity Center (IdC) and WorkMail to proxy authentication requests for mailbox users. You can connect your IdC directory or your external directory to WorkMail through \n IdC and manage access to WorkMail mailboxes in a single place. For enhanced protection, you could enable Multifactor Authentication (MFA) and Personal Access Tokens.\n \n

", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.workmail#PutIdentityProviderConfigurationRequest": { + "type": "structure", + "members": { + "OrganizationId": { + "target": "com.amazonaws.workmail#OrganizationId", + "traits": { + "smithy.api#documentation": "

\n The ID of the WorkMail Organization.

", + "smithy.api#required": {} + } + }, + "AuthenticationMode": { + "target": "com.amazonaws.workmail#IdentityProviderAuthenticationMode", + "traits": { + "smithy.api#documentation": "

\n The authentication mode used in WorkMail.

", + "smithy.api#required": {} + } + }, + "IdentityCenterConfiguration": { + "target": "com.amazonaws.workmail#IdentityCenterConfiguration", + "traits": { + "smithy.api#documentation": "

\n The details of the IAM Identity Center configuration.

", + "smithy.api#required": {} + } + }, + "PersonalAccessTokenConfiguration": { + "target": "com.amazonaws.workmail#PersonalAccessTokenConfiguration", + "traits": { + "smithy.api#documentation": "

\n The details of the Personal Access Token configuration. \n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.workmail#PutIdentityProviderConfigurationResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.workmail#PutInboundDmarcSettings": { "type": "operation", "input": { @@ -7837,7 +8661,8 @@ "smithy.api#length": { "min": 1, "max": 64 - } + }, + "smithy.api#sensitive": {} } }, "com.amazonaws.workmail#ResourceId": { @@ -8520,7 +9345,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates attibutes in a group.

", + "smithy.api#documentation": "

Updates attributes in a group.

", "smithy.api#idempotent": {} } }, @@ -9158,7 +9983,7 @@ "ZipCode": { "target": "com.amazonaws.workmail#UserAttribute", "traits": { - "smithy.api#documentation": "

Updates the user's zipcode.

" + "smithy.api#documentation": "

Updates the user's zip code.

" } }, "Department": { @@ -9178,6 +10003,12 @@ "traits": { "smithy.api#documentation": "

Updates the user's office.

" } + }, + "IdentityProviderUserId": { + "target": "com.amazonaws.workmail#IdentityProviderUserIdForUpdate", + "traits": { + "smithy.api#documentation": "

User ID from the IAM Identity Center. If this parameter is empty it will be updated automatically when the user logs in for the first time to the mailbox associated with WorkMail.

" + } } }, "traits": { @@ -9251,6 +10082,18 @@ "traits": { "smithy.api#documentation": "

The date indicating when the user was disabled from WorkMail use.

" } + }, + "IdentityProviderUserId": { + "target": "com.amazonaws.workmail#IdentityProviderUserId", + "traits": { + "smithy.api#documentation": "

User ID from the IAM Identity Center. If this parameter is empty it will be updated automatically when the user logs in for the first time to the mailbox associated with WorkMail.

" + } + }, + "IdentityProviderIdentityStoreId": { + "target": "com.amazonaws.workmail#IdentityProviderIdentityStoreId", + "traits": { + "smithy.api#documentation": "

Identity store ID from the IAM Identity Center. If this parameter is empty it will be updated automatically when the user logs in for the first time to the mailbox associated with WorkMail.

" + } } }, "traits": { @@ -9368,6 +10211,9 @@ { "target": "com.amazonaws.workmail#CreateGroup" }, + { + "target": "com.amazonaws.workmail#CreateIdentityCenterApplication" + }, { "target": "com.amazonaws.workmail#CreateImpersonationRole" }, @@ -9398,6 +10244,12 @@ { "target": "com.amazonaws.workmail#DeleteGroup" }, + { + "target": "com.amazonaws.workmail#DeleteIdentityCenterApplication" + }, + { + "target": "com.amazonaws.workmail#DeleteIdentityProviderConfiguration" + }, { "target": "com.amazonaws.workmail#DeleteImpersonationRole" }, @@ -9413,6 +10265,9 @@ { "target": "com.amazonaws.workmail#DeleteOrganization" }, + { + "target": "com.amazonaws.workmail#DeletePersonalAccessToken" + }, { "target": "com.amazonaws.workmail#DeleteResource" }, @@ -9437,6 +10292,9 @@ { "target": "com.amazonaws.workmail#DescribeGroup" }, + { + "target": "com.amazonaws.workmail#DescribeIdentityProviderConfiguration" + }, { "target": "com.amazonaws.workmail#DescribeInboundDmarcSettings" }, @@ -9482,6 +10340,9 @@ { "target": "com.amazonaws.workmail#GetMobileDeviceAccessOverride" }, + { + "target": "com.amazonaws.workmail#GetPersonalAccessTokenMetadata" + }, { "target": "com.amazonaws.workmail#ListAccessControlRules" }, @@ -9521,6 +10382,9 @@ { "target": "com.amazonaws.workmail#ListOrganizations" }, + { + "target": "com.amazonaws.workmail#ListPersonalAccessTokens" + }, { "target": "com.amazonaws.workmail#ListResourceDelegates" }, @@ -9539,6 +10403,9 @@ { "target": "com.amazonaws.workmail#PutEmailMonitoringConfiguration" }, + { + "target": "com.amazonaws.workmail#PutIdentityProviderConfiguration" + }, { "target": "com.amazonaws.workmail#PutInboundDmarcSettings" }, @@ -9656,7 +10523,6 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [ @@ -9699,7 +10565,8 @@ }, "type": "endpoint" } - ] + ], + "type": "tree" }, { "conditions": [ @@ -9712,7 +10579,6 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [ @@ -9726,7 +10592,6 @@ "assign": "PartitionResult" } ], - "type": "tree", "rules": [ { "conditions": [ @@ -9749,7 +10614,6 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [ @@ -9784,7 +10648,6 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [], @@ -9795,14 +10658,16 @@ }, "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": [ @@ -9816,14 +10681,12 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ - true, { "fn": "getAttr", "argv": [ @@ -9832,11 +10695,11 @@ }, "supportsFIPS" ] - } + }, + true ] } ], - "type": "tree", "rules": [ { "conditions": [], @@ -9847,14 +10710,16 @@ }, "type": "endpoint" } - ] + ], + "type": "tree" }, { "conditions": [], "error": "FIPS is enabled but this partition does not support FIPS", "type": "error" } - ] + ], + "type": "tree" }, { "conditions": [ @@ -9868,7 +10733,6 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [ @@ -9888,7 +10752,6 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [], @@ -9899,14 +10762,16 @@ }, "type": "endpoint" } - ] + ], + "type": "tree" }, { "conditions": [], "error": "DualStack is enabled but this partition does not support DualStack", "type": "error" } - ] + ], + "type": "tree" }, { "conditions": [], @@ -9917,9 +10782,11 @@ }, "type": "endpoint" } - ] + ], + "type": "tree" } - ] + ], + "type": "tree" }, { "conditions": [], From fe7423a2f978f4e0bd1cb60bc59a8c7b5e3170e9 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Wed, 30 Oct 2024 18:10:26 +0000 Subject: [PATCH 7/9] Update endpoints model --- .../software/amazon/smithy/aws/go/codegen/endpoints.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json b/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json index 402bb50da55..43bbe1e77d8 100644 --- a/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json +++ b/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json @@ -27551,6 +27551,12 @@ } } }, + "memory-db" : { + "endpoints" : { + "us-gov-east-1" : { }, + "us-gov-west-1" : { } + } + }, "metering.marketplace" : { "defaults" : { "credentialScope" : { From 6def3a8e17eab8b0ec7e66c9ccb197dbbb8609d1 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Wed, 30 Oct 2024 18:30:37 +0000 Subject: [PATCH 8/9] Regenerated Clients --- .../07276b2f174548288189b6e70ea1da72.json | 8 + .../0ca78f87247d48e1809b75d2c574349a.json | 8 + .../24a9ea866b694eaebcfee3f4a6a55d8b.json | 8 + .../41575353444b40ffbf474f4155544f00.json | 10 + .../49c02c9c096549e987e4a093dc950820.json | 8 + .../60382073c4c947cd9700acdcdec81fad.json | 8 + .../69e55b9752c645a4adc0bacc5ef30913.json | 8 + .../9a64f03491324848a391306721e3ce4a.json | 8 + .../a078a7b84fb04122b666ee0d2d0a383f.json | 8 + .../accfb1ecff6549ceb46d1adba3e85595.json | 8 + .../b19af23f9bfb44028e0c1a16cf400e8a.json | 8 + .../b3fdaf9818da4d229146b744ec30a8a0.json | 8 + .../bbcdb2cb47da4a23bd0adaed6937b057.json | 8 + .../be705c9d73c64c88af65d015dcc71285.json | 8 + .../cf2a79e28f904882a8c59a5d7c29aa6f.json | 8 + .../d5bb2186ba7f49698f4073622ae7a019.json | 8 + .../d5bd7876a09e4bafa8a7750e83dca271.json | 8 + .../ea67cb4153e541b9b977dcdf5d077ab2.json | 8 + .../attributevalue/go_module_metadata.go | 2 +- service/appsync/api_op_CreateApi.go | 169 + .../appsync/api_op_CreateChannelNamespace.go | 178 + service/appsync/api_op_DeleteApi.go | 152 + .../appsync/api_op_DeleteChannelNamespace.go | 157 + service/appsync/api_op_GetApi.go | 157 + service/appsync/api_op_GetChannelNamespace.go | 162 + .../api_op_GetDataSourceIntrospection.go | 6 +- service/appsync/api_op_ListApis.go | 251 + .../appsync/api_op_ListChannelNamespaces.go | 261 + service/appsync/api_op_UpdateApi.go | 169 + .../appsync/api_op_UpdateChannelNamespace.go | 175 + service/appsync/api_op_UpdateGraphqlApi.go | 8 +- service/appsync/deserializers.go | 3825 +++++-- service/appsync/generated.json | 10 + service/appsync/serializers.go | 1110 +- .../appsync/snapshot/api_op_CreateApi.go.snap | 41 + .../api_op_CreateChannelNamespace.go.snap | 41 + .../appsync/snapshot/api_op_DeleteApi.go.snap | 41 + .../api_op_DeleteChannelNamespace.go.snap | 41 + .../appsync/snapshot/api_op_GetApi.go.snap | 41 + .../api_op_GetChannelNamespace.go.snap | 41 + .../appsync/snapshot/api_op_ListApis.go.snap | 40 + .../api_op_ListChannelNamespaces.go.snap | 41 + .../appsync/snapshot/api_op_UpdateApi.go.snap | 41 + .../api_op_UpdateChannelNamespace.go.snap | 41 + service/appsync/snapshot_test.go | 240 + service/appsync/types/enums.go | 25 + service/appsync/types/errors.go | 55 + service/appsync/types/types.go | 205 +- service/appsync/validators.go | 559 +- service/connect/types/types.go | 5 + service/datasync/api_op_CreateAgent.go | 49 +- service/datasync/api_op_CreateLocationEfs.go | 35 +- .../api_op_CreateLocationFsxWindows.go | 10 +- service/datasync/api_op_CreateLocationHdfs.go | 6 +- service/datasync/api_op_CreateLocationNfs.go | 8 +- .../api_op_CreateLocationObjectStorage.go | 2 +- service/datasync/api_op_CreateLocationSmb.go | 4 +- service/datasync/api_op_CreateTask.go | 27 +- .../datasync/api_op_DescribeLocationEfs.go | 22 +- .../api_op_DescribeLocationFsxWindows.go | 9 +- .../datasync/api_op_DescribeLocationNfs.go | 3 +- service/datasync/api_op_DescribeTask.go | 9 +- .../datasync/api_op_DescribeTaskExecution.go | 122 +- service/datasync/api_op_StartTaskExecution.go | 2 +- service/datasync/api_op_UpdateLocationHdfs.go | 3 +- service/datasync/api_op_UpdateLocationNfs.go | 3 +- .../api_op_UpdateLocationObjectStorage.go | 2 +- service/datasync/api_op_UpdateLocationSmb.go | 4 +- service/datasync/api_op_UpdateTask.go | 9 + service/datasync/deserializers.go | 199 + service/datasync/serializers.go | 5 + service/datasync/types/enums.go | 19 + service/datasync/types/types.go | 218 +- .../ec2/api_op_AssociateSecurityGroupVpc.go | 182 + service/ec2/api_op_CreateNetworkInterface.go | 5 +- service/ec2/api_op_CreateSecurityGroup.go | 3 + .../ec2/api_op_CreateTrafficMirrorSession.go | 2 +- service/ec2/api_op_DeleteSecurityGroup.go | 4 +- service/ec2/api_op_DescribeInstanceTypes.go | 3 +- .../ec2/api_op_DescribeNetworkInterfaces.go | 4 +- .../api_op_DescribeSecurityGroupReferences.go | 5 +- ...op_DescribeSecurityGroupVpcAssociations.go | 291 + .../ec2/api_op_DescribeStaleSecurityGroups.go | 17 +- .../api_op_DisassociateSecurityGroupVpc.go | 175 + .../ec2/api_op_RevokeSecurityGroupEgress.go | 3 + .../ec2/api_op_RevokeSecurityGroupIngress.go | 3 + service/ec2/deserializers.go | 6520 ++++++----- service/ec2/generated.json | 3 + service/ec2/serializers.go | 283 + .../api_op_AssociateSecurityGroupVpc.go.snap | 41 + ...scribeSecurityGroupVpcAssociations.go.snap | 40 + ...pi_op_DisassociateSecurityGroupVpc.go.snap | 41 + service/ec2/snapshot_test.go | 72 + service/ec2/types/enums.go | 28 + service/ec2/types/types.go | 88 +- service/ec2/validators.go | 84 + service/ecs/api_op_CreateCluster.go | 3 +- service/ecs/api_op_CreateService.go | 4 +- .../ecs/api_op_DescribeServiceDeployments.go | 171 + .../ecs/api_op_DescribeServiceRevisions.go | 175 + service/ecs/api_op_ListServiceDeployments.go | 220 + service/ecs/api_op_RegisterTaskDefinition.go | 21 +- service/ecs/api_op_UpdateService.go | 2 +- service/ecs/deserializers.go | 1829 ++- service/ecs/generated.json | 3 + service/ecs/serializers.go | 280 + .../api_op_DescribeServiceDeployments.go.snap | 41 + .../api_op_DescribeServiceRevisions.go.snap | 41 + .../api_op_ListServiceDeployments.go.snap | 41 + service/ecs/snapshot_test.go | 72 + service/ecs/types/enums.go | 55 + service/ecs/types/types.go | 419 +- service/ecs/validators.go | 117 + service/geomaps/LICENSE.txt | 202 + service/geomaps/api_client.go | 913 ++ service/geomaps/api_client_test.go | 127 + service/geomaps/api_op_GetGlyphs.go | 338 + service/geomaps/api_op_GetSprites.go | 198 + service/geomaps/api_op_GetStaticMap.go | 271 + service/geomaps/api_op_GetStyleDescriptor.go | 218 + service/geomaps/api_op_GetTile.go | 194 + service/geomaps/auth.go | 313 + service/geomaps/deserializers.go | 1160 ++ service/geomaps/doc.go | 28 + service/geomaps/endpoints.go | 741 ++ service/geomaps/endpoints_config_test.go | 139 + service/geomaps/endpoints_test.go | 1006 ++ service/geomaps/generated.json | 37 + service/geomaps/go.mod | 16 + service/geomaps/go.sum | 2 + service/geomaps/go_module_metadata.go | 6 + .../geomaps/internal/endpoints/endpoints.go | 296 + .../internal/endpoints/endpoints_test.go | 11 + service/geomaps/options.go | 232 + service/geomaps/protocol_test.go | 3 + service/geomaps/serializers.go | 499 + .../geomaps/snapshot/api_op_GetGlyphs.go.snap | 41 + .../snapshot/api_op_GetSprites.go.snap | 41 + .../snapshot/api_op_GetStaticMap.go.snap | 41 + .../api_op_GetStyleDescriptor.go.snap | 41 + .../geomaps/snapshot/api_op_GetTile.go.snap | 41 + service/geomaps/snapshot_test.go | 182 + service/geomaps/types/enums.go | 137 + service/geomaps/types/errors.go | 117 + service/geomaps/types/types.go | 26 + service/geomaps/validators.go | 232 + service/geoplaces/LICENSE.txt | 202 + service/geoplaces/api_client.go | 913 ++ service/geoplaces/api_client_test.go | 127 + service/geoplaces/api_op_Autocomplete.go | 215 + service/geoplaces/api_op_Geocode.go | 205 + service/geoplaces/api_op_GetPlace.go | 256 + service/geoplaces/api_op_ReverseGeocode.go | 204 + service/geoplaces/api_op_SearchNearby.go | 210 + service/geoplaces/api_op_SearchText.go | 216 + service/geoplaces/api_op_Suggest.go | 213 + service/geoplaces/auth.go | 313 + service/geoplaces/deserializers.go | 5929 ++++++++++ service/geoplaces/doc.go | 30 + service/geoplaces/endpoints.go | 741 ++ service/geoplaces/endpoints_config_test.go | 139 + service/geoplaces/endpoints_test.go | 1006 ++ service/geoplaces/generated.json | 39 + service/geoplaces/go.mod | 16 + service/geoplaces/go.sum | 2 + service/geoplaces/go_module_metadata.go | 6 + .../geoplaces/internal/endpoints/endpoints.go | 296 + .../internal/endpoints/endpoints_test.go | 11 + service/geoplaces/options.go | 232 + service/geoplaces/protocol_test.go | 3 + service/geoplaces/serializers.go | 1368 +++ .../snapshot/api_op_Autocomplete.go.snap | 41 + .../geoplaces/snapshot/api_op_Geocode.go.snap | 40 + .../snapshot/api_op_GetPlace.go.snap | 41 + .../snapshot/api_op_ReverseGeocode.go.snap | 41 + .../snapshot/api_op_SearchNearby.go.snap | 41 + .../snapshot/api_op_SearchText.go.snap | 41 + .../geoplaces/snapshot/api_op_Suggest.go.snap | 41 + service/geoplaces/snapshot_test.go | 230 + service/geoplaces/types/enums.go | 611 + service/geoplaces/types/errors.go | 116 + service/geoplaces/types/types.go | 1335 +++ service/geoplaces/validators.go | 326 + service/georoutes/LICENSE.txt | 202 + service/georoutes/api_client.go | 913 ++ service/georoutes/api_client_test.go | 127 + service/georoutes/api_op_CalculateIsolines.go | 290 + .../georoutes/api_op_CalculateRouteMatrix.go | 246 + service/georoutes/api_op_CalculateRoutes.go | 314 + service/georoutes/api_op_OptimizeWaypoints.go | 251 + service/georoutes/api_op_SnapToRoads.go | 203 + service/georoutes/auth.go | 313 + service/georoutes/deserializers.go | 9873 +++++++++++++++++ service/georoutes/doc.go | 23 + service/georoutes/endpoints.go | 741 ++ service/georoutes/endpoints_config_test.go | 139 + service/georoutes/endpoints_test.go | 1006 ++ service/georoutes/generated.json | 37 + service/georoutes/go.mod | 16 + service/georoutes/go.sum | 2 + service/georoutes/go_module_metadata.go | 6 + .../georoutes/internal/endpoints/endpoints.go | 296 + .../internal/endpoints/endpoints_test.go | 11 + service/georoutes/options.go | 232 + service/georoutes/protocol_test.go | 3 + service/georoutes/serializers.go | 4096 +++++++ .../snapshot/api_op_CalculateIsolines.go.snap | 41 + .../api_op_CalculateRouteMatrix.go.snap | 41 + .../snapshot/api_op_CalculateRoutes.go.snap | 41 + .../snapshot/api_op_OptimizeWaypoints.go.snap | 41 + .../snapshot/api_op_SnapToRoads.go.snap | 41 + service/georoutes/snapshot_test.go | 182 + service/georoutes/types/enums.go | 1715 +++ service/georoutes/types/errors.go | 116 + service/georoutes/types/types.go | 4254 +++++++ service/georoutes/validators.go | 1344 +++ service/keyspaces/api_op_CreateKeyspace.go | 4 +- service/keyspaces/api_op_CreateTable.go | 4 +- service/keyspaces/api_op_CreateType.go | 196 + service/keyspaces/api_op_DeleteType.go | 171 + service/keyspaces/api_op_GetTable.go | 4 +- service/keyspaces/api_op_GetType.go | 204 + service/keyspaces/api_op_ListKeyspaces.go | 2 +- service/keyspaces/api_op_ListTables.go | 5 +- .../keyspaces/api_op_ListTagsForResource.go | 3 + service/keyspaces/api_op_ListTypes.go | 270 + service/keyspaces/deserializers.go | 1216 +- service/keyspaces/generated.json | 4 + service/keyspaces/serializers.go | 354 + .../snapshot/api_op_CreateType.go.snap | 41 + .../snapshot/api_op_DeleteType.go.snap | 41 + .../keyspaces/snapshot/api_op_GetType.go.snap | 41 + .../snapshot/api_op_ListTypes.go.snap | 41 + service/keyspaces/snapshot_test.go | 96 + service/keyspaces/types/enums.go | 23 + service/keyspaces/types/errors.go | 5 +- service/keyspaces/types/types.go | 21 + service/keyspaces/validators.go | 207 + .../memorydb/internal/endpoints/endpoints.go | 8 + service/networkfirewall/deserializers.go | 49 + service/networkfirewall/doc.go | 4 +- service/networkfirewall/serializers.go | 19 + service/networkfirewall/types/types.go | 24 + service/opensearch/api_client.go | 16 + .../api_op_AuthorizeVpcEndpointAccess.go | 11 +- .../opensearch/api_op_CreateApplication.go | 235 + service/opensearch/api_op_CreateDomain.go | 3 + .../opensearch/api_op_DeleteApplication.go | 152 + service/opensearch/api_op_GetApplication.go | 189 + service/opensearch/api_op_ListApplications.go | 259 + .../api_op_RevokeVpcEndpointAccess.go | 12 +- .../opensearch/api_op_UpdateApplication.go | 188 + .../opensearch/api_op_UpdateDomainConfig.go | 3 + service/opensearch/deserializers.go | 1815 ++- service/opensearch/generated.json | 5 + service/opensearch/options.go | 4 + service/opensearch/serializers.go | 568 + .../snapshot/api_op_CreateApplication.go.snap | 42 + .../snapshot/api_op_DeleteApplication.go.snap | 41 + .../snapshot/api_op_GetApplication.go.snap | 41 + .../snapshot/api_op_ListApplications.go.snap | 40 + .../snapshot/api_op_UpdateApplication.go.snap | 41 + service/opensearch/snapshot_test.go | 120 + service/opensearch/types/enums.go | 101 + service/opensearch/types/types.go | 172 + service/opensearch/validators.go | 167 +- .../api_op_CreateSecurityConfig.go | 4 + .../api_op_UpdateSecurityConfig.go | 3 + service/opensearchserverless/deserializers.go | 90 + service/opensearchserverless/serializers.go | 53 + service/opensearchserverless/types/enums.go | 50 + service/opensearchserverless/types/types.go | 67 + service/opensearchserverless/validators.go | 20 + service/redshift/api_op_CreateIntegration.go | 2 +- service/redshift/api_op_DeleteIntegration.go | 2 +- .../redshift/api_op_DescribeIntegrations.go | 2 +- service/redshift/api_op_DescribeTags.go | 2 +- service/redshift/api_op_ModifyIntegration.go | 2 +- service/redshift/types/errors.go | 4 +- .../api_op_CreateWorkgroup.go | 4 + .../api_op_UpdateWorkgroup.go | 4 + service/redshiftserverless/deserializers.go | 58 + service/redshiftserverless/serializers.go | 31 + service/redshiftserverless/types/enums.go | 19 + service/redshiftserverless/types/types.go | 19 + .../api_op_CreateQueryLoggingConfig.go | 9 +- service/route53/api_op_GetHostedZone.go | 6 + .../route53/api_op_ListHostedZonesByVPC.go | 5 + service/route53/types/enums.go | 10 + service/route53/types/types.go | 15 +- .../sagemaker/api_op_CreateModelPackage.go | 3 + .../api_op_CreatePresignedDomainUrl.go | 11 +- .../sagemaker/api_op_DescribeModelPackage.go | 3 + .../sagemaker/api_op_UpdateModelPackage.go | 6 + service/sagemaker/deserializers.go | 68 + service/sagemaker/serializers.go | 41 + service/sagemaker/types/enums.go | 4 - service/sagemaker/types/types.go | 22 + service/sagemaker/validators.go | 28 + .../api_op_CreateIdentityCenterApplication.go | 204 + service/workmail/api_op_CreateUser.go | 5 + .../api_op_DeleteIdentityCenterApplication.go | 154 + ..._op_DeleteIdentityProviderConfiguration.go | 156 + service/workmail/api_op_DeleteOrganization.go | 4 + .../api_op_DeletePersonalAccessToken.go | 157 + ...p_DescribeIdentityProviderConfiguration.go | 165 + service/workmail/api_op_DescribeUser.go | 10 + .../api_op_GetPersonalAccessTokenMetadata.go | 182 + .../api_op_ListPersonalAccessTokens.go | 265 + ...api_op_PutIdentityProviderConfiguration.go | 173 + service/workmail/api_op_UpdateGroup.go | 2 +- service/workmail/api_op_UpdateUser.go | 7 +- service/workmail/deserializers.go | 2672 ++++- service/workmail/endpoints.go | 2 +- service/workmail/generated.json | 8 + service/workmail/serializers.go | 750 +- ...op_CreateIdentityCenterApplication.go.snap | 42 + ...op_DeleteIdentityCenterApplication.go.snap | 41 + ...eleteIdentityProviderConfiguration.go.snap | 41 + .../api_op_DeletePersonalAccessToken.go.snap | 41 + ...cribeIdentityProviderConfiguration.go.snap | 41 + ..._op_GetPersonalAccessTokenMetadata.go.snap | 41 + .../api_op_ListPersonalAccessTokens.go.snap | 41 + ...p_PutIdentityProviderConfiguration.go.snap | 41 + service/workmail/snapshot_test.go | 192 + service/workmail/types/enums.go | 40 + service/workmail/types/types.go | 81 + service/workmail/validators.go | 371 + 328 files changed, 80358 insertions(+), 4918 deletions(-) create mode 100644 .changelog/07276b2f174548288189b6e70ea1da72.json create mode 100644 .changelog/0ca78f87247d48e1809b75d2c574349a.json create mode 100644 .changelog/24a9ea866b694eaebcfee3f4a6a55d8b.json create mode 100644 .changelog/41575353444b40ffbf474f4155544f00.json create mode 100644 .changelog/49c02c9c096549e987e4a093dc950820.json create mode 100644 .changelog/60382073c4c947cd9700acdcdec81fad.json create mode 100644 .changelog/69e55b9752c645a4adc0bacc5ef30913.json create mode 100644 .changelog/9a64f03491324848a391306721e3ce4a.json create mode 100644 .changelog/a078a7b84fb04122b666ee0d2d0a383f.json create mode 100644 .changelog/accfb1ecff6549ceb46d1adba3e85595.json create mode 100644 .changelog/b19af23f9bfb44028e0c1a16cf400e8a.json create mode 100644 .changelog/b3fdaf9818da4d229146b744ec30a8a0.json create mode 100644 .changelog/bbcdb2cb47da4a23bd0adaed6937b057.json create mode 100644 .changelog/be705c9d73c64c88af65d015dcc71285.json create mode 100644 .changelog/cf2a79e28f904882a8c59a5d7c29aa6f.json create mode 100644 .changelog/d5bb2186ba7f49698f4073622ae7a019.json create mode 100644 .changelog/d5bd7876a09e4bafa8a7750e83dca271.json create mode 100644 .changelog/ea67cb4153e541b9b977dcdf5d077ab2.json create mode 100644 service/appsync/api_op_CreateApi.go create mode 100644 service/appsync/api_op_CreateChannelNamespace.go create mode 100644 service/appsync/api_op_DeleteApi.go create mode 100644 service/appsync/api_op_DeleteChannelNamespace.go create mode 100644 service/appsync/api_op_GetApi.go create mode 100644 service/appsync/api_op_GetChannelNamespace.go create mode 100644 service/appsync/api_op_ListApis.go create mode 100644 service/appsync/api_op_ListChannelNamespaces.go create mode 100644 service/appsync/api_op_UpdateApi.go create mode 100644 service/appsync/api_op_UpdateChannelNamespace.go create mode 100644 service/appsync/snapshot/api_op_CreateApi.go.snap create mode 100644 service/appsync/snapshot/api_op_CreateChannelNamespace.go.snap create mode 100644 service/appsync/snapshot/api_op_DeleteApi.go.snap create mode 100644 service/appsync/snapshot/api_op_DeleteChannelNamespace.go.snap create mode 100644 service/appsync/snapshot/api_op_GetApi.go.snap create mode 100644 service/appsync/snapshot/api_op_GetChannelNamespace.go.snap create mode 100644 service/appsync/snapshot/api_op_ListApis.go.snap create mode 100644 service/appsync/snapshot/api_op_ListChannelNamespaces.go.snap create mode 100644 service/appsync/snapshot/api_op_UpdateApi.go.snap create mode 100644 service/appsync/snapshot/api_op_UpdateChannelNamespace.go.snap create mode 100644 service/ec2/api_op_AssociateSecurityGroupVpc.go create mode 100644 service/ec2/api_op_DescribeSecurityGroupVpcAssociations.go create mode 100644 service/ec2/api_op_DisassociateSecurityGroupVpc.go create mode 100644 service/ec2/snapshot/api_op_AssociateSecurityGroupVpc.go.snap create mode 100644 service/ec2/snapshot/api_op_DescribeSecurityGroupVpcAssociations.go.snap create mode 100644 service/ec2/snapshot/api_op_DisassociateSecurityGroupVpc.go.snap create mode 100644 service/ecs/api_op_DescribeServiceDeployments.go create mode 100644 service/ecs/api_op_DescribeServiceRevisions.go create mode 100644 service/ecs/api_op_ListServiceDeployments.go create mode 100644 service/ecs/snapshot/api_op_DescribeServiceDeployments.go.snap create mode 100644 service/ecs/snapshot/api_op_DescribeServiceRevisions.go.snap create mode 100644 service/ecs/snapshot/api_op_ListServiceDeployments.go.snap create mode 100644 service/geomaps/LICENSE.txt create mode 100644 service/geomaps/api_client.go create mode 100644 service/geomaps/api_client_test.go create mode 100644 service/geomaps/api_op_GetGlyphs.go create mode 100644 service/geomaps/api_op_GetSprites.go create mode 100644 service/geomaps/api_op_GetStaticMap.go create mode 100644 service/geomaps/api_op_GetStyleDescriptor.go create mode 100644 service/geomaps/api_op_GetTile.go create mode 100644 service/geomaps/auth.go create mode 100644 service/geomaps/deserializers.go create mode 100644 service/geomaps/doc.go create mode 100644 service/geomaps/endpoints.go create mode 100644 service/geomaps/endpoints_config_test.go create mode 100644 service/geomaps/endpoints_test.go create mode 100644 service/geomaps/generated.json create mode 100644 service/geomaps/go.mod create mode 100644 service/geomaps/go.sum create mode 100644 service/geomaps/go_module_metadata.go create mode 100644 service/geomaps/internal/endpoints/endpoints.go create mode 100644 service/geomaps/internal/endpoints/endpoints_test.go create mode 100644 service/geomaps/options.go create mode 100644 service/geomaps/protocol_test.go create mode 100644 service/geomaps/serializers.go create mode 100644 service/geomaps/snapshot/api_op_GetGlyphs.go.snap create mode 100644 service/geomaps/snapshot/api_op_GetSprites.go.snap create mode 100644 service/geomaps/snapshot/api_op_GetStaticMap.go.snap create mode 100644 service/geomaps/snapshot/api_op_GetStyleDescriptor.go.snap create mode 100644 service/geomaps/snapshot/api_op_GetTile.go.snap create mode 100644 service/geomaps/snapshot_test.go create mode 100644 service/geomaps/types/enums.go create mode 100644 service/geomaps/types/errors.go create mode 100644 service/geomaps/types/types.go create mode 100644 service/geomaps/validators.go create mode 100644 service/geoplaces/LICENSE.txt create mode 100644 service/geoplaces/api_client.go create mode 100644 service/geoplaces/api_client_test.go create mode 100644 service/geoplaces/api_op_Autocomplete.go create mode 100644 service/geoplaces/api_op_Geocode.go create mode 100644 service/geoplaces/api_op_GetPlace.go create mode 100644 service/geoplaces/api_op_ReverseGeocode.go create mode 100644 service/geoplaces/api_op_SearchNearby.go create mode 100644 service/geoplaces/api_op_SearchText.go create mode 100644 service/geoplaces/api_op_Suggest.go create mode 100644 service/geoplaces/auth.go create mode 100644 service/geoplaces/deserializers.go create mode 100644 service/geoplaces/doc.go create mode 100644 service/geoplaces/endpoints.go create mode 100644 service/geoplaces/endpoints_config_test.go create mode 100644 service/geoplaces/endpoints_test.go create mode 100644 service/geoplaces/generated.json create mode 100644 service/geoplaces/go.mod create mode 100644 service/geoplaces/go.sum create mode 100644 service/geoplaces/go_module_metadata.go create mode 100644 service/geoplaces/internal/endpoints/endpoints.go create mode 100644 service/geoplaces/internal/endpoints/endpoints_test.go create mode 100644 service/geoplaces/options.go create mode 100644 service/geoplaces/protocol_test.go create mode 100644 service/geoplaces/serializers.go create mode 100644 service/geoplaces/snapshot/api_op_Autocomplete.go.snap create mode 100644 service/geoplaces/snapshot/api_op_Geocode.go.snap create mode 100644 service/geoplaces/snapshot/api_op_GetPlace.go.snap create mode 100644 service/geoplaces/snapshot/api_op_ReverseGeocode.go.snap create mode 100644 service/geoplaces/snapshot/api_op_SearchNearby.go.snap create mode 100644 service/geoplaces/snapshot/api_op_SearchText.go.snap create mode 100644 service/geoplaces/snapshot/api_op_Suggest.go.snap create mode 100644 service/geoplaces/snapshot_test.go create mode 100644 service/geoplaces/types/enums.go create mode 100644 service/geoplaces/types/errors.go create mode 100644 service/geoplaces/types/types.go create mode 100644 service/geoplaces/validators.go create mode 100644 service/georoutes/LICENSE.txt create mode 100644 service/georoutes/api_client.go create mode 100644 service/georoutes/api_client_test.go create mode 100644 service/georoutes/api_op_CalculateIsolines.go create mode 100644 service/georoutes/api_op_CalculateRouteMatrix.go create mode 100644 service/georoutes/api_op_CalculateRoutes.go create mode 100644 service/georoutes/api_op_OptimizeWaypoints.go create mode 100644 service/georoutes/api_op_SnapToRoads.go create mode 100644 service/georoutes/auth.go create mode 100644 service/georoutes/deserializers.go create mode 100644 service/georoutes/doc.go create mode 100644 service/georoutes/endpoints.go create mode 100644 service/georoutes/endpoints_config_test.go create mode 100644 service/georoutes/endpoints_test.go create mode 100644 service/georoutes/generated.json create mode 100644 service/georoutes/go.mod create mode 100644 service/georoutes/go.sum create mode 100644 service/georoutes/go_module_metadata.go create mode 100644 service/georoutes/internal/endpoints/endpoints.go create mode 100644 service/georoutes/internal/endpoints/endpoints_test.go create mode 100644 service/georoutes/options.go create mode 100644 service/georoutes/protocol_test.go create mode 100644 service/georoutes/serializers.go create mode 100644 service/georoutes/snapshot/api_op_CalculateIsolines.go.snap create mode 100644 service/georoutes/snapshot/api_op_CalculateRouteMatrix.go.snap create mode 100644 service/georoutes/snapshot/api_op_CalculateRoutes.go.snap create mode 100644 service/georoutes/snapshot/api_op_OptimizeWaypoints.go.snap create mode 100644 service/georoutes/snapshot/api_op_SnapToRoads.go.snap create mode 100644 service/georoutes/snapshot_test.go create mode 100644 service/georoutes/types/enums.go create mode 100644 service/georoutes/types/errors.go create mode 100644 service/georoutes/types/types.go create mode 100644 service/georoutes/validators.go create mode 100644 service/keyspaces/api_op_CreateType.go create mode 100644 service/keyspaces/api_op_DeleteType.go create mode 100644 service/keyspaces/api_op_GetType.go create mode 100644 service/keyspaces/api_op_ListTypes.go create mode 100644 service/keyspaces/snapshot/api_op_CreateType.go.snap create mode 100644 service/keyspaces/snapshot/api_op_DeleteType.go.snap create mode 100644 service/keyspaces/snapshot/api_op_GetType.go.snap create mode 100644 service/keyspaces/snapshot/api_op_ListTypes.go.snap create mode 100644 service/opensearch/api_op_CreateApplication.go create mode 100644 service/opensearch/api_op_DeleteApplication.go create mode 100644 service/opensearch/api_op_GetApplication.go create mode 100644 service/opensearch/api_op_ListApplications.go create mode 100644 service/opensearch/api_op_UpdateApplication.go create mode 100644 service/opensearch/snapshot/api_op_CreateApplication.go.snap create mode 100644 service/opensearch/snapshot/api_op_DeleteApplication.go.snap create mode 100644 service/opensearch/snapshot/api_op_GetApplication.go.snap create mode 100644 service/opensearch/snapshot/api_op_ListApplications.go.snap create mode 100644 service/opensearch/snapshot/api_op_UpdateApplication.go.snap create mode 100644 service/workmail/api_op_CreateIdentityCenterApplication.go create mode 100644 service/workmail/api_op_DeleteIdentityCenterApplication.go create mode 100644 service/workmail/api_op_DeleteIdentityProviderConfiguration.go create mode 100644 service/workmail/api_op_DeletePersonalAccessToken.go create mode 100644 service/workmail/api_op_DescribeIdentityProviderConfiguration.go create mode 100644 service/workmail/api_op_GetPersonalAccessTokenMetadata.go create mode 100644 service/workmail/api_op_ListPersonalAccessTokens.go create mode 100644 service/workmail/api_op_PutIdentityProviderConfiguration.go create mode 100644 service/workmail/snapshot/api_op_CreateIdentityCenterApplication.go.snap create mode 100644 service/workmail/snapshot/api_op_DeleteIdentityCenterApplication.go.snap create mode 100644 service/workmail/snapshot/api_op_DeleteIdentityProviderConfiguration.go.snap create mode 100644 service/workmail/snapshot/api_op_DeletePersonalAccessToken.go.snap create mode 100644 service/workmail/snapshot/api_op_DescribeIdentityProviderConfiguration.go.snap create mode 100644 service/workmail/snapshot/api_op_GetPersonalAccessTokenMetadata.go.snap create mode 100644 service/workmail/snapshot/api_op_ListPersonalAccessTokens.go.snap create mode 100644 service/workmail/snapshot/api_op_PutIdentityProviderConfiguration.go.snap diff --git a/.changelog/07276b2f174548288189b6e70ea1da72.json b/.changelog/07276b2f174548288189b6e70ea1da72.json new file mode 100644 index 00000000000..9ea8386559b --- /dev/null +++ b/.changelog/07276b2f174548288189b6e70ea1da72.json @@ -0,0 +1,8 @@ +{ + "id": "07276b2f-1745-4828-8189-b6e70ea1da72", + "type": "feature", + "description": "Neo Integration via IAM Identity Center (IdC)", + "modules": [ + "service/opensearchserverless" + ] +} \ No newline at end of file diff --git a/.changelog/0ca78f87247d48e1809b75d2c574349a.json b/.changelog/0ca78f87247d48e1809b75d2c574349a.json new file mode 100644 index 00000000000..f328b3f470f --- /dev/null +++ b/.changelog/0ca78f87247d48e1809b75d2c574349a.json @@ -0,0 +1,8 @@ +{ + "id": "0ca78f87-247d-48e1-809b-75d2c574349a", + "type": "feature", + "description": "Release of Amazon Location Maps API. Maps enables you to build digital maps that showcase your locations, visualize your data, and unlock insights to drive your business", + "modules": [ + "service/geomaps" + ] +} \ No newline at end of file diff --git a/.changelog/24a9ea866b694eaebcfee3f4a6a55d8b.json b/.changelog/24a9ea866b694eaebcfee3f4a6a55d8b.json new file mode 100644 index 00000000000..a2258dc2658 --- /dev/null +++ b/.changelog/24a9ea866b694eaebcfee3f4a6a55d8b.json @@ -0,0 +1,8 @@ +{ + "id": "24a9ea86-6b69-4eae-bcfe-e3f4a6a55d8b", + "type": "feature", + "description": "This release adds support for TLSA, SSHFP, SVCB, and HTTPS record types.", + "modules": [ + "service/route53" + ] +} \ No newline at end of file diff --git a/.changelog/41575353444b40ffbf474f4155544f00.json b/.changelog/41575353444b40ffbf474f4155544f00.json new file mode 100644 index 00000000000..30f577bdcb1 --- /dev/null +++ b/.changelog/41575353444b40ffbf474f4155544f00.json @@ -0,0 +1,10 @@ +{ + "id": "41575353-444b-40ff-bf47-4f4155544f00", + "type": "release", + "description": "New AWS service client module", + "modules": [ + "service/geomaps", + "service/geoplaces", + "service/georoutes" + ] +} \ No newline at end of file diff --git a/.changelog/49c02c9c096549e987e4a093dc950820.json b/.changelog/49c02c9c096549e987e4a093dc950820.json new file mode 100644 index 00000000000..6ee79ccd638 --- /dev/null +++ b/.changelog/49c02c9c096549e987e4a093dc950820.json @@ -0,0 +1,8 @@ +{ + "id": "49c02c9c-0965-49e9-87e4-a093dc950820", + "type": "feature", + "description": "Adds and updates API members for the Redshift Serverless AI-driven scaling and optimization feature using the price-performance target setting.", + "modules": [ + "service/redshiftserverless" + ] +} \ No newline at end of file diff --git a/.changelog/60382073c4c947cd9700acdcdec81fad.json b/.changelog/60382073c4c947cd9700acdcdec81fad.json new file mode 100644 index 00000000000..4de8a228f1f --- /dev/null +++ b/.changelog/60382073c4c947cd9700acdcdec81fad.json @@ -0,0 +1,8 @@ +{ + "id": "60382073-c4c9-47cd-9700-acdcdec81fad", + "type": "feature", + "description": "This release adds two new capabilities to VPC Security Groups: Security Group VPC Associations and Shared Security Groups.", + "modules": [ + "service/ec2" + ] +} \ No newline at end of file diff --git a/.changelog/69e55b9752c645a4adc0bacc5ef30913.json b/.changelog/69e55b9752c645a4adc0bacc5ef30913.json new file mode 100644 index 00000000000..5b5c45c4301 --- /dev/null +++ b/.changelog/69e55b9752c645a4adc0bacc5ef30913.json @@ -0,0 +1,8 @@ +{ + "id": "69e55b97-52c6-45a4-adc0-bacc5ef30913", + "type": "feature", + "description": "Release of Amazon Location Places API. Places enables you to quickly search, display, and filter places, businesses, and locations based on proximity, category, and name", + "modules": [ + "service/geoplaces" + ] +} \ No newline at end of file diff --git a/.changelog/9a64f03491324848a391306721e3ce4a.json b/.changelog/9a64f03491324848a391306721e3ce4a.json new file mode 100644 index 00000000000..6e017a60543 --- /dev/null +++ b/.changelog/9a64f03491324848a391306721e3ce4a.json @@ -0,0 +1,8 @@ +{ + "id": "9a64f034-9132-4848-a391-306721e3ce4a", + "type": "feature", + "description": "Release of Amazon Location Routes API. Routes enables you to plan efficient routes and streamline deliveries by leveraging real-time traffic, vehicle restrictions, and turn-by-turn directions.", + "modules": [ + "service/georoutes" + ] +} \ No newline at end of file diff --git a/.changelog/a078a7b84fb04122b666ee0d2d0a383f.json b/.changelog/a078a7b84fb04122b666ee0d2d0a383f.json new file mode 100644 index 00000000000..a1ad31e4072 --- /dev/null +++ b/.changelog/a078a7b84fb04122b666ee0d2d0a383f.json @@ -0,0 +1,8 @@ +{ + "id": "a078a7b8-4fb0-4122-b666-ee0d2d0a383f", + "type": "feature", + "description": "Adds support for interacting with user-defined types (UDTs) through the following new operations: Create-Type, Delete-Type, List-Types, Get-Type.", + "modules": [ + "service/keyspaces" + ] +} \ No newline at end of file diff --git a/.changelog/accfb1ecff6549ceb46d1adba3e85595.json b/.changelog/accfb1ecff6549ceb46d1adba3e85595.json new file mode 100644 index 00000000000..988c0ab17de --- /dev/null +++ b/.changelog/accfb1ecff6549ceb46d1adba3e85595.json @@ -0,0 +1,8 @@ +{ + "id": "accfb1ec-ff65-49ce-b46d-1adba3e85595", + "type": "feature", + "description": "AWS DataSync now supports Enhanced mode tasks. This task mode supports transfer of virtually unlimited numbers of objects with enhanced metrics, more detailed logs, and higher performance than Basic mode. This mode currently supports transfers between Amazon S3 locations.", + "modules": [ + "service/datasync" + ] +} \ No newline at end of file diff --git a/.changelog/b19af23f9bfb44028e0c1a16cf400e8a.json b/.changelog/b19af23f9bfb44028e0c1a16cf400e8a.json new file mode 100644 index 00000000000..9c29a79c8d8 --- /dev/null +++ b/.changelog/b19af23f9bfb44028e0c1a16cf400e8a.json @@ -0,0 +1,8 @@ +{ + "id": "b19af23f-9bfb-4402-8e0c-1a16cf400e8a", + "type": "feature", + "description": "This release supports service deployments and service revisions which provide a comprehensive view of your Amazon ECS service history.", + "modules": [ + "service/ecs" + ] +} \ No newline at end of file diff --git a/.changelog/b3fdaf9818da4d229146b744ec30a8a0.json b/.changelog/b3fdaf9818da4d229146b744ec30a8a0.json new file mode 100644 index 00000000000..8b651a0e5cf --- /dev/null +++ b/.changelog/b3fdaf9818da4d229146b744ec30a8a0.json @@ -0,0 +1,8 @@ +{ + "id": "b3fdaf98-18da-4d22-9146-b744ec30a8a0", + "type": "feature", + "description": "Updated the public documentation for the UserIdentityInfo object to accurately reflect the character limits for the FirstName and LastName fields, which were previously listed as 1-100 characters.", + "modules": [ + "service/connect" + ] +} \ No newline at end of file diff --git a/.changelog/bbcdb2cb47da4a23bd0adaed6937b057.json b/.changelog/bbcdb2cb47da4a23bd0adaed6937b057.json new file mode 100644 index 00000000000..6d038cf5203 --- /dev/null +++ b/.changelog/bbcdb2cb47da4a23bd0adaed6937b057.json @@ -0,0 +1,8 @@ +{ + "id": "bbcdb2cb-47da-4a23-bd0a-daed6937b057", + "type": "feature", + "description": "AWS Network Firewall now supports configuring TCP idle timeout", + "modules": [ + "service/networkfirewall" + ] +} \ No newline at end of file diff --git a/.changelog/be705c9d73c64c88af65d015dcc71285.json b/.changelog/be705c9d73c64c88af65d015dcc71285.json new file mode 100644 index 00000000000..352f8e3826f --- /dev/null +++ b/.changelog/be705c9d73c64c88af65d015dcc71285.json @@ -0,0 +1,8 @@ +{ + "id": "be705c9d-73c6-4c88-af65-d015dcc71285", + "type": "feature", + "description": "This release adds support for Multi-Factor Authentication (MFA) and Personal Access Tokens through integration with AWS IAM Identity Center.", + "modules": [ + "service/workmail" + ] +} \ No newline at end of file diff --git a/.changelog/cf2a79e28f904882a8c59a5d7c29aa6f.json b/.changelog/cf2a79e28f904882a8c59a5d7c29aa6f.json new file mode 100644 index 00000000000..d50ff90fd00 --- /dev/null +++ b/.changelog/cf2a79e28f904882a8c59a5d7c29aa6f.json @@ -0,0 +1,8 @@ +{ + "id": "cf2a79e2-8f90-4882-a8c5-9a5d7c29aa6f", + "type": "feature", + "description": "Added support for Model Registry Staging construct. Users can define series of stages that models can progress through for model workflows and lifecycle. This simplifies tracking and managing models as they transition through development, testing, and production stages.", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/d5bb2186ba7f49698f4073622ae7a019.json b/.changelog/d5bb2186ba7f49698f4073622ae7a019.json new file mode 100644 index 00000000000..641d410e777 --- /dev/null +++ b/.changelog/d5bb2186ba7f49698f4073622ae7a019.json @@ -0,0 +1,8 @@ +{ + "id": "d5bb2186-ba7f-4969-8f40-73622ae7a019", + "type": "feature", + "description": "This release launches S3 event integrations to create and manage integrations from an Amazon S3 source into an Amazon Redshift database.", + "modules": [ + "service/redshift" + ] +} \ No newline at end of file diff --git a/.changelog/d5bd7876a09e4bafa8a7750e83dca271.json b/.changelog/d5bd7876a09e4bafa8a7750e83dca271.json new file mode 100644 index 00000000000..7bc6e7b0d39 --- /dev/null +++ b/.changelog/d5bd7876a09e4bafa8a7750e83dca271.json @@ -0,0 +1,8 @@ +{ + "id": "d5bd7876-a09e-4baf-a8a7-750e83dca271", + "type": "feature", + "description": "This release introduces the new OpenSearch user interface (Dashboards), a new web-based application that can be associated with multiple data sources across OpenSearch managed clusters, serverless collections, and Amazon S3, so that users can gain a comprehensive insights in an unified interface.", + "modules": [ + "service/opensearch" + ] +} \ No newline at end of file diff --git a/.changelog/ea67cb4153e541b9b977dcdf5d077ab2.json b/.changelog/ea67cb4153e541b9b977dcdf5d077ab2.json new file mode 100644 index 00000000000..46ea328aa94 --- /dev/null +++ b/.changelog/ea67cb4153e541b9b977dcdf5d077ab2.json @@ -0,0 +1,8 @@ +{ + "id": "ea67cb41-53e5-41b9-b977-dcdf5d077ab2", + "type": "feature", + "description": "This release adds support for AppSync Event APIs.", + "modules": [ + "service/appsync" + ] +} \ No newline at end of file diff --git a/feature/dynamodbstreams/attributevalue/go_module_metadata.go b/feature/dynamodbstreams/attributevalue/go_module_metadata.go index d2c5ca8ee08..04358c081d7 100644 --- a/feature/dynamodbstreams/attributevalue/go_module_metadata.go +++ b/feature/dynamodbstreams/attributevalue/go_module_metadata.go @@ -3,4 +3,4 @@ package attributevalue // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.14.45" +const goModuleVersion = "1.15.13" diff --git a/service/appsync/api_op_CreateApi.go b/service/appsync/api_op_CreateApi.go new file mode 100644 index 00000000000..ce36f798b1a --- /dev/null +++ b/service/appsync/api_op_CreateApi.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package appsync + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/appsync/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an Api object. Use this operation to create an AppSync API with your +// preferred configuration, such as an Event API that provides real-time message +// publishing and message subscriptions over WebSockets. +func (c *Client) CreateApi(ctx context.Context, params *CreateApiInput, optFns ...func(*Options)) (*CreateApiOutput, error) { + if params == nil { + params = &CreateApiInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateApi", params, optFns, c.addOperationCreateApiMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateApiOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateApiInput struct { + + // The name for the Api . + // + // This member is required. + Name *string + + // The Event API configuration. This includes the default authorization + // configuration for connecting, publishing, and subscribing to an Event API. + EventConfig *types.EventConfig + + // The owner contact information for the Api . + OwnerContact *string + + // A map with keys of TagKey objects and values of TagValue objects. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateApiOutput struct { + + // The Api object. + Api *types.Api + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateApiMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateApi{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateApi{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateApi"); 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 = addSpanRetryLoop(stack, options); 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 = addOpCreateApiValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateApi(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateApi(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateApi", + } +} diff --git a/service/appsync/api_op_CreateChannelNamespace.go b/service/appsync/api_op_CreateChannelNamespace.go new file mode 100644 index 00000000000..f2d574d4c76 --- /dev/null +++ b/service/appsync/api_op_CreateChannelNamespace.go @@ -0,0 +1,178 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package appsync + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/appsync/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a ChannelNamespace for an Api . +func (c *Client) CreateChannelNamespace(ctx context.Context, params *CreateChannelNamespaceInput, optFns ...func(*Options)) (*CreateChannelNamespaceOutput, error) { + if params == nil { + params = &CreateChannelNamespaceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateChannelNamespace", params, optFns, c.addOperationCreateChannelNamespaceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateChannelNamespaceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateChannelNamespaceInput struct { + + // The Api ID. + // + // This member is required. + ApiId *string + + // The name of the ChannelNamespace . This name must be unique within the Api + // + // This member is required. + Name *string + + // The event handler functions that run custom business logic to process published + // events and subscribe requests. + CodeHandlers *string + + // The authorization mode to use for publishing messages on the channel namespace. + // This configuration overrides the default Api authorization configuration. + PublishAuthModes []types.AuthMode + + // The authorization mode to use for subscribing to messages on the channel + // namespace. This configuration overrides the default Api authorization + // configuration. + SubscribeAuthModes []types.AuthMode + + // A map with keys of TagKey objects and values of TagValue objects. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateChannelNamespaceOutput struct { + + // The ChannelNamespace object. + ChannelNamespace *types.ChannelNamespace + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateChannelNamespaceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateChannelNamespace{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateChannelNamespace{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateChannelNamespace"); 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 = addSpanRetryLoop(stack, options); 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 = addOpCreateChannelNamespaceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateChannelNamespace(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateChannelNamespace(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateChannelNamespace", + } +} diff --git a/service/appsync/api_op_DeleteApi.go b/service/appsync/api_op_DeleteApi.go new file mode 100644 index 00000000000..584b850fe31 --- /dev/null +++ b/service/appsync/api_op_DeleteApi.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package appsync + +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 an Api object +func (c *Client) DeleteApi(ctx context.Context, params *DeleteApiInput, optFns ...func(*Options)) (*DeleteApiOutput, error) { + if params == nil { + params = &DeleteApiInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteApi", params, optFns, c.addOperationDeleteApiMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteApiOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteApiInput struct { + + // The Api ID. + // + // This member is required. + ApiId *string + + noSmithyDocumentSerde +} + +type DeleteApiOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteApiMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteApi{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteApi{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteApi"); 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 = addSpanRetryLoop(stack, options); 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 = addOpDeleteApiValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteApi(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteApi(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteApi", + } +} diff --git a/service/appsync/api_op_DeleteChannelNamespace.go b/service/appsync/api_op_DeleteChannelNamespace.go new file mode 100644 index 00000000000..e4e714b393e --- /dev/null +++ b/service/appsync/api_op_DeleteChannelNamespace.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package appsync + +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 ChannelNamespace . +func (c *Client) DeleteChannelNamespace(ctx context.Context, params *DeleteChannelNamespaceInput, optFns ...func(*Options)) (*DeleteChannelNamespaceOutput, error) { + if params == nil { + params = &DeleteChannelNamespaceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteChannelNamespace", params, optFns, c.addOperationDeleteChannelNamespaceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteChannelNamespaceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteChannelNamespaceInput struct { + + // The ID of the Api associated with the ChannelNamespace . + // + // This member is required. + ApiId *string + + // The name of the ChannelNamespace . + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type DeleteChannelNamespaceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteChannelNamespaceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteChannelNamespace{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteChannelNamespace{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteChannelNamespace"); 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 = addSpanRetryLoop(stack, options); 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 = addOpDeleteChannelNamespaceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteChannelNamespace(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteChannelNamespace(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteChannelNamespace", + } +} diff --git a/service/appsync/api_op_GetApi.go b/service/appsync/api_op_GetApi.go new file mode 100644 index 00000000000..e09e71af02c --- /dev/null +++ b/service/appsync/api_op_GetApi.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package appsync + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/appsync/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves an Api object. +func (c *Client) GetApi(ctx context.Context, params *GetApiInput, optFns ...func(*Options)) (*GetApiOutput, error) { + if params == nil { + params = &GetApiInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetApi", params, optFns, c.addOperationGetApiMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetApiOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetApiInput struct { + + // The Api ID. + // + // This member is required. + ApiId *string + + noSmithyDocumentSerde +} + +type GetApiOutput struct { + + // The Api object. + Api *types.Api + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetApiMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetApi{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetApi{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetApi"); 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 = addSpanRetryLoop(stack, options); 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 = addOpGetApiValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetApi(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetApi(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetApi", + } +} diff --git a/service/appsync/api_op_GetChannelNamespace.go b/service/appsync/api_op_GetChannelNamespace.go new file mode 100644 index 00000000000..64840b224e7 --- /dev/null +++ b/service/appsync/api_op_GetChannelNamespace.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package appsync + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/appsync/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the channel namespace for a specified Api . +func (c *Client) GetChannelNamespace(ctx context.Context, params *GetChannelNamespaceInput, optFns ...func(*Options)) (*GetChannelNamespaceOutput, error) { + if params == nil { + params = &GetChannelNamespaceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetChannelNamespace", params, optFns, c.addOperationGetChannelNamespaceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetChannelNamespaceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetChannelNamespaceInput struct { + + // The Api ID. + // + // This member is required. + ApiId *string + + // The name of the ChannelNamespace . + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type GetChannelNamespaceOutput struct { + + // The ChannelNamespace object. + ChannelNamespace *types.ChannelNamespace + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetChannelNamespaceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetChannelNamespace{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetChannelNamespace{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetChannelNamespace"); 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 = addSpanRetryLoop(stack, options); 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 = addOpGetChannelNamespaceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetChannelNamespace(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetChannelNamespace(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetChannelNamespace", + } +} diff --git a/service/appsync/api_op_GetDataSourceIntrospection.go b/service/appsync/api_op_GetDataSourceIntrospection.go index feafb011528..28f3426d7a9 100644 --- a/service/appsync/api_op_GetDataSourceIntrospection.go +++ b/service/appsync/api_op_GetDataSourceIntrospection.go @@ -38,9 +38,9 @@ type GetDataSourceIntrospectionInput struct { IntrospectionId *string // A boolean flag that determines whether SDL should be generated for introspected - // types or not. If set to true , each model will contain an sdl property that - // contains the SDL for that type. The SDL only contains the type data and no - // additional metadata or directives. + // types. If set to true , each model will contain an sdl property that contains + // the SDL for that type. The SDL only contains the type data and no additional + // metadata or directives. IncludeModelsSDL bool // The maximum number of introspected types that will be returned in a single diff --git a/service/appsync/api_op_ListApis.go b/service/appsync/api_op_ListApis.go new file mode 100644 index 00000000000..2fc70710e33 --- /dev/null +++ b/service/appsync/api_op_ListApis.go @@ -0,0 +1,251 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package appsync + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/appsync/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the APIs in your AppSync account. +// +// ListApis returns only the high level API details. For more detailed information +// about an API, use GetApi . +func (c *Client) ListApis(ctx context.Context, params *ListApisInput, optFns ...func(*Options)) (*ListApisOutput, error) { + if params == nil { + params = &ListApisInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListApis", params, optFns, c.addOperationListApisMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListApisOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListApisInput struct { + + // The maximum number of results that you want the request to return. + MaxResults int32 + + // An identifier that was returned from the previous call to this operation, which + // you can use to return the next set of items in the list. + NextToken *string + + noSmithyDocumentSerde +} + +type ListApisOutput struct { + + // The Api objects. + Apis []types.Api + + // An identifier that was returned from the previous call to this operation, which + // you can use to return the next set of items in the list. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListApisMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListApis{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListApis{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListApis"); 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 = addSpanRetryLoop(stack, options); 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_opListApis(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListApisPaginatorOptions is the paginator options for ListApis +type ListApisPaginatorOptions struct { + // The maximum number of results that you want the request to return. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListApisPaginator is a paginator for ListApis +type ListApisPaginator struct { + options ListApisPaginatorOptions + client ListApisAPIClient + params *ListApisInput + nextToken *string + firstPage bool +} + +// NewListApisPaginator returns a new ListApisPaginator +func NewListApisPaginator(client ListApisAPIClient, params *ListApisInput, optFns ...func(*ListApisPaginatorOptions)) *ListApisPaginator { + if params == nil { + params = &ListApisInput{} + } + + options := ListApisPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListApisPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListApisPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListApis page. +func (p *ListApisPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListApisOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListApis(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListApisAPIClient is a client that implements the ListApis operation. +type ListApisAPIClient interface { + ListApis(context.Context, *ListApisInput, ...func(*Options)) (*ListApisOutput, error) +} + +var _ ListApisAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListApis(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListApis", + } +} diff --git a/service/appsync/api_op_ListChannelNamespaces.go b/service/appsync/api_op_ListChannelNamespaces.go new file mode 100644 index 00000000000..972c9807b04 --- /dev/null +++ b/service/appsync/api_op_ListChannelNamespaces.go @@ -0,0 +1,261 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package appsync + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/appsync/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the channel namespaces for a specified Api . +// +// ListChannelNamespaces returns only high level details for the channel +// namespace. To retrieve code handlers, use GetChannelNamespace . +func (c *Client) ListChannelNamespaces(ctx context.Context, params *ListChannelNamespacesInput, optFns ...func(*Options)) (*ListChannelNamespacesOutput, error) { + if params == nil { + params = &ListChannelNamespacesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListChannelNamespaces", params, optFns, c.addOperationListChannelNamespacesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListChannelNamespacesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListChannelNamespacesInput struct { + + // The Api ID. + // + // This member is required. + ApiId *string + + // The maximum number of results that you want the request to return. + MaxResults int32 + + // An identifier that was returned from the previous call to this operation, which + // you can use to return the next set of items in the list. + NextToken *string + + noSmithyDocumentSerde +} + +type ListChannelNamespacesOutput struct { + + // The ChannelNamespace objects. + ChannelNamespaces []types.ChannelNamespace + + // An identifier that was returned from the previous call to this operation, which + // you can use to return the next set of items in the list. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListChannelNamespacesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListChannelNamespaces{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChannelNamespaces{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListChannelNamespaces"); 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 = addSpanRetryLoop(stack, options); 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 = addOpListChannelNamespacesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannelNamespaces(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListChannelNamespacesPaginatorOptions is the paginator options for +// ListChannelNamespaces +type ListChannelNamespacesPaginatorOptions struct { + // The maximum number of results that you want the request to return. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListChannelNamespacesPaginator is a paginator for ListChannelNamespaces +type ListChannelNamespacesPaginator struct { + options ListChannelNamespacesPaginatorOptions + client ListChannelNamespacesAPIClient + params *ListChannelNamespacesInput + nextToken *string + firstPage bool +} + +// NewListChannelNamespacesPaginator returns a new ListChannelNamespacesPaginator +func NewListChannelNamespacesPaginator(client ListChannelNamespacesAPIClient, params *ListChannelNamespacesInput, optFns ...func(*ListChannelNamespacesPaginatorOptions)) *ListChannelNamespacesPaginator { + if params == nil { + params = &ListChannelNamespacesInput{} + } + + options := ListChannelNamespacesPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListChannelNamespacesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListChannelNamespacesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListChannelNamespaces page. +func (p *ListChannelNamespacesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChannelNamespacesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListChannelNamespaces(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListChannelNamespacesAPIClient is a client that implements the +// ListChannelNamespaces operation. +type ListChannelNamespacesAPIClient interface { + ListChannelNamespaces(context.Context, *ListChannelNamespacesInput, ...func(*Options)) (*ListChannelNamespacesOutput, error) +} + +var _ ListChannelNamespacesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListChannelNamespaces(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListChannelNamespaces", + } +} diff --git a/service/appsync/api_op_UpdateApi.go b/service/appsync/api_op_UpdateApi.go new file mode 100644 index 00000000000..18314c413d4 --- /dev/null +++ b/service/appsync/api_op_UpdateApi.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package appsync + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/appsync/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates an Api . +func (c *Client) UpdateApi(ctx context.Context, params *UpdateApiInput, optFns ...func(*Options)) (*UpdateApiOutput, error) { + if params == nil { + params = &UpdateApiInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateApi", params, optFns, c.addOperationUpdateApiMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateApiOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateApiInput struct { + + // The Api ID. + // + // This member is required. + ApiId *string + + // The name of the Api. + // + // This member is required. + Name *string + + // The new event configuration. This includes the default authorization + // configuration for connecting, publishing, and subscribing to an Event API. + EventConfig *types.EventConfig + + // The owner contact information for the Api . + OwnerContact *string + + noSmithyDocumentSerde +} + +type UpdateApiOutput struct { + + // The Api object. + Api *types.Api + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateApiMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateApi{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateApi{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateApi"); 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 = addSpanRetryLoop(stack, options); 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 = addOpUpdateApiValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateApi(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateApi(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateApi", + } +} diff --git a/service/appsync/api_op_UpdateChannelNamespace.go b/service/appsync/api_op_UpdateChannelNamespace.go new file mode 100644 index 00000000000..d545ba6f3d6 --- /dev/null +++ b/service/appsync/api_op_UpdateChannelNamespace.go @@ -0,0 +1,175 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package appsync + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/appsync/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a ChannelNamespace associated with an Api . +func (c *Client) UpdateChannelNamespace(ctx context.Context, params *UpdateChannelNamespaceInput, optFns ...func(*Options)) (*UpdateChannelNamespaceOutput, error) { + if params == nil { + params = &UpdateChannelNamespaceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateChannelNamespace", params, optFns, c.addOperationUpdateChannelNamespaceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateChannelNamespaceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateChannelNamespaceInput struct { + + // The Api ID. + // + // This member is required. + ApiId *string + + // The name of the ChannelNamespace . + // + // This member is required. + Name *string + + // The event handler functions that run custom business logic to process published + // events and subscribe requests. + CodeHandlers *string + + // The authorization mode to use for publishing messages on the channel namespace. + // This configuration overrides the default Api authorization configuration. + PublishAuthModes []types.AuthMode + + // The authorization mode to use for subscribing to messages on the channel + // namespace. This configuration overrides the default Api authorization + // configuration. + SubscribeAuthModes []types.AuthMode + + noSmithyDocumentSerde +} + +type UpdateChannelNamespaceOutput struct { + + // The ChannelNamespace object. + ChannelNamespace *types.ChannelNamespace + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateChannelNamespaceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateChannelNamespace{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateChannelNamespace{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateChannelNamespace"); 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 = addSpanRetryLoop(stack, options); 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 = addOpUpdateChannelNamespaceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateChannelNamespace(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateChannelNamespace(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateChannelNamespace", + } +} diff --git a/service/appsync/api_op_UpdateGraphqlApi.go b/service/appsync/api_op_UpdateGraphqlApi.go index f1ccf0b2986..8da10c0882a 100644 --- a/service/appsync/api_op_UpdateGraphqlApi.go +++ b/service/appsync/api_op_UpdateGraphqlApi.go @@ -34,11 +34,6 @@ type UpdateGraphqlApiInput struct { // This member is required. ApiId *string - // The new authentication type for the GraphqlApi object. - // - // This member is required. - AuthenticationType types.AuthenticationType - // The new name for the GraphqlApi object. // // This member is required. @@ -47,6 +42,9 @@ type UpdateGraphqlApiInput struct { // A list of additional authentication providers for the GraphqlApi API. AdditionalAuthenticationProviders []types.AdditionalAuthenticationProvider + // The new authentication type for the GraphqlApi object. + AuthenticationType types.AuthenticationType + // The enhancedMetricsConfig object. EnhancedMetricsConfig *types.EnhancedMetricsConfig diff --git a/service/appsync/deserializers.go b/service/appsync/deserializers.go index 6b35b764979..f82894cef2a 100644 --- a/service/appsync/deserializers.go +++ b/service/appsync/deserializers.go @@ -524,14 +524,14 @@ func awsRestjson1_deserializeOpDocumentAssociateSourceGraphqlApiOutput(v **Assoc return nil } -type awsRestjson1_deserializeOpCreateApiCache struct { +type awsRestjson1_deserializeOpCreateApi struct { } -func (*awsRestjson1_deserializeOpCreateApiCache) ID() string { +func (*awsRestjson1_deserializeOpCreateApi) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateApiCache) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateApi) 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) @@ -549,9 +549,9 @@ func (m *awsRestjson1_deserializeOpCreateApiCache) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateApiCache(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateApi(response, &metadata) } - output := &CreateApiCacheOutput{} + output := &CreateApiOutput{} out.Result = output var buff [1024]byte @@ -572,7 +572,7 @@ func (m *awsRestjson1_deserializeOpCreateApiCache) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateApiCacheOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateApiOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -586,7 +586,7 @@ func (m *awsRestjson1_deserializeOpCreateApiCache) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateApiCache(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateApi(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)} @@ -636,8 +636,8 @@ func awsRestjson1_deserializeOpErrorCreateApiCache(response *smithyhttp.Response case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("UnauthorizedException", errorCode): return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) @@ -652,7 +652,7 @@ func awsRestjson1_deserializeOpErrorCreateApiCache(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentCreateApiCacheOutput(v **CreateApiCacheOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateApiOutput(v **CreateApiOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -665,17 +665,17 @@ func awsRestjson1_deserializeOpDocumentCreateApiCacheOutput(v **CreateApiCacheOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateApiCacheOutput + var sv *CreateApiOutput if *v == nil { - sv = &CreateApiCacheOutput{} + sv = &CreateApiOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "apiCache": - if err := awsRestjson1_deserializeDocumentApiCache(&sv.ApiCache, value); err != nil { + case "api": + if err := awsRestjson1_deserializeDocumentApi(&sv.Api, value); err != nil { return err } @@ -688,14 +688,14 @@ func awsRestjson1_deserializeOpDocumentCreateApiCacheOutput(v **CreateApiCacheOu return nil } -type awsRestjson1_deserializeOpCreateApiKey struct { +type awsRestjson1_deserializeOpCreateApiCache struct { } -func (*awsRestjson1_deserializeOpCreateApiKey) ID() string { +func (*awsRestjson1_deserializeOpCreateApiCache) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateApiKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateApiCache) 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) @@ -713,9 +713,9 @@ func (m *awsRestjson1_deserializeOpCreateApiKey) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateApiKey(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateApiCache(response, &metadata) } - output := &CreateApiKeyOutput{} + output := &CreateApiCacheOutput{} out.Result = output var buff [1024]byte @@ -736,7 +736,7 @@ func (m *awsRestjson1_deserializeOpCreateApiKey) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateApiKeyOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateApiCacheOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -750,7 +750,7 @@ func (m *awsRestjson1_deserializeOpCreateApiKey) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateApiKey(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateApiCache(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)} @@ -791,21 +791,15 @@ func awsRestjson1_deserializeOpErrorCreateApiKey(response *smithyhttp.Response, } switch { - case strings.EqualFold("ApiKeyLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorApiKeyLimitExceededException(response, errorBody) - - case strings.EqualFold("ApiKeyValidityOutOfBoundsException", errorCode): - return awsRestjson1_deserializeErrorApiKeyValidityOutOfBoundsException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) @@ -822,7 +816,7 @@ func awsRestjson1_deserializeOpErrorCreateApiKey(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentCreateApiKeyOutput(v **CreateApiKeyOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateApiCacheOutput(v **CreateApiCacheOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -835,17 +829,17 @@ func awsRestjson1_deserializeOpDocumentCreateApiKeyOutput(v **CreateApiKeyOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateApiKeyOutput + var sv *CreateApiCacheOutput if *v == nil { - sv = &CreateApiKeyOutput{} + sv = &CreateApiCacheOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "apiKey": - if err := awsRestjson1_deserializeDocumentApiKey(&sv.ApiKey, value); err != nil { + case "apiCache": + if err := awsRestjson1_deserializeDocumentApiCache(&sv.ApiCache, value); err != nil { return err } @@ -858,14 +852,14 @@ func awsRestjson1_deserializeOpDocumentCreateApiKeyOutput(v **CreateApiKeyOutput return nil } -type awsRestjson1_deserializeOpCreateDataSource struct { +type awsRestjson1_deserializeOpCreateApiKey struct { } -func (*awsRestjson1_deserializeOpCreateDataSource) ID() string { +func (*awsRestjson1_deserializeOpCreateApiKey) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateApiKey) 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) @@ -883,9 +877,9 @@ func (m *awsRestjson1_deserializeOpCreateDataSource) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateDataSource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateApiKey(response, &metadata) } - output := &CreateDataSourceOutput{} + output := &CreateApiKeyOutput{} out.Result = output var buff [1024]byte @@ -906,7 +900,7 @@ func (m *awsRestjson1_deserializeOpCreateDataSource) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateDataSourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateApiKeyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -920,7 +914,7 @@ func (m *awsRestjson1_deserializeOpCreateDataSource) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateApiKey(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)} @@ -961,15 +955,21 @@ func awsRestjson1_deserializeOpErrorCreateDataSource(response *smithyhttp.Respon } switch { + case strings.EqualFold("ApiKeyLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorApiKeyLimitExceededException(response, errorBody) + + case strings.EqualFold("ApiKeyValidityOutOfBoundsException", errorCode): + return awsRestjson1_deserializeErrorApiKeyValidityOutOfBoundsException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) @@ -986,7 +986,7 @@ func awsRestjson1_deserializeOpErrorCreateDataSource(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentCreateDataSourceOutput(v **CreateDataSourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateApiKeyOutput(v **CreateApiKeyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -999,17 +999,17 @@ func awsRestjson1_deserializeOpDocumentCreateDataSourceOutput(v **CreateDataSour return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateDataSourceOutput + var sv *CreateApiKeyOutput if *v == nil { - sv = &CreateDataSourceOutput{} + sv = &CreateApiKeyOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "dataSource": - if err := awsRestjson1_deserializeDocumentDataSource(&sv.DataSource, value); err != nil { + case "apiKey": + if err := awsRestjson1_deserializeDocumentApiKey(&sv.ApiKey, value); err != nil { return err } @@ -1022,14 +1022,14 @@ func awsRestjson1_deserializeOpDocumentCreateDataSourceOutput(v **CreateDataSour return nil } -type awsRestjson1_deserializeOpCreateDomainName struct { +type awsRestjson1_deserializeOpCreateChannelNamespace struct { } -func (*awsRestjson1_deserializeOpCreateDomainName) ID() string { +func (*awsRestjson1_deserializeOpCreateChannelNamespace) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateDomainName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateChannelNamespace) 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) @@ -1047,9 +1047,9 @@ func (m *awsRestjson1_deserializeOpCreateDomainName) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateDomainName(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateChannelNamespace(response, &metadata) } - output := &CreateDomainNameOutput{} + output := &CreateChannelNamespaceOutput{} out.Result = output var buff [1024]byte @@ -1070,7 +1070,7 @@ func (m *awsRestjson1_deserializeOpCreateDomainName) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateDomainNameOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateChannelNamespaceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1084,7 +1084,7 @@ func (m *awsRestjson1_deserializeOpCreateDomainName) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateDomainName(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateChannelNamespace(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)} @@ -1125,15 +1125,27 @@ func awsRestjson1_deserializeOpErrorCreateDomainName(response *smithyhttp.Respon } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1144,7 +1156,7 @@ func awsRestjson1_deserializeOpErrorCreateDomainName(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentCreateDomainNameOutput(v **CreateDomainNameOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateChannelNamespaceOutput(v **CreateChannelNamespaceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1157,17 +1169,17 @@ func awsRestjson1_deserializeOpDocumentCreateDomainNameOutput(v **CreateDomainNa return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateDomainNameOutput + var sv *CreateChannelNamespaceOutput if *v == nil { - sv = &CreateDomainNameOutput{} + sv = &CreateChannelNamespaceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "domainNameConfig": - if err := awsRestjson1_deserializeDocumentDomainNameConfig(&sv.DomainNameConfig, value); err != nil { + case "channelNamespace": + if err := awsRestjson1_deserializeDocumentChannelNamespace(&sv.ChannelNamespace, value); err != nil { return err } @@ -1180,14 +1192,14 @@ func awsRestjson1_deserializeOpDocumentCreateDomainNameOutput(v **CreateDomainNa return nil } -type awsRestjson1_deserializeOpCreateFunction struct { +type awsRestjson1_deserializeOpCreateDataSource struct { } -func (*awsRestjson1_deserializeOpCreateFunction) ID() string { +func (*awsRestjson1_deserializeOpCreateDataSource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateDataSource) 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) @@ -1205,9 +1217,9 @@ func (m *awsRestjson1_deserializeOpCreateFunction) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateFunction(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateDataSource(response, &metadata) } - output := &CreateFunctionOutput{} + output := &CreateDataSourceOutput{} out.Result = output var buff [1024]byte @@ -1228,7 +1240,7 @@ func (m *awsRestjson1_deserializeOpCreateFunction) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateFunctionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateDataSourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1242,7 +1254,7 @@ func (m *awsRestjson1_deserializeOpCreateFunction) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateDataSource(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)} @@ -1308,7 +1320,7 @@ func awsRestjson1_deserializeOpErrorCreateFunction(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentCreateFunctionOutput(v **CreateFunctionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateDataSourceOutput(v **CreateDataSourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1321,17 +1333,17 @@ func awsRestjson1_deserializeOpDocumentCreateFunctionOutput(v **CreateFunctionOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateFunctionOutput + var sv *CreateDataSourceOutput if *v == nil { - sv = &CreateFunctionOutput{} + sv = &CreateDataSourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "functionConfiguration": - if err := awsRestjson1_deserializeDocumentFunctionConfiguration(&sv.FunctionConfiguration, value); err != nil { + case "dataSource": + if err := awsRestjson1_deserializeDocumentDataSource(&sv.DataSource, value); err != nil { return err } @@ -1344,14 +1356,14 @@ func awsRestjson1_deserializeOpDocumentCreateFunctionOutput(v **CreateFunctionOu return nil } -type awsRestjson1_deserializeOpCreateGraphqlApi struct { +type awsRestjson1_deserializeOpCreateDomainName struct { } -func (*awsRestjson1_deserializeOpCreateGraphqlApi) ID() string { +func (*awsRestjson1_deserializeOpCreateDomainName) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateGraphqlApi) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateDomainName) 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) @@ -1369,9 +1381,9 @@ func (m *awsRestjson1_deserializeOpCreateGraphqlApi) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateGraphqlApi(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateDomainName(response, &metadata) } - output := &CreateGraphqlApiOutput{} + output := &CreateDomainNameOutput{} out.Result = output var buff [1024]byte @@ -1392,7 +1404,7 @@ func (m *awsRestjson1_deserializeOpCreateGraphqlApi) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateGraphqlApiOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateDomainNameOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1406,7 +1418,7 @@ func (m *awsRestjson1_deserializeOpCreateGraphqlApi) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateGraphqlApi(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateDomainName(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)} @@ -1447,24 +1459,15 @@ func awsRestjson1_deserializeOpErrorCreateGraphqlApi(response *smithyhttp.Respon } switch { - case strings.EqualFold("ApiLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorApiLimitExceededException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("UnauthorizedException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1475,7 +1478,7 @@ func awsRestjson1_deserializeOpErrorCreateGraphqlApi(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentCreateGraphqlApiOutput(v **CreateGraphqlApiOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateDomainNameOutput(v **CreateDomainNameOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1488,17 +1491,17 @@ func awsRestjson1_deserializeOpDocumentCreateGraphqlApiOutput(v **CreateGraphqlA return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateGraphqlApiOutput + var sv *CreateDomainNameOutput if *v == nil { - sv = &CreateGraphqlApiOutput{} + sv = &CreateDomainNameOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "graphqlApi": - if err := awsRestjson1_deserializeDocumentGraphqlApi(&sv.GraphqlApi, value); err != nil { + case "domainNameConfig": + if err := awsRestjson1_deserializeDocumentDomainNameConfig(&sv.DomainNameConfig, value); err != nil { return err } @@ -1511,14 +1514,14 @@ func awsRestjson1_deserializeOpDocumentCreateGraphqlApiOutput(v **CreateGraphqlA return nil } -type awsRestjson1_deserializeOpCreateResolver struct { +type awsRestjson1_deserializeOpCreateFunction struct { } -func (*awsRestjson1_deserializeOpCreateResolver) ID() string { +func (*awsRestjson1_deserializeOpCreateFunction) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateResolver) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateFunction) 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) @@ -1536,9 +1539,9 @@ func (m *awsRestjson1_deserializeOpCreateResolver) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateResolver(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateFunction(response, &metadata) } - output := &CreateResolverOutput{} + output := &CreateFunctionOutput{} out.Result = output var buff [1024]byte @@ -1559,7 +1562,7 @@ func (m *awsRestjson1_deserializeOpCreateResolver) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateResolverOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateFunctionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1573,7 +1576,7 @@ func (m *awsRestjson1_deserializeOpCreateResolver) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateResolver(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateFunction(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)} @@ -1639,7 +1642,7 @@ func awsRestjson1_deserializeOpErrorCreateResolver(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentCreateResolverOutput(v **CreateResolverOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateFunctionOutput(v **CreateFunctionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1652,17 +1655,17 @@ func awsRestjson1_deserializeOpDocumentCreateResolverOutput(v **CreateResolverOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateResolverOutput + var sv *CreateFunctionOutput if *v == nil { - sv = &CreateResolverOutput{} + sv = &CreateFunctionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "resolver": - if err := awsRestjson1_deserializeDocumentResolver(&sv.Resolver, value); err != nil { + case "functionConfiguration": + if err := awsRestjson1_deserializeDocumentFunctionConfiguration(&sv.FunctionConfiguration, value); err != nil { return err } @@ -1675,14 +1678,14 @@ func awsRestjson1_deserializeOpDocumentCreateResolverOutput(v **CreateResolverOu return nil } -type awsRestjson1_deserializeOpCreateType struct { +type awsRestjson1_deserializeOpCreateGraphqlApi struct { } -func (*awsRestjson1_deserializeOpCreateType) ID() string { +func (*awsRestjson1_deserializeOpCreateGraphqlApi) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateGraphqlApi) 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) @@ -1700,9 +1703,9 @@ func (m *awsRestjson1_deserializeOpCreateType) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateType(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateGraphqlApi(response, &metadata) } - output := &CreateTypeOutput{} + output := &CreateGraphqlApiOutput{} out.Result = output var buff [1024]byte @@ -1723,7 +1726,7 @@ func (m *awsRestjson1_deserializeOpCreateType) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateTypeOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateGraphqlApiOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1737,7 +1740,7 @@ func (m *awsRestjson1_deserializeOpCreateType) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateType(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateGraphqlApi(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)} @@ -1778,6 +1781,9 @@ func awsRestjson1_deserializeOpErrorCreateType(response *smithyhttp.Response, me } switch { + case strings.EqualFold("ApiLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorApiLimitExceededException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) @@ -1787,8 +1793,8 @@ func awsRestjson1_deserializeOpErrorCreateType(response *smithyhttp.Response, me case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("UnauthorizedException", errorCode): return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) @@ -1803,7 +1809,7 @@ func awsRestjson1_deserializeOpErrorCreateType(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentCreateTypeOutput(v **CreateTypeOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateGraphqlApiOutput(v **CreateGraphqlApiOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1816,17 +1822,17 @@ func awsRestjson1_deserializeOpDocumentCreateTypeOutput(v **CreateTypeOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateTypeOutput + var sv *CreateGraphqlApiOutput if *v == nil { - sv = &CreateTypeOutput{} + sv = &CreateGraphqlApiOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "type": - if err := awsRestjson1_deserializeDocumentType(&sv.Type, value); err != nil { + case "graphqlApi": + if err := awsRestjson1_deserializeDocumentGraphqlApi(&sv.GraphqlApi, value); err != nil { return err } @@ -1839,14 +1845,14 @@ func awsRestjson1_deserializeOpDocumentCreateTypeOutput(v **CreateTypeOutput, va return nil } -type awsRestjson1_deserializeOpDeleteApiCache struct { +type awsRestjson1_deserializeOpCreateResolver struct { } -func (*awsRestjson1_deserializeOpDeleteApiCache) ID() string { +func (*awsRestjson1_deserializeOpCreateResolver) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteApiCache) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateResolver) 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) @@ -1864,28 +1870,56 @@ func (m *awsRestjson1_deserializeOpDeleteApiCache) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteApiCache(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateResolver(response, &metadata) } - output := &DeleteApiCacheOutput{} + output := &CreateResolverOutput{} out.Result = output - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDeleteApiCache(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()) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) - errorCode := "UnknownError" - errorMessage := errorCode + body := io.TeeReader(response.Body, ringBuffer) - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateResolverOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateResolver(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte @@ -1939,14 +1973,50 @@ func awsRestjson1_deserializeOpErrorDeleteApiCache(response *smithyhttp.Response } } -type awsRestjson1_deserializeOpDeleteApiKey struct { +func awsRestjson1_deserializeOpDocumentCreateResolverOutput(v **CreateResolverOutput, 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 *CreateResolverOutput + if *v == nil { + sv = &CreateResolverOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "resolver": + if err := awsRestjson1_deserializeDocumentResolver(&sv.Resolver, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpDeleteApiKey) ID() string { +type awsRestjson1_deserializeOpCreateType struct { +} + +func (*awsRestjson1_deserializeOpCreateType) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteApiKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateType) 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) @@ -1964,16 +2034,44 @@ func (m *awsRestjson1_deserializeOpDeleteApiKey) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteApiKey(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateType(response, &metadata) } - output := &DeleteApiKeyOutput{} + output := &CreateTypeOutput{} out.Result = output + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateTypeOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteApiKey(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateType(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)} @@ -2017,6 +2115,9 @@ func awsRestjson1_deserializeOpErrorDeleteApiKey(response *smithyhttp.Response, case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -2036,14 +2137,50 @@ func awsRestjson1_deserializeOpErrorDeleteApiKey(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpDeleteDataSource struct { +func awsRestjson1_deserializeOpDocumentCreateTypeOutput(v **CreateTypeOutput, 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 *CreateTypeOutput + if *v == nil { + sv = &CreateTypeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "type": + if err := awsRestjson1_deserializeDocumentType(&sv.Type, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpDeleteDataSource) ID() string { +type awsRestjson1_deserializeOpDeleteApi struct { +} + +func (*awsRestjson1_deserializeOpDeleteApi) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteApi) 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) @@ -2061,16 +2198,16 @@ func (m *awsRestjson1_deserializeOpDeleteDataSource) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteDataSource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteApi(response, &metadata) } - output := &DeleteDataSourceOutput{} + output := &DeleteApiOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteApi(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)} @@ -2111,6 +2248,9 @@ func awsRestjson1_deserializeOpErrorDeleteDataSource(response *smithyhttp.Respon } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) @@ -2136,14 +2276,14 @@ func awsRestjson1_deserializeOpErrorDeleteDataSource(response *smithyhttp.Respon } } -type awsRestjson1_deserializeOpDeleteDomainName struct { +type awsRestjson1_deserializeOpDeleteApiCache struct { } -func (*awsRestjson1_deserializeOpDeleteDomainName) ID() string { +func (*awsRestjson1_deserializeOpDeleteApiCache) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteDomainName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteApiCache) 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) @@ -2161,16 +2301,16 @@ func (m *awsRestjson1_deserializeOpDeleteDomainName) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteDomainName(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteApiCache(response, &metadata) } - output := &DeleteDomainNameOutput{} + output := &DeleteApiCacheOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteDomainName(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteApiCache(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)} @@ -2211,9 +2351,6 @@ func awsRestjson1_deserializeOpErrorDeleteDomainName(response *smithyhttp.Respon } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) @@ -2226,6 +2363,9 @@ func awsRestjson1_deserializeOpErrorDeleteDomainName(response *smithyhttp.Respon case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2236,14 +2376,14 @@ func awsRestjson1_deserializeOpErrorDeleteDomainName(response *smithyhttp.Respon } } -type awsRestjson1_deserializeOpDeleteFunction struct { +type awsRestjson1_deserializeOpDeleteApiKey struct { } -func (*awsRestjson1_deserializeOpDeleteFunction) ID() string { +func (*awsRestjson1_deserializeOpDeleteApiKey) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteApiKey) 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) @@ -2261,16 +2401,16 @@ func (m *awsRestjson1_deserializeOpDeleteFunction) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteFunction(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteApiKey(response, &metadata) } - output := &DeleteFunctionOutput{} + output := &DeleteApiKeyOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteApiKey(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)} @@ -2314,9 +2454,6 @@ func awsRestjson1_deserializeOpErrorDeleteFunction(response *smithyhttp.Response case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -2336,14 +2473,14 @@ func awsRestjson1_deserializeOpErrorDeleteFunction(response *smithyhttp.Response } } -type awsRestjson1_deserializeOpDeleteGraphqlApi struct { +type awsRestjson1_deserializeOpDeleteChannelNamespace struct { } -func (*awsRestjson1_deserializeOpDeleteGraphqlApi) ID() string { +func (*awsRestjson1_deserializeOpDeleteChannelNamespace) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteGraphqlApi) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteChannelNamespace) 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) @@ -2361,16 +2498,16 @@ func (m *awsRestjson1_deserializeOpDeleteGraphqlApi) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteGraphqlApi(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteChannelNamespace(response, &metadata) } - output := &DeleteGraphqlApiOutput{} + output := &DeleteChannelNamespaceOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteGraphqlApi(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteChannelNamespace(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)} @@ -2439,14 +2576,14 @@ func awsRestjson1_deserializeOpErrorDeleteGraphqlApi(response *smithyhttp.Respon } } -type awsRestjson1_deserializeOpDeleteResolver struct { +type awsRestjson1_deserializeOpDeleteDataSource struct { } -func (*awsRestjson1_deserializeOpDeleteResolver) ID() string { +func (*awsRestjson1_deserializeOpDeleteDataSource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteResolver) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteDataSource) 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) @@ -2464,16 +2601,16 @@ func (m *awsRestjson1_deserializeOpDeleteResolver) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteResolver(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteDataSource(response, &metadata) } - output := &DeleteResolverOutput{} + output := &DeleteDataSourceOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteResolver(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteDataSource(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)} @@ -2539,14 +2676,14 @@ func awsRestjson1_deserializeOpErrorDeleteResolver(response *smithyhttp.Response } } -type awsRestjson1_deserializeOpDeleteType struct { +type awsRestjson1_deserializeOpDeleteDomainName struct { } -func (*awsRestjson1_deserializeOpDeleteType) ID() string { +func (*awsRestjson1_deserializeOpDeleteDomainName) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteDomainName) 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) @@ -2564,16 +2701,16 @@ func (m *awsRestjson1_deserializeOpDeleteType) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteType(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteDomainName(response, &metadata) } - output := &DeleteTypeOutput{} + output := &DeleteDomainNameOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteType(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteDomainName(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)} @@ -2614,6 +2751,9 @@ func awsRestjson1_deserializeOpErrorDeleteType(response *smithyhttp.Response, me } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) @@ -2626,9 +2766,6 @@ func awsRestjson1_deserializeOpErrorDeleteType(response *smithyhttp.Response, me case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("UnauthorizedException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2639,14 +2776,14 @@ func awsRestjson1_deserializeOpErrorDeleteType(response *smithyhttp.Response, me } } -type awsRestjson1_deserializeOpDisassociateApi struct { +type awsRestjson1_deserializeOpDeleteFunction struct { } -func (*awsRestjson1_deserializeOpDisassociateApi) ID() string { +func (*awsRestjson1_deserializeOpDeleteFunction) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDisassociateApi) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteFunction) 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) @@ -2664,16 +2801,16 @@ func (m *awsRestjson1_deserializeOpDisassociateApi) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisassociateApi(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteFunction(response, &metadata) } - output := &DisassociateApiOutput{} + output := &DeleteFunctionOutput{} out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDisassociateApi(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteFunction(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)} @@ -2714,9 +2851,6 @@ func awsRestjson1_deserializeOpErrorDisassociateApi(response *smithyhttp.Respons } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) @@ -2729,6 +2863,9 @@ func awsRestjson1_deserializeOpErrorDisassociateApi(response *smithyhttp.Respons case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2739,14 +2876,925 @@ func awsRestjson1_deserializeOpErrorDisassociateApi(response *smithyhttp.Respons } } -type awsRestjson1_deserializeOpDisassociateMergedGraphqlApi struct { +type awsRestjson1_deserializeOpDeleteGraphqlApi struct { } -func (*awsRestjson1_deserializeOpDisassociateMergedGraphqlApi) ID() string { +func (*awsRestjson1_deserializeOpDeleteGraphqlApi) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDisassociateMergedGraphqlApi) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteGraphqlApi) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteGraphqlApi(response, &metadata) + } + output := &DeleteGraphqlApiOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteGraphqlApi(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteResolver struct { +} + +func (*awsRestjson1_deserializeOpDeleteResolver) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteResolver) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteResolver(response, &metadata) + } + output := &DeleteResolverOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteResolver(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteType struct { +} + +func (*awsRestjson1_deserializeOpDeleteType) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteType) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteType(response, &metadata) + } + output := &DeleteTypeOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteType(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDisassociateApi struct { +} + +func (*awsRestjson1_deserializeOpDisassociateApi) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDisassociateApi) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateApi(response, &metadata) + } + output := &DisassociateApiOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDisassociateApi(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDisassociateMergedGraphqlApi struct { +} + +func (*awsRestjson1_deserializeOpDisassociateMergedGraphqlApi) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDisassociateMergedGraphqlApi) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateMergedGraphqlApi(response, &metadata) + } + output := &DisassociateMergedGraphqlApiOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDisassociateMergedGraphqlApiOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDisassociateMergedGraphqlApi(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDisassociateMergedGraphqlApiOutput(v **DisassociateMergedGraphqlApiOutput, 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 *DisassociateMergedGraphqlApiOutput + if *v == nil { + sv = &DisassociateMergedGraphqlApiOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "sourceApiAssociationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceApiAssociationStatus to be of type string, got %T instead", value) + } + sv.SourceApiAssociationStatus = types.SourceApiAssociationStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDisassociateSourceGraphqlApi struct { +} + +func (*awsRestjson1_deserializeOpDisassociateSourceGraphqlApi) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDisassociateSourceGraphqlApi) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateSourceGraphqlApi(response, &metadata) + } + output := &DisassociateSourceGraphqlApiOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDisassociateSourceGraphqlApiOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDisassociateSourceGraphqlApi(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDisassociateSourceGraphqlApiOutput(v **DisassociateSourceGraphqlApiOutput, 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 *DisassociateSourceGraphqlApiOutput + if *v == nil { + sv = &DisassociateSourceGraphqlApiOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "sourceApiAssociationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceApiAssociationStatus to be of type string, got %T instead", value) + } + sv.SourceApiAssociationStatus = types.SourceApiAssociationStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpEvaluateCode struct { +} + +func (*awsRestjson1_deserializeOpEvaluateCode) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpEvaluateCode) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorEvaluateCode(response, &metadata) + } + output := &EvaluateCodeOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentEvaluateCodeOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorEvaluateCode(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentEvaluateCodeOutput(v **EvaluateCodeOutput, 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 *EvaluateCodeOutput + if *v == nil { + sv = &EvaluateCodeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "error": + if err := awsRestjson1_deserializeDocumentEvaluateCodeErrorDetail(&sv.Error, value); err != nil { + return err + } + + case "evaluationResult": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EvaluationResult to be of type string, got %T instead", value) + } + sv.EvaluationResult = ptr.String(jtv) + } + + case "logs": + if err := awsRestjson1_deserializeDocumentLogs(&sv.Logs, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpEvaluateMappingTemplate struct { +} + +func (*awsRestjson1_deserializeOpEvaluateMappingTemplate) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpEvaluateMappingTemplate) 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) @@ -2764,9 +3812,9 @@ func (m *awsRestjson1_deserializeOpDisassociateMergedGraphqlApi) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisassociateMergedGraphqlApi(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorEvaluateMappingTemplate(response, &metadata) } - output := &DisassociateMergedGraphqlApiOutput{} + output := &EvaluateMappingTemplateOutput{} out.Result = output var buff [1024]byte @@ -2787,7 +3835,7 @@ func (m *awsRestjson1_deserializeOpDisassociateMergedGraphqlApi) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDisassociateMergedGraphqlApiOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentEvaluateMappingTemplateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2801,7 +3849,7 @@ func (m *awsRestjson1_deserializeOpDisassociateMergedGraphqlApi) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorDisassociateMergedGraphqlApi(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorEvaluateMappingTemplate(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)} @@ -2842,21 +3890,15 @@ func awsRestjson1_deserializeOpErrorDisassociateMergedGraphqlApi(response *smith } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("UnauthorizedException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2867,7 +3909,7 @@ func awsRestjson1_deserializeOpErrorDisassociateMergedGraphqlApi(response *smith } } -func awsRestjson1_deserializeOpDocumentDisassociateMergedGraphqlApiOutput(v **DisassociateMergedGraphqlApiOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentEvaluateMappingTemplateOutput(v **EvaluateMappingTemplateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2880,22 +3922,32 @@ func awsRestjson1_deserializeOpDocumentDisassociateMergedGraphqlApiOutput(v **Di return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DisassociateMergedGraphqlApiOutput + var sv *EvaluateMappingTemplateOutput if *v == nil { - sv = &DisassociateMergedGraphqlApiOutput{} + sv = &EvaluateMappingTemplateOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "sourceApiAssociationStatus": + case "error": + if err := awsRestjson1_deserializeDocumentErrorDetail(&sv.Error, value); err != nil { + return err + } + + case "evaluationResult": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SourceApiAssociationStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected EvaluationResult to be of type string, got %T instead", value) } - sv.SourceApiAssociationStatus = types.SourceApiAssociationStatus(jtv) + sv.EvaluationResult = ptr.String(jtv) + } + + case "logs": + if err := awsRestjson1_deserializeDocumentLogs(&sv.Logs, value); err != nil { + return err } default: @@ -2903,18 +3955,118 @@ func awsRestjson1_deserializeOpDocumentDisassociateMergedGraphqlApiOutput(v **Di } } - *v = sv - return nil + *v = sv + return nil +} + +type awsRestjson1_deserializeOpFlushApiCache struct { +} + +func (*awsRestjson1_deserializeOpFlushApiCache) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpFlushApiCache) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorFlushApiCache(response, &metadata) + } + output := &FlushApiCacheOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorFlushApiCache(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } } -type awsRestjson1_deserializeOpDisassociateSourceGraphqlApi struct { +type awsRestjson1_deserializeOpGetApi struct { } -func (*awsRestjson1_deserializeOpDisassociateSourceGraphqlApi) ID() string { +func (*awsRestjson1_deserializeOpGetApi) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDisassociateSourceGraphqlApi) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetApi) 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) @@ -2932,9 +4084,9 @@ func (m *awsRestjson1_deserializeOpDisassociateSourceGraphqlApi) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisassociateSourceGraphqlApi(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetApi(response, &metadata) } - output := &DisassociateSourceGraphqlApiOutput{} + output := &GetApiOutput{} out.Result = output var buff [1024]byte @@ -2955,7 +4107,7 @@ func (m *awsRestjson1_deserializeOpDisassociateSourceGraphqlApi) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDisassociateSourceGraphqlApiOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetApiOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2969,7 +4121,7 @@ func (m *awsRestjson1_deserializeOpDisassociateSourceGraphqlApi) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorDisassociateSourceGraphqlApi(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetApi(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)} @@ -3010,12 +4162,12 @@ func awsRestjson1_deserializeOpErrorDisassociateSourceGraphqlApi(response *smith } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -3035,7 +4187,7 @@ func awsRestjson1_deserializeOpErrorDisassociateSourceGraphqlApi(response *smith } } -func awsRestjson1_deserializeOpDocumentDisassociateSourceGraphqlApiOutput(v **DisassociateSourceGraphqlApiOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetApiOutput(v **GetApiOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3048,22 +4200,18 @@ func awsRestjson1_deserializeOpDocumentDisassociateSourceGraphqlApiOutput(v **Di return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DisassociateSourceGraphqlApiOutput + var sv *GetApiOutput if *v == nil { - sv = &DisassociateSourceGraphqlApiOutput{} + sv = &GetApiOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "sourceApiAssociationStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SourceApiAssociationStatus to be of type string, got %T instead", value) - } - sv.SourceApiAssociationStatus = types.SourceApiAssociationStatus(jtv) + case "api": + if err := awsRestjson1_deserializeDocumentApi(&sv.Api, value); err != nil { + return err } default: @@ -3075,14 +4223,14 @@ func awsRestjson1_deserializeOpDocumentDisassociateSourceGraphqlApiOutput(v **Di return nil } -type awsRestjson1_deserializeOpEvaluateCode struct { +type awsRestjson1_deserializeOpGetApiAssociation struct { } -func (*awsRestjson1_deserializeOpEvaluateCode) ID() string { +func (*awsRestjson1_deserializeOpGetApiAssociation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpEvaluateCode) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetApiAssociation) 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) @@ -3100,9 +4248,9 @@ func (m *awsRestjson1_deserializeOpEvaluateCode) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorEvaluateCode(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetApiAssociation(response, &metadata) } - output := &EvaluateCodeOutput{} + output := &GetApiAssociationOutput{} out.Result = output var buff [1024]byte @@ -3123,7 +4271,7 @@ func (m *awsRestjson1_deserializeOpEvaluateCode) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentEvaluateCodeOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetApiAssociationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3137,7 +4285,7 @@ func (m *awsRestjson1_deserializeOpEvaluateCode) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorEvaluateCode(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetApiAssociation(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)} @@ -3187,6 +4335,9 @@ func awsRestjson1_deserializeOpErrorEvaluateCode(response *smithyhttp.Response, case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3197,7 +4348,7 @@ func awsRestjson1_deserializeOpErrorEvaluateCode(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentEvaluateCodeOutput(v **EvaluateCodeOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetApiAssociationOutput(v **GetApiAssociationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3210,31 +4361,17 @@ func awsRestjson1_deserializeOpDocumentEvaluateCodeOutput(v **EvaluateCodeOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *EvaluateCodeOutput + var sv *GetApiAssociationOutput if *v == nil { - sv = &EvaluateCodeOutput{} + sv = &GetApiAssociationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "error": - if err := awsRestjson1_deserializeDocumentEvaluateCodeErrorDetail(&sv.Error, value); err != nil { - return err - } - - case "evaluationResult": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EvaluationResult to be of type string, got %T instead", value) - } - sv.EvaluationResult = ptr.String(jtv) - } - - case "logs": - if err := awsRestjson1_deserializeDocumentLogs(&sv.Logs, value); err != nil { + case "apiAssociation": + if err := awsRestjson1_deserializeDocumentApiAssociation(&sv.ApiAssociation, value); err != nil { return err } @@ -3247,14 +4384,14 @@ func awsRestjson1_deserializeOpDocumentEvaluateCodeOutput(v **EvaluateCodeOutput return nil } -type awsRestjson1_deserializeOpEvaluateMappingTemplate struct { +type awsRestjson1_deserializeOpGetApiCache struct { } -func (*awsRestjson1_deserializeOpEvaluateMappingTemplate) ID() string { +func (*awsRestjson1_deserializeOpGetApiCache) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpEvaluateMappingTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetApiCache) 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) @@ -3272,9 +4409,9 @@ func (m *awsRestjson1_deserializeOpEvaluateMappingTemplate) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorEvaluateMappingTemplate(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetApiCache(response, &metadata) } - output := &EvaluateMappingTemplateOutput{} + output := &GetApiCacheOutput{} out.Result = output var buff [1024]byte @@ -3295,7 +4432,7 @@ func (m *awsRestjson1_deserializeOpEvaluateMappingTemplate) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentEvaluateMappingTemplateOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetApiCacheOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3309,7 +4446,7 @@ func (m *awsRestjson1_deserializeOpEvaluateMappingTemplate) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorEvaluateMappingTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetApiCache(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)} @@ -3350,15 +4487,21 @@ func awsRestjson1_deserializeOpErrorEvaluateMappingTemplate(response *smithyhttp } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3369,7 +4512,7 @@ func awsRestjson1_deserializeOpErrorEvaluateMappingTemplate(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentEvaluateMappingTemplateOutput(v **EvaluateMappingTemplateOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetApiCacheOutput(v **GetApiCacheOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3382,31 +4525,17 @@ func awsRestjson1_deserializeOpDocumentEvaluateMappingTemplateOutput(v **Evaluat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *EvaluateMappingTemplateOutput + var sv *GetApiCacheOutput if *v == nil { - sv = &EvaluateMappingTemplateOutput{} + sv = &GetApiCacheOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "error": - if err := awsRestjson1_deserializeDocumentErrorDetail(&sv.Error, value); err != nil { - return err - } - - case "evaluationResult": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EvaluationResult to be of type string, got %T instead", value) - } - sv.EvaluationResult = ptr.String(jtv) - } - - case "logs": - if err := awsRestjson1_deserializeDocumentLogs(&sv.Logs, value); err != nil { + case "apiCache": + if err := awsRestjson1_deserializeDocumentApiCache(&sv.ApiCache, value); err != nil { return err } @@ -3419,14 +4548,14 @@ func awsRestjson1_deserializeOpDocumentEvaluateMappingTemplateOutput(v **Evaluat return nil } -type awsRestjson1_deserializeOpFlushApiCache struct { +type awsRestjson1_deserializeOpGetChannelNamespace struct { } -func (*awsRestjson1_deserializeOpFlushApiCache) ID() string { +func (*awsRestjson1_deserializeOpGetChannelNamespace) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpFlushApiCache) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetChannelNamespace) 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) @@ -3444,16 +4573,44 @@ func (m *awsRestjson1_deserializeOpFlushApiCache) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorFlushApiCache(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetChannelNamespace(response, &metadata) } - output := &FlushApiCacheOutput{} + output := &GetChannelNamespaceOutput{} out.Result = output + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetChannelNamespaceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorFlushApiCache(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetChannelNamespace(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)} @@ -3494,12 +4651,12 @@ func awsRestjson1_deserializeOpErrorFlushApiCache(response *smithyhttp.Response, } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -3519,14 +4676,50 @@ func awsRestjson1_deserializeOpErrorFlushApiCache(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpGetApiAssociation struct { +func awsRestjson1_deserializeOpDocumentGetChannelNamespaceOutput(v **GetChannelNamespaceOutput, 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 *GetChannelNamespaceOutput + if *v == nil { + sv = &GetChannelNamespaceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "channelNamespace": + if err := awsRestjson1_deserializeDocumentChannelNamespace(&sv.ChannelNamespace, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpGetApiAssociation) ID() string { +type awsRestjson1_deserializeOpGetDataSource struct { +} + +func (*awsRestjson1_deserializeOpGetDataSource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetApiAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetDataSource) 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) @@ -3544,9 +4737,9 @@ func (m *awsRestjson1_deserializeOpGetApiAssociation) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetApiAssociation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetDataSource(response, &metadata) } - output := &GetApiAssociationOutput{} + output := &GetDataSourceOutput{} out.Result = output var buff [1024]byte @@ -3567,7 +4760,7 @@ func (m *awsRestjson1_deserializeOpGetApiAssociation) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetApiAssociationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetDataSourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3581,7 +4774,7 @@ func (m *awsRestjson1_deserializeOpGetApiAssociation) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetApiAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetDataSource(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)} @@ -3622,18 +4815,21 @@ func awsRestjson1_deserializeOpErrorGetApiAssociation(response *smithyhttp.Respo } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3644,7 +4840,7 @@ func awsRestjson1_deserializeOpErrorGetApiAssociation(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentGetApiAssociationOutput(v **GetApiAssociationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetDataSourceOutput(v **GetDataSourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3657,17 +4853,17 @@ func awsRestjson1_deserializeOpDocumentGetApiAssociationOutput(v **GetApiAssocia return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetApiAssociationOutput + var sv *GetDataSourceOutput if *v == nil { - sv = &GetApiAssociationOutput{} + sv = &GetDataSourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "apiAssociation": - if err := awsRestjson1_deserializeDocumentApiAssociation(&sv.ApiAssociation, value); err != nil { + case "dataSource": + if err := awsRestjson1_deserializeDocumentDataSource(&sv.DataSource, value); err != nil { return err } @@ -3680,14 +4876,14 @@ func awsRestjson1_deserializeOpDocumentGetApiAssociationOutput(v **GetApiAssocia return nil } -type awsRestjson1_deserializeOpGetApiCache struct { +type awsRestjson1_deserializeOpGetDataSourceIntrospection struct { } -func (*awsRestjson1_deserializeOpGetApiCache) ID() string { +func (*awsRestjson1_deserializeOpGetDataSourceIntrospection) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetApiCache) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetDataSourceIntrospection) 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) @@ -3705,9 +4901,9 @@ func (m *awsRestjson1_deserializeOpGetApiCache) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetApiCache(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetDataSourceIntrospection(response, &metadata) } - output := &GetApiCacheOutput{} + output := &GetDataSourceIntrospectionOutput{} out.Result = output var buff [1024]byte @@ -3728,7 +4924,7 @@ func (m *awsRestjson1_deserializeOpGetApiCache) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetApiCacheOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetDataSourceIntrospectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3742,7 +4938,7 @@ func (m *awsRestjson1_deserializeOpGetApiCache) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetApiCache(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetDataSourceIntrospection(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)} @@ -3786,18 +4982,12 @@ func awsRestjson1_deserializeOpErrorGetApiCache(response *smithyhttp.Response, m case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("UnauthorizedException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3808,7 +4998,7 @@ func awsRestjson1_deserializeOpErrorGetApiCache(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentGetApiCacheOutput(v **GetApiCacheOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetDataSourceIntrospectionOutput(v **GetDataSourceIntrospectionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3821,20 +5011,47 @@ func awsRestjson1_deserializeOpDocumentGetApiCacheOutput(v **GetApiCacheOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetApiCacheOutput + var sv *GetDataSourceIntrospectionOutput if *v == nil { - sv = &GetApiCacheOutput{} + sv = &GetDataSourceIntrospectionOutput{} } else { sv = *v } - for key, value := range shape { - switch key { - case "apiCache": - if err := awsRestjson1_deserializeDocumentApiCache(&sv.ApiCache, value); err != nil { + for key, value := range shape { + switch key { + case "introspectionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.IntrospectionId = ptr.String(jtv) + } + + case "introspectionResult": + if err := awsRestjson1_deserializeDocumentDataSourceIntrospectionResult(&sv.IntrospectionResult, value); err != nil { return err } + case "introspectionStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataSourceIntrospectionStatus to be of type string, got %T instead", value) + } + sv.IntrospectionStatus = types.DataSourceIntrospectionStatus(jtv) + } + + case "introspectionStatusDetail": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.IntrospectionStatusDetail = ptr.String(jtv) + } + default: _, _ = key, value @@ -3844,14 +5061,14 @@ func awsRestjson1_deserializeOpDocumentGetApiCacheOutput(v **GetApiCacheOutput, return nil } -type awsRestjson1_deserializeOpGetDataSource struct { +type awsRestjson1_deserializeOpGetDomainName struct { } -func (*awsRestjson1_deserializeOpGetDataSource) ID() string { +func (*awsRestjson1_deserializeOpGetDomainName) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetDomainName) 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) @@ -3869,9 +5086,9 @@ func (m *awsRestjson1_deserializeOpGetDataSource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetDataSource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetDomainName(response, &metadata) } - output := &GetDataSourceOutput{} + output := &GetDomainNameOutput{} out.Result = output var buff [1024]byte @@ -3892,7 +5109,7 @@ func (m *awsRestjson1_deserializeOpGetDataSource) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetDataSourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetDomainNameOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3906,7 +5123,7 @@ func (m *awsRestjson1_deserializeOpGetDataSource) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetDomainName(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)} @@ -3947,21 +5164,18 @@ func awsRestjson1_deserializeOpErrorGetDataSource(response *smithyhttp.Response, } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("UnauthorizedException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3972,7 +5186,7 @@ func awsRestjson1_deserializeOpErrorGetDataSource(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentGetDataSourceOutput(v **GetDataSourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetDomainNameOutput(v **GetDomainNameOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3985,17 +5199,17 @@ func awsRestjson1_deserializeOpDocumentGetDataSourceOutput(v **GetDataSourceOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetDataSourceOutput + var sv *GetDomainNameOutput if *v == nil { - sv = &GetDataSourceOutput{} + sv = &GetDomainNameOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "dataSource": - if err := awsRestjson1_deserializeDocumentDataSource(&sv.DataSource, value); err != nil { + case "domainNameConfig": + if err := awsRestjson1_deserializeDocumentDomainNameConfig(&sv.DomainNameConfig, value); err != nil { return err } @@ -4008,14 +5222,14 @@ func awsRestjson1_deserializeOpDocumentGetDataSourceOutput(v **GetDataSourceOutp return nil } -type awsRestjson1_deserializeOpGetDataSourceIntrospection struct { +type awsRestjson1_deserializeOpGetFunction struct { } -func (*awsRestjson1_deserializeOpGetDataSourceIntrospection) ID() string { +func (*awsRestjson1_deserializeOpGetFunction) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetDataSourceIntrospection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetFunction) 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) @@ -4033,9 +5247,9 @@ func (m *awsRestjson1_deserializeOpGetDataSourceIntrospection) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetDataSourceIntrospection(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetFunction(response, &metadata) } - output := &GetDataSourceIntrospectionOutput{} + output := &GetFunctionOutput{} out.Result = output var buff [1024]byte @@ -4056,7 +5270,7 @@ func (m *awsRestjson1_deserializeOpGetDataSourceIntrospection) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetDataSourceIntrospectionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetFunctionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4070,7 +5284,7 @@ func (m *awsRestjson1_deserializeOpGetDataSourceIntrospection) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetDataSourceIntrospection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetFunction(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)} @@ -4111,15 +5325,15 @@ func awsRestjson1_deserializeOpErrorGetDataSourceIntrospection(response *smithyh } switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("InternalFailureException", errorCode): - return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4130,7 +5344,7 @@ func awsRestjson1_deserializeOpErrorGetDataSourceIntrospection(response *smithyh } } -func awsRestjson1_deserializeOpDocumentGetDataSourceIntrospectionOutput(v **GetDataSourceIntrospectionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetFunctionOutput(v **GetFunctionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4143,47 +5357,20 @@ func awsRestjson1_deserializeOpDocumentGetDataSourceIntrospectionOutput(v **GetD return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetDataSourceIntrospectionOutput + var sv *GetFunctionOutput if *v == nil { - sv = &GetDataSourceIntrospectionOutput{} + sv = &GetFunctionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "introspectionId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.IntrospectionId = ptr.String(jtv) - } - - case "introspectionResult": - if err := awsRestjson1_deserializeDocumentDataSourceIntrospectionResult(&sv.IntrospectionResult, value); err != nil { + case "functionConfiguration": + if err := awsRestjson1_deserializeDocumentFunctionConfiguration(&sv.FunctionConfiguration, value); err != nil { return err } - case "introspectionStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DataSourceIntrospectionStatus to be of type string, got %T instead", value) - } - sv.IntrospectionStatus = types.DataSourceIntrospectionStatus(jtv) - } - - case "introspectionStatusDetail": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.IntrospectionStatusDetail = ptr.String(jtv) - } - default: _, _ = key, value @@ -4193,14 +5380,14 @@ func awsRestjson1_deserializeOpDocumentGetDataSourceIntrospectionOutput(v **GetD return nil } -type awsRestjson1_deserializeOpGetDomainName struct { +type awsRestjson1_deserializeOpGetGraphqlApi struct { } -func (*awsRestjson1_deserializeOpGetDomainName) ID() string { +func (*awsRestjson1_deserializeOpGetGraphqlApi) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetDomainName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetGraphqlApi) 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) @@ -4218,9 +5405,9 @@ func (m *awsRestjson1_deserializeOpGetDomainName) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetDomainName(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetGraphqlApi(response, &metadata) } - output := &GetDomainNameOutput{} + output := &GetGraphqlApiOutput{} out.Result = output var buff [1024]byte @@ -4241,7 +5428,7 @@ func (m *awsRestjson1_deserializeOpGetDomainName) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetDomainNameOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetGraphqlApiOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4255,7 +5442,7 @@ func (m *awsRestjson1_deserializeOpGetDomainName) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetDomainName(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetGraphqlApi(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)} @@ -4308,6 +5495,9 @@ func awsRestjson1_deserializeOpErrorGetDomainName(response *smithyhttp.Response, case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4318,7 +5508,7 @@ func awsRestjson1_deserializeOpErrorGetDomainName(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentGetDomainNameOutput(v **GetDomainNameOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetGraphqlApiOutput(v **GetGraphqlApiOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4331,17 +5521,17 @@ func awsRestjson1_deserializeOpDocumentGetDomainNameOutput(v **GetDomainNameOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetDomainNameOutput + var sv *GetGraphqlApiOutput if *v == nil { - sv = &GetDomainNameOutput{} + sv = &GetGraphqlApiOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "domainNameConfig": - if err := awsRestjson1_deserializeDocumentDomainNameConfig(&sv.DomainNameConfig, value); err != nil { + case "graphqlApi": + if err := awsRestjson1_deserializeDocumentGraphqlApi(&sv.GraphqlApi, value); err != nil { return err } @@ -4354,14 +5544,14 @@ func awsRestjson1_deserializeOpDocumentGetDomainNameOutput(v **GetDomainNameOutp return nil } -type awsRestjson1_deserializeOpGetFunction struct { +type awsRestjson1_deserializeOpGetGraphqlApiEnvironmentVariables struct { } -func (*awsRestjson1_deserializeOpGetFunction) ID() string { +func (*awsRestjson1_deserializeOpGetGraphqlApiEnvironmentVariables) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetGraphqlApiEnvironmentVariables) 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) @@ -4379,9 +5569,9 @@ func (m *awsRestjson1_deserializeOpGetFunction) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetFunction(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetGraphqlApiEnvironmentVariables(response, &metadata) } - output := &GetFunctionOutput{} + output := &GetGraphqlApiEnvironmentVariablesOutput{} out.Result = output var buff [1024]byte @@ -4402,7 +5592,7 @@ func (m *awsRestjson1_deserializeOpGetFunction) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetFunctionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetGraphqlApiEnvironmentVariablesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4416,7 +5606,7 @@ func (m *awsRestjson1_deserializeOpGetFunction) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetGraphqlApiEnvironmentVariables(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)} @@ -4457,8 +5647,14 @@ func awsRestjson1_deserializeOpErrorGetFunction(response *smithyhttp.Response, m } switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) @@ -4476,7 +5672,7 @@ func awsRestjson1_deserializeOpErrorGetFunction(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentGetFunctionOutput(v **GetFunctionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetGraphqlApiEnvironmentVariablesOutput(v **GetGraphqlApiEnvironmentVariablesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4489,17 +5685,17 @@ func awsRestjson1_deserializeOpDocumentGetFunctionOutput(v **GetFunctionOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetFunctionOutput + var sv *GetGraphqlApiEnvironmentVariablesOutput if *v == nil { - sv = &GetFunctionOutput{} + sv = &GetGraphqlApiEnvironmentVariablesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "functionConfiguration": - if err := awsRestjson1_deserializeDocumentFunctionConfiguration(&sv.FunctionConfiguration, value); err != nil { + case "environmentVariables": + if err := awsRestjson1_deserializeDocumentEnvironmentVariableMap(&sv.EnvironmentVariables, value); err != nil { return err } @@ -4512,14 +5708,14 @@ func awsRestjson1_deserializeOpDocumentGetFunctionOutput(v **GetFunctionOutput, return nil } -type awsRestjson1_deserializeOpGetGraphqlApi struct { +type awsRestjson1_deserializeOpGetIntrospectionSchema struct { } -func (*awsRestjson1_deserializeOpGetGraphqlApi) ID() string { +func (*awsRestjson1_deserializeOpGetIntrospectionSchema) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetGraphqlApi) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetIntrospectionSchema) 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) @@ -4537,44 +5733,21 @@ func (m *awsRestjson1_deserializeOpGetGraphqlApi) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetGraphqlApi(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetIntrospectionSchema(response, &metadata) } - output := &GetGraphqlApiOutput{} + output := &GetIntrospectionSchemaOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetGraphqlApiOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetIntrospectionSchemaOutput(output, response.Body, response.ContentLength) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} } span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetGraphqlApi(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetIntrospectionSchema(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)} @@ -4615,11 +5788,8 @@ func awsRestjson1_deserializeOpErrorGetGraphqlApi(response *smithyhttp.Response, } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("GraphQLSchemaException", errorCode): + return awsRestjson1_deserializeErrorGraphQLSchemaException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -4640,50 +5810,36 @@ func awsRestjson1_deserializeOpErrorGetGraphqlApi(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentGetGraphqlApiOutput(v **GetGraphqlApiOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetIntrospectionSchemaOutput(v *GetIntrospectionSchemaOutput, body io.ReadCloser, contentLength int64) 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) + return fmt.Errorf("unsupported deserialization of nil %T", v) } - var sv *GetGraphqlApiOutput - if *v == nil { - sv = &GetGraphqlApiOutput{} + var buf bytes.Buffer + if contentLength > 0 { + buf.Grow(int(contentLength)) } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "graphqlApi": - if err := awsRestjson1_deserializeDocumentGraphqlApi(&sv.GraphqlApi, value); err != nil { - return err - } - - default: - _, _ = key, value + buf.Grow(512) + } - } + _, err := buf.ReadFrom(body) + if err != nil { + return err + } + if buf.Len() > 0 { + v.Schema = buf.Bytes() } - *v = sv return nil } -type awsRestjson1_deserializeOpGetGraphqlApiEnvironmentVariables struct { +type awsRestjson1_deserializeOpGetResolver struct { } -func (*awsRestjson1_deserializeOpGetGraphqlApiEnvironmentVariables) ID() string { +func (*awsRestjson1_deserializeOpGetResolver) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetGraphqlApiEnvironmentVariables) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetResolver) 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) @@ -4701,9 +5857,9 @@ func (m *awsRestjson1_deserializeOpGetGraphqlApiEnvironmentVariables) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetGraphqlApiEnvironmentVariables(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetResolver(response, &metadata) } - output := &GetGraphqlApiEnvironmentVariablesOutput{} + output := &GetResolverOutput{} out.Result = output var buff [1024]byte @@ -4724,7 +5880,7 @@ func (m *awsRestjson1_deserializeOpGetGraphqlApiEnvironmentVariables) HandleDese return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetGraphqlApiEnvironmentVariablesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetResolverOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4738,7 +5894,7 @@ func (m *awsRestjson1_deserializeOpGetGraphqlApiEnvironmentVariables) HandleDese return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetGraphqlApiEnvironmentVariables(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetResolver(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)} @@ -4779,14 +5935,8 @@ func awsRestjson1_deserializeOpErrorGetGraphqlApiEnvironmentVariables(response * } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("InternalFailureException", errorCode): - return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) @@ -4804,7 +5954,7 @@ func awsRestjson1_deserializeOpErrorGetGraphqlApiEnvironmentVariables(response * } } -func awsRestjson1_deserializeOpDocumentGetGraphqlApiEnvironmentVariablesOutput(v **GetGraphqlApiEnvironmentVariablesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetResolverOutput(v **GetResolverOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4817,17 +5967,17 @@ func awsRestjson1_deserializeOpDocumentGetGraphqlApiEnvironmentVariablesOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetGraphqlApiEnvironmentVariablesOutput + var sv *GetResolverOutput if *v == nil { - sv = &GetGraphqlApiEnvironmentVariablesOutput{} + sv = &GetResolverOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "environmentVariables": - if err := awsRestjson1_deserializeDocumentEnvironmentVariableMap(&sv.EnvironmentVariables, value); err != nil { + case "resolver": + if err := awsRestjson1_deserializeDocumentResolver(&sv.Resolver, value); err != nil { return err } @@ -4840,14 +5990,14 @@ func awsRestjson1_deserializeOpDocumentGetGraphqlApiEnvironmentVariablesOutput(v return nil } -type awsRestjson1_deserializeOpGetIntrospectionSchema struct { +type awsRestjson1_deserializeOpGetSchemaCreationStatus struct { } -func (*awsRestjson1_deserializeOpGetIntrospectionSchema) ID() string { +func (*awsRestjson1_deserializeOpGetSchemaCreationStatus) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetIntrospectionSchema) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetSchemaCreationStatus) 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) @@ -4865,21 +6015,44 @@ func (m *awsRestjson1_deserializeOpGetIntrospectionSchema) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetIntrospectionSchema(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetSchemaCreationStatus(response, &metadata) } - output := &GetIntrospectionSchemaOutput{} + output := &GetSchemaCreationStatusOutput{} out.Result = output - err = awsRestjson1_deserializeOpDocumentGetIntrospectionSchemaOutput(output, response.Body, response.ContentLength) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetSchemaCreationStatusOutput(&output, shape) if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } } span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetIntrospectionSchema(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetSchemaCreationStatus(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)} @@ -4920,8 +6093,8 @@ func awsRestjson1_deserializeOpErrorGetIntrospectionSchema(response *smithyhttp. } switch { - case strings.EqualFold("GraphQLSchemaException", errorCode): - return awsRestjson1_deserializeErrorGraphQLSchemaException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -4942,36 +6115,63 @@ func awsRestjson1_deserializeOpErrorGetIntrospectionSchema(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentGetIntrospectionSchemaOutput(v *GetIntrospectionSchemaOutput, body io.ReadCloser, contentLength int64) error { +func awsRestjson1_deserializeOpDocumentGetSchemaCreationStatusOutput(v **GetSchemaCreationStatusOutput, value interface{}) error { if v == nil { - return fmt.Errorf("unsupported deserialization of nil %T", v) + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - var buf bytes.Buffer - if contentLength > 0 { - buf.Grow(int(contentLength)) - } else { - buf.Grow(512) + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) } - _, err := buf.ReadFrom(body) - if err != nil { - return err + var sv *GetSchemaCreationStatusOutput + if *v == nil { + sv = &GetSchemaCreationStatusOutput{} + } else { + sv = *v } - if buf.Len() > 0 { - v.Schema = buf.Bytes() + + for key, value := range shape { + switch key { + case "details": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Details = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SchemaStatus to be of type string, got %T instead", value) + } + sv.Status = types.SchemaStatus(jtv) + } + + default: + _, _ = key, value + + } } + *v = sv return nil } -type awsRestjson1_deserializeOpGetResolver struct { +type awsRestjson1_deserializeOpGetSourceApiAssociation struct { } -func (*awsRestjson1_deserializeOpGetResolver) ID() string { +func (*awsRestjson1_deserializeOpGetSourceApiAssociation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetResolver) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetSourceApiAssociation) 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) @@ -4989,9 +6189,9 @@ func (m *awsRestjson1_deserializeOpGetResolver) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetResolver(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetSourceApiAssociation(response, &metadata) } - output := &GetResolverOutput{} + output := &GetSourceApiAssociationOutput{} out.Result = output var buff [1024]byte @@ -5012,7 +6212,7 @@ func (m *awsRestjson1_deserializeOpGetResolver) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetResolverOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetSourceApiAssociationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5026,7 +6226,7 @@ func (m *awsRestjson1_deserializeOpGetResolver) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetResolver(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetSourceApiAssociation(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)} @@ -5067,8 +6267,11 @@ func awsRestjson1_deserializeOpErrorGetResolver(response *smithyhttp.Response, m } switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) @@ -5086,7 +6289,7 @@ func awsRestjson1_deserializeOpErrorGetResolver(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentGetResolverOutput(v **GetResolverOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetSourceApiAssociationOutput(v **GetSourceApiAssociationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5099,17 +6302,17 @@ func awsRestjson1_deserializeOpDocumentGetResolverOutput(v **GetResolverOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetResolverOutput + var sv *GetSourceApiAssociationOutput if *v == nil { - sv = &GetResolverOutput{} + sv = &GetSourceApiAssociationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "resolver": - if err := awsRestjson1_deserializeDocumentResolver(&sv.Resolver, value); err != nil { + case "sourceApiAssociation": + if err := awsRestjson1_deserializeDocumentSourceApiAssociation(&sv.SourceApiAssociation, value); err != nil { return err } @@ -5122,14 +6325,14 @@ func awsRestjson1_deserializeOpDocumentGetResolverOutput(v **GetResolverOutput, return nil } -type awsRestjson1_deserializeOpGetSchemaCreationStatus struct { +type awsRestjson1_deserializeOpGetType struct { } -func (*awsRestjson1_deserializeOpGetSchemaCreationStatus) ID() string { +func (*awsRestjson1_deserializeOpGetType) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetSchemaCreationStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetType) 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) @@ -5147,9 +6350,9 @@ func (m *awsRestjson1_deserializeOpGetSchemaCreationStatus) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSchemaCreationStatus(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetType(response, &metadata) } - output := &GetSchemaCreationStatusOutput{} + output := &GetTypeOutput{} out.Result = output var buff [1024]byte @@ -5170,7 +6373,7 @@ func (m *awsRestjson1_deserializeOpGetSchemaCreationStatus) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetSchemaCreationStatusOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetTypeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5184,7 +6387,7 @@ func (m *awsRestjson1_deserializeOpGetSchemaCreationStatus) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetSchemaCreationStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetType(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)} @@ -5228,6 +6431,9 @@ func awsRestjson1_deserializeOpErrorGetSchemaCreationStatus(response *smithyhttp case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -5247,7 +6453,7 @@ func awsRestjson1_deserializeOpErrorGetSchemaCreationStatus(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentGetSchemaCreationStatusOutput(v **GetSchemaCreationStatusOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetTypeOutput(v **GetTypeOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5260,31 +6466,18 @@ func awsRestjson1_deserializeOpDocumentGetSchemaCreationStatusOutput(v **GetSche return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetSchemaCreationStatusOutput + var sv *GetTypeOutput if *v == nil { - sv = &GetSchemaCreationStatusOutput{} + sv = &GetTypeOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "details": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Details = ptr.String(jtv) - } - - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SchemaStatus to be of type string, got %T instead", value) - } - sv.Status = types.SchemaStatus(jtv) + case "type": + if err := awsRestjson1_deserializeDocumentType(&sv.Type, value); err != nil { + return err } default: @@ -5296,14 +6489,14 @@ func awsRestjson1_deserializeOpDocumentGetSchemaCreationStatusOutput(v **GetSche return nil } -type awsRestjson1_deserializeOpGetSourceApiAssociation struct { +type awsRestjson1_deserializeOpListApiKeys struct { } -func (*awsRestjson1_deserializeOpGetSourceApiAssociation) ID() string { +func (*awsRestjson1_deserializeOpListApiKeys) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetSourceApiAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListApiKeys) 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) @@ -5321,9 +6514,9 @@ func (m *awsRestjson1_deserializeOpGetSourceApiAssociation) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSourceApiAssociation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListApiKeys(response, &metadata) } - output := &GetSourceApiAssociationOutput{} + output := &ListApiKeysOutput{} out.Result = output var buff [1024]byte @@ -5344,7 +6537,7 @@ func (m *awsRestjson1_deserializeOpGetSourceApiAssociation) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetSourceApiAssociationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListApiKeysOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5358,7 +6551,7 @@ func (m *awsRestjson1_deserializeOpGetSourceApiAssociation) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetSourceApiAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListApiKeys(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)} @@ -5421,7 +6614,7 @@ func awsRestjson1_deserializeOpErrorGetSourceApiAssociation(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentGetSourceApiAssociationOutput(v **GetSourceApiAssociationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListApiKeysOutput(v **ListApiKeysOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5434,20 +6627,29 @@ func awsRestjson1_deserializeOpDocumentGetSourceApiAssociationOutput(v **GetSour return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetSourceApiAssociationOutput + var sv *ListApiKeysOutput if *v == nil { - sv = &GetSourceApiAssociationOutput{} + sv = &ListApiKeysOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "sourceApiAssociation": - if err := awsRestjson1_deserializeDocumentSourceApiAssociation(&sv.SourceApiAssociation, value); err != nil { + case "apiKeys": + if err := awsRestjson1_deserializeDocumentApiKeys(&sv.ApiKeys, value); err != nil { return err } + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -5457,14 +6659,14 @@ func awsRestjson1_deserializeOpDocumentGetSourceApiAssociationOutput(v **GetSour return nil } -type awsRestjson1_deserializeOpGetType struct { +type awsRestjson1_deserializeOpListApis struct { } -func (*awsRestjson1_deserializeOpGetType) ID() string { +func (*awsRestjson1_deserializeOpListApis) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListApis) 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) @@ -5482,9 +6684,9 @@ func (m *awsRestjson1_deserializeOpGetType) HandleDeserialize(ctx context.Contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetType(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListApis(response, &metadata) } - output := &GetTypeOutput{} + output := &ListApisOutput{} out.Result = output var buff [1024]byte @@ -5505,7 +6707,7 @@ func (m *awsRestjson1_deserializeOpGetType) HandleDeserialize(ctx context.Contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetTypeOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListApisOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5519,7 +6721,7 @@ func (m *awsRestjson1_deserializeOpGetType) HandleDeserialize(ctx context.Contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetType(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListApis(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)} @@ -5560,18 +6762,12 @@ func awsRestjson1_deserializeOpErrorGetType(response *smithyhttp.Response, metad } switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("UnauthorizedException", errorCode): return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) @@ -5585,7 +6781,7 @@ func awsRestjson1_deserializeOpErrorGetType(response *smithyhttp.Response, metad } } -func awsRestjson1_deserializeOpDocumentGetTypeOutput(v **GetTypeOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListApisOutput(v **ListApisOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5598,20 +6794,29 @@ func awsRestjson1_deserializeOpDocumentGetTypeOutput(v **GetTypeOutput, value in return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetTypeOutput + var sv *ListApisOutput if *v == nil { - sv = &GetTypeOutput{} + sv = &ListApisOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "type": - if err := awsRestjson1_deserializeDocumentType(&sv.Type, value); err != nil { + case "apis": + if err := awsRestjson1_deserializeDocumentApis(&sv.Apis, value); err != nil { return err } + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -5621,14 +6826,14 @@ func awsRestjson1_deserializeOpDocumentGetTypeOutput(v **GetTypeOutput, value in return nil } -type awsRestjson1_deserializeOpListApiKeys struct { +type awsRestjson1_deserializeOpListChannelNamespaces struct { } -func (*awsRestjson1_deserializeOpListApiKeys) ID() string { +func (*awsRestjson1_deserializeOpListChannelNamespaces) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListApiKeys) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListChannelNamespaces) 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) @@ -5646,9 +6851,9 @@ func (m *awsRestjson1_deserializeOpListApiKeys) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListApiKeys(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListChannelNamespaces(response, &metadata) } - output := &ListApiKeysOutput{} + output := &ListChannelNamespacesOutput{} out.Result = output var buff [1024]byte @@ -5669,7 +6874,7 @@ func (m *awsRestjson1_deserializeOpListApiKeys) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListApiKeysOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListChannelNamespacesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5683,7 +6888,7 @@ func (m *awsRestjson1_deserializeOpListApiKeys) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListApiKeys(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListChannelNamespaces(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)} @@ -5746,7 +6951,7 @@ func awsRestjson1_deserializeOpErrorListApiKeys(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentListApiKeysOutput(v **ListApiKeysOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListChannelNamespacesOutput(v **ListChannelNamespacesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5759,17 +6964,17 @@ func awsRestjson1_deserializeOpDocumentListApiKeysOutput(v **ListApiKeysOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListApiKeysOutput + var sv *ListChannelNamespacesOutput if *v == nil { - sv = &ListApiKeysOutput{} + sv = &ListChannelNamespacesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "apiKeys": - if err := awsRestjson1_deserializeDocumentApiKeys(&sv.ApiKeys, value); err != nil { + case "channelNamespaces": + if err := awsRestjson1_deserializeDocumentChannelNamespaces(&sv.ChannelNamespaces, value); err != nil { return err } @@ -8201,14 +9406,248 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) } - output := &TagResourceOutput{} - out.Result = output + output := &TagResourceOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateApi struct { +} + +func (*awsRestjson1_deserializeOpUpdateApi) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateApi) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateApi(response, &metadata) + } + output := &UpdateApiOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateApiOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateApi(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)} @@ -8255,12 +9694,12 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) @@ -8277,14 +9716,50 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsRestjson1_deserializeOpUntagResource struct { +func awsRestjson1_deserializeOpDocumentUpdateApiOutput(v **UpdateApiOutput, 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 *UpdateApiOutput + if *v == nil { + sv = &UpdateApiOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "api": + if err := awsRestjson1_deserializeDocumentApi(&sv.Api, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpUntagResource) ID() string { +type awsRestjson1_deserializeOpUpdateApiCache struct { +} + +func (*awsRestjson1_deserializeOpUpdateApiCache) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateApiCache) 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) @@ -8302,16 +9777,44 @@ func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateApiCache(response, &metadata) } - output := &UntagResourceOutput{} + output := &UpdateApiCacheOutput{} out.Result = output + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateApiCacheOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateApiCache(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)} @@ -8352,18 +9855,15 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) @@ -8380,14 +9880,50 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpUpdateApiCache struct { +func awsRestjson1_deserializeOpDocumentUpdateApiCacheOutput(v **UpdateApiCacheOutput, 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 *UpdateApiCacheOutput + if *v == nil { + sv = &UpdateApiCacheOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "apiCache": + if err := awsRestjson1_deserializeDocumentApiCache(&sv.ApiCache, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpUpdateApiCache) ID() string { +type awsRestjson1_deserializeOpUpdateApiKey struct { +} + +func (*awsRestjson1_deserializeOpUpdateApiKey) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateApiCache) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateApiKey) 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) @@ -8405,9 +9941,9 @@ func (m *awsRestjson1_deserializeOpUpdateApiCache) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateApiCache(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateApiKey(response, &metadata) } - output := &UpdateApiCacheOutput{} + output := &UpdateApiKeyOutput{} out.Result = output var buff [1024]byte @@ -8428,7 +9964,7 @@ func (m *awsRestjson1_deserializeOpUpdateApiCache) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateApiCacheOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateApiKeyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8442,7 +9978,7 @@ func (m *awsRestjson1_deserializeOpUpdateApiCache) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateApiCache(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateApiKey(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)} @@ -8483,15 +10019,18 @@ func awsRestjson1_deserializeOpErrorUpdateApiCache(response *smithyhttp.Response } switch { + case strings.EqualFold("ApiKeyValidityOutOfBoundsException", errorCode): + return awsRestjson1_deserializeErrorApiKeyValidityOutOfBoundsException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) @@ -8508,7 +10047,7 @@ func awsRestjson1_deserializeOpErrorUpdateApiCache(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentUpdateApiCacheOutput(v **UpdateApiCacheOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateApiKeyOutput(v **UpdateApiKeyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8521,17 +10060,17 @@ func awsRestjson1_deserializeOpDocumentUpdateApiCacheOutput(v **UpdateApiCacheOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateApiCacheOutput + var sv *UpdateApiKeyOutput if *v == nil { - sv = &UpdateApiCacheOutput{} + sv = &UpdateApiKeyOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "apiCache": - if err := awsRestjson1_deserializeDocumentApiCache(&sv.ApiCache, value); err != nil { + case "apiKey": + if err := awsRestjson1_deserializeDocumentApiKey(&sv.ApiKey, value); err != nil { return err } @@ -8544,14 +10083,14 @@ func awsRestjson1_deserializeOpDocumentUpdateApiCacheOutput(v **UpdateApiCacheOu return nil } -type awsRestjson1_deserializeOpUpdateApiKey struct { +type awsRestjson1_deserializeOpUpdateChannelNamespace struct { } -func (*awsRestjson1_deserializeOpUpdateApiKey) ID() string { +func (*awsRestjson1_deserializeOpUpdateChannelNamespace) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateApiKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateChannelNamespace) 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) @@ -8569,9 +10108,9 @@ func (m *awsRestjson1_deserializeOpUpdateApiKey) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateApiKey(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateChannelNamespace(response, &metadata) } - output := &UpdateApiKeyOutput{} + output := &UpdateChannelNamespaceOutput{} out.Result = output var buff [1024]byte @@ -8592,7 +10131,7 @@ func (m *awsRestjson1_deserializeOpUpdateApiKey) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateApiKeyOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateChannelNamespaceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8606,7 +10145,7 @@ func (m *awsRestjson1_deserializeOpUpdateApiKey) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateApiKey(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateChannelNamespace(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)} @@ -8647,18 +10186,18 @@ func awsRestjson1_deserializeOpErrorUpdateApiKey(response *smithyhttp.Response, } switch { - case strings.EqualFold("ApiKeyValidityOutOfBoundsException", errorCode): - return awsRestjson1_deserializeErrorApiKeyValidityOutOfBoundsException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) @@ -8675,7 +10214,7 @@ func awsRestjson1_deserializeOpErrorUpdateApiKey(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentUpdateApiKeyOutput(v **UpdateApiKeyOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateChannelNamespaceOutput(v **UpdateChannelNamespaceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8688,17 +10227,17 @@ func awsRestjson1_deserializeOpDocumentUpdateApiKeyOutput(v **UpdateApiKeyOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateApiKeyOutput + var sv *UpdateChannelNamespaceOutput if *v == nil { - sv = &UpdateApiKeyOutput{} + sv = &UpdateChannelNamespaceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "apiKey": - if err := awsRestjson1_deserializeDocumentApiKey(&sv.ApiKey, value); err != nil { + case "channelNamespace": + if err := awsRestjson1_deserializeDocumentChannelNamespace(&sv.ChannelNamespace, value); err != nil { return err } @@ -9953,7 +11492,79 @@ func awsRestjson1_deserializeErrorApiKeyValidityOutOfBoundsException(response *s return err } - err := awsRestjson1_deserializeDocumentApiKeyValidityOutOfBoundsException(&output, shape) + err := awsRestjson1_deserializeDocumentApiKeyValidityOutOfBoundsException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorApiLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ApiLimitExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentApiLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorBadRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.BadRequestException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentBadRequestException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -9970,8 +11581,8 @@ func awsRestjson1_deserializeErrorApiKeyValidityOutOfBoundsException(response *s return output } -func awsRestjson1_deserializeErrorApiLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ApiLimitExceededException{} +func awsRestjson1_deserializeErrorConcurrentModificationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConcurrentModificationException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -9989,7 +11600,7 @@ func awsRestjson1_deserializeErrorApiLimitExceededException(response *smithyhttp return err } - err := awsRestjson1_deserializeDocumentApiLimitExceededException(&output, shape) + err := awsRestjson1_deserializeDocumentConcurrentModificationException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -10006,8 +11617,8 @@ func awsRestjson1_deserializeErrorApiLimitExceededException(response *smithyhttp return output } -func awsRestjson1_deserializeErrorBadRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.BadRequestException{} +func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -10025,7 +11636,7 @@ func awsRestjson1_deserializeErrorBadRequestException(response *smithyhttp.Respo return err } - err := awsRestjson1_deserializeDocumentBadRequestException(&output, shape) + err := awsRestjson1_deserializeDocumentConflictException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -10042,8 +11653,8 @@ func awsRestjson1_deserializeErrorBadRequestException(response *smithyhttp.Respo return output } -func awsRestjson1_deserializeErrorConcurrentModificationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ConcurrentModificationException{} +func awsRestjson1_deserializeErrorGraphQLSchemaException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.GraphQLSchemaException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -10061,7 +11672,7 @@ func awsRestjson1_deserializeErrorConcurrentModificationException(response *smit return err } - err := awsRestjson1_deserializeDocumentConcurrentModificationException(&output, shape) + err := awsRestjson1_deserializeDocumentGraphQLSchemaException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -10078,8 +11689,8 @@ func awsRestjson1_deserializeErrorConcurrentModificationException(response *smit return output } -func awsRestjson1_deserializeErrorGraphQLSchemaException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.GraphQLSchemaException{} +func awsRestjson1_deserializeErrorInternalFailureException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalFailureException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -10097,7 +11708,7 @@ func awsRestjson1_deserializeErrorGraphQLSchemaException(response *smithyhttp.Re return err } - err := awsRestjson1_deserializeDocumentGraphQLSchemaException(&output, shape) + err := awsRestjson1_deserializeDocumentInternalFailureException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -10114,8 +11725,8 @@ func awsRestjson1_deserializeErrorGraphQLSchemaException(response *smithyhttp.Re return output } -func awsRestjson1_deserializeErrorInternalFailureException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InternalFailureException{} +func awsRestjson1_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.LimitExceededException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -10133,7 +11744,7 @@ func awsRestjson1_deserializeErrorInternalFailureException(response *smithyhttp. return err } - err := awsRestjson1_deserializeDocumentInternalFailureException(&output, shape) + err := awsRestjson1_deserializeDocumentLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -10150,8 +11761,8 @@ func awsRestjson1_deserializeErrorInternalFailureException(response *smithyhttp. return output } -func awsRestjson1_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.LimitExceededException{} +func awsRestjson1_deserializeErrorNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NotFoundException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -10169,7 +11780,7 @@ func awsRestjson1_deserializeErrorLimitExceededException(response *smithyhttp.Re return err } - err := awsRestjson1_deserializeDocumentLimitExceededException(&output, shape) + err := awsRestjson1_deserializeDocumentNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -10186,8 +11797,8 @@ func awsRestjson1_deserializeErrorLimitExceededException(response *smithyhttp.Re return output } -func awsRestjson1_deserializeErrorNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NotFoundException{} +func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceQuotaExceededException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -10205,7 +11816,7 @@ func awsRestjson1_deserializeErrorNotFoundException(response *smithyhttp.Respons return err } - err := awsRestjson1_deserializeDocumentNotFoundException(&output, shape) + err := awsRestjson1_deserializeDocumentServiceQuotaExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -10387,6 +11998,122 @@ func awsRestjson1_deserializeDocumentAdditionalAuthenticationProviders(v *[]type return nil } +func awsRestjson1_deserializeDocumentApi(v **types.Api, 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.Api + if *v == nil { + sv = &types.Api{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "apiArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ApiArn = ptr.String(jtv) + } + + case "apiId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ApiId = ptr.String(jtv) + } + + case "created": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Created = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "dns": + if err := awsRestjson1_deserializeDocumentMapOfStringToString(&sv.Dns, value); err != nil { + return err + } + + case "eventConfig": + if err := awsRestjson1_deserializeDocumentEventConfig(&sv.EventConfig, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApiName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "ownerContact": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OwnerContact to be of type string, got %T instead", value) + } + sv.OwnerContact = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "wafWebAclArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.WafWebAclArn = ptr.String(jtv) + } + + case "xrayEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.XrayEnabled = jtv + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentApiAssociation(v **types.ApiAssociation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10640,9 +12367,123 @@ func awsRestjson1_deserializeDocumentApiKeyLimitExceededException(v **types.ApiK return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ApiKeyLimitExceededException + var sv *types.ApiKeyLimitExceededException + if *v == nil { + sv = &types.ApiKeyLimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentApiKeys(v *[]types.ApiKey, 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.ApiKey + if *v == nil { + cv = []types.ApiKey{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ApiKey + destAddr := &col + if err := awsRestjson1_deserializeDocumentApiKey(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentApiKeyValidityOutOfBoundsException(v **types.ApiKeyValidityOutOfBoundsException, 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.ApiKeyValidityOutOfBoundsException + if *v == nil { + sv = &types.ApiKeyValidityOutOfBoundsException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentApiLimitExceededException(v **types.ApiLimitExceededException, 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.ApiLimitExceededException if *v == nil { - sv = &types.ApiKeyLimitExceededException{} + sv = &types.ApiLimitExceededException{} } else { sv = *v } @@ -10667,7 +12508,7 @@ func awsRestjson1_deserializeDocumentApiKeyLimitExceededException(v **types.ApiK return nil } -func awsRestjson1_deserializeDocumentApiKeys(v *[]types.ApiKey, value interface{}) error { +func awsRestjson1_deserializeDocumentApis(v *[]types.Api, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10680,17 +12521,17 @@ func awsRestjson1_deserializeDocumentApiKeys(v *[]types.ApiKey, value interface{ return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ApiKey + var cv []types.Api if *v == nil { - cv = []types.ApiKey{} + cv = []types.Api{} } else { cv = *v } for _, value := range shape { - var col types.ApiKey + var col types.Api destAddr := &col - if err := awsRestjson1_deserializeDocumentApiKey(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentApi(&destAddr, value); err != nil { return err } col = *destAddr @@ -10701,7 +12542,7 @@ func awsRestjson1_deserializeDocumentApiKeys(v *[]types.ApiKey, value interface{ return nil } -func awsRestjson1_deserializeDocumentApiKeyValidityOutOfBoundsException(v **types.ApiKeyValidityOutOfBoundsException, value interface{}) error { +func awsRestjson1_deserializeDocumentAppSyncRuntime(v **types.AppSyncRuntime, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10714,22 +12555,31 @@ func awsRestjson1_deserializeDocumentApiKeyValidityOutOfBoundsException(v **type return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ApiKeyValidityOutOfBoundsException + var sv *types.AppSyncRuntime if *v == nil { - sv = &types.ApiKeyValidityOutOfBoundsException{} + sv = &types.AppSyncRuntime{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuntimeName to be of type string, got %T instead", value) + } + sv.Name = types.RuntimeName(jtv) + } + + case "runtimeVersion": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.RuntimeVersion = ptr.String(jtv) } default: @@ -10741,7 +12591,7 @@ func awsRestjson1_deserializeDocumentApiKeyValidityOutOfBoundsException(v **type return nil } -func awsRestjson1_deserializeDocumentApiLimitExceededException(v **types.ApiLimitExceededException, value interface{}) error { +func awsRestjson1_deserializeDocumentAuthMode(v **types.AuthMode, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10754,22 +12604,22 @@ func awsRestjson1_deserializeDocumentApiLimitExceededException(v **types.ApiLimi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ApiLimitExceededException + var sv *types.AuthMode if *v == nil { - sv = &types.ApiLimitExceededException{} + sv = &types.AuthMode{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "authType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected AuthenticationType to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.AuthType = types.AuthenticationType(jtv) } default: @@ -10781,7 +12631,41 @@ func awsRestjson1_deserializeDocumentApiLimitExceededException(v **types.ApiLimi return nil } -func awsRestjson1_deserializeDocumentAppSyncRuntime(v **types.AppSyncRuntime, value interface{}) error { +func awsRestjson1_deserializeDocumentAuthModes(v *[]types.AuthMode, 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.AuthMode + if *v == nil { + cv = []types.AuthMode{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AuthMode + destAddr := &col + if err := awsRestjson1_deserializeDocumentAuthMode(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAuthorizationConfig(v **types.AuthorizationConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10794,31 +12678,27 @@ func awsRestjson1_deserializeDocumentAppSyncRuntime(v **types.AppSyncRuntime, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AppSyncRuntime + var sv *types.AuthorizationConfig if *v == nil { - sv = &types.AppSyncRuntime{} + sv = &types.AuthorizationConfig{} } else { sv = *v } for key, value := range shape { switch key { - case "name": + case "authorizationType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RuntimeName to be of type string, got %T instead", value) + return fmt.Errorf("expected AuthorizationType to be of type string, got %T instead", value) } - sv.Name = types.RuntimeName(jtv) + sv.AuthorizationType = types.AuthorizationType(jtv) } - case "runtimeVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.RuntimeVersion = ptr.String(jtv) + case "awsIamConfig": + if err := awsRestjson1_deserializeDocumentAwsIamConfig(&sv.AwsIamConfig, value); err != nil { + return err } default: @@ -10830,7 +12710,7 @@ func awsRestjson1_deserializeDocumentAppSyncRuntime(v **types.AppSyncRuntime, va return nil } -func awsRestjson1_deserializeDocumentAuthorizationConfig(v **types.AuthorizationConfig, value interface{}) error { +func awsRestjson1_deserializeDocumentAuthProvider(v **types.AuthProvider, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10843,26 +12723,36 @@ func awsRestjson1_deserializeDocumentAuthorizationConfig(v **types.Authorization return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AuthorizationConfig + var sv *types.AuthProvider if *v == nil { - sv = &types.AuthorizationConfig{} + sv = &types.AuthProvider{} } else { sv = *v } for key, value := range shape { switch key { - case "authorizationType": + case "authType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AuthorizationType to be of type string, got %T instead", value) + return fmt.Errorf("expected AuthenticationType to be of type string, got %T instead", value) } - sv.AuthorizationType = types.AuthorizationType(jtv) + sv.AuthType = types.AuthenticationType(jtv) } - case "awsIamConfig": - if err := awsRestjson1_deserializeDocumentAwsIamConfig(&sv.AwsIamConfig, value); err != nil { + case "cognitoConfig": + if err := awsRestjson1_deserializeDocumentCognitoConfig(&sv.CognitoConfig, value); err != nil { + return err + } + + case "lambdaAuthorizerConfig": + if err := awsRestjson1_deserializeDocumentLambdaAuthorizerConfig(&sv.LambdaAuthorizerConfig, value); err != nil { + return err + } + + case "openIDConnectConfig": + if err := awsRestjson1_deserializeDocumentOpenIDConnectConfig(&sv.OpenIDConnectConfig, value); err != nil { return err } @@ -10875,6 +12765,40 @@ func awsRestjson1_deserializeDocumentAuthorizationConfig(v **types.Authorization return nil } +func awsRestjson1_deserializeDocumentAuthProviders(v *[]types.AuthProvider, 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.AuthProvider + if *v == nil { + cv = []types.AuthProvider{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AuthProvider + destAddr := &col + if err := awsRestjson1_deserializeDocumentAuthProvider(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentAwsIamConfig(v **types.AwsIamConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11041,17 +12965,167 @@ func awsRestjson1_deserializeDocumentCachingConfig(v **types.CachingConfig, valu return err } - case "ttl": + case "ttl": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Ttl = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCachingKeys(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentChannelNamespace(v **types.ChannelNamespace, 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.ChannelNamespace + if *v == nil { + sv = &types.ChannelNamespace{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "apiId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ApiId = ptr.String(jtv) + } + + case "channelNamespaceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ChannelNamespaceArn = ptr.String(jtv) + } + + case "codeHandlers": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Code to be of type string, got %T instead", value) + } + sv.CodeHandlers = ptr.String(jtv) + } + + case "created": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Created = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "lastModified": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModified = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "name": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Long to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected Namespace to be of type string, got %T instead", value) } - sv.Ttl = i64 + sv.Name = ptr.String(jtv) + } + + case "publishAuthModes": + if err := awsRestjson1_deserializeDocumentAuthModes(&sv.PublishAuthModes, value); err != nil { + return err + } + + case "subscribeAuthModes": + if err := awsRestjson1_deserializeDocumentAuthModes(&sv.SubscribeAuthModes, value); err != nil { + return err + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err } default: @@ -11063,7 +13137,7 @@ func awsRestjson1_deserializeDocumentCachingConfig(v **types.CachingConfig, valu return nil } -func awsRestjson1_deserializeDocumentCachingKeys(v *[]string, value interface{}) error { +func awsRestjson1_deserializeDocumentChannelNamespaces(v *[]types.ChannelNamespace, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11076,22 +13150,20 @@ func awsRestjson1_deserializeDocumentCachingKeys(v *[]string, value interface{}) return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var cv []types.ChannelNamespace if *v == nil { - cv = []string{} + cv = []types.ChannelNamespace{} } else { cv = *v } for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - col = jtv + var col types.ChannelNamespace + destAddr := &col + if err := awsRestjson1_deserializeDocumentChannelNamespace(&destAddr, value); err != nil { + return err } + col = *destAddr cv = append(cv, col) } @@ -11257,6 +13329,64 @@ func awsRestjson1_deserializeDocumentCodeErrors(v *[]types.CodeError, value inte return nil } +func awsRestjson1_deserializeDocumentCognitoConfig(v **types.CognitoConfig, 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.CognitoConfig + if *v == nil { + sv = &types.CognitoConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "appIdClientRegex": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AppIdClientRegex = ptr.String(jtv) + } + + case "awsRegion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AwsRegion = ptr.String(jtv) + } + + case "userPoolId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.UserPoolId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentCognitoUserPoolConfig(v **types.CognitoUserPoolConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11355,6 +13485,46 @@ func awsRestjson1_deserializeDocumentConcurrentModificationException(v **types.C return nil } +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentDataSource(v **types.DataSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12470,6 +14640,111 @@ func awsRestjson1_deserializeDocumentEventBridgeDataSourceConfig(v **types.Event return nil } +func awsRestjson1_deserializeDocumentEventConfig(v **types.EventConfig, 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.EventConfig + if *v == nil { + sv = &types.EventConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "authProviders": + if err := awsRestjson1_deserializeDocumentAuthProviders(&sv.AuthProviders, value); err != nil { + return err + } + + case "connectionAuthModes": + if err := awsRestjson1_deserializeDocumentAuthModes(&sv.ConnectionAuthModes, value); err != nil { + return err + } + + case "defaultPublishAuthModes": + if err := awsRestjson1_deserializeDocumentAuthModes(&sv.DefaultPublishAuthModes, value); err != nil { + return err + } + + case "defaultSubscribeAuthModes": + if err := awsRestjson1_deserializeDocumentAuthModes(&sv.DefaultSubscribeAuthModes, value); err != nil { + return err + } + + case "logConfig": + if err := awsRestjson1_deserializeDocumentEventLogConfig(&sv.LogConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEventLogConfig(v **types.EventLogConfig, 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.EventLogConfig + if *v == nil { + sv = &types.EventLogConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "cloudWatchLogsRoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CloudWatchLogsRoleArn = ptr.String(jtv) + } + + case "logLevel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventLogLevel to be of type string, got %T instead", value) + } + sv.LogLevel = types.EventLogLevel(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentFunctionConfiguration(v **types.FunctionConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13856,6 +16131,46 @@ func awsRestjson1_deserializeDocumentResolvers(v *[]types.Resolver, value interf return nil } +func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ServiceQuotaExceededException + if *v == nil { + sv = &types.ServiceQuotaExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentSourceApiAssociation(v **types.SourceApiAssociation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/appsync/generated.json b/service/appsync/generated.json index c5768be707d..3083450251a 100644 --- a/service/appsync/generated.json +++ b/service/appsync/generated.json @@ -11,16 +11,20 @@ "api_op_AssociateApi.go", "api_op_AssociateMergedGraphqlApi.go", "api_op_AssociateSourceGraphqlApi.go", + "api_op_CreateApi.go", "api_op_CreateApiCache.go", "api_op_CreateApiKey.go", + "api_op_CreateChannelNamespace.go", "api_op_CreateDataSource.go", "api_op_CreateDomainName.go", "api_op_CreateFunction.go", "api_op_CreateGraphqlApi.go", "api_op_CreateResolver.go", "api_op_CreateType.go", + "api_op_DeleteApi.go", "api_op_DeleteApiCache.go", "api_op_DeleteApiKey.go", + "api_op_DeleteChannelNamespace.go", "api_op_DeleteDataSource.go", "api_op_DeleteDomainName.go", "api_op_DeleteFunction.go", @@ -33,8 +37,10 @@ "api_op_EvaluateCode.go", "api_op_EvaluateMappingTemplate.go", "api_op_FlushApiCache.go", + "api_op_GetApi.go", "api_op_GetApiAssociation.go", "api_op_GetApiCache.go", + "api_op_GetChannelNamespace.go", "api_op_GetDataSource.go", "api_op_GetDataSourceIntrospection.go", "api_op_GetDomainName.go", @@ -47,6 +53,8 @@ "api_op_GetSourceApiAssociation.go", "api_op_GetType.go", "api_op_ListApiKeys.go", + "api_op_ListApis.go", + "api_op_ListChannelNamespaces.go", "api_op_ListDataSources.go", "api_op_ListDomainNames.go", "api_op_ListFunctions.go", @@ -63,8 +71,10 @@ "api_op_StartSchemaMerge.go", "api_op_TagResource.go", "api_op_UntagResource.go", + "api_op_UpdateApi.go", "api_op_UpdateApiCache.go", "api_op_UpdateApiKey.go", + "api_op_UpdateChannelNamespace.go", "api_op_UpdateDataSource.go", "api_op_UpdateDomainName.go", "api_op_UpdateFunction.go", diff --git a/service/appsync/serializers.go b/service/appsync/serializers.go index a1e22532cb8..e62da00aff8 100644 --- a/service/appsync/serializers.go +++ b/service/appsync/serializers.go @@ -321,6 +321,106 @@ func awsRestjson1_serializeOpDocumentAssociateSourceGraphqlApiInput(v *Associate return nil } +type awsRestjson1_serializeOpCreateApi struct { +} + +func (*awsRestjson1_serializeOpCreateApi) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateApi) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CreateApiInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/apis") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateApiInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateApiInput(v *CreateApiInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateApiInput(v *CreateApiInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EventConfig != nil { + ok := object.Key("eventConfig") + if err := awsRestjson1_serializeDocumentEventConfig(v.EventConfig, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.OwnerContact != nil { + ok := object.Key("ownerContact") + ok.String(*v.OwnerContact) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateApiCache struct { } @@ -539,6 +639,126 @@ func awsRestjson1_serializeOpDocumentCreateApiKeyInput(v *CreateApiKeyInput, val return nil } +type awsRestjson1_serializeOpCreateChannelNamespace struct { +} + +func (*awsRestjson1_serializeOpCreateChannelNamespace) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateChannelNamespace) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CreateChannelNamespaceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/apis/{apiId}/channelNamespaces") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateChannelNamespaceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateChannelNamespaceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateChannelNamespaceInput(v *CreateChannelNamespaceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApiId == nil || len(*v.ApiId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} + } + if v.ApiId != nil { + if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateChannelNamespaceInput(v *CreateChannelNamespaceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CodeHandlers != nil { + ok := object.Key("codeHandlers") + ok.String(*v.CodeHandlers) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.PublishAuthModes != nil { + ok := object.Key("publishAuthModes") + if err := awsRestjson1_serializeDocumentAuthModes(v.PublishAuthModes, ok); err != nil { + return err + } + } + + if v.SubscribeAuthModes != nil { + ok := object.Key("subscribeAuthModes") + if err := awsRestjson1_serializeDocumentAuthModes(v.SubscribeAuthModes, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateDataSource struct { } @@ -1376,6 +1596,77 @@ func awsRestjson1_serializeOpDocumentCreateTypeInput(v *CreateTypeInput, value s return nil } +type awsRestjson1_serializeOpDeleteApi struct { +} + +func (*awsRestjson1_serializeOpDeleteApi) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteApi) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteApiInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/apis/{apiId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteApiInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteApiInput(v *DeleteApiInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApiId == nil || len(*v.ApiId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} + } + if v.ApiId != nil { + if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteApiCache struct { } @@ -1527,6 +1818,86 @@ func awsRestjson1_serializeOpHttpBindingsDeleteApiKeyInput(v *DeleteApiKeyInput, return nil } +type awsRestjson1_serializeOpDeleteChannelNamespace struct { +} + +func (*awsRestjson1_serializeOpDeleteChannelNamespace) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteChannelNamespace) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteChannelNamespaceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/apis/{apiId}/channelNamespaces/{name}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteChannelNamespaceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteChannelNamespaceInput(v *DeleteChannelNamespaceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApiId == nil || len(*v.ApiId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} + } + if v.ApiId != nil { + if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { + return err + } + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteDataSource struct { } @@ -2472,11 +2843,153 @@ func awsRestjson1_serializeOpHttpBindingsFlushApiCacheInput(v *FlushApiCacheInpu return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ApiId == nil || len(*v.ApiId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} + if v.ApiId == nil || len(*v.ApiId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} + } + if v.ApiId != nil { + if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetApi struct { +} + +func (*awsRestjson1_serializeOpGetApi) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetApi) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetApiInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/apis/{apiId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetApiInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetApiInput(v *GetApiInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApiId == nil || len(*v.ApiId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} + } + if v.ApiId != nil { + if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetApiAssociation struct { +} + +func (*awsRestjson1_serializeOpGetApiAssociation) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetApiAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetApiAssociationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/domainnames/{domainName}/apiassociation") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetApiAssociationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetApiAssociationInput(v *GetApiAssociationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName == nil || len(*v.DomainName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")} } - if v.ApiId != nil { - if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { + if v.DomainName != nil { + if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil { return err } } @@ -2484,14 +2997,14 @@ func awsRestjson1_serializeOpHttpBindingsFlushApiCacheInput(v *FlushApiCacheInpu return nil } -type awsRestjson1_serializeOpGetApiAssociation struct { +type awsRestjson1_serializeOpGetApiCache struct { } -func (*awsRestjson1_serializeOpGetApiAssociation) ID() string { +func (*awsRestjson1_serializeOpGetApiCache) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetApiAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetApiCache) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2503,13 +3016,13 @@ func (m *awsRestjson1_serializeOpGetApiAssociation) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetApiAssociationInput) + input, ok := in.Parameters.(*GetApiCacheInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/domainnames/{domainName}/apiassociation") + opPath, opQuery := httpbinding.SplitURI("/v1/apis/{apiId}/ApiCaches") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2525,7 +3038,7 @@ func (m *awsRestjson1_serializeOpGetApiAssociation) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetApiAssociationInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetApiCacheInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2538,16 +3051,16 @@ func (m *awsRestjson1_serializeOpGetApiAssociation) HandleSerialize(ctx context. span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetApiAssociationInput(v *GetApiAssociationInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetApiCacheInput(v *GetApiCacheInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.DomainName == nil || len(*v.DomainName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")} + if v.ApiId == nil || len(*v.ApiId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} } - if v.DomainName != nil { - if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil { + if v.ApiId != nil { + if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { return err } } @@ -2555,14 +3068,14 @@ func awsRestjson1_serializeOpHttpBindingsGetApiAssociationInput(v *GetApiAssocia return nil } -type awsRestjson1_serializeOpGetApiCache struct { +type awsRestjson1_serializeOpGetChannelNamespace struct { } -func (*awsRestjson1_serializeOpGetApiCache) ID() string { +func (*awsRestjson1_serializeOpGetChannelNamespace) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetApiCache) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetChannelNamespace) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2574,13 +3087,13 @@ func (m *awsRestjson1_serializeOpGetApiCache) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetApiCacheInput) + input, ok := in.Parameters.(*GetChannelNamespaceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/apis/{apiId}/ApiCaches") + opPath, opQuery := httpbinding.SplitURI("/v2/apis/{apiId}/channelNamespaces/{name}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2596,7 +3109,7 @@ func (m *awsRestjson1_serializeOpGetApiCache) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetApiCacheInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetChannelNamespaceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2609,7 +3122,7 @@ func (m *awsRestjson1_serializeOpGetApiCache) HandleSerialize(ctx context.Contex span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetApiCacheInput(v *GetApiCacheInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetChannelNamespaceInput(v *GetChannelNamespaceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -2623,6 +3136,15 @@ func awsRestjson1_serializeOpHttpBindingsGetApiCacheInput(v *GetApiCacheInput, e } } + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("name").String(*v.Name); err != nil { + return err + } + } + return nil } @@ -3564,6 +4086,155 @@ func awsRestjson1_serializeOpHttpBindingsListApiKeysInput(v *ListApiKeysInput, e return nil } +type awsRestjson1_serializeOpListApis struct { +} + +func (*awsRestjson1_serializeOpListApis) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListApis) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListApisInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/apis") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListApisInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListApisInput(v *ListApisInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListChannelNamespaces struct { +} + +func (*awsRestjson1_serializeOpListChannelNamespaces) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListChannelNamespaces) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListChannelNamespacesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/apis/{apiId}/channelNamespaces") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListChannelNamespacesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListChannelNamespacesInput(v *ListChannelNamespacesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApiId == nil || len(*v.ApiId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} + } + if v.ApiId != nil { + if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { + return err + } + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + type awsRestjson1_serializeOpListDataSources struct { } @@ -4857,11 +5528,99 @@ func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Cont restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) } - if err != nil { + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + if v.TagKeys != nil { + for i := range v.TagKeys { + encoder.AddQuery("tagKeys").String(v.TagKeys[i]) + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateApi struct { +} + +func (*awsRestjson1_serializeOpUpdateApi) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateApi) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*UpdateApiInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/apis/{apiId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateApiInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateApiInput(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} } @@ -4874,26 +5633,44 @@ func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateApiInput(v *UpdateApiInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + if v.ApiId == nil || len(*v.ApiId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} } - if v.ResourceArn != nil { - if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + if v.ApiId != nil { + if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { return err } } - if v.TagKeys != nil { - for i := range v.TagKeys { - encoder.AddQuery("tagKeys").String(v.TagKeys[i]) + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateApiInput(v *UpdateApiInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EventConfig != nil { + ok := object.Key("eventConfig") + if err := awsRestjson1_serializeDocumentEventConfig(v.EventConfig, ok); err != nil { + return err } } + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.OwnerContact != nil { + ok := object.Key("ownerContact") + ok.String(*v.OwnerContact) + } + return nil } @@ -5114,6 +5891,123 @@ func awsRestjson1_serializeOpDocumentUpdateApiKeyInput(v *UpdateApiKeyInput, val return nil } +type awsRestjson1_serializeOpUpdateChannelNamespace struct { +} + +func (*awsRestjson1_serializeOpUpdateChannelNamespace) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateChannelNamespace) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*UpdateChannelNamespaceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/apis/{apiId}/channelNamespaces/{name}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateChannelNamespaceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateChannelNamespaceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateChannelNamespaceInput(v *UpdateChannelNamespaceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApiId == nil || len(*v.ApiId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} + } + if v.ApiId != nil { + if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { + return err + } + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateChannelNamespaceInput(v *UpdateChannelNamespaceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CodeHandlers != nil { + ok := object.Key("codeHandlers") + ok.String(*v.CodeHandlers) + } + + if v.PublishAuthModes != nil { + ok := object.Key("publishAuthModes") + if err := awsRestjson1_serializeDocumentAuthModes(v.PublishAuthModes, ok); err != nil { + return err + } + } + + if v.SubscribeAuthModes != nil { + ok := object.Key("subscribeAuthModes") + if err := awsRestjson1_serializeDocumentAuthModes(v.SubscribeAuthModes, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpUpdateDataSource struct { } @@ -6149,6 +7043,31 @@ func awsRestjson1_serializeDocumentAppSyncRuntime(v *types.AppSyncRuntime, value return nil } +func awsRestjson1_serializeDocumentAuthMode(v *types.AuthMode, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.AuthType) > 0 { + ok := object.Key("authType") + ok.String(string(v.AuthType)) + } + + return nil +} + +func awsRestjson1_serializeDocumentAuthModes(v []types.AuthMode, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentAuthMode(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentAuthorizationConfig(v *types.AuthorizationConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6168,6 +7087,52 @@ func awsRestjson1_serializeDocumentAuthorizationConfig(v *types.AuthorizationCon return nil } +func awsRestjson1_serializeDocumentAuthProvider(v *types.AuthProvider, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.AuthType) > 0 { + ok := object.Key("authType") + ok.String(string(v.AuthType)) + } + + if v.CognitoConfig != nil { + ok := object.Key("cognitoConfig") + if err := awsRestjson1_serializeDocumentCognitoConfig(v.CognitoConfig, ok); err != nil { + return err + } + } + + if v.LambdaAuthorizerConfig != nil { + ok := object.Key("lambdaAuthorizerConfig") + if err := awsRestjson1_serializeDocumentLambdaAuthorizerConfig(v.LambdaAuthorizerConfig, ok); err != nil { + return err + } + } + + if v.OpenIDConnectConfig != nil { + ok := object.Key("openIDConnectConfig") + if err := awsRestjson1_serializeDocumentOpenIDConnectConfig(v.OpenIDConnectConfig, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentAuthProviders(v []types.AuthProvider, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentAuthProvider(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentAwsIamConfig(v *types.AwsIamConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6215,6 +7180,28 @@ func awsRestjson1_serializeDocumentCachingKeys(v []string, value smithyjson.Valu return nil } +func awsRestjson1_serializeDocumentCognitoConfig(v *types.CognitoConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AppIdClientRegex != nil { + ok := object.Key("appIdClientRegex") + ok.String(*v.AppIdClientRegex) + } + + if v.AwsRegion != nil { + ok := object.Key("awsRegion") + ok.String(*v.AwsRegion) + } + + if v.UserPoolId != nil { + ok := object.Key("userPoolId") + ok.String(*v.UserPoolId) + } + + return nil +} + func awsRestjson1_serializeDocumentCognitoUserPoolConfig(v *types.CognitoUserPoolConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6355,6 +7342,65 @@ func awsRestjson1_serializeDocumentEventBridgeDataSourceConfig(v *types.EventBri return nil } +func awsRestjson1_serializeDocumentEventConfig(v *types.EventConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AuthProviders != nil { + ok := object.Key("authProviders") + if err := awsRestjson1_serializeDocumentAuthProviders(v.AuthProviders, ok); err != nil { + return err + } + } + + if v.ConnectionAuthModes != nil { + ok := object.Key("connectionAuthModes") + if err := awsRestjson1_serializeDocumentAuthModes(v.ConnectionAuthModes, ok); err != nil { + return err + } + } + + if v.DefaultPublishAuthModes != nil { + ok := object.Key("defaultPublishAuthModes") + if err := awsRestjson1_serializeDocumentAuthModes(v.DefaultPublishAuthModes, ok); err != nil { + return err + } + } + + if v.DefaultSubscribeAuthModes != nil { + ok := object.Key("defaultSubscribeAuthModes") + if err := awsRestjson1_serializeDocumentAuthModes(v.DefaultSubscribeAuthModes, ok); err != nil { + return err + } + } + + if v.LogConfig != nil { + ok := object.Key("logConfig") + if err := awsRestjson1_serializeDocumentEventLogConfig(v.LogConfig, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentEventLogConfig(v *types.EventLogConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CloudWatchLogsRoleArn != nil { + ok := object.Key("cloudWatchLogsRoleArn") + ok.String(*v.CloudWatchLogsRoleArn) + } + + if len(v.LogLevel) > 0 { + ok := object.Key("logLevel") + ok.String(string(v.LogLevel)) + } + + return nil +} + func awsRestjson1_serializeDocumentFunctionsIds(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/appsync/snapshot/api_op_CreateApi.go.snap b/service/appsync/snapshot/api_op_CreateApi.go.snap new file mode 100644 index 00000000000..b16efe069ee --- /dev/null +++ b/service/appsync/snapshot/api_op_CreateApi.go.snap @@ -0,0 +1,41 @@ +CreateApi + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/appsync/snapshot/api_op_CreateChannelNamespace.go.snap b/service/appsync/snapshot/api_op_CreateChannelNamespace.go.snap new file mode 100644 index 00000000000..be1755a8dfc --- /dev/null +++ b/service/appsync/snapshot/api_op_CreateChannelNamespace.go.snap @@ -0,0 +1,41 @@ +CreateChannelNamespace + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/appsync/snapshot/api_op_DeleteApi.go.snap b/service/appsync/snapshot/api_op_DeleteApi.go.snap new file mode 100644 index 00000000000..c2e01a8ebdb --- /dev/null +++ b/service/appsync/snapshot/api_op_DeleteApi.go.snap @@ -0,0 +1,41 @@ +DeleteApi + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/appsync/snapshot/api_op_DeleteChannelNamespace.go.snap b/service/appsync/snapshot/api_op_DeleteChannelNamespace.go.snap new file mode 100644 index 00000000000..320cae74518 --- /dev/null +++ b/service/appsync/snapshot/api_op_DeleteChannelNamespace.go.snap @@ -0,0 +1,41 @@ +DeleteChannelNamespace + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/appsync/snapshot/api_op_GetApi.go.snap b/service/appsync/snapshot/api_op_GetApi.go.snap new file mode 100644 index 00000000000..2453998780d --- /dev/null +++ b/service/appsync/snapshot/api_op_GetApi.go.snap @@ -0,0 +1,41 @@ +GetApi + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/appsync/snapshot/api_op_GetChannelNamespace.go.snap b/service/appsync/snapshot/api_op_GetChannelNamespace.go.snap new file mode 100644 index 00000000000..0ba7daa02da --- /dev/null +++ b/service/appsync/snapshot/api_op_GetChannelNamespace.go.snap @@ -0,0 +1,41 @@ +GetChannelNamespace + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/appsync/snapshot/api_op_ListApis.go.snap b/service/appsync/snapshot/api_op_ListApis.go.snap new file mode 100644 index 00000000000..008079cf385 --- /dev/null +++ b/service/appsync/snapshot/api_op_ListApis.go.snap @@ -0,0 +1,40 @@ +ListApis + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/appsync/snapshot/api_op_ListChannelNamespaces.go.snap b/service/appsync/snapshot/api_op_ListChannelNamespaces.go.snap new file mode 100644 index 00000000000..731990da3bd --- /dev/null +++ b/service/appsync/snapshot/api_op_ListChannelNamespaces.go.snap @@ -0,0 +1,41 @@ +ListChannelNamespaces + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/appsync/snapshot/api_op_UpdateApi.go.snap b/service/appsync/snapshot/api_op_UpdateApi.go.snap new file mode 100644 index 00000000000..ba48351990f --- /dev/null +++ b/service/appsync/snapshot/api_op_UpdateApi.go.snap @@ -0,0 +1,41 @@ +UpdateApi + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/appsync/snapshot/api_op_UpdateChannelNamespace.go.snap b/service/appsync/snapshot/api_op_UpdateChannelNamespace.go.snap new file mode 100644 index 00000000000..6491a52b0fa --- /dev/null +++ b/service/appsync/snapshot/api_op_UpdateChannelNamespace.go.snap @@ -0,0 +1,41 @@ +UpdateChannelNamespace + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/appsync/snapshot_test.go b/service/appsync/snapshot_test.go index 2297ad2bb52..2b33031dea9 100644 --- a/service/appsync/snapshot_test.go +++ b/service/appsync/snapshot_test.go @@ -98,6 +98,18 @@ func TestCheckSnapshot_AssociateSourceGraphqlApi(t *testing.T) { } } +func TestCheckSnapshot_CreateApi(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateApi(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateApi") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateApiCache(t *testing.T) { svc := New(Options{}) _, err := svc.CreateApiCache(context.Background(), nil, func(o *Options) { @@ -122,6 +134,18 @@ func TestCheckSnapshot_CreateApiKey(t *testing.T) { } } +func TestCheckSnapshot_CreateChannelNamespace(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateChannelNamespace(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateChannelNamespace") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateDataSource(t *testing.T) { svc := New(Options{}) _, err := svc.CreateDataSource(context.Background(), nil, func(o *Options) { @@ -194,6 +218,18 @@ func TestCheckSnapshot_CreateType(t *testing.T) { } } +func TestCheckSnapshot_DeleteApi(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteApi(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteApi") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteApiCache(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteApiCache(context.Background(), nil, func(o *Options) { @@ -218,6 +254,18 @@ func TestCheckSnapshot_DeleteApiKey(t *testing.T) { } } +func TestCheckSnapshot_DeleteChannelNamespace(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteChannelNamespace(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteChannelNamespace") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteDataSource(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteDataSource(context.Background(), nil, func(o *Options) { @@ -362,6 +410,18 @@ func TestCheckSnapshot_FlushApiCache(t *testing.T) { } } +func TestCheckSnapshot_GetApi(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetApi(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetApi") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetApiAssociation(t *testing.T) { svc := New(Options{}) _, err := svc.GetApiAssociation(context.Background(), nil, func(o *Options) { @@ -386,6 +446,18 @@ func TestCheckSnapshot_GetApiCache(t *testing.T) { } } +func TestCheckSnapshot_GetChannelNamespace(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetChannelNamespace(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetChannelNamespace") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetDataSource(t *testing.T) { svc := New(Options{}) _, err := svc.GetDataSource(context.Background(), nil, func(o *Options) { @@ -530,6 +602,30 @@ func TestCheckSnapshot_ListApiKeys(t *testing.T) { } } +func TestCheckSnapshot_ListApis(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListApis(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListApis") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListChannelNamespaces(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListChannelNamespaces(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListChannelNamespaces") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListDataSources(t *testing.T) { svc := New(Options{}) _, err := svc.ListDataSources(context.Background(), nil, func(o *Options) { @@ -722,6 +818,18 @@ func TestCheckSnapshot_UntagResource(t *testing.T) { } } +func TestCheckSnapshot_UpdateApi(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateApi(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateApi") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateApiCache(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateApiCache(context.Background(), nil, func(o *Options) { @@ -746,6 +854,18 @@ func TestCheckSnapshot_UpdateApiKey(t *testing.T) { } } +func TestCheckSnapshot_UpdateChannelNamespace(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateChannelNamespace(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateChannelNamespace") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateDataSource(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateDataSource(context.Background(), nil, func(o *Options) { @@ -865,6 +985,18 @@ func TestUpdateSnapshot_AssociateSourceGraphqlApi(t *testing.T) { } } +func TestUpdateSnapshot_CreateApi(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateApi(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateApi") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateApiCache(t *testing.T) { svc := New(Options{}) _, err := svc.CreateApiCache(context.Background(), nil, func(o *Options) { @@ -889,6 +1021,18 @@ func TestUpdateSnapshot_CreateApiKey(t *testing.T) { } } +func TestUpdateSnapshot_CreateChannelNamespace(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateChannelNamespace(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateChannelNamespace") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateDataSource(t *testing.T) { svc := New(Options{}) _, err := svc.CreateDataSource(context.Background(), nil, func(o *Options) { @@ -961,6 +1105,18 @@ func TestUpdateSnapshot_CreateType(t *testing.T) { } } +func TestUpdateSnapshot_DeleteApi(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteApi(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteApi") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteApiCache(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteApiCache(context.Background(), nil, func(o *Options) { @@ -985,6 +1141,18 @@ func TestUpdateSnapshot_DeleteApiKey(t *testing.T) { } } +func TestUpdateSnapshot_DeleteChannelNamespace(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteChannelNamespace(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteChannelNamespace") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteDataSource(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteDataSource(context.Background(), nil, func(o *Options) { @@ -1129,6 +1297,18 @@ func TestUpdateSnapshot_FlushApiCache(t *testing.T) { } } +func TestUpdateSnapshot_GetApi(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetApi(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetApi") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetApiAssociation(t *testing.T) { svc := New(Options{}) _, err := svc.GetApiAssociation(context.Background(), nil, func(o *Options) { @@ -1153,6 +1333,18 @@ func TestUpdateSnapshot_GetApiCache(t *testing.T) { } } +func TestUpdateSnapshot_GetChannelNamespace(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetChannelNamespace(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetChannelNamespace") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetDataSource(t *testing.T) { svc := New(Options{}) _, err := svc.GetDataSource(context.Background(), nil, func(o *Options) { @@ -1297,6 +1489,30 @@ func TestUpdateSnapshot_ListApiKeys(t *testing.T) { } } +func TestUpdateSnapshot_ListApis(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListApis(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListApis") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListChannelNamespaces(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListChannelNamespaces(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListChannelNamespaces") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListDataSources(t *testing.T) { svc := New(Options{}) _, err := svc.ListDataSources(context.Background(), nil, func(o *Options) { @@ -1489,6 +1705,18 @@ func TestUpdateSnapshot_UntagResource(t *testing.T) { } } +func TestUpdateSnapshot_UpdateApi(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateApi(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateApi") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateApiCache(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateApiCache(context.Background(), nil, func(o *Options) { @@ -1513,6 +1741,18 @@ func TestUpdateSnapshot_UpdateApiKey(t *testing.T) { } } +func TestUpdateSnapshot_UpdateChannelNamespace(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateChannelNamespace(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateChannelNamespace") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateDataSource(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateDataSource(context.Background(), nil, func(o *Options) { diff --git a/service/appsync/types/enums.go b/service/appsync/types/enums.go index b8db3c685c7..815c58162c1 100644 --- a/service/appsync/types/enums.go +++ b/service/appsync/types/enums.go @@ -344,6 +344,31 @@ func (DefaultAction) Values() []DefaultAction { } } +type EventLogLevel string + +// Enum values for EventLogLevel +const ( + EventLogLevelNone EventLogLevel = "NONE" + EventLogLevelError EventLogLevel = "ERROR" + EventLogLevelAll EventLogLevel = "ALL" + EventLogLevelInfo EventLogLevel = "INFO" + EventLogLevelDebug EventLogLevel = "DEBUG" +) + +// Values returns all known values for EventLogLevel. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (EventLogLevel) Values() []EventLogLevel { + return []EventLogLevel{ + "NONE", + "ERROR", + "ALL", + "INFO", + "DEBUG", + } +} + type FieldLogLevel string // Enum values for FieldLogLevel diff --git a/service/appsync/types/errors.go b/service/appsync/types/errors.go index e7323bc7da1..410dd91a678 100644 --- a/service/appsync/types/errors.go +++ b/service/appsync/types/errors.go @@ -171,6 +171,35 @@ func (e *ConcurrentModificationException) ErrorCode() string { } func (e *ConcurrentModificationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// A conflict with a previous successful update is detected. This typically occurs +// when the previous update did not have time to propagate before the next update +// was made. A retry (with appropriate backoff logic) is the recommended response +// to this exception. +type ConflictException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ConflictException" + } + return *e.ErrorCodeOverride +} +func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The GraphQL schema is not valid. type GraphQLSchemaException struct { Message *string @@ -276,6 +305,32 @@ func (e *NotFoundException) ErrorCode() string { } func (e *NotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The operation exceeded the service quota for this resource. +type ServiceQuotaExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceQuotaExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceQuotaExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ServiceQuotaExceededException" + } + return *e.ErrorCodeOverride +} +func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // You aren't authorized to perform this operation. type UnauthorizedException struct { Message *string diff --git a/service/appsync/types/types.go b/service/appsync/types/types.go index 6c47d1e0e34..e9708ceb319 100644 --- a/service/appsync/types/types.go +++ b/service/appsync/types/types.go @@ -26,6 +26,46 @@ type AdditionalAuthenticationProvider struct { noSmithyDocumentSerde } +// Describes an AppSync API. You can use Api for an AppSync API with your +// preferred configuration, such as an Event API that provides real-time message +// publishing and message subscriptions over WebSockets. +type Api struct { + + // The Amazon Resource Name (ARN) for the Api . + ApiArn *string + + // The Api ID. + ApiId *string + + // The date and time that the Api was created. + Created *time.Time + + // The DNS records for the API. This will include an HTTP and a real-time endpoint. + Dns map[string]string + + // The Event API configuration. This includes the default authorization + // configuration for connecting, publishing, and subscribing to an Event API. + EventConfig *EventConfig + + // The name of the Api . + Name *string + + // The owner contact information for the Api + OwnerContact *string + + // A map with keys of TagKey objects and values of TagValue objects. + Tags map[string]string + + // The Amazon Resource Name (ARN) of the WAF web access control list (web ACL) + // associated with this Api , if one exists. + WafWebAclArn *string + + // A flag indicating whether to use X-Ray tracing for this Api . + XrayEnabled bool + + noSmithyDocumentSerde +} + // Describes an ApiAssociation object. type ApiAssociation struct { @@ -226,6 +266,18 @@ type AppSyncRuntime struct { noSmithyDocumentSerde } +// Describes an authorization configuration. Use AuthMode to specify the +// publishing and subscription authorization configuration for an Event API. +type AuthMode struct { + + // The authorization type. + // + // This member is required. + AuthType AuthenticationType + + noSmithyDocumentSerde +} + // The authorization configuration in case the HTTP endpoint requires // authorization. type AuthorizationConfig struct { @@ -243,6 +295,28 @@ type AuthorizationConfig struct { noSmithyDocumentSerde } +// Describes an authorization provider. +type AuthProvider struct { + + // The authorization type. + // + // This member is required. + AuthType AuthenticationType + + // Describes an Amazon Cognito user pool configuration. + CognitoConfig *CognitoConfig + + // A LambdaAuthorizerConfig specifies how to authorize AppSync API access when + // using the AWS_LAMBDA authorizer mode. Be aware that an AppSync API can have + // only one Lambda authorizer configured at a time. + LambdaAuthorizerConfig *LambdaAuthorizerConfig + + // Describes an OpenID Connect (OIDC) configuration. + OpenIDConnectConfig *OpenIDConnectConfig + + noSmithyDocumentSerde +} + // The Identity and Access Management (IAM) configuration. type AwsIamConfig struct { @@ -284,6 +358,44 @@ type CachingConfig struct { noSmithyDocumentSerde } +// Describes a channel namespace associated with an Api . The ChannelNamespace +// contains the definitions for code handlers for the Api . +type ChannelNamespace struct { + + // The Api ID. + ApiId *string + + // The Amazon Resource Name (ARN) for the ChannelNamespace . + ChannelNamespaceArn *string + + // The event handler functions that run custom business logic to process published + // events and subscribe requests. + CodeHandlers *string + + // The date and time that the ChannelNamespace was created. + Created *time.Time + + // The date and time that the ChannelNamespace was last changed. + LastModified *time.Time + + // The name of the channel namespace. This name must be unique within the Api . + Name *string + + // The authorization mode to use for publishing messages on the channel namespace. + // This configuration overrides the default Api authorization configuration. + PublishAuthModes []AuthMode + + // The authorization mode to use for subscribing to messages on the channel + // namespace. This configuration overrides the default Api authorization + // configuration. + SubscribeAuthModes []AuthMode + + // A map with keys of TagKey objects and values of TagValue objects. + Tags map[string]string + + noSmithyDocumentSerde +} + // Describes an AppSync error. type CodeError struct { @@ -319,6 +431,26 @@ type CodeErrorLocation struct { noSmithyDocumentSerde } +// Describes an Amazon Cognito configuration. +type CognitoConfig struct { + + // The Amazon Web Services Region in which the user pool was created. + // + // This member is required. + AwsRegion *string + + // The user pool ID. + // + // This member is required. + UserPoolId *string + + // A regular expression for validating the incoming Amazon Cognito user pool app + // client ID. If this value isn't set, no filtering is applied. + AppIdClientRegex *string + + noSmithyDocumentSerde +} + // Describes an Amazon Cognito user pool configuration. type CognitoUserPoolConfig struct { @@ -764,6 +896,53 @@ type EventBridgeDataSourceConfig struct { noSmithyDocumentSerde } +// Describes the authorization configuration for connections, message publishing, +// message subscriptions, and logging for an Event API. +type EventConfig struct { + + // A list of authorization providers. + // + // This member is required. + AuthProviders []AuthProvider + + // A list of valid authorization modes for the Event API connections. + // + // This member is required. + ConnectionAuthModes []AuthMode + + // A list of valid authorization modes for the Event API publishing. + // + // This member is required. + DefaultPublishAuthModes []AuthMode + + // A list of valid authorization modes for the Event API subscriptions. + // + // This member is required. + DefaultSubscribeAuthModes []AuthMode + + // The CloudWatch Logs configuration for the Event API. + LogConfig *EventLogConfig + + noSmithyDocumentSerde +} + +// Describes the CloudWatch Logs configuration for the Event API. +type EventLogConfig struct { + + // The IAM service role that AppSync assumes to publish CloudWatch Logs in your + // account. + // + // This member is required. + CloudWatchLogsRoleArn *string + + // The type of information to log for the Event API. + // + // This member is required. + LogLevel EventLogLevel + + noSmithyDocumentSerde +} + // A function is a reusable entity. You can use multiple functions to compose the // resolver logic. type FunctionConfiguration struct { @@ -999,12 +1178,11 @@ type LogConfig struct { // This member is required. CloudWatchLogsRoleArn *string - // The field logging level. Values can be NONE, ERROR, INFO, DEBUG, or ALL. + // The field logging level. Values can be NONE, ERROR, or ALL. // // - NONE: No field-level logs are captured. // - // - ERROR: Logs the following information only for the fields that are in the - // error category: + // - ERROR: Logs the following information only for the fields that are in error: // // - The error section in the server response. // @@ -1012,30 +1190,11 @@ type LogConfig struct { // // - The generated request/response functions that got resolved for error fields. // - // - INFO: Logs the following information only for the fields that are in the - // info and error categories: - // - // - Info-level messages. - // - // - The user messages sent through $util.log.info and console.log . - // - // - Field-level tracing and mapping logs are not shown. - // - // - DEBUG: Logs the following information only for the fields that are in the - // debug, info, and error categories: - // - // - Debug-level messages. - // - // - The user messages sent through $util.log.info , $util.log.debug , - // console.log , and console.debug . - // - // - Field-level tracing and mapping logs are not shown. - // // - ALL: The following information is logged for all fields in the query: // // - Field-level tracing information. // - // - The generated request/response functions that were resolved for each field. + // - The generated request/response functions that got resolved for each field. // // This member is required. FieldLogLevel FieldLogLevel diff --git a/service/appsync/validators.go b/service/appsync/validators.go index 977f8a62e37..9b3430238c9 100644 --- a/service/appsync/validators.go +++ b/service/appsync/validators.go @@ -90,6 +90,26 @@ func (m *validateOpCreateApiCache) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpCreateApi struct { +} + +func (*validateOpCreateApi) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateApi) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateApiInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateApiInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateApiKey struct { } @@ -110,6 +130,26 @@ func (m *validateOpCreateApiKey) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpCreateChannelNamespace struct { +} + +func (*validateOpCreateChannelNamespace) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateChannelNamespace) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateChannelNamespaceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateChannelNamespaceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateDataSource struct { } @@ -250,6 +290,26 @@ func (m *validateOpDeleteApiCache) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpDeleteApi struct { +} + +func (*validateOpDeleteApi) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteApi) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteApiInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteApiInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteApiKey struct { } @@ -270,6 +330,26 @@ func (m *validateOpDeleteApiKey) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpDeleteChannelNamespace struct { +} + +func (*validateOpDeleteChannelNamespace) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteChannelNamespace) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteChannelNamespaceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteChannelNamespaceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteDataSource struct { } @@ -550,6 +630,46 @@ func (m *validateOpGetApiCache) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpGetApi struct { +} + +func (*validateOpGetApi) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetApi) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetApiInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetApiInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetChannelNamespace struct { +} + +func (*validateOpGetChannelNamespace) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetChannelNamespace) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetChannelNamespaceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetChannelNamespaceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetDataSource struct { } @@ -790,6 +910,26 @@ func (m *validateOpListApiKeys) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpListChannelNamespaces struct { +} + +func (*validateOpListChannelNamespaces) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListChannelNamespaces) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListChannelNamespacesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListChannelNamespacesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListDataSources struct { } @@ -1090,6 +1230,26 @@ func (m *validateOpUpdateApiCache) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpUpdateApi struct { +} + +func (*validateOpUpdateApi) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateApi) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateApiInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateApiInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateApiKey struct { } @@ -1110,6 +1270,26 @@ func (m *validateOpUpdateApiKey) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpUpdateChannelNamespace struct { +} + +func (*validateOpUpdateChannelNamespace) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateChannelNamespace) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateChannelNamespaceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateChannelNamespaceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateDataSource struct { } @@ -1266,10 +1446,18 @@ func addOpCreateApiCacheValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateApiCache{}, middleware.After) } +func addOpCreateApiValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateApi{}, middleware.After) +} + func addOpCreateApiKeyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateApiKey{}, middleware.After) } +func addOpCreateChannelNamespaceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateChannelNamespace{}, middleware.After) +} + func addOpCreateDataSourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateDataSource{}, middleware.After) } @@ -1298,10 +1486,18 @@ func addOpDeleteApiCacheValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteApiCache{}, middleware.After) } +func addOpDeleteApiValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteApi{}, middleware.After) +} + func addOpDeleteApiKeyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteApiKey{}, middleware.After) } +func addOpDeleteChannelNamespaceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteChannelNamespace{}, middleware.After) +} + func addOpDeleteDataSourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteDataSource{}, middleware.After) } @@ -1358,6 +1554,14 @@ func addOpGetApiCacheValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetApiCache{}, middleware.After) } +func addOpGetApiValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetApi{}, middleware.After) +} + +func addOpGetChannelNamespaceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetChannelNamespace{}, middleware.After) +} + func addOpGetDataSourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetDataSource{}, middleware.After) } @@ -1406,6 +1610,10 @@ func addOpListApiKeysValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListApiKeys{}, middleware.After) } +func addOpListChannelNamespacesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListChannelNamespaces{}, middleware.After) +} + func addOpListDataSourcesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListDataSources{}, middleware.After) } @@ -1466,10 +1674,18 @@ func addOpUpdateApiCacheValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateApiCache{}, middleware.After) } +func addOpUpdateApiValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateApi{}, middleware.After) +} + func addOpUpdateApiKeyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateApiKey{}, middleware.After) } +func addOpUpdateChannelNamespaceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateChannelNamespace{}, middleware.After) +} + func addOpUpdateDataSourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateDataSource{}, middleware.After) } @@ -1560,6 +1776,38 @@ func validateAppSyncRuntime(v *types.AppSyncRuntime) error { } } +func validateAuthMode(v *types.AuthMode) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AuthMode"} + if len(v.AuthType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("AuthType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAuthModes(v []types.AuthMode) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AuthModes"} + for i := range v { + if err := validateAuthMode(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateAuthorizationConfig(v *types.AuthorizationConfig) error { if v == nil { return nil @@ -1575,6 +1823,53 @@ func validateAuthorizationConfig(v *types.AuthorizationConfig) error { } } +func validateAuthProvider(v *types.AuthProvider) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AuthProvider"} + if len(v.AuthType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("AuthType")) + } + if v.CognitoConfig != nil { + if err := validateCognitoConfig(v.CognitoConfig); err != nil { + invalidParams.AddNested("CognitoConfig", err.(smithy.InvalidParamsError)) + } + } + if v.OpenIDConnectConfig != nil { + if err := validateOpenIDConnectConfig(v.OpenIDConnectConfig); err != nil { + invalidParams.AddNested("OpenIDConnectConfig", err.(smithy.InvalidParamsError)) + } + } + if v.LambdaAuthorizerConfig != nil { + if err := validateLambdaAuthorizerConfig(v.LambdaAuthorizerConfig); err != nil { + invalidParams.AddNested("LambdaAuthorizerConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAuthProviders(v []types.AuthProvider) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AuthProviders"} + for i := range v { + if err := validateAuthProvider(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateCachingConfig(v *types.CachingConfig) error { if v == nil { return nil @@ -1587,6 +1882,24 @@ func validateCachingConfig(v *types.CachingConfig) error { } } +func validateCognitoConfig(v *types.CognitoConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CognitoConfig"} + if v.UserPoolId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserPoolId")) + } + if v.AwsRegion == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsRegion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateCognitoUserPoolConfig(v *types.CognitoUserPoolConfig) error { if v == nil { return nil @@ -1677,6 +1990,69 @@ func validateEventBridgeDataSourceConfig(v *types.EventBridgeDataSourceConfig) e } } +func validateEventConfig(v *types.EventConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EventConfig"} + if v.AuthProviders == nil { + invalidParams.Add(smithy.NewErrParamRequired("AuthProviders")) + } else if v.AuthProviders != nil { + if err := validateAuthProviders(v.AuthProviders); err != nil { + invalidParams.AddNested("AuthProviders", err.(smithy.InvalidParamsError)) + } + } + if v.ConnectionAuthModes == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConnectionAuthModes")) + } else if v.ConnectionAuthModes != nil { + if err := validateAuthModes(v.ConnectionAuthModes); err != nil { + invalidParams.AddNested("ConnectionAuthModes", err.(smithy.InvalidParamsError)) + } + } + if v.DefaultPublishAuthModes == nil { + invalidParams.Add(smithy.NewErrParamRequired("DefaultPublishAuthModes")) + } else if v.DefaultPublishAuthModes != nil { + if err := validateAuthModes(v.DefaultPublishAuthModes); err != nil { + invalidParams.AddNested("DefaultPublishAuthModes", err.(smithy.InvalidParamsError)) + } + } + if v.DefaultSubscribeAuthModes == nil { + invalidParams.Add(smithy.NewErrParamRequired("DefaultSubscribeAuthModes")) + } else if v.DefaultSubscribeAuthModes != nil { + if err := validateAuthModes(v.DefaultSubscribeAuthModes); err != nil { + invalidParams.AddNested("DefaultSubscribeAuthModes", err.(smithy.InvalidParamsError)) + } + } + if v.LogConfig != nil { + if err := validateEventLogConfig(v.LogConfig); err != nil { + invalidParams.AddNested("LogConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEventLogConfig(v *types.EventLogConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EventLogConfig"} + if len(v.LogLevel) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("LogLevel")) + } + if v.CloudWatchLogsRoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("CloudWatchLogsRoleArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateHttpDataSourceConfig(v *types.HttpDataSourceConfig) error { if v == nil { return nil @@ -1892,6 +2268,26 @@ func validateOpCreateApiCacheInput(v *CreateApiCacheInput) error { } } +func validateOpCreateApiInput(v *CreateApiInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateApiInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.EventConfig != nil { + if err := validateEventConfig(v.EventConfig); err != nil { + invalidParams.AddNested("EventConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateApiKeyInput(v *CreateApiKeyInput) error { if v == nil { return nil @@ -1907,6 +2303,34 @@ func validateOpCreateApiKeyInput(v *CreateApiKeyInput) error { } } +func validateOpCreateChannelNamespaceInput(v *CreateChannelNamespaceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateChannelNamespaceInput"} + if v.ApiId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApiId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.SubscribeAuthModes != nil { + if err := validateAuthModes(v.SubscribeAuthModes); err != nil { + invalidParams.AddNested("SubscribeAuthModes", err.(smithy.InvalidParamsError)) + } + } + if v.PublishAuthModes != nil { + if err := validateAuthModes(v.PublishAuthModes); err != nil { + invalidParams.AddNested("PublishAuthModes", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateDataSourceInput(v *CreateDataSourceInput) error { if v == nil { return nil @@ -2117,6 +2541,21 @@ func validateOpDeleteApiCacheInput(v *DeleteApiCacheInput) error { } } +func validateOpDeleteApiInput(v *DeleteApiInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteApiInput"} + if v.ApiId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApiId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteApiKeyInput(v *DeleteApiKeyInput) error { if v == nil { return nil @@ -2135,6 +2574,24 @@ func validateOpDeleteApiKeyInput(v *DeleteApiKeyInput) error { } } +func validateOpDeleteChannelNamespaceInput(v *DeleteChannelNamespaceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteChannelNamespaceInput"} + if v.ApiId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApiId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteDataSourceInput(v *DeleteDataSourceInput) error { if v == nil { return nil @@ -2379,6 +2836,39 @@ func validateOpGetApiCacheInput(v *GetApiCacheInput) error { } } +func validateOpGetApiInput(v *GetApiInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetApiInput"} + if v.ApiId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApiId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetChannelNamespaceInput(v *GetChannelNamespaceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetChannelNamespaceInput"} + if v.ApiId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApiId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetDataSourceInput(v *GetDataSourceInput) error { if v == nil { return nil @@ -2583,6 +3073,21 @@ func validateOpListApiKeysInput(v *ListApiKeysInput) error { } } +func validateOpListChannelNamespacesInput(v *ListChannelNamespacesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListChannelNamespacesInput"} + if v.ApiId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApiId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListDataSourcesInput(v *ListDataSourcesInput) error { if v == nil { return nil @@ -2846,6 +3351,29 @@ func validateOpUpdateApiCacheInput(v *UpdateApiCacheInput) error { } } +func validateOpUpdateApiInput(v *UpdateApiInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateApiInput"} + if v.ApiId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApiId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.EventConfig != nil { + if err := validateEventConfig(v.EventConfig); err != nil { + invalidParams.AddNested("EventConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateApiKeyInput(v *UpdateApiKeyInput) error { if v == nil { return nil @@ -2864,6 +3392,34 @@ func validateOpUpdateApiKeyInput(v *UpdateApiKeyInput) error { } } +func validateOpUpdateChannelNamespaceInput(v *UpdateChannelNamespaceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateChannelNamespaceInput"} + if v.ApiId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApiId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.SubscribeAuthModes != nil { + if err := validateAuthModes(v.SubscribeAuthModes); err != nil { + invalidParams.AddNested("SubscribeAuthModes", err.(smithy.InvalidParamsError)) + } + } + if v.PublishAuthModes != nil { + if err := validateAuthModes(v.PublishAuthModes); err != nil { + invalidParams.AddNested("PublishAuthModes", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateDataSourceInput(v *UpdateDataSourceInput) error { if v == nil { return nil @@ -2975,9 +3531,6 @@ func validateOpUpdateGraphqlApiInput(v *UpdateGraphqlApiInput) error { invalidParams.AddNested("LogConfig", err.(smithy.InvalidParamsError)) } } - if len(v.AuthenticationType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("AuthenticationType")) - } if v.UserPoolConfig != nil { if err := validateUserPoolConfig(v.UserPoolConfig); err != nil { invalidParams.AddNested("UserPoolConfig", err.(smithy.InvalidParamsError)) diff --git a/service/connect/types/types.go b/service/connect/types/types.go index bdc89a27dc8..2d3f0c17b3d 100644 --- a/service/connect/types/types.go +++ b/service/connect/types/types.go @@ -6289,6 +6289,11 @@ type UserHierarchyGroupSearchFilter struct { // For Amazon Connect instances that are created with the EXISTING_DIRECTORY // identity management type, FirstName , LastName , and Email cannot be updated // from within Amazon Connect because they are managed by the directory. +// +// The FirstName and LastName length constraints below apply only to instances +// using SAML for identity management. If you are using Amazon Connect for identity +// management, the length constraints are 1-255 for FirstName , and 1-256 for +// LastName . type UserIdentityInfo struct { // The email address. If you are using SAML for identity management and include diff --git a/service/datasync/api_op_CreateAgent.go b/service/datasync/api_op_CreateAgent.go index 2a79a6dd300..3925d4e605b 100644 --- a/service/datasync/api_op_CreateAgent.go +++ b/service/datasync/api_op_CreateAgent.go @@ -11,21 +11,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Activates an DataSync agent that you've deployed in your storage environment. -// The activation process associates the agent with your Amazon Web Services -// account. +// Activates an DataSync agent that you deploy in your storage environment. The +// activation process associates the agent with your Amazon Web Services account. // -// If you haven't deployed an agent yet, see the following topics to learn more: +// If you haven't deployed an agent yet, see [Do I need a DataSync agent?] // -// [Agent requirements] -// -// [Create an agent] -// -// If you're transferring between Amazon Web Services storage services, you don't -// need a DataSync agent. -// -// [Agent requirements]: https://docs.aws.amazon.com/datasync/latest/userguide/agent-requirements.html -// [Create an agent]: https://docs.aws.amazon.com/datasync/latest/userguide/configure-agent.html +// [Do I need a DataSync agent?]: https://docs.aws.amazon.com/datasync/latest/userguide/do-i-need-datasync-agent.html func (c *Client) CreateAgent(ctx context.Context, params *CreateAgentInput, optFns ...func(*Options)) (*CreateAgentOutput, error) { if params == nil { params = &CreateAgentInput{} @@ -45,39 +36,37 @@ func (c *Client) CreateAgent(ctx context.Context, params *CreateAgentInput, optF type CreateAgentInput struct { // Specifies your DataSync agent's activation key. If you don't have an activation - // key, see [Activate your agent]. + // key, see [Activating your agent]. // - // [Activate your agent]: https://docs.aws.amazon.com/datasync/latest/userguide/activate-agent.html + // [Activating your agent]: https://docs.aws.amazon.com/datasync/latest/userguide/activate-agent.html // // This member is required. ActivationKey *string - // Specifies a name for your agent. You can see this name in the DataSync console. + // Specifies a name for your agent. We recommend specifying a name that you can + // remember. AgentName *string - // Specifies the Amazon Resource Name (ARN) of the security group that protects - // your task's [network interfaces]when [using a virtual private cloud (VPC) endpoint]. You can only specify one ARN. - // - // [network interfaces]: https://docs.aws.amazon.com/datasync/latest/userguide/datasync-network.html#required-network-interfaces - // [using a virtual private cloud (VPC) endpoint]: https://docs.aws.amazon.com/datasync/latest/userguide/choose-service-endpoint.html#choose-service-endpoint-vpc + // Specifies the Amazon Resource Name (ARN) of the security group that allows + // traffic between your agent and VPC service endpoint. You can only specify one + // ARN. SecurityGroupArns []string - // Specifies the ARN of the subnet where you want to run your DataSync task when - // using a VPC endpoint. This is the subnet where DataSync creates and manages the [network interfaces] - // for your transfer. You can only specify one ARN. - // - // [network interfaces]: https://docs.aws.amazon.com/datasync/latest/userguide/datasync-network.html#required-network-interfaces + // Specifies the ARN of the subnet where your VPC service endpoint is located. You + // can only specify one ARN. SubnetArns []string // Specifies labels that help you categorize, filter, and search for your Amazon // Web Services resources. We recommend creating at least one tag for your agent. Tags []types.TagListEntry - // Specifies the ID of the VPC endpoint that you want your agent to connect to. - // For example, a VPC endpoint ID looks like vpce-01234d5aff67890e1 . + // Specifies the ID of the [VPC service endpoint] that you're using. For example, a VPC endpoint ID + // looks like vpce-01234d5aff67890e1 . + // + // The VPC service endpoint you use must include the DataSync service name (for + // example, com.amazonaws.us-east-2.datasync ). // - // The VPC endpoint you use must include the DataSync service name (for example, - // com.amazonaws.us-east-2.datasync ). + // [VPC service endpoint]: https://docs.aws.amazon.com/datasync/latest/userguide/choose-service-endpoint.html#datasync-in-vpc VpcEndpointId *string noSmithyDocumentSerde diff --git a/service/datasync/api_op_CreateLocationEfs.go b/service/datasync/api_op_CreateLocationEfs.go index 56f85c21a50..0e23a76f800 100644 --- a/service/datasync/api_op_CreateLocationEfs.go +++ b/service/datasync/api_op_CreateLocationEfs.go @@ -35,38 +35,51 @@ func (c *Client) CreateLocationEfs(ctx context.Context, params *CreateLocationEf // CreateLocationEfsRequest type CreateLocationEfsInput struct { - // Specifies the subnet and security groups DataSync uses to access your Amazon - // EFS file system. + // Specifies the subnet and security groups DataSync uses to connect to one of + // your Amazon EFS file system's [mount targets]. + // + // [mount targets]: https://docs.aws.amazon.com/efs/latest/ug/accessing-fs.html // // This member is required. Ec2Config *types.Ec2Config - // Specifies the ARN for the Amazon EFS file system. + // Specifies the ARN for your Amazon EFS file system. // // This member is required. EfsFilesystemArn *string // Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses - // to access the Amazon EFS file system. + // to mount your Amazon EFS file system. + // + // For more information, see [Accessing restricted file systems]. + // + // [Accessing restricted file systems]: https://docs.aws.amazon.com/datasync/latest/userguide/create-efs-location.html#create-efs-location-iam AccessPointArn *string - // Specifies an Identity and Access Management (IAM) role that DataSync assumes - // when mounting the Amazon EFS file system. + // Specifies an Identity and Access Management (IAM) role that allows DataSync to + // access your Amazon EFS file system. + // + // For information on creating this role, see [Creating a DataSync IAM role for file system access]. + // + // [Creating a DataSync IAM role for file system access]: https://docs.aws.amazon.com/datasync/latest/userguide/create-efs-location.html#create-efs-location-iam-role FileSystemAccessRoleArn *string // Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 - // encryption when it copies data to or from the Amazon EFS file system. + // encryption when it transfers data to or from your Amazon EFS file system. // // If you specify an access point using AccessPointArn or an IAM role using // FileSystemAccessRoleArn , you must set this parameter to TLS1_2 . InTransitEncryption types.EfsInTransitEncryption // Specifies a mount path for your Amazon EFS file system. This is where DataSync - // reads or writes data (depending on if this is a source or destination location). - // By default, DataSync uses the root directory, but you can also include - // subdirectories. + // reads or writes data (depending on if this is a source or destination location) + // on your file system. + // + // By default, DataSync uses the root directory (or [access point] if you provide one by using + // AccessPointArn ). You can also include subdirectories using forward slashes (for + // example, /path/to/folder ). // - // You must specify a value with forward slashes (for example, /path/to/folder ). + // [access point]: https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html Subdirectory *string // Specifies the key-value pair that represents a tag that you want to add to the diff --git a/service/datasync/api_op_CreateLocationFsxWindows.go b/service/datasync/api_op_CreateLocationFsxWindows.go index e83f34477a8..0954238e04c 100644 --- a/service/datasync/api_op_CreateLocationFsxWindows.go +++ b/service/datasync/api_op_CreateLocationFsxWindows.go @@ -48,8 +48,12 @@ type CreateLocationFsxWindowsInput struct { // This member is required. Password *string - // Specifies the ARNs of the security groups that provide access to your file - // system's preferred subnet. + // Specifies the ARNs of the Amazon EC2 security groups that provide access to + // your file system's preferred subnet. + // + // The security groups that you specify must be able to communicate with your file + // system's security groups. For information about configuring security groups for + // file system access, see the [Amazon FSx for Windows File Server User Guide]. // // If you choose a security group that doesn't allow connections from within // itself, do one of the following: @@ -59,6 +63,8 @@ type CreateLocationFsxWindowsInput struct { // - Choose a different security group that can communicate with the mount // target's security group. // + // [Amazon FSx for Windows File Server User Guide]: https://docs.aws.amazon.com/fsx/latest/WindowsGuide/limit-access-security-groups.html + // // This member is required. SecurityGroupArns []string diff --git a/service/datasync/api_op_CreateLocationHdfs.go b/service/datasync/api_op_CreateLocationHdfs.go index 89127289510..db48de0031a 100644 --- a/service/datasync/api_op_CreateLocationHdfs.go +++ b/service/datasync/api_op_CreateLocationHdfs.go @@ -34,8 +34,8 @@ func (c *Client) CreateLocationHdfs(ctx context.Context, params *CreateLocationH type CreateLocationHdfsInput struct { - // The Amazon Resource Names (ARNs) of the agents that are used to connect to the - // HDFS cluster. + // The Amazon Resource Names (ARNs) of the DataSync agents that can connect to + // your HDFS cluster. // // This member is required. AgentArns []string @@ -114,7 +114,7 @@ type CreateLocationHdfsInput struct { type CreateLocationHdfsOutput struct { - // The ARN of the source HDFS cluster location that's created. + // The ARN of the source HDFS cluster location that you create. LocationArn *string // Metadata pertaining to the operation's result. diff --git a/service/datasync/api_op_CreateLocationNfs.go b/service/datasync/api_op_CreateLocationNfs.go index 913619d73dc..40f5725a210 100644 --- a/service/datasync/api_op_CreateLocationNfs.go +++ b/service/datasync/api_op_CreateLocationNfs.go @@ -39,12 +39,12 @@ func (c *Client) CreateLocationNfs(ctx context.Context, params *CreateLocationNf // CreateLocationNfsRequest type CreateLocationNfsInput struct { - // Specifies the Amazon Resource Name (ARN) of the DataSync agent that want to - // connect to your NFS file server. + // Specifies the Amazon Resource Name (ARN) of the DataSync agent that can connect + // to your NFS file server. // - // You can specify more than one agent. For more information, see [Using multiple agents for transfers]. + // You can specify more than one agent. For more information, see [Using multiple DataSync agents]. // - // [Using multiple agents for transfers]: https://docs.aws.amazon.com/datasync/latest/userguide/multiple-agents.html + // [Using multiple DataSync agents]: https://docs.aws.amazon.com/datasync/latest/userguide/do-i-need-datasync-agent.html#multiple-agents // // This member is required. OnPremConfig *types.OnPremConfig diff --git a/service/datasync/api_op_CreateLocationObjectStorage.go b/service/datasync/api_op_CreateLocationObjectStorage.go index 8ced873c5b5..7b97e2ea926 100644 --- a/service/datasync/api_op_CreateLocationObjectStorage.go +++ b/service/datasync/api_op_CreateLocationObjectStorage.go @@ -37,7 +37,7 @@ func (c *Client) CreateLocationObjectStorage(ctx context.Context, params *Create type CreateLocationObjectStorageInput struct { // Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can - // securely connect with your location. + // connect with your object storage system. // // This member is required. AgentArns []string diff --git a/service/datasync/api_op_CreateLocationSmb.go b/service/datasync/api_op_CreateLocationSmb.go index 3849c537250..88d89b4f341 100644 --- a/service/datasync/api_op_CreateLocationSmb.go +++ b/service/datasync/api_op_CreateLocationSmb.go @@ -35,8 +35,8 @@ func (c *Client) CreateLocationSmb(ctx context.Context, params *CreateLocationSm // CreateLocationSmbRequest type CreateLocationSmbInput struct { - // Specifies the DataSync agent (or agents) which you want to connect to your SMB - // file server. You specify an agent by using its Amazon Resource Name (ARN). + // Specifies the DataSync agent (or agents) that can connect to your SMB file + // server. You specify an agent by using its Amazon Resource Name (ARN). // // This member is required. AgentArns []string diff --git a/service/datasync/api_op_CreateTask.go b/service/datasync/api_op_CreateTask.go index fad5a00989f..b1b7395db5d 100644 --- a/service/datasync/api_op_CreateTask.go +++ b/service/datasync/api_op_CreateTask.go @@ -51,6 +51,9 @@ type CreateTaskInput struct { // Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for // monitoring your task. + // + // For Enhanced mode tasks, you don't need to specify anything. DataSync + // automatically sends logs to a CloudWatch log group named /aws/datasync . CloudWatchLogGroupArn *string // Specifies exclude filters that define the files, objects, and folders in your @@ -60,9 +63,9 @@ type CreateTaskInput struct { // [Specifying what DataSync transfers by using filters]: https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html Excludes []types.FilterRule - // Specifies include filters define the files, objects, and folders in your source - // location that you want DataSync to transfer. For more information and examples, - // see [Specifying what DataSync transfers by using filters]. + // Specifies include filters that define the files, objects, and folders in your + // source location that you want DataSync to transfer. For more information and + // examples, see [Specifying what DataSync transfers by using filters]. // // [Specifying what DataSync transfers by using filters]: https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html Includes []types.FilterRule @@ -97,6 +100,24 @@ type CreateTaskInput struct { // DataSync resources. Tags []types.TagListEntry + // Specifies one of the following task modes for your data transfer: + // + // - ENHANCED - Transfer virtually unlimited numbers of objects with enhanced + // metrics, more detailed logs, and higher performance than Basic mode. Currently + // available for transfers between Amazon S3 locations. + // + // To create an Enhanced mode task, the IAM role that you use to call the + // CreateTask operation must have the iam:CreateServiceLinkedRole permission. + // + // - BASIC (default) - Transfer files or objects between Amazon Web Services + // storage and on-premises, edge, or other cloud storage. DataSync [quotas]apply. + // + // For more information, see [Understanding task mode differences]. + // + // [Understanding task mode differences]: https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html#task-mode-differences + // [quotas]: https://docs.aws.amazon.com/datasync/latest/userguide/datasync-limits.html + TaskMode types.TaskMode + // Specifies how you want to configure a task report, which provides detailed // information about your DataSync transfer. For more information, see [Monitoring your DataSync transfers with task reports]. // diff --git a/service/datasync/api_op_DescribeLocationEfs.go b/service/datasync/api_op_DescribeLocationEfs.go index 6eb48382076..d44e1e579e4 100644 --- a/service/datasync/api_op_DescribeLocationEfs.go +++ b/service/datasync/api_op_DescribeLocationEfs.go @@ -46,21 +46,31 @@ type DescribeLocationEfsOutput struct { // The ARN of the access point that DataSync uses to access the Amazon EFS file // system. + // + // For more information, see [Accessing restricted file systems]. + // + // [Accessing restricted file systems]: https://docs.aws.amazon.com/datasync/latest/userguide/create-efs-location.html#create-efs-location-iam AccessPointArn *string // The time that the location was created. CreationTime *time.Time - // The subnet and security groups that DataSync uses to access your Amazon EFS - // file system. + // The subnet and security groups that DataSync uses to connect to one of your + // Amazon EFS file system's [mount targets]. + // + // [mount targets]: https://docs.aws.amazon.com/efs/latest/ug/accessing-fs.html Ec2Config *types.Ec2Config - // The Identity and Access Management (IAM) role that DataSync assumes when - // mounting the Amazon EFS file system. + // The Identity and Access Management (IAM) role that allows DataSync to access + // your Amazon EFS file system. + // + // For more information, see [Creating a DataSync IAM role for file system access]. + // + // [Creating a DataSync IAM role for file system access]: https://docs.aws.amazon.com/datasync/latest/userguide/create-efs-location.html#create-efs-location-iam-role FileSystemAccessRoleArn *string - // Describes whether DataSync uses Transport Layer Security (TLS) encryption when - // copying data to or from the Amazon EFS file system. + // Indicates whether DataSync uses Transport Layer Security (TLS) encryption when + // transferring data to or from the Amazon EFS file system. InTransitEncryption types.EfsInTransitEncryption // The ARN of the Amazon EFS file system location. diff --git a/service/datasync/api_op_DescribeLocationFsxWindows.go b/service/datasync/api_op_DescribeLocationFsxWindows.go index acd65ccd1e8..fce2c2b5322 100644 --- a/service/datasync/api_op_DescribeLocationFsxWindows.go +++ b/service/datasync/api_op_DescribeLocationFsxWindows.go @@ -55,8 +55,13 @@ type DescribeLocationFsxWindowsOutput struct { // location. LocationUri *string - // The ARNs of the security groups that are configured for the FSx for Windows - // File Server file system. + // The ARNs of the Amazon EC2 security groups that provide access to your file + // system's preferred subnet. + // + // For information about configuring security groups for file system access, see + // the [Amazon FSx for Windows File Server User Guide]. + // + // [Amazon FSx for Windows File Server User Guide]: https://docs.aws.amazon.com/fsx/latest/WindowsGuide/limit-access-security-groups.html SecurityGroupArns []string // The user with the permissions to mount and access the FSx for Windows File diff --git a/service/datasync/api_op_DescribeLocationNfs.go b/service/datasync/api_op_DescribeLocationNfs.go index 78b51687287..8854a6109e3 100644 --- a/service/datasync/api_op_DescribeLocationNfs.go +++ b/service/datasync/api_op_DescribeLocationNfs.go @@ -56,7 +56,8 @@ type DescribeLocationNfsOutput struct { // The mount options that DataSync uses to mount your NFS file server. MountOptions *types.NfsMountOptions - // The DataSync agents that are connecting to a Network File System (NFS) location. + // The DataSync agents that can connect to your Network File System (NFS) file + // server. OnPremConfig *types.OnPremConfig // Metadata pertaining to the operation's result. diff --git a/service/datasync/api_op_DescribeTask.go b/service/datasync/api_op_DescribeTask.go index ed0c252a1a5..f382edfc783 100644 --- a/service/datasync/api_op_DescribeTask.go +++ b/service/datasync/api_op_DescribeTask.go @@ -47,9 +47,9 @@ type DescribeTaskOutput struct { // The Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring // your task. // - // For more information, see [Monitoring DataSync with Amazon CloudWatch]. + // For more information, see [Monitoring data transfers with CloudWatch Logs]. // - // [Monitoring DataSync with Amazon CloudWatch]: https://docs.aws.amazon.com/datasync/latest/userguide/monitor-datasync.html + // [Monitoring data transfers with CloudWatch Logs]: https://docs.aws.amazon.com/datasync/latest/userguide/configure-logging.html CloudWatchLogGroupArn *string // The time that the task was created. @@ -132,6 +132,11 @@ type DescribeTaskOutput struct { // The ARN of your task. TaskArn *string + // The task mode that you're using. For more information, see [Choosing a task mode for your data transfer]. + // + // [Choosing a task mode for your data transfer]: https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html + TaskMode types.TaskMode + // The configuration of your task report, which provides detailed information // about your DataSync transfer. For more information, see [Monitoring your DataSync transfers with task reports]. // diff --git a/service/datasync/api_op_DescribeTaskExecution.go b/service/datasync/api_op_DescribeTaskExecution.go index 5c3f63b1696..7e0c110ca82 100644 --- a/service/datasync/api_op_DescribeTaskExecution.go +++ b/service/datasync/api_op_DescribeTaskExecution.go @@ -13,8 +13,14 @@ import ( ) // Provides information about an execution of your DataSync task. You can use this -// operation to help monitor the progress of an ongoing transfer or check the +// operation to help monitor the progress of an ongoing data transfer or check the // results of the transfer. +// +// Some DescribeTaskExecution response elements are only relevant to a specific +// task mode. For information, see [Understanding task mode differences]and [Understanding data transfer performance metrics]. +// +// [Understanding task mode differences]: https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html#task-mode-differences +// [Understanding data transfer performance metrics]: https://docs.aws.amazon.com/datasync/latest/userguide/transfer-performance-metrics.html func (c *Client) DescribeTaskExecution(ctx context.Context, params *DescribeTaskExecutionInput, optFns ...func(*Options)) (*DescribeTaskExecutionOutput, error) { if params == nil { params = &DescribeTaskExecutionInput{} @@ -45,33 +51,63 @@ type DescribeTaskExecutionInput struct { // DescribeTaskExecutionResponse type DescribeTaskExecutionOutput struct { - // The physical number of bytes transferred over the network after compression was - // applied. In most cases, this number is less than BytesTransferred unless the - // data isn't compressible. + // The number of physical bytes that DataSync transfers over the network after + // compression (if compression is possible). This number is typically less than [BytesTransferred] + // unless the data isn't compressible. + // + // Not currently supported with [Enhanced mode tasks]. + // + // [BytesTransferred]: https://docs.aws.amazon.com/datasync/latest/userguide/API_DescribeTaskExecution.html#DataSync-DescribeTaskExecution-response-BytesTransferred + // [Enhanced mode tasks]: https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html BytesCompressed int64 - // The total number of bytes that are involved in the transfer. For the number of - // bytes sent over the network, see BytesCompressed . + // The number of bytes that DataSync sends to the network before compression (if + // compression is possible). For the number of bytes transferred over the network, + // see [BytesCompressed]. + // + // [BytesCompressed]: https://docs.aws.amazon.com/datasync/latest/userguide/API_DescribeTaskExecution.html#DataSync-DescribeTaskExecution-response-BytesCompressed BytesTransferred int64 - // The number of logical bytes written to the destination location. + // The number of logical bytes that DataSync actually writes to the destination + // location. BytesWritten int64 - // The estimated physical number of bytes that will transfer over the network. + // The number of logical bytes that DataSync expects to write to the destination + // location. EstimatedBytesToTransfer int64 - // The expected number of files, objects, and directories that DataSync will - // delete in your destination location. If you don't [configure your task]to delete data in the - // destination that isn't in the source, the value is always 0 . + // The number of files, objects, and directories that DataSync expects to delete + // in your destination location. If you don't [configure your task]to delete data in the destination + // that isn't in the source, the value is always 0 . // // [configure your task]: https://docs.aws.amazon.com/datasync/latest/userguide/configure-metadata.html EstimatedFilesToDelete int64 - // The expected number of files, objects, and directories that DataSync will - // transfer over the network. This value is calculated during the task execution's - // PREPARING phase before the TRANSFERRING phase. The calculation is based on - // comparing the content of the source and destination locations and finding the - // difference that needs to be transferred. + // The number of files, objects, and directories that DataSync expects to transfer + // over the network. This value is calculated during the task execution's PREPARING[step] + // before the TRANSFERRING step. + // + // How this gets calculated depends primarily on your task’s [transfer mode] configuration: + // + // - If TranserMode is set to CHANGED - The calculation is based on comparing the + // content of the source and destination locations and determining the difference + // that needs to be transferred. The difference can include: + // + // - Anything that's added or modified at the source location. + // + // - Anything that's in both locations and modified at the destination after an + // initial transfer (unless [OverwriteMode]is set to NEVER ). + // + // - (Basic task mode only) The number of items that DataSync expects to delete + // (if [PreserveDeletedFiles]is set to REMOVE ). + // + // - If TranserMode is set to ALL - The calculation is based only on the items + // that DataSync finds at the source location. + // + // [transfer mode]: https://docs.aws.amazon.com/datasync/latest/userguide/API_Options.html#DataSync-Type-Options-TransferMode + // [OverwriteMode]: https://docs.aws.amazon.com/datasync/latest/userguide/API_Options.html#DataSync-Type-Options-OverwriteMode + // [step]: https://docs.aws.amazon.com/datasync/latest/userguide/run-task.html#understand-task-execution-statuses + // [PreserveDeletedFiles]: https://docs.aws.amazon.com/datasync/latest/userguide/API_Options.html#DataSync-Type-Options-PreserveDeletedFiles EstimatedFilesToTransfer int64 // A list of filter rules that exclude specific data during your transfer. For @@ -80,30 +116,59 @@ type DescribeTaskExecutionOutput struct { // [Filtering data transferred by DataSync]: https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html Excludes []types.FilterRule - // The number of files, objects, and directories that DataSync deleted in your - // destination location. If you don't [configure your task]to delete data in the destination that isn't - // in the source, the value is always 0 . + // The number of files, objects, and directories that DataSync actually deletes in + // your destination location. If you don't [configure your task]to delete data in the destination that + // isn't in the source, the value is always 0 . // // [configure your task]: https://docs.aws.amazon.com/datasync/latest/userguide/configure-metadata.html FilesDeleted int64 - // The number of files, objects, and directories that DataSync skipped during your + // The number of objects that DataSync fails to prepare, transfer, verify, and + // delete during your task execution. + // + // Applies only to [Enhanced mode tasks]. + // + // [Enhanced mode tasks]: https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html + FilesFailed *types.TaskExecutionFilesFailedDetail + + // The number of objects that DataSync finds at your locations. + // + // Applies only to [Enhanced mode tasks]. + // + // [Enhanced mode tasks]: https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html + FilesListed *types.TaskExecutionFilesListedDetail + + // The number of objects that DataSync will attempt to transfer after comparing + // your source and destination locations. + // + // Applies only to [Enhanced mode tasks]. + // + // This metric isn't applicable if you configure your task to [transfer all data]. In that scenario, + // DataSync copies everything from the source to the destination without comparing + // differences between the locations. + // + // [transfer all data]: https://docs.aws.amazon.com/datasync/latest/userguide/configure-metadata.html#task-option-transfer-mode + // [Enhanced mode tasks]: https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html + FilesPrepared int64 + + // The number of files, objects, and directories that DataSync skips during your // transfer. FilesSkipped int64 - // The actual number of files, objects, and directories that DataSync transferred + // The number of files, objects, and directories that DataSync actually transfers // over the network. This value is updated periodically during the task execution's - // TRANSFERRING phase when something is read from the source and sent over the - // network. + // TRANSFERRING[step] when something is read from the source and sent over the network. // // If DataSync fails to transfer something, this value can be less than // EstimatedFilesToTransfer . In some cases, this value can also be greater than // EstimatedFilesToTransfer . This element is implementation-specific for some - // location types, so don't use it as an exact indication of what transferred or to - // monitor your task execution. + // location types, so don't use it as an exact indication of what's transferring or + // to monitor your task execution. + // + // [step]: https://docs.aws.amazon.com/datasync/latest/userguide/run-task.html#understand-task-execution-statuses FilesTransferred int64 - // The number of files, objects, and directories that DataSync verified during + // The number of files, objects, and directories that DataSync verifies during // your transfer. // // When you configure your task to [verify only the data that's transferred], DataSync doesn't verify directories in some @@ -162,6 +227,11 @@ type DescribeTaskExecutionOutput struct { // arn:aws:datasync:us-east-1:111222333444:task/task-0208075f79cedf4a2 . TaskExecutionArn *string + // The task mode that you're using. For more information, see [Choosing a task mode for your data transfer]. + // + // [Choosing a task mode for your data transfer]: https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html + TaskMode types.TaskMode + // The configuration of your task report, which provides detailed information // about for your DataSync transfer. For more information, see [Creating a task report]. // diff --git a/service/datasync/api_op_StartTaskExecution.go b/service/datasync/api_op_StartTaskExecution.go index 6c56ad5066d..b27857692d0 100644 --- a/service/datasync/api_op_StartTaskExecution.go +++ b/service/datasync/api_op_StartTaskExecution.go @@ -14,7 +14,7 @@ import ( // Starts an DataSync transfer task. For each task, you can only run one task // execution at a time. // -// There are several phases to a task execution. For more information, see [Task execution statuses]. +// There are several steps to a task execution. For more information, see [Task execution statuses]. // // If you're planning to transfer data to or from an Amazon S3 location, review [how DataSync can affect your S3 request charges] // and the [DataSync pricing page]before you begin. diff --git a/service/datasync/api_op_UpdateLocationHdfs.go b/service/datasync/api_op_UpdateLocationHdfs.go index b5e55f2717d..85f8311d287 100644 --- a/service/datasync/api_op_UpdateLocationHdfs.go +++ b/service/datasync/api_op_UpdateLocationHdfs.go @@ -35,7 +35,8 @@ type UpdateLocationHdfsInput struct { // This member is required. LocationArn *string - // The ARNs of the agents that are used to connect to the HDFS cluster. + // The Amazon Resource Names (ARNs) of the DataSync agents that can connect to + // your HDFS cluster. AgentArns []string // The type of authentication used to determine the identity of the user. diff --git a/service/datasync/api_op_UpdateLocationNfs.go b/service/datasync/api_op_UpdateLocationNfs.go index 9fa934af064..7d767bf84db 100644 --- a/service/datasync/api_op_UpdateLocationNfs.go +++ b/service/datasync/api_op_UpdateLocationNfs.go @@ -43,7 +43,8 @@ type UpdateLocationNfsInput struct { // Specifies how DataSync can access a location using the NFS protocol. MountOptions *types.NfsMountOptions - // The DataSync agents that are connecting to a Network File System (NFS) location. + // The DataSync agents that can connect to your Network File System (NFS) file + // server. OnPremConfig *types.OnPremConfig // Specifies the export path in your NFS file server that you want DataSync to diff --git a/service/datasync/api_op_UpdateLocationObjectStorage.go b/service/datasync/api_op_UpdateLocationObjectStorage.go index 011462295c0..92b05784c03 100644 --- a/service/datasync/api_op_UpdateLocationObjectStorage.go +++ b/service/datasync/api_op_UpdateLocationObjectStorage.go @@ -40,7 +40,7 @@ type UpdateLocationObjectStorageInput struct { AccessKey *string // Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can - // securely connect with your location. + // connect with your object storage system. AgentArns []string // Specifies the secret key (for example, a password) if credentials are required diff --git a/service/datasync/api_op_UpdateLocationSmb.go b/service/datasync/api_op_UpdateLocationSmb.go index 6065ee9c2fd..c9e084ec105 100644 --- a/service/datasync/api_op_UpdateLocationSmb.go +++ b/service/datasync/api_op_UpdateLocationSmb.go @@ -35,8 +35,8 @@ type UpdateLocationSmbInput struct { // This member is required. LocationArn *string - // Specifies the DataSync agent (or agents) which you want to connect to your SMB - // file server. You specify an agent by using its Amazon Resource Name (ARN). + // Specifies the DataSync agent (or agents) that can connect to your SMB file + // server. You specify an agent by using its Amazon Resource Name (ARN). AgentArns []string // Specifies the Windows domain name that your SMB file server belongs to. diff --git a/service/datasync/api_op_UpdateTask.go b/service/datasync/api_op_UpdateTask.go index 78e4f2b3ef3..db76f62a7c0 100644 --- a/service/datasync/api_op_UpdateTask.go +++ b/service/datasync/api_op_UpdateTask.go @@ -38,6 +38,15 @@ type UpdateTaskInput struct { // Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for // monitoring your task. + // + // For Enhanced mode tasks, you must use /aws/datasync as your log group name. For + // example: + // + // arn:aws:logs:us-east-1:111222333444:log-group:/aws/datasync:* + // + // For more information, see [Monitoring data transfers with CloudWatch Logs]. + // + // [Monitoring data transfers with CloudWatch Logs]: https://docs.aws.amazon.com/datasync/latest/userguide/configure-logging.html CloudWatchLogGroupArn *string // Specifies exclude filters that define the files, objects, and folders in your diff --git a/service/datasync/deserializers.go b/service/datasync/deserializers.go index 1d9b6d01357..6ee2dcf3ba2 100644 --- a/service/datasync/deserializers.go +++ b/service/datasync/deserializers.go @@ -10776,6 +10776,146 @@ func awsAwsjson11_deserializeDocumentTagListEntry(v **types.TagListEntry, value return nil } +func awsAwsjson11_deserializeDocumentTaskExecutionFilesFailedDetail(v **types.TaskExecutionFilesFailedDetail, 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.TaskExecutionFilesFailedDetail + if *v == nil { + sv = &types.TaskExecutionFilesFailedDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Delete": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Delete = i64 + } + + case "Prepare": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Prepare = i64 + } + + case "Transfer": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Transfer = i64 + } + + case "Verify": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Verify = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTaskExecutionFilesListedDetail(v **types.TaskExecutionFilesListedDetail, 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.TaskExecutionFilesListedDetail + if *v == nil { + sv = &types.TaskExecutionFilesListedDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AtDestinationForDelete": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AtDestinationForDelete = i64 + } + + case "AtSource": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AtSource = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentTaskExecutionList(v *[]types.TaskExecutionListEntry, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10850,6 +10990,15 @@ func awsAwsjson11_deserializeDocumentTaskExecutionListEntry(v **types.TaskExecut sv.TaskExecutionArn = ptr.String(jtv) } + case "TaskMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskMode to be of type string, got %T instead", value) + } + sv.TaskMode = types.TaskMode(jtv) + } + default: _, _ = key, value @@ -11070,6 +11219,15 @@ func awsAwsjson11_deserializeDocumentTaskListEntry(v **types.TaskListEntry, valu sv.TaskArn = ptr.String(jtv) } + case "TaskMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskMode to be of type string, got %T instead", value) + } + sv.TaskMode = types.TaskMode(jtv) + } + default: _, _ = key, value @@ -13680,6 +13838,29 @@ func awsAwsjson11_deserializeOpDocumentDescribeTaskExecutionOutput(v **DescribeT sv.FilesDeleted = i64 } + case "FilesFailed": + if err := awsAwsjson11_deserializeDocumentTaskExecutionFilesFailedDetail(&sv.FilesFailed, value); err != nil { + return err + } + + case "FilesListed": + if err := awsAwsjson11_deserializeDocumentTaskExecutionFilesListedDetail(&sv.FilesListed, value); err != nil { + return err + } + + case "FilesPrepared": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FilesPrepared = i64 + } + case "FilesSkipped": if value != nil { jtv, ok := value.(json.Number) @@ -13778,6 +13959,15 @@ func awsAwsjson11_deserializeOpDocumentDescribeTaskExecutionOutput(v **DescribeT sv.TaskExecutionArn = ptr.String(jtv) } + case "TaskMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskMode to be of type string, got %T instead", value) + } + sv.TaskMode = types.TaskMode(jtv) + } + case "TaskReportConfig": if err := awsAwsjson11_deserializeDocumentTaskReportConfig(&sv.TaskReportConfig, value); err != nil { return err @@ -13951,6 +14141,15 @@ func awsAwsjson11_deserializeOpDocumentDescribeTaskOutput(v **DescribeTaskOutput sv.TaskArn = ptr.String(jtv) } + case "TaskMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskMode to be of type string, got %T instead", value) + } + sv.TaskMode = types.TaskMode(jtv) + } + case "TaskReportConfig": if err := awsAwsjson11_deserializeDocumentTaskReportConfig(&sv.TaskReportConfig, value); err != nil { return err diff --git a/service/datasync/serializers.go b/service/datasync/serializers.go index 51f26fb2a0b..35f1b15f2b7 100644 --- a/service/datasync/serializers.go +++ b/service/datasync/serializers.go @@ -5137,6 +5137,11 @@ func awsAwsjson11_serializeOpDocumentCreateTaskInput(v *CreateTaskInput, value s } } + if len(v.TaskMode) > 0 { + ok := object.Key("TaskMode") + ok.String(string(v.TaskMode)) + } + if v.TaskReportConfig != nil { ok := object.Key("TaskReportConfig") if err := awsAwsjson11_serializeDocumentTaskReportConfig(v.TaskReportConfig, ok); err != nil { diff --git a/service/datasync/types/enums.go b/service/datasync/types/enums.go index 8c29101d44b..2903e69ef4c 100644 --- a/service/datasync/types/enums.go +++ b/service/datasync/types/enums.go @@ -880,6 +880,25 @@ func (TaskFilterName) Values() []TaskFilterName { } } +type TaskMode string + +// Enum values for TaskMode +const ( + TaskModeBasic TaskMode = "BASIC" + TaskModeEnhanced TaskMode = "ENHANCED" +) + +// Values returns all known values for TaskMode. Note that this can be expanded in +// the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (TaskMode) Values() []TaskMode { + return []TaskMode{ + "BASIC", + "ENHANCED", + } +} + type TaskQueueing string // Enum values for TaskQueueing diff --git a/service/datasync/types/types.go b/service/datasync/types/types.go index 117ae07b09b..d4fcff0f708 100644 --- a/service/datasync/types/types.go +++ b/service/datasync/types/types.go @@ -130,8 +130,10 @@ type DiscoveryServerConfiguration struct { noSmithyDocumentSerde } -// The subnet and security groups that DataSync uses to access your Amazon EFS -// file system. +// The subnet and security groups that DataSync uses to connect to one of your +// Amazon EFS file system's [mount targets]. +// +// [mount targets]: https://docs.aws.amazon.com/efs/latest/ug/accessing-fs.html type Ec2Config struct { // Specifies the Amazon Resource Names (ARNs) of the security groups associated @@ -627,11 +629,16 @@ type NfsMountOptions struct { noSmithyDocumentSerde } -// The DataSync agents that are connecting to a Network File System (NFS) location. +// The DataSync agents that can connect to your Network File System (NFS) file +// server. type OnPremConfig struct { - // The Amazon Resource Names (ARNs) of the agents connecting to a transfer - // location. + // The Amazon Resource Names (ARNs) of the DataSync agents that can connect to + // your NFS file server. + // + // You can specify more than one agent. For more information, see [Using multiple DataSync agents]. + // + // [Using multiple DataSync agents]: https://docs.aws.amazon.com/datasync/latest/userguide/do-i-need-datasync-agent.html#multiple-agents // // This member is required. AgentArns []string @@ -660,7 +667,7 @@ type Options struct { // only do this on a best-effort basis. // // - BEST_EFFORT (default) - DataSync attempts to preserve the original Atime - // attribute on all source files (that is, the version before the PREPARING phase + // attribute on all source files (that is, the version before the PREPARING steps // of the task execution). This option is recommended. // // - NONE - Ignores Atime . @@ -672,6 +679,10 @@ type Options struct { // Limits the bandwidth used by a DataSync task. For example, if you want DataSync // to use a maximum of 1 MB, set this value to 1048576 ( =1024*1024 ). + // + // Not applicable to [Enhanced mode tasks]. + // + // [Enhanced mode tasks]: https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html BytesPerSecond *int64 // Specifies the POSIX group ID (GID) of the file's owners. @@ -681,9 +692,9 @@ type Options struct { // // - NONE - Ignores UID and GID. // - // For more information, see [Metadata copied by DataSync]. + // For more information, see [Understanding how DataSync handles file and object metadata]. // - // [Metadata copied by DataSync]: https://docs.aws.amazon.com/datasync/latest/userguide/special-files.html#metadata-copied + // [Understanding how DataSync handles file and object metadata]: https://docs.aws.amazon.com/datasync/latest/userguide/metadata-copied.html Gid Gid // Specifies the type of logs that DataSync publishes to a Amazon CloudWatch Logs @@ -700,7 +711,7 @@ type Options struct { LogLevel LogLevel // Specifies whether to preserve metadata indicating the last time that a file was - // written to before the PREPARING phase of your task execution. This option is + // written to before the PREPARING step of your task execution. This option is // required when you need to run the a task more than once. // // - PRESERVE (default) - Preserves original Mtime , which is recommended. @@ -737,7 +748,7 @@ type Options struct { // Specifies which users or groups can access a file for a specific purpose such // as reading, writing, or execution of the file. // - // For more information, see [Metadata copied by DataSync]. + // For more information, see [Understanding how DataSync handles file and object metadata]. // // - PRESERVE (default) - Preserves POSIX-style permissions, which is recommended. // @@ -745,7 +756,7 @@ type Options struct { // // DataSync can preserve extant permissions of a source location. // - // [Metadata copied by DataSync]: https://docs.aws.amazon.com/datasync/latest/userguide/special-files.html#metadata-copied + // [Understanding how DataSync handles file and object metadata]: https://docs.aws.amazon.com/datasync/latest/userguide/metadata-copied.html PosixPermissions PosixPermissions // Specifies whether files in the destination location that don't exist in the @@ -783,7 +794,7 @@ type Options struct { // // This value is only used for transfers between SMB and Amazon FSx for Windows // File Server locations or between two FSx for Windows File Server locations. For - // more information, see [how DataSync handles metadata]. + // more information, see [Understanding how DataSync handles file and object metadata]. // // - OWNER_DACL (default) - For each copied object, DataSync copies the following // metadata: @@ -817,7 +828,7 @@ type Options struct { // configuration. // // [FSx for Windows File Server]: https://docs.aws.amazon.com/datasync/latest/userguide/create-fsx-location.html#create-fsx-windows-location-permissions - // [how DataSync handles metadata]: https://docs.aws.amazon.com/datasync/latest/userguide/special-files.html + // [Understanding how DataSync handles file and object metadata]: https://docs.aws.amazon.com/datasync/latest/userguide/metadata-copied.html // [SMB]: https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb-permissions // [FSx for ONTAP]: https://docs.aws.amazon.com/datasync/latest/userguide/create-ontap-location.html#create-ontap-location-smb SecurityDescriptorCopyFlags SmbSecurityDescriptorCopyFlags @@ -828,12 +839,13 @@ type Options struct { // [running multiple tasks]: https://docs.aws.amazon.com/datasync/latest/userguide/run-task.html#running-multiple-tasks TaskQueueing TaskQueueing - // Determines whether DataSync transfers only the data and metadata that differ - // between the source and the destination location or transfers all the content - // from the source (without comparing what's in the destination). + // Specifies whether DataSync transfers only the data (including metadata) that + // differs between locations following an initial copy or transfers all data every + // time you run the task. If you're planning on recurring transfers, you might only + // want to transfer what's changed since your previous task execution. // - // - CHANGED (default) - DataSync copies only data or metadata that is new or - // different content from the source location to the destination location. + // - CHANGED (default) - After your initial full transfer, DataSync copies only + // the data and metadata that differs between the source and destination location. // // - ALL - DataSync copies everything in the source to the destination without // comparing differences between the locations. @@ -851,32 +863,39 @@ type Options struct { // [Metadata copied by DataSync]: https://docs.aws.amazon.com/datasync/latest/userguide/special-files.html#metadata-copied Uid Uid - // Specifies how and when DataSync checks the integrity of your data during a - // transfer. + // Specifies if and how DataSync checks the integrity of your data at the end of + // your transfer. // // - ONLY_FILES_TRANSFERRED (recommended) - DataSync calculates the checksum of - // transferred files and metadata at the source location. At the end of the + // transferred data (including metadata) at the source location. At the end of the // transfer, DataSync then compares this checksum to the checksum calculated on - // those files at the destination. + // that data at the destination. + // + // This is the default option for [Enhanced mode tasks]. // // We recommend this option when transferring to S3 Glacier Flexible Retrieval or // S3 Glacier Deep Archive storage classes. For more information, see [Storage class considerations with Amazon S3 locations]. // - // - POINT_IN_TIME_CONSISTENT (default) - At the end of the transfer, DataSync - // scans the entire source and destination to verify that both locations are fully + // - POINT_IN_TIME_CONSISTENT - At the end of the transfer, DataSync checks the + // entire source and destination to verify that both locations are fully // synchronized. // + // The is the default option for [Basic mode tasks]and isn't currently supported with Enhanced mode + // tasks. + // // If you use a [manifest], DataSync only scans and verifies what's listed in the manifest. // // You can't use this option when transferring to S3 Glacier Flexible Retrieval or // S3 Glacier Deep Archive storage classes. For more information, see [Storage class considerations with Amazon S3 locations]. // - // - NONE - DataSync doesn't run additional verification at the end of the - // transfer. All data transmissions are still integrity-checked with checksum - // verification during the transfer. + // - NONE - DataSync performs data integrity checks only during your transfer. + // Unlike other options, there's no additional verification at the end of your + // transfer. // // [Storage class considerations with Amazon S3 locations]: https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html#using-storage-classes // [manifest]: https://docs.aws.amazon.com/datasync/latest/userguide/transferring-with-manifest.html + // [Enhanced mode tasks]: https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html + // [Basic mode tasks]: https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html VerifyMode VerifyMode noSmithyDocumentSerde @@ -919,7 +938,7 @@ type PrivateLinkConfig struct { // Specifies the VPC endpoint provided by [Amazon Web Services PrivateLink] that your agent connects to. // - // [Amazon Web Services PrivateLink]: https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html + // [Amazon Web Services PrivateLink]: https://docs.aws.amazon.com/vpc/latest/privatelink/privatelink-share-your-services.html PrivateLinkEndpoint *string // Specifies the Amazon Resource Names (ARN) of the security group that provides @@ -1246,6 +1265,62 @@ type TagListEntry struct { noSmithyDocumentSerde } +// The number of objects that DataSync fails to prepare, transfer, verify, and +// delete during your task execution. +// +// Applies only to [Enhanced mode tasks]. +// +// [Enhanced mode tasks]: https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html +type TaskExecutionFilesFailedDetail struct { + + // The number of objects that DataSync fails to delete during your task execution. + Delete int64 + + // The number of objects that DataSync fails to prepare during your task execution. + Prepare int64 + + // The number of objects that DataSync fails to transfer during your task + // execution. + Transfer int64 + + // The number of objects that DataSync fails to verify during your task execution. + Verify int64 + + noSmithyDocumentSerde +} + +// The number of objects that DataSync finds at your locations. +// +// Applies only to [Enhanced mode tasks]. +// +// [Enhanced mode tasks]: https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html +type TaskExecutionFilesListedDetail struct { + + // The number of objects that DataSync finds at your destination location. This + // metric is only applicable if you [configure your task]to delete data in the destination that isn't + // in the source. + // + // [configure your task]: https://docs.aws.amazon.com/datasync/latest/userguide/configure-metadata.html#task-option-file-object-handling + AtDestinationForDelete int64 + + // The number of objects that DataSync finds at your source location. + // + // - With a [manifest], DataSync lists only what's in your manifest (and not everything at + // your source location). + // + // - With an include [filter], DataSync lists only what matches the filter at your + // source location. + // + // - With an exclude filter, DataSync lists everything at your source location + // before applying the filter. + // + // [filter]: https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html + // [manifest]: https://docs.aws.amazon.com/datasync/latest/userguide/transferring-with-manifest.html + AtSource int64 + + noSmithyDocumentSerde +} + // Represents a single entry in a list of DataSync task executions that's returned // with the [ListTaskExecutions]operation. // @@ -1260,42 +1335,75 @@ type TaskExecutionListEntry struct { // The Amazon Resource Name (ARN) of a task execution. TaskExecutionArn *string + // The task mode that you're using. For more information, see [Choosing a task mode for your data transfer]. + // + // [Choosing a task mode for your data transfer]: https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html + TaskMode TaskMode + noSmithyDocumentSerde } -// Describes the detailed result of a TaskExecution operation. This result -// includes the time in milliseconds spent in each phase, the status of the task -// execution, and the errors encountered. +// Provides detailed information about the result of your DataSync task execution. type TaskExecutionResultDetail struct { - // Errors that DataSync encountered during execution of the task. You can use this - // error code to help troubleshoot issues. + // An error that DataSync encountered during your task execution. You can use this + // information to help [troubleshoot issues]. + // + // [troubleshoot issues]: https://docs.aws.amazon.com/datasync/latest/userguide/troubleshooting-datasync-locations-tasks.html ErrorCode *string - // Detailed description of an error that was encountered during the task - // execution. You can use this information to help troubleshoot issues. + // The detailed description of an error that DataSync encountered during your task + // execution. You can use this information to help [troubleshoot issues]. + // + // [troubleshoot issues]: https://docs.aws.amazon.com/datasync/latest/userguide/troubleshooting-datasync-locations-tasks.html ErrorDetail *string - // The total time in milliseconds that DataSync spent in the PREPARING phase. + // The time in milliseconds that your task execution was in the PREPARING step. + // For more information, see [Task execution statuses]. + // + // For Enhanced mode tasks, the value is always 0 . For more information, see [How DataSync prepares your data transfer]. + // + // [Task execution statuses]: https://docs.aws.amazon.com/datasync/latest/userguide/run-task.html#understand-task-execution-statuses + // [How DataSync prepares your data transfer]: https://docs.aws.amazon.com/datasync/latest/userguide/how-datasync-transfer-works.html#how-datasync-prepares PrepareDuration *int64 - // The status of the PREPARING phase. + // The status of the PREPARING step for your task execution. For more information, + // see [Task execution statuses]. + // + // [Task execution statuses]: https://docs.aws.amazon.com/datasync/latest/userguide/run-task.html#understand-task-execution-statuses PrepareStatus PhaseStatus - // The total time in milliseconds that DataSync took to transfer the file from the - // source to the destination location. + // The time in milliseconds that your task execution ran. TotalDuration *int64 - // The total time in milliseconds that DataSync spent in the TRANSFERRING phase. + // The time in milliseconds that your task execution was in the TRANSFERRING step. + // For more information, see [Task execution statuses]. + // + // For Enhanced mode tasks, the value is always 0 . For more information, see [How DataSync transfers your data]. + // + // [Task execution statuses]: https://docs.aws.amazon.com/datasync/latest/userguide/run-task.html#understand-task-execution-statuses + // [How DataSync transfers your data]: https://docs.aws.amazon.com/datasync/latest/userguide/how-datasync-transfer-works.html#how-datasync-transfers TransferDuration *int64 - // The status of the TRANSFERRING phase. + // The status of the TRANSFERRING step for your task execution. For more + // information, see [Task execution statuses]. + // + // [Task execution statuses]: https://docs.aws.amazon.com/datasync/latest/userguide/run-task.html#understand-task-execution-statuses TransferStatus PhaseStatus - // The total time in milliseconds that DataSync spent in the VERIFYING phase. + // The time in milliseconds that your task execution was in the VERIFYING step. + // For more information, see [Task execution statuses]. + // + // For Enhanced mode tasks, the value is always 0 . For more information, see [How DataSync verifies your data's integrity]. + // + // [Task execution statuses]: https://docs.aws.amazon.com/datasync/latest/userguide/run-task.html#understand-task-execution-statuses + // [How DataSync verifies your data's integrity]: https://docs.aws.amazon.com/datasync/latest/userguide/how-datasync-transfer-works.html#how-verifying-works VerifyDuration *int64 - // The status of the VERIFYING phase. + // The status of the VERIFYING step for your task execution. For more information, + // see [Task execution statuses]. + // + // [Task execution statuses]: https://docs.aws.amazon.com/datasync/latest/userguide/run-task.html#understand-task-execution-statuses VerifyStatus PhaseStatus noSmithyDocumentSerde @@ -1349,6 +1457,11 @@ type TaskListEntry struct { // The Amazon Resource Name (ARN) of the task. TaskArn *string + // The task mode that you're using. For more information, see [Choosing a task mode for your data transfer]. + // + // [Choosing a task mode for your data transfer]: https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html + TaskMode TaskMode + noSmithyDocumentSerde } @@ -1407,10 +1520,23 @@ type TaskReportConfig struct { // [schedule]: https://docs.aws.amazon.com/datasync/latest/userguide/task-scheduling.html type TaskSchedule struct { - // Specifies your task schedule by using a cron expression in UTC time. For - // information about cron expression syntax, see the [Amazon EventBridge User Guide]. + // Specifies your task schedule by using a cron or rate expression. + // + // Use cron expressions for task schedules that run on a specific time and day. + // For example, the following cron expression creates a task schedule that runs at + // 8 AM on the first Wednesday of every month: + // + // cron(0 8 * * 3#1) + // + // Use rate expressions for task schedules that run on a regular interval. For + // example, the following rate expression creates a task schedule that runs every + // 12 hours: + // + // rate(12 hours) + // + // For information about cron and rate expression syntax, see the [Amazon EventBridge User Guide]. // - // [Amazon EventBridge User Guide]: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-cron-expressions.html + // [Amazon EventBridge User Guide]: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-scheduled-rule-pattern.html // // This member is required. ScheduleExpression *string diff --git a/service/ec2/api_op_AssociateSecurityGroupVpc.go b/service/ec2/api_op_AssociateSecurityGroupVpc.go new file mode 100644 index 00000000000..92d2712313e --- /dev/null +++ b/service/ec2/api_op_AssociateSecurityGroupVpc.go @@ -0,0 +1,182 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ec2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ec2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Associates a security group with another VPC in the same Region. This enables +// you to use the same security group with network interfaces and instances in the +// specified VPC. +// +// - The VPC you want to associate the security group with must be in the same +// Region. +// +// - You can associate the security group with another VPC if your account owns +// the VPC or if the VPC was shared with you. +// +// - You must own the security group and the VPC that it was created in. +// +// - You cannot use this feature with default security groups. +// +// - You cannot use this feature with the default VPC. +func (c *Client) AssociateSecurityGroupVpc(ctx context.Context, params *AssociateSecurityGroupVpcInput, optFns ...func(*Options)) (*AssociateSecurityGroupVpcOutput, error) { + if params == nil { + params = &AssociateSecurityGroupVpcInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssociateSecurityGroupVpc", params, optFns, c.addOperationAssociateSecurityGroupVpcMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssociateSecurityGroupVpcOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssociateSecurityGroupVpcInput struct { + + // A security group ID. + // + // This member is required. + GroupId *string + + // A VPC ID. + // + // This member is required. + VpcId *string + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have the + // required permissions, the error response is DryRunOperation . Otherwise, it is + // UnauthorizedOperation . + DryRun *bool + + noSmithyDocumentSerde +} + +type AssociateSecurityGroupVpcOutput struct { + + // The state of the association. + State types.SecurityGroupVpcAssociationState + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssociateSecurityGroupVpcMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateSecurityGroupVpc{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateSecurityGroupVpc{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateSecurityGroupVpc"); 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 = addSpanRetryLoop(stack, options); 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 = addOpAssociateSecurityGroupVpcValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateSecurityGroupVpc(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAssociateSecurityGroupVpc(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AssociateSecurityGroupVpc", + } +} diff --git a/service/ec2/api_op_CreateNetworkInterface.go b/service/ec2/api_op_CreateNetworkInterface.go index 43726eaef3a..3d5327ce381 100644 --- a/service/ec2/api_op_CreateNetworkInterface.go +++ b/service/ec2/api_op_CreateNetworkInterface.go @@ -80,7 +80,10 @@ type CreateNetworkInterfaceInput struct { // The type of network interface. The default is interface . // - // The only supported values are interface , efa , and trunk . + // If you specify efa-only , do not assign any IP addresses to the network + // interface. EFA-only network interfaces do not support IP addresses. + // + // The only supported values are interface , efa , efa-only , and trunk . InterfaceType types.NetworkInterfaceCreationType // The number of IPv4 prefixes that Amazon Web Services automatically assigns to diff --git a/service/ec2/api_op_CreateSecurityGroup.go b/service/ec2/api_op_CreateSecurityGroup.go index 44601f4e13e..8c6a5903bbe 100644 --- a/service/ec2/api_op_CreateSecurityGroup.go +++ b/service/ec2/api_op_CreateSecurityGroup.go @@ -87,6 +87,9 @@ type CreateSecurityGroupOutput struct { // The ID of the security group. GroupId *string + // The security group ARN. + SecurityGroupArn *string + // The tags assigned to the security group. Tags []types.Tag diff --git a/service/ec2/api_op_CreateTrafficMirrorSession.go b/service/ec2/api_op_CreateTrafficMirrorSession.go index 30df756c1c6..9d8ed178c70 100644 --- a/service/ec2/api_op_CreateTrafficMirrorSession.go +++ b/service/ec2/api_op_CreateTrafficMirrorSession.go @@ -24,7 +24,7 @@ import ( // By default, no traffic is mirrored. Use [CreateTrafficMirrorFilter] to create filter rules that specify // the traffic to mirror. // -// [CreateTrafficMirrorFilter]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTrafficMirrorFilter.htm +// [CreateTrafficMirrorFilter]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTrafficMirrorFilter.html func (c *Client) CreateTrafficMirrorSession(ctx context.Context, params *CreateTrafficMirrorSessionInput, optFns ...func(*Options)) (*CreateTrafficMirrorSessionOutput, error) { if params == nil { params = &CreateTrafficMirrorSessionInput{} diff --git a/service/ec2/api_op_DeleteSecurityGroup.go b/service/ec2/api_op_DeleteSecurityGroup.go index 210016c2c48..2515cb81f73 100644 --- a/service/ec2/api_op_DeleteSecurityGroup.go +++ b/service/ec2/api_op_DeleteSecurityGroup.go @@ -13,8 +13,8 @@ import ( // Deletes a security group. // // If you attempt to delete a security group that is associated with an instance -// or network interface or is referenced by another security group in the same VPC, -// the operation fails with DependencyViolation . +// or network interface, is referenced by another security group in the same VPC, +// or has a VPC association, the operation fails with DependencyViolation . func (c *Client) DeleteSecurityGroup(ctx context.Context, params *DeleteSecurityGroupInput, optFns ...func(*Options)) (*DeleteSecurityGroupOutput, error) { if params == nil { params = &DeleteSecurityGroupInput{} diff --git a/service/ec2/api_op_DescribeInstanceTypes.go b/service/ec2/api_op_DescribeInstanceTypes.go index d6cce5787b7..aa15e536c57 100644 --- a/service/ec2/api_op_DescribeInstanceTypes.go +++ b/service/ec2/api_op_DescribeInstanceTypes.go @@ -161,7 +161,8 @@ type DescribeInstanceTypesInput struct { // // - supported-root-device-type - The root device type ( ebs | instance-store ). // - // - supported-usage-class - The usage class ( on-demand | spot ). + // - supported-usage-class - The usage class ( on-demand | spot | capacity-block + // ). // // - supported-virtualization-type - The virtualization type ( hvm | paravirtual // ). diff --git a/service/ec2/api_op_DescribeNetworkInterfaces.go b/service/ec2/api_op_DescribeNetworkInterfaces.go index 49b6a78645c..68b379cfac1 100644 --- a/service/ec2/api_op_DescribeNetworkInterfaces.go +++ b/service/ec2/api_op_DescribeNetworkInterfaces.go @@ -109,8 +109,8 @@ type DescribeNetworkInterfacesInput struct { // // - interface-type - The type of network interface ( api_gateway_managed | // aws_codestar_connections_managed | branch | ec2_instance_connect_endpoint | - // efa | efs | gateway_load_balancer | gateway_load_balancer_endpoint | - // global_accelerator_managed | interface | iot_rules_managed | lambda | + // efa | efa-only | efs | gateway_load_balancer | gateway_load_balancer_endpoint + // | global_accelerator_managed | interface | iot_rules_managed | lambda | // load_balancer | nat_gateway | network_load_balancer | quicksight | // transit_gateway | trunk | vpc_endpoint ). // diff --git a/service/ec2/api_op_DescribeSecurityGroupReferences.go b/service/ec2/api_op_DescribeSecurityGroupReferences.go index e0c54d71cd5..ce5ee798a9e 100644 --- a/service/ec2/api_op_DescribeSecurityGroupReferences.go +++ b/service/ec2/api_op_DescribeSecurityGroupReferences.go @@ -11,8 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Describes the VPCs on the other side of a VPC peering connection that are -// referencing the security groups you've specified in this request. +// Describes the VPCs on the other side of a VPC peering or Transit Gateway +// connection that are referencing the security groups you've specified in this +// request. func (c *Client) DescribeSecurityGroupReferences(ctx context.Context, params *DescribeSecurityGroupReferencesInput, optFns ...func(*Options)) (*DescribeSecurityGroupReferencesOutput, error) { if params == nil { params = &DescribeSecurityGroupReferencesInput{} diff --git a/service/ec2/api_op_DescribeSecurityGroupVpcAssociations.go b/service/ec2/api_op_DescribeSecurityGroupVpcAssociations.go new file mode 100644 index 00000000000..e14bf082da8 --- /dev/null +++ b/service/ec2/api_op_DescribeSecurityGroupVpcAssociations.go @@ -0,0 +1,291 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ec2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ec2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes security group VPC associations made with [AssociateSecurityGroupVpc]. +// +// [AssociateSecurityGroupVpc]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateSecurityGroupVpc.html +func (c *Client) DescribeSecurityGroupVpcAssociations(ctx context.Context, params *DescribeSecurityGroupVpcAssociationsInput, optFns ...func(*Options)) (*DescribeSecurityGroupVpcAssociationsOutput, error) { + if params == nil { + params = &DescribeSecurityGroupVpcAssociationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeSecurityGroupVpcAssociations", params, optFns, c.addOperationDescribeSecurityGroupVpcAssociationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeSecurityGroupVpcAssociationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeSecurityGroupVpcAssociationsInput struct { + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have the + // required permissions, the error response is DryRunOperation . Otherwise, it is + // UnauthorizedOperation . + DryRun *bool + + // Security group VPC association filters. + // + // - group-id : The security group ID. + // + // - vpc-id : The ID of the associated VPC. + // + // - vpc-owner-id : The account ID of the VPC owner. + // + // - state : The state of the association. + // + // - tag: : The key/value combination of a tag assigned to the resource. Use the + // tag key in the filter name and the tag value as the filter value. For example, + // to find all resources that have a tag with the key Owner and the value TeamA , + // specify tag:Owner for the filter name and TeamA for the filter value. + // + // - tag-key : The key of a tag assigned to the resource. Use this filter to find + // all resources assigned a tag with a specific key, regardless of the tag value. + Filters []types.Filter + + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. For more + // information, see [Pagination]. + // + // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination + MaxResults *int32 + + // The token returned from a previous paginated request. Pagination continues from + // the end of the items returned by the previous request. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeSecurityGroupVpcAssociationsOutput struct { + + // The token to include in another request to get the next page of items. This + // value is null when there are no more items to return. + NextToken *string + + // The security group VPC associations. + SecurityGroupVpcAssociations []types.SecurityGroupVpcAssociation + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeSecurityGroupVpcAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSecurityGroupVpcAssociations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSecurityGroupVpcAssociations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeSecurityGroupVpcAssociations"); 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 = addSpanRetryLoop(stack, options); 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_opDescribeSecurityGroupVpcAssociations(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// DescribeSecurityGroupVpcAssociationsPaginatorOptions is the paginator options +// for DescribeSecurityGroupVpcAssociations +type DescribeSecurityGroupVpcAssociationsPaginatorOptions struct { + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. For more + // information, see [Pagination]. + // + // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeSecurityGroupVpcAssociationsPaginator is a paginator for +// DescribeSecurityGroupVpcAssociations +type DescribeSecurityGroupVpcAssociationsPaginator struct { + options DescribeSecurityGroupVpcAssociationsPaginatorOptions + client DescribeSecurityGroupVpcAssociationsAPIClient + params *DescribeSecurityGroupVpcAssociationsInput + nextToken *string + firstPage bool +} + +// NewDescribeSecurityGroupVpcAssociationsPaginator returns a new +// DescribeSecurityGroupVpcAssociationsPaginator +func NewDescribeSecurityGroupVpcAssociationsPaginator(client DescribeSecurityGroupVpcAssociationsAPIClient, params *DescribeSecurityGroupVpcAssociationsInput, optFns ...func(*DescribeSecurityGroupVpcAssociationsPaginatorOptions)) *DescribeSecurityGroupVpcAssociationsPaginator { + if params == nil { + params = &DescribeSecurityGroupVpcAssociationsInput{} + } + + options := DescribeSecurityGroupVpcAssociationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeSecurityGroupVpcAssociationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeSecurityGroupVpcAssociationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeSecurityGroupVpcAssociations page. +func (p *DescribeSecurityGroupVpcAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSecurityGroupVpcAssociationsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeSecurityGroupVpcAssociations(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeSecurityGroupVpcAssociationsAPIClient is a client that implements the +// DescribeSecurityGroupVpcAssociations operation. +type DescribeSecurityGroupVpcAssociationsAPIClient interface { + DescribeSecurityGroupVpcAssociations(context.Context, *DescribeSecurityGroupVpcAssociationsInput, ...func(*Options)) (*DescribeSecurityGroupVpcAssociationsOutput, error) +} + +var _ DescribeSecurityGroupVpcAssociationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeSecurityGroupVpcAssociations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeSecurityGroupVpcAssociations", + } +} diff --git a/service/ec2/api_op_DescribeStaleSecurityGroups.go b/service/ec2/api_op_DescribeStaleSecurityGroups.go index 6c9da2d6ef4..f88dab16c94 100644 --- a/service/ec2/api_op_DescribeStaleSecurityGroups.go +++ b/service/ec2/api_op_DescribeStaleSecurityGroups.go @@ -11,10 +11,15 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Describes the stale security group rules for security groups in a specified -// VPC. Rules are stale when they reference a deleted security group in a peered -// VPC. Rules can also be stale if they reference a security group in a peer VPC -// for which the VPC peering connection has been deleted. +// Describes the stale security group rules for security groups referenced across +// a VPC peering connection, transit gateway connection, or with a security group +// VPC association. Rules are stale when they reference a deleted security group. +// Rules can also be stale if they reference a security group in a peer VPC for +// which the VPC peering connection has been deleted, across a transit gateway +// where the transit gateway has been deleted (or [the transit gateway security group referencing feature]has been disabled), or if a +// security group VPC association has been disassociated. +// +// [the transit gateway security group referencing feature]: https://docs.aws.amazon.com/vpc/latest/tgw/tgw-vpc-attachments.html#vpc-attachment-security func (c *Client) DescribeStaleSecurityGroups(ctx context.Context, params *DescribeStaleSecurityGroupsInput, optFns ...func(*Options)) (*DescribeStaleSecurityGroupsOutput, error) { if params == nil { params = &DescribeStaleSecurityGroupsInput{} @@ -59,8 +64,8 @@ type DescribeStaleSecurityGroupsInput struct { type DescribeStaleSecurityGroupsOutput struct { - // The token to include in another request to get the next page of items. If there - // are no additional items to return, the string is empty. + // The token to include in another request to get the next page of items. This + // value is null when there are no more items to return. NextToken *string // Information about the stale security groups. diff --git a/service/ec2/api_op_DisassociateSecurityGroupVpc.go b/service/ec2/api_op_DisassociateSecurityGroupVpc.go new file mode 100644 index 00000000000..2aa815e1373 --- /dev/null +++ b/service/ec2/api_op_DisassociateSecurityGroupVpc.go @@ -0,0 +1,175 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ec2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ec2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Disassociates a security group from a VPC. You cannot disassociate the security +// group if any Elastic network interfaces in the associated VPC are still +// associated with the security group. +// +// Note that the disassociation is asynchronous and you can check the status of +// the request with [DescribeSecurityGroupVpcAssociations]. +// +// [DescribeSecurityGroupVpcAssociations]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroupVpcAssociations.html +func (c *Client) DisassociateSecurityGroupVpc(ctx context.Context, params *DisassociateSecurityGroupVpcInput, optFns ...func(*Options)) (*DisassociateSecurityGroupVpcOutput, error) { + if params == nil { + params = &DisassociateSecurityGroupVpcInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisassociateSecurityGroupVpc", params, optFns, c.addOperationDisassociateSecurityGroupVpcMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisassociateSecurityGroupVpcOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisassociateSecurityGroupVpcInput struct { + + // A security group ID. + // + // This member is required. + GroupId *string + + // A VPC ID. + // + // This member is required. + VpcId *string + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have the + // required permissions, the error response is DryRunOperation . Otherwise, it is + // UnauthorizedOperation . + DryRun *bool + + noSmithyDocumentSerde +} + +type DisassociateSecurityGroupVpcOutput struct { + + // The state of the disassociation. + State types.SecurityGroupVpcAssociationState + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDisassociateSecurityGroupVpcMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateSecurityGroupVpc{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateSecurityGroupVpc{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateSecurityGroupVpc"); 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 = addSpanRetryLoop(stack, options); 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 = addOpDisassociateSecurityGroupVpcValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateSecurityGroupVpc(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDisassociateSecurityGroupVpc(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DisassociateSecurityGroupVpc", + } +} diff --git a/service/ec2/api_op_RevokeSecurityGroupEgress.go b/service/ec2/api_op_RevokeSecurityGroupEgress.go index 9d93afc1461..49237b56a8c 100644 --- a/service/ec2/api_op_RevokeSecurityGroupEgress.go +++ b/service/ec2/api_op_RevokeSecurityGroupEgress.go @@ -95,6 +95,9 @@ type RevokeSecurityGroupEgressOutput struct { // Returns true if the request succeeds; otherwise, returns an error. Return *bool + // Details about the revoked security group rules. + RevokedSecurityGroupRules []types.RevokedSecurityGroupRule + // The outbound rules that were unknown to the service. In some cases, // unknownIpPermissionSet might be in a different format from the request // parameter. diff --git a/service/ec2/api_op_RevokeSecurityGroupIngress.go b/service/ec2/api_op_RevokeSecurityGroupIngress.go index 1ec6805fc13..66b7d3331aa 100644 --- a/service/ec2/api_op_RevokeSecurityGroupIngress.go +++ b/service/ec2/api_op_RevokeSecurityGroupIngress.go @@ -109,6 +109,9 @@ type RevokeSecurityGroupIngressOutput struct { // Returns true if the request succeeds; otherwise, returns an error. Return *bool + // Details about the revoked security group rules. + RevokedSecurityGroupRules []types.RevokedSecurityGroupRule + // The inbound rules that were unknown to the service. In some cases, // unknownIpPermissionSet might be in a different format from the request // parameter. diff --git a/service/ec2/deserializers.go b/service/ec2/deserializers.go index f6b202e6190..13a4e364ab7 100644 --- a/service/ec2/deserializers.go +++ b/service/ec2/deserializers.go @@ -2576,14 +2576,14 @@ func awsEc2query_deserializeOpErrorAssociateRouteTable(response *smithyhttp.Resp } } -type awsEc2query_deserializeOpAssociateSubnetCidrBlock struct { +type awsEc2query_deserializeOpAssociateSecurityGroupVpc struct { } -func (*awsEc2query_deserializeOpAssociateSubnetCidrBlock) ID() string { +func (*awsEc2query_deserializeOpAssociateSecurityGroupVpc) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpAssociateSubnetCidrBlock) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpAssociateSecurityGroupVpc) 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) @@ -2601,9 +2601,9 @@ func (m *awsEc2query_deserializeOpAssociateSubnetCidrBlock) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateSubnetCidrBlock(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorAssociateSecurityGroupVpc(response, &metadata) } - output := &AssociateSubnetCidrBlockOutput{} + output := &AssociateSecurityGroupVpcOutput{} out.Result = output var buff [1024]byte @@ -2624,7 +2624,7 @@ func (m *awsEc2query_deserializeOpAssociateSubnetCidrBlock) HandleDeserialize(ct } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateSubnetCidrBlockOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentAssociateSecurityGroupVpcOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2638,7 +2638,7 @@ func (m *awsEc2query_deserializeOpAssociateSubnetCidrBlock) HandleDeserialize(ct return out, metadata, err } -func awsEc2query_deserializeOpErrorAssociateSubnetCidrBlock(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorAssociateSecurityGroupVpc(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)} @@ -2671,14 +2671,14 @@ func awsEc2query_deserializeOpErrorAssociateSubnetCidrBlock(response *smithyhttp } } -type awsEc2query_deserializeOpAssociateTransitGatewayMulticastDomain struct { +type awsEc2query_deserializeOpAssociateSubnetCidrBlock struct { } -func (*awsEc2query_deserializeOpAssociateTransitGatewayMulticastDomain) ID() string { +func (*awsEc2query_deserializeOpAssociateSubnetCidrBlock) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpAssociateTransitGatewayMulticastDomain) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpAssociateSubnetCidrBlock) 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) @@ -2696,9 +2696,9 @@ func (m *awsEc2query_deserializeOpAssociateTransitGatewayMulticastDomain) Handle } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateTransitGatewayMulticastDomain(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorAssociateSubnetCidrBlock(response, &metadata) } - output := &AssociateTransitGatewayMulticastDomainOutput{} + output := &AssociateSubnetCidrBlockOutput{} out.Result = output var buff [1024]byte @@ -2719,7 +2719,7 @@ func (m *awsEc2query_deserializeOpAssociateTransitGatewayMulticastDomain) Handle } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateTransitGatewayMulticastDomainOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentAssociateSubnetCidrBlockOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2733,7 +2733,7 @@ func (m *awsEc2query_deserializeOpAssociateTransitGatewayMulticastDomain) Handle return out, metadata, err } -func awsEc2query_deserializeOpErrorAssociateTransitGatewayMulticastDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorAssociateSubnetCidrBlock(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)} @@ -2766,14 +2766,14 @@ func awsEc2query_deserializeOpErrorAssociateTransitGatewayMulticastDomain(respon } } -type awsEc2query_deserializeOpAssociateTransitGatewayPolicyTable struct { +type awsEc2query_deserializeOpAssociateTransitGatewayMulticastDomain struct { } -func (*awsEc2query_deserializeOpAssociateTransitGatewayPolicyTable) ID() string { +func (*awsEc2query_deserializeOpAssociateTransitGatewayMulticastDomain) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpAssociateTransitGatewayPolicyTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpAssociateTransitGatewayMulticastDomain) 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) @@ -2791,9 +2791,9 @@ func (m *awsEc2query_deserializeOpAssociateTransitGatewayPolicyTable) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateTransitGatewayPolicyTable(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorAssociateTransitGatewayMulticastDomain(response, &metadata) } - output := &AssociateTransitGatewayPolicyTableOutput{} + output := &AssociateTransitGatewayMulticastDomainOutput{} out.Result = output var buff [1024]byte @@ -2814,7 +2814,7 @@ func (m *awsEc2query_deserializeOpAssociateTransitGatewayPolicyTable) HandleDese } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateTransitGatewayPolicyTableOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentAssociateTransitGatewayMulticastDomainOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2828,7 +2828,7 @@ func (m *awsEc2query_deserializeOpAssociateTransitGatewayPolicyTable) HandleDese return out, metadata, err } -func awsEc2query_deserializeOpErrorAssociateTransitGatewayPolicyTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorAssociateTransitGatewayMulticastDomain(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)} @@ -2861,14 +2861,14 @@ func awsEc2query_deserializeOpErrorAssociateTransitGatewayPolicyTable(response * } } -type awsEc2query_deserializeOpAssociateTransitGatewayRouteTable struct { +type awsEc2query_deserializeOpAssociateTransitGatewayPolicyTable struct { } -func (*awsEc2query_deserializeOpAssociateTransitGatewayRouteTable) ID() string { +func (*awsEc2query_deserializeOpAssociateTransitGatewayPolicyTable) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpAssociateTransitGatewayRouteTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpAssociateTransitGatewayPolicyTable) 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) @@ -2886,9 +2886,9 @@ func (m *awsEc2query_deserializeOpAssociateTransitGatewayRouteTable) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateTransitGatewayRouteTable(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorAssociateTransitGatewayPolicyTable(response, &metadata) } - output := &AssociateTransitGatewayRouteTableOutput{} + output := &AssociateTransitGatewayPolicyTableOutput{} out.Result = output var buff [1024]byte @@ -2909,7 +2909,7 @@ func (m *awsEc2query_deserializeOpAssociateTransitGatewayRouteTable) HandleDeser } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateTransitGatewayRouteTableOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentAssociateTransitGatewayPolicyTableOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2923,7 +2923,7 @@ func (m *awsEc2query_deserializeOpAssociateTransitGatewayRouteTable) HandleDeser return out, metadata, err } -func awsEc2query_deserializeOpErrorAssociateTransitGatewayRouteTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorAssociateTransitGatewayPolicyTable(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)} @@ -2956,14 +2956,14 @@ func awsEc2query_deserializeOpErrorAssociateTransitGatewayRouteTable(response *s } } -type awsEc2query_deserializeOpAssociateTrunkInterface struct { +type awsEc2query_deserializeOpAssociateTransitGatewayRouteTable struct { } -func (*awsEc2query_deserializeOpAssociateTrunkInterface) ID() string { +func (*awsEc2query_deserializeOpAssociateTransitGatewayRouteTable) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpAssociateTrunkInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpAssociateTransitGatewayRouteTable) 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) @@ -2981,9 +2981,9 @@ func (m *awsEc2query_deserializeOpAssociateTrunkInterface) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateTrunkInterface(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorAssociateTransitGatewayRouteTable(response, &metadata) } - output := &AssociateTrunkInterfaceOutput{} + output := &AssociateTransitGatewayRouteTableOutput{} out.Result = output var buff [1024]byte @@ -3004,7 +3004,7 @@ func (m *awsEc2query_deserializeOpAssociateTrunkInterface) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateTrunkInterfaceOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentAssociateTransitGatewayRouteTableOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3018,7 +3018,7 @@ func (m *awsEc2query_deserializeOpAssociateTrunkInterface) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorAssociateTrunkInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorAssociateTransitGatewayRouteTable(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)} @@ -3051,14 +3051,14 @@ func awsEc2query_deserializeOpErrorAssociateTrunkInterface(response *smithyhttp. } } -type awsEc2query_deserializeOpAssociateVpcCidrBlock struct { +type awsEc2query_deserializeOpAssociateTrunkInterface struct { } -func (*awsEc2query_deserializeOpAssociateVpcCidrBlock) ID() string { +func (*awsEc2query_deserializeOpAssociateTrunkInterface) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpAssociateVpcCidrBlock) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpAssociateTrunkInterface) 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) @@ -3076,9 +3076,9 @@ func (m *awsEc2query_deserializeOpAssociateVpcCidrBlock) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateVpcCidrBlock(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorAssociateTrunkInterface(response, &metadata) } - output := &AssociateVpcCidrBlockOutput{} + output := &AssociateTrunkInterfaceOutput{} out.Result = output var buff [1024]byte @@ -3099,7 +3099,7 @@ func (m *awsEc2query_deserializeOpAssociateVpcCidrBlock) HandleDeserialize(ctx c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateVpcCidrBlockOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentAssociateTrunkInterfaceOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3113,7 +3113,7 @@ func (m *awsEc2query_deserializeOpAssociateVpcCidrBlock) HandleDeserialize(ctx c return out, metadata, err } -func awsEc2query_deserializeOpErrorAssociateVpcCidrBlock(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorAssociateTrunkInterface(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)} @@ -3146,14 +3146,14 @@ func awsEc2query_deserializeOpErrorAssociateVpcCidrBlock(response *smithyhttp.Re } } -type awsEc2query_deserializeOpAttachClassicLinkVpc struct { +type awsEc2query_deserializeOpAssociateVpcCidrBlock struct { } -func (*awsEc2query_deserializeOpAttachClassicLinkVpc) ID() string { +func (*awsEc2query_deserializeOpAssociateVpcCidrBlock) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpAttachClassicLinkVpc) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpAssociateVpcCidrBlock) 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) @@ -3171,9 +3171,9 @@ func (m *awsEc2query_deserializeOpAttachClassicLinkVpc) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAttachClassicLinkVpc(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorAssociateVpcCidrBlock(response, &metadata) } - output := &AttachClassicLinkVpcOutput{} + output := &AssociateVpcCidrBlockOutput{} out.Result = output var buff [1024]byte @@ -3194,7 +3194,7 @@ func (m *awsEc2query_deserializeOpAttachClassicLinkVpc) HandleDeserialize(ctx co } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAttachClassicLinkVpcOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentAssociateVpcCidrBlockOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3208,79 +3208,7 @@ func (m *awsEc2query_deserializeOpAttachClassicLinkVpc) HandleDeserialize(ctx co return out, metadata, err } -func awsEc2query_deserializeOpErrorAttachClassicLinkVpc(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 - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAttachInternetGateway struct { -} - -func (*awsEc2query_deserializeOpAttachInternetGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAttachInternetGateway) 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 - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - 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, awsEc2query_deserializeOpErrorAttachInternetGateway(response, &metadata) - } - output := &AttachInternetGatewayOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAttachInternetGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorAssociateVpcCidrBlock(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)} @@ -3313,14 +3241,14 @@ func awsEc2query_deserializeOpErrorAttachInternetGateway(response *smithyhttp.Re } } -type awsEc2query_deserializeOpAttachNetworkInterface struct { +type awsEc2query_deserializeOpAttachClassicLinkVpc struct { } -func (*awsEc2query_deserializeOpAttachNetworkInterface) ID() string { +func (*awsEc2query_deserializeOpAttachClassicLinkVpc) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpAttachNetworkInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpAttachClassicLinkVpc) 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) @@ -3338,9 +3266,9 @@ func (m *awsEc2query_deserializeOpAttachNetworkInterface) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAttachNetworkInterface(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorAttachClassicLinkVpc(response, &metadata) } - output := &AttachNetworkInterfaceOutput{} + output := &AttachClassicLinkVpcOutput{} out.Result = output var buff [1024]byte @@ -3361,7 +3289,7 @@ func (m *awsEc2query_deserializeOpAttachNetworkInterface) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAttachNetworkInterfaceOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentAttachClassicLinkVpcOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3375,7 +3303,7 @@ func (m *awsEc2query_deserializeOpAttachNetworkInterface) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorAttachNetworkInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorAttachClassicLinkVpc(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)} @@ -3408,14 +3336,14 @@ func awsEc2query_deserializeOpErrorAttachNetworkInterface(response *smithyhttp.R } } -type awsEc2query_deserializeOpAttachVerifiedAccessTrustProvider struct { +type awsEc2query_deserializeOpAttachInternetGateway struct { } -func (*awsEc2query_deserializeOpAttachVerifiedAccessTrustProvider) ID() string { +func (*awsEc2query_deserializeOpAttachInternetGateway) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpAttachVerifiedAccessTrustProvider) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpAttachInternetGateway) 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) @@ -3433,44 +3361,21 @@ func (m *awsEc2query_deserializeOpAttachVerifiedAccessTrustProvider) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAttachVerifiedAccessTrustProvider(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorAttachInternetGateway(response, &metadata) } - output := &AttachVerifiedAccessTrustProviderOutput{} + output := &AttachInternetGatewayOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAttachVerifiedAccessTrustProviderOutput(&output, 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(), + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorAttachVerifiedAccessTrustProvider(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorAttachInternetGateway(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)} @@ -3503,14 +3408,14 @@ func awsEc2query_deserializeOpErrorAttachVerifiedAccessTrustProvider(response *s } } -type awsEc2query_deserializeOpAttachVolume struct { +type awsEc2query_deserializeOpAttachNetworkInterface struct { } -func (*awsEc2query_deserializeOpAttachVolume) ID() string { +func (*awsEc2query_deserializeOpAttachNetworkInterface) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpAttachVolume) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpAttachNetworkInterface) 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) @@ -3528,9 +3433,9 @@ func (m *awsEc2query_deserializeOpAttachVolume) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAttachVolume(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorAttachNetworkInterface(response, &metadata) } - output := &AttachVolumeOutput{} + output := &AttachNetworkInterfaceOutput{} out.Result = output var buff [1024]byte @@ -3551,7 +3456,7 @@ func (m *awsEc2query_deserializeOpAttachVolume) HandleDeserialize(ctx context.Co } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAttachVolumeOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentAttachNetworkInterfaceOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3565,7 +3470,7 @@ func (m *awsEc2query_deserializeOpAttachVolume) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsEc2query_deserializeOpErrorAttachVolume(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorAttachNetworkInterface(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)} @@ -3598,14 +3503,14 @@ func awsEc2query_deserializeOpErrorAttachVolume(response *smithyhttp.Response, m } } -type awsEc2query_deserializeOpAttachVpnGateway struct { +type awsEc2query_deserializeOpAttachVerifiedAccessTrustProvider struct { } -func (*awsEc2query_deserializeOpAttachVpnGateway) ID() string { +func (*awsEc2query_deserializeOpAttachVerifiedAccessTrustProvider) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpAttachVpnGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpAttachVerifiedAccessTrustProvider) 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) @@ -3623,9 +3528,9 @@ func (m *awsEc2query_deserializeOpAttachVpnGateway) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAttachVpnGateway(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorAttachVerifiedAccessTrustProvider(response, &metadata) } - output := &AttachVpnGatewayOutput{} + output := &AttachVerifiedAccessTrustProviderOutput{} out.Result = output var buff [1024]byte @@ -3646,7 +3551,7 @@ func (m *awsEc2query_deserializeOpAttachVpnGateway) HandleDeserialize(ctx contex } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAttachVpnGatewayOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentAttachVerifiedAccessTrustProviderOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3660,7 +3565,7 @@ func (m *awsEc2query_deserializeOpAttachVpnGateway) HandleDeserialize(ctx contex return out, metadata, err } -func awsEc2query_deserializeOpErrorAttachVpnGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorAttachVerifiedAccessTrustProvider(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)} @@ -3693,14 +3598,14 @@ func awsEc2query_deserializeOpErrorAttachVpnGateway(response *smithyhttp.Respons } } -type awsEc2query_deserializeOpAuthorizeClientVpnIngress struct { +type awsEc2query_deserializeOpAttachVolume struct { } -func (*awsEc2query_deserializeOpAuthorizeClientVpnIngress) ID() string { +func (*awsEc2query_deserializeOpAttachVolume) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpAuthorizeClientVpnIngress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpAttachVolume) 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) @@ -3718,9 +3623,9 @@ func (m *awsEc2query_deserializeOpAuthorizeClientVpnIngress) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAuthorizeClientVpnIngress(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorAttachVolume(response, &metadata) } - output := &AuthorizeClientVpnIngressOutput{} + output := &AttachVolumeOutput{} out.Result = output var buff [1024]byte @@ -3741,7 +3646,7 @@ func (m *awsEc2query_deserializeOpAuthorizeClientVpnIngress) HandleDeserialize(c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAuthorizeClientVpnIngressOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentAttachVolumeOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3755,7 +3660,197 @@ func (m *awsEc2query_deserializeOpAuthorizeClientVpnIngress) HandleDeserialize(c return out, metadata, err } -func awsEc2query_deserializeOpErrorAuthorizeClientVpnIngress(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorAttachVolume(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 + + errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsEc2query_deserializeOpAttachVpnGateway struct { +} + +func (*awsEc2query_deserializeOpAttachVpnGateway) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpAttachVpnGateway) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsEc2query_deserializeOpErrorAttachVpnGateway(response, &metadata) + } + output := &AttachVpnGatewayOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentAttachVpnGatewayOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsEc2query_deserializeOpErrorAttachVpnGateway(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 + + errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsEc2query_deserializeOpAuthorizeClientVpnIngress struct { +} + +func (*awsEc2query_deserializeOpAuthorizeClientVpnIngress) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpAuthorizeClientVpnIngress) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsEc2query_deserializeOpErrorAuthorizeClientVpnIngress(response, &metadata) + } + output := &AuthorizeClientVpnIngressOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentAuthorizeClientVpnIngressOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsEc2query_deserializeOpErrorAuthorizeClientVpnIngress(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)} @@ -30573,14 +30668,14 @@ func awsEc2query_deserializeOpErrorDescribeSecurityGroups(response *smithyhttp.R } } -type awsEc2query_deserializeOpDescribeSnapshotAttribute struct { +type awsEc2query_deserializeOpDescribeSecurityGroupVpcAssociations struct { } -func (*awsEc2query_deserializeOpDescribeSnapshotAttribute) ID() string { +func (*awsEc2query_deserializeOpDescribeSecurityGroupVpcAssociations) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpDescribeSnapshotAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDescribeSecurityGroupVpcAssociations) 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) @@ -30598,9 +30693,9 @@ func (m *awsEc2query_deserializeOpDescribeSnapshotAttribute) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeSnapshotAttribute(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDescribeSecurityGroupVpcAssociations(response, &metadata) } - output := &DescribeSnapshotAttributeOutput{} + output := &DescribeSecurityGroupVpcAssociationsOutput{} out.Result = output var buff [1024]byte @@ -30621,7 +30716,7 @@ func (m *awsEc2query_deserializeOpDescribeSnapshotAttribute) HandleDeserialize(c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeSnapshotAttributeOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentDescribeSecurityGroupVpcAssociationsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -30635,7 +30730,7 @@ func (m *awsEc2query_deserializeOpDescribeSnapshotAttribute) HandleDeserialize(c return out, metadata, err } -func awsEc2query_deserializeOpErrorDescribeSnapshotAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorDescribeSecurityGroupVpcAssociations(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)} @@ -30668,14 +30763,14 @@ func awsEc2query_deserializeOpErrorDescribeSnapshotAttribute(response *smithyhtt } } -type awsEc2query_deserializeOpDescribeSnapshots struct { +type awsEc2query_deserializeOpDescribeSnapshotAttribute struct { } -func (*awsEc2query_deserializeOpDescribeSnapshots) ID() string { +func (*awsEc2query_deserializeOpDescribeSnapshotAttribute) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpDescribeSnapshots) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDescribeSnapshotAttribute) 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) @@ -30693,9 +30788,9 @@ func (m *awsEc2query_deserializeOpDescribeSnapshots) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeSnapshots(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDescribeSnapshotAttribute(response, &metadata) } - output := &DescribeSnapshotsOutput{} + output := &DescribeSnapshotAttributeOutput{} out.Result = output var buff [1024]byte @@ -30716,7 +30811,7 @@ func (m *awsEc2query_deserializeOpDescribeSnapshots) HandleDeserialize(ctx conte } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeSnapshotsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentDescribeSnapshotAttributeOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -30730,7 +30825,7 @@ func (m *awsEc2query_deserializeOpDescribeSnapshots) HandleDeserialize(ctx conte return out, metadata, err } -func awsEc2query_deserializeOpErrorDescribeSnapshots(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorDescribeSnapshotAttribute(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)} @@ -30763,14 +30858,14 @@ func awsEc2query_deserializeOpErrorDescribeSnapshots(response *smithyhttp.Respon } } -type awsEc2query_deserializeOpDescribeSnapshotTierStatus struct { +type awsEc2query_deserializeOpDescribeSnapshots struct { } -func (*awsEc2query_deserializeOpDescribeSnapshotTierStatus) ID() string { +func (*awsEc2query_deserializeOpDescribeSnapshots) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpDescribeSnapshotTierStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDescribeSnapshots) 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) @@ -30788,9 +30883,9 @@ func (m *awsEc2query_deserializeOpDescribeSnapshotTierStatus) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeSnapshotTierStatus(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDescribeSnapshots(response, &metadata) } - output := &DescribeSnapshotTierStatusOutput{} + output := &DescribeSnapshotsOutput{} out.Result = output var buff [1024]byte @@ -30811,7 +30906,7 @@ func (m *awsEc2query_deserializeOpDescribeSnapshotTierStatus) HandleDeserialize( } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeSnapshotTierStatusOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentDescribeSnapshotsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -30825,7 +30920,7 @@ func (m *awsEc2query_deserializeOpDescribeSnapshotTierStatus) HandleDeserialize( return out, metadata, err } -func awsEc2query_deserializeOpErrorDescribeSnapshotTierStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorDescribeSnapshots(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)} @@ -30858,14 +30953,14 @@ func awsEc2query_deserializeOpErrorDescribeSnapshotTierStatus(response *smithyht } } -type awsEc2query_deserializeOpDescribeSpotDatafeedSubscription struct { +type awsEc2query_deserializeOpDescribeSnapshotTierStatus struct { } -func (*awsEc2query_deserializeOpDescribeSpotDatafeedSubscription) ID() string { +func (*awsEc2query_deserializeOpDescribeSnapshotTierStatus) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpDescribeSpotDatafeedSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDescribeSnapshotTierStatus) 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) @@ -30883,9 +30978,9 @@ func (m *awsEc2query_deserializeOpDescribeSpotDatafeedSubscription) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeSpotDatafeedSubscription(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDescribeSnapshotTierStatus(response, &metadata) } - output := &DescribeSpotDatafeedSubscriptionOutput{} + output := &DescribeSnapshotTierStatusOutput{} out.Result = output var buff [1024]byte @@ -30906,7 +31001,7 @@ func (m *awsEc2query_deserializeOpDescribeSpotDatafeedSubscription) HandleDeseri } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeSpotDatafeedSubscriptionOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentDescribeSnapshotTierStatusOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -30920,7 +31015,7 @@ func (m *awsEc2query_deserializeOpDescribeSpotDatafeedSubscription) HandleDeseri return out, metadata, err } -func awsEc2query_deserializeOpErrorDescribeSpotDatafeedSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorDescribeSnapshotTierStatus(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)} @@ -30953,14 +31048,14 @@ func awsEc2query_deserializeOpErrorDescribeSpotDatafeedSubscription(response *sm } } -type awsEc2query_deserializeOpDescribeSpotFleetInstances struct { +type awsEc2query_deserializeOpDescribeSpotDatafeedSubscription struct { } -func (*awsEc2query_deserializeOpDescribeSpotFleetInstances) ID() string { +func (*awsEc2query_deserializeOpDescribeSpotDatafeedSubscription) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpDescribeSpotFleetInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDescribeSpotDatafeedSubscription) 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) @@ -30978,9 +31073,9 @@ func (m *awsEc2query_deserializeOpDescribeSpotFleetInstances) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeSpotFleetInstances(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDescribeSpotDatafeedSubscription(response, &metadata) } - output := &DescribeSpotFleetInstancesOutput{} + output := &DescribeSpotDatafeedSubscriptionOutput{} out.Result = output var buff [1024]byte @@ -31001,7 +31096,7 @@ func (m *awsEc2query_deserializeOpDescribeSpotFleetInstances) HandleDeserialize( } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeSpotFleetInstancesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentDescribeSpotDatafeedSubscriptionOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -31015,7 +31110,7 @@ func (m *awsEc2query_deserializeOpDescribeSpotFleetInstances) HandleDeserialize( return out, metadata, err } -func awsEc2query_deserializeOpErrorDescribeSpotFleetInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorDescribeSpotDatafeedSubscription(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)} @@ -31048,14 +31143,14 @@ func awsEc2query_deserializeOpErrorDescribeSpotFleetInstances(response *smithyht } } -type awsEc2query_deserializeOpDescribeSpotFleetRequestHistory struct { +type awsEc2query_deserializeOpDescribeSpotFleetInstances struct { } -func (*awsEc2query_deserializeOpDescribeSpotFleetRequestHistory) ID() string { +func (*awsEc2query_deserializeOpDescribeSpotFleetInstances) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpDescribeSpotFleetRequestHistory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDescribeSpotFleetInstances) 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) @@ -31073,9 +31168,104 @@ func (m *awsEc2query_deserializeOpDescribeSpotFleetRequestHistory) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeSpotFleetRequestHistory(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDescribeSpotFleetInstances(response, &metadata) } - output := &DescribeSpotFleetRequestHistoryOutput{} + output := &DescribeSpotFleetInstancesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentDescribeSpotFleetInstancesOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsEc2query_deserializeOpErrorDescribeSpotFleetInstances(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 + + errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsEc2query_deserializeOpDescribeSpotFleetRequestHistory struct { +} + +func (*awsEc2query_deserializeOpDescribeSpotFleetRequestHistory) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpDescribeSpotFleetRequestHistory) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsEc2query_deserializeOpErrorDescribeSpotFleetRequestHistory(response, &metadata) + } + output := &DescribeSpotFleetRequestHistoryOutput{} out.Result = output var buff [1024]byte @@ -38225,14 +38415,14 @@ func awsEc2query_deserializeOpErrorDisassociateRouteTable(response *smithyhttp.R } } -type awsEc2query_deserializeOpDisassociateSubnetCidrBlock struct { +type awsEc2query_deserializeOpDisassociateSecurityGroupVpc struct { } -func (*awsEc2query_deserializeOpDisassociateSubnetCidrBlock) ID() string { +func (*awsEc2query_deserializeOpDisassociateSecurityGroupVpc) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpDisassociateSubnetCidrBlock) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDisassociateSecurityGroupVpc) 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) @@ -38250,9 +38440,9 @@ func (m *awsEc2query_deserializeOpDisassociateSubnetCidrBlock) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateSubnetCidrBlock(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDisassociateSecurityGroupVpc(response, &metadata) } - output := &DisassociateSubnetCidrBlockOutput{} + output := &DisassociateSecurityGroupVpcOutput{} out.Result = output var buff [1024]byte @@ -38273,7 +38463,7 @@ func (m *awsEc2query_deserializeOpDisassociateSubnetCidrBlock) HandleDeserialize } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisassociateSubnetCidrBlockOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentDisassociateSecurityGroupVpcOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -38287,7 +38477,7 @@ func (m *awsEc2query_deserializeOpDisassociateSubnetCidrBlock) HandleDeserialize return out, metadata, err } -func awsEc2query_deserializeOpErrorDisassociateSubnetCidrBlock(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorDisassociateSecurityGroupVpc(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)} @@ -38320,14 +38510,14 @@ func awsEc2query_deserializeOpErrorDisassociateSubnetCidrBlock(response *smithyh } } -type awsEc2query_deserializeOpDisassociateTransitGatewayMulticastDomain struct { +type awsEc2query_deserializeOpDisassociateSubnetCidrBlock struct { } -func (*awsEc2query_deserializeOpDisassociateTransitGatewayMulticastDomain) ID() string { +func (*awsEc2query_deserializeOpDisassociateSubnetCidrBlock) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpDisassociateTransitGatewayMulticastDomain) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDisassociateSubnetCidrBlock) 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) @@ -38345,9 +38535,9 @@ func (m *awsEc2query_deserializeOpDisassociateTransitGatewayMulticastDomain) Han } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateTransitGatewayMulticastDomain(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDisassociateSubnetCidrBlock(response, &metadata) } - output := &DisassociateTransitGatewayMulticastDomainOutput{} + output := &DisassociateSubnetCidrBlockOutput{} out.Result = output var buff [1024]byte @@ -38368,7 +38558,7 @@ func (m *awsEc2query_deserializeOpDisassociateTransitGatewayMulticastDomain) Han } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisassociateTransitGatewayMulticastDomainOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentDisassociateSubnetCidrBlockOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -38382,7 +38572,7 @@ func (m *awsEc2query_deserializeOpDisassociateTransitGatewayMulticastDomain) Han return out, metadata, err } -func awsEc2query_deserializeOpErrorDisassociateTransitGatewayMulticastDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorDisassociateSubnetCidrBlock(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)} @@ -38415,14 +38605,14 @@ func awsEc2query_deserializeOpErrorDisassociateTransitGatewayMulticastDomain(res } } -type awsEc2query_deserializeOpDisassociateTransitGatewayPolicyTable struct { +type awsEc2query_deserializeOpDisassociateTransitGatewayMulticastDomain struct { } -func (*awsEc2query_deserializeOpDisassociateTransitGatewayPolicyTable) ID() string { +func (*awsEc2query_deserializeOpDisassociateTransitGatewayMulticastDomain) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpDisassociateTransitGatewayPolicyTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDisassociateTransitGatewayMulticastDomain) 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) @@ -38440,9 +38630,9 @@ func (m *awsEc2query_deserializeOpDisassociateTransitGatewayPolicyTable) HandleD } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateTransitGatewayPolicyTable(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDisassociateTransitGatewayMulticastDomain(response, &metadata) } - output := &DisassociateTransitGatewayPolicyTableOutput{} + output := &DisassociateTransitGatewayMulticastDomainOutput{} out.Result = output var buff [1024]byte @@ -38463,7 +38653,7 @@ func (m *awsEc2query_deserializeOpDisassociateTransitGatewayPolicyTable) HandleD } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisassociateTransitGatewayPolicyTableOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentDisassociateTransitGatewayMulticastDomainOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -38477,7 +38667,7 @@ func (m *awsEc2query_deserializeOpDisassociateTransitGatewayPolicyTable) HandleD return out, metadata, err } -func awsEc2query_deserializeOpErrorDisassociateTransitGatewayPolicyTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorDisassociateTransitGatewayMulticastDomain(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)} @@ -38510,14 +38700,14 @@ func awsEc2query_deserializeOpErrorDisassociateTransitGatewayPolicyTable(respons } } -type awsEc2query_deserializeOpDisassociateTransitGatewayRouteTable struct { +type awsEc2query_deserializeOpDisassociateTransitGatewayPolicyTable struct { } -func (*awsEc2query_deserializeOpDisassociateTransitGatewayRouteTable) ID() string { +func (*awsEc2query_deserializeOpDisassociateTransitGatewayPolicyTable) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpDisassociateTransitGatewayRouteTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDisassociateTransitGatewayPolicyTable) 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) @@ -38535,9 +38725,9 @@ func (m *awsEc2query_deserializeOpDisassociateTransitGatewayRouteTable) HandleDe } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateTransitGatewayRouteTable(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDisassociateTransitGatewayPolicyTable(response, &metadata) } - output := &DisassociateTransitGatewayRouteTableOutput{} + output := &DisassociateTransitGatewayPolicyTableOutput{} out.Result = output var buff [1024]byte @@ -38558,7 +38748,7 @@ func (m *awsEc2query_deserializeOpDisassociateTransitGatewayRouteTable) HandleDe } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisassociateTransitGatewayRouteTableOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentDisassociateTransitGatewayPolicyTableOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -38572,7 +38762,7 @@ func (m *awsEc2query_deserializeOpDisassociateTransitGatewayRouteTable) HandleDe return out, metadata, err } -func awsEc2query_deserializeOpErrorDisassociateTransitGatewayRouteTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorDisassociateTransitGatewayPolicyTable(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)} @@ -38605,14 +38795,14 @@ func awsEc2query_deserializeOpErrorDisassociateTransitGatewayRouteTable(response } } -type awsEc2query_deserializeOpDisassociateTrunkInterface struct { +type awsEc2query_deserializeOpDisassociateTransitGatewayRouteTable struct { } -func (*awsEc2query_deserializeOpDisassociateTrunkInterface) ID() string { +func (*awsEc2query_deserializeOpDisassociateTransitGatewayRouteTable) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpDisassociateTrunkInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDisassociateTransitGatewayRouteTable) 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) @@ -38630,9 +38820,9 @@ func (m *awsEc2query_deserializeOpDisassociateTrunkInterface) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateTrunkInterface(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDisassociateTransitGatewayRouteTable(response, &metadata) } - output := &DisassociateTrunkInterfaceOutput{} + output := &DisassociateTransitGatewayRouteTableOutput{} out.Result = output var buff [1024]byte @@ -38653,7 +38843,7 @@ func (m *awsEc2query_deserializeOpDisassociateTrunkInterface) HandleDeserialize( } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisassociateTrunkInterfaceOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentDisassociateTransitGatewayRouteTableOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -38667,7 +38857,7 @@ func (m *awsEc2query_deserializeOpDisassociateTrunkInterface) HandleDeserialize( return out, metadata, err } -func awsEc2query_deserializeOpErrorDisassociateTrunkInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorDisassociateTransitGatewayRouteTable(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)} @@ -38700,14 +38890,14 @@ func awsEc2query_deserializeOpErrorDisassociateTrunkInterface(response *smithyht } } -type awsEc2query_deserializeOpDisassociateVpcCidrBlock struct { +type awsEc2query_deserializeOpDisassociateTrunkInterface struct { } -func (*awsEc2query_deserializeOpDisassociateVpcCidrBlock) ID() string { +func (*awsEc2query_deserializeOpDisassociateTrunkInterface) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpDisassociateVpcCidrBlock) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDisassociateTrunkInterface) 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) @@ -38725,9 +38915,9 @@ func (m *awsEc2query_deserializeOpDisassociateVpcCidrBlock) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateVpcCidrBlock(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDisassociateTrunkInterface(response, &metadata) } - output := &DisassociateVpcCidrBlockOutput{} + output := &DisassociateTrunkInterfaceOutput{} out.Result = output var buff [1024]byte @@ -38748,7 +38938,7 @@ func (m *awsEc2query_deserializeOpDisassociateVpcCidrBlock) HandleDeserialize(ct } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisassociateVpcCidrBlockOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentDisassociateTrunkInterfaceOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -38762,7 +38952,7 @@ func (m *awsEc2query_deserializeOpDisassociateVpcCidrBlock) HandleDeserialize(ct return out, metadata, err } -func awsEc2query_deserializeOpErrorDisassociateVpcCidrBlock(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorDisassociateTrunkInterface(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)} @@ -38795,14 +38985,14 @@ func awsEc2query_deserializeOpErrorDisassociateVpcCidrBlock(response *smithyhttp } } -type awsEc2query_deserializeOpEnableAddressTransfer struct { +type awsEc2query_deserializeOpDisassociateVpcCidrBlock struct { } -func (*awsEc2query_deserializeOpEnableAddressTransfer) ID() string { +func (*awsEc2query_deserializeOpDisassociateVpcCidrBlock) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpEnableAddressTransfer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpDisassociateVpcCidrBlock) 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) @@ -38820,9 +39010,9 @@ func (m *awsEc2query_deserializeOpEnableAddressTransfer) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableAddressTransfer(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorDisassociateVpcCidrBlock(response, &metadata) } - output := &EnableAddressTransferOutput{} + output := &DisassociateVpcCidrBlockOutput{} out.Result = output var buff [1024]byte @@ -38843,7 +39033,7 @@ func (m *awsEc2query_deserializeOpEnableAddressTransfer) HandleDeserialize(ctx c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableAddressTransferOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentDisassociateVpcCidrBlockOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -38857,7 +39047,7 @@ func (m *awsEc2query_deserializeOpEnableAddressTransfer) HandleDeserialize(ctx c return out, metadata, err } -func awsEc2query_deserializeOpErrorEnableAddressTransfer(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorDisassociateVpcCidrBlock(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)} @@ -38890,14 +39080,14 @@ func awsEc2query_deserializeOpErrorEnableAddressTransfer(response *smithyhttp.Re } } -type awsEc2query_deserializeOpEnableAwsNetworkPerformanceMetricSubscription struct { +type awsEc2query_deserializeOpEnableAddressTransfer struct { } -func (*awsEc2query_deserializeOpEnableAwsNetworkPerformanceMetricSubscription) ID() string { +func (*awsEc2query_deserializeOpEnableAddressTransfer) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpEnableAwsNetworkPerformanceMetricSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpEnableAddressTransfer) 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) @@ -38915,9 +39105,9 @@ func (m *awsEc2query_deserializeOpEnableAwsNetworkPerformanceMetricSubscription) } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableAwsNetworkPerformanceMetricSubscription(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorEnableAddressTransfer(response, &metadata) } - output := &EnableAwsNetworkPerformanceMetricSubscriptionOutput{} + output := &EnableAddressTransferOutput{} out.Result = output var buff [1024]byte @@ -38938,7 +39128,7 @@ func (m *awsEc2query_deserializeOpEnableAwsNetworkPerformanceMetricSubscription) } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableAwsNetworkPerformanceMetricSubscriptionOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentEnableAddressTransferOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -38952,7 +39142,7 @@ func (m *awsEc2query_deserializeOpEnableAwsNetworkPerformanceMetricSubscription) return out, metadata, err } -func awsEc2query_deserializeOpErrorEnableAwsNetworkPerformanceMetricSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorEnableAddressTransfer(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)} @@ -38985,14 +39175,14 @@ func awsEc2query_deserializeOpErrorEnableAwsNetworkPerformanceMetricSubscription } } -type awsEc2query_deserializeOpEnableEbsEncryptionByDefault struct { +type awsEc2query_deserializeOpEnableAwsNetworkPerformanceMetricSubscription struct { } -func (*awsEc2query_deserializeOpEnableEbsEncryptionByDefault) ID() string { +func (*awsEc2query_deserializeOpEnableAwsNetworkPerformanceMetricSubscription) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpEnableEbsEncryptionByDefault) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpEnableAwsNetworkPerformanceMetricSubscription) 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) @@ -39010,9 +39200,9 @@ func (m *awsEc2query_deserializeOpEnableEbsEncryptionByDefault) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableEbsEncryptionByDefault(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorEnableAwsNetworkPerformanceMetricSubscription(response, &metadata) } - output := &EnableEbsEncryptionByDefaultOutput{} + output := &EnableAwsNetworkPerformanceMetricSubscriptionOutput{} out.Result = output var buff [1024]byte @@ -39033,7 +39223,7 @@ func (m *awsEc2query_deserializeOpEnableEbsEncryptionByDefault) HandleDeserializ } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableEbsEncryptionByDefaultOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentEnableAwsNetworkPerformanceMetricSubscriptionOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -39047,7 +39237,7 @@ func (m *awsEc2query_deserializeOpEnableEbsEncryptionByDefault) HandleDeserializ return out, metadata, err } -func awsEc2query_deserializeOpErrorEnableEbsEncryptionByDefault(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorEnableAwsNetworkPerformanceMetricSubscription(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)} @@ -39080,14 +39270,14 @@ func awsEc2query_deserializeOpErrorEnableEbsEncryptionByDefault(response *smithy } } -type awsEc2query_deserializeOpEnableFastLaunch struct { +type awsEc2query_deserializeOpEnableEbsEncryptionByDefault struct { } -func (*awsEc2query_deserializeOpEnableFastLaunch) ID() string { +func (*awsEc2query_deserializeOpEnableEbsEncryptionByDefault) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpEnableFastLaunch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpEnableEbsEncryptionByDefault) 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) @@ -39105,9 +39295,9 @@ func (m *awsEc2query_deserializeOpEnableFastLaunch) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableFastLaunch(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorEnableEbsEncryptionByDefault(response, &metadata) } - output := &EnableFastLaunchOutput{} + output := &EnableEbsEncryptionByDefaultOutput{} out.Result = output var buff [1024]byte @@ -39128,7 +39318,7 @@ func (m *awsEc2query_deserializeOpEnableFastLaunch) HandleDeserialize(ctx contex } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableFastLaunchOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentEnableEbsEncryptionByDefaultOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -39142,7 +39332,7 @@ func (m *awsEc2query_deserializeOpEnableFastLaunch) HandleDeserialize(ctx contex return out, metadata, err } -func awsEc2query_deserializeOpErrorEnableFastLaunch(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorEnableEbsEncryptionByDefault(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)} @@ -39175,14 +39365,14 @@ func awsEc2query_deserializeOpErrorEnableFastLaunch(response *smithyhttp.Respons } } -type awsEc2query_deserializeOpEnableFastSnapshotRestores struct { +type awsEc2query_deserializeOpEnableFastLaunch struct { } -func (*awsEc2query_deserializeOpEnableFastSnapshotRestores) ID() string { +func (*awsEc2query_deserializeOpEnableFastLaunch) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpEnableFastSnapshotRestores) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpEnableFastLaunch) 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) @@ -39200,9 +39390,9 @@ func (m *awsEc2query_deserializeOpEnableFastSnapshotRestores) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableFastSnapshotRestores(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorEnableFastLaunch(response, &metadata) } - output := &EnableFastSnapshotRestoresOutput{} + output := &EnableFastLaunchOutput{} out.Result = output var buff [1024]byte @@ -39223,7 +39413,7 @@ func (m *awsEc2query_deserializeOpEnableFastSnapshotRestores) HandleDeserialize( } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableFastSnapshotRestoresOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentEnableFastLaunchOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -39237,7 +39427,7 @@ func (m *awsEc2query_deserializeOpEnableFastSnapshotRestores) HandleDeserialize( return out, metadata, err } -func awsEc2query_deserializeOpErrorEnableFastSnapshotRestores(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorEnableFastLaunch(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)} @@ -39270,14 +39460,14 @@ func awsEc2query_deserializeOpErrorEnableFastSnapshotRestores(response *smithyht } } -type awsEc2query_deserializeOpEnableImage struct { +type awsEc2query_deserializeOpEnableFastSnapshotRestores struct { } -func (*awsEc2query_deserializeOpEnableImage) ID() string { +func (*awsEc2query_deserializeOpEnableFastSnapshotRestores) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpEnableImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpEnableFastSnapshotRestores) 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) @@ -39295,9 +39485,9 @@ func (m *awsEc2query_deserializeOpEnableImage) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableImage(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorEnableFastSnapshotRestores(response, &metadata) } - output := &EnableImageOutput{} + output := &EnableFastSnapshotRestoresOutput{} out.Result = output var buff [1024]byte @@ -39318,7 +39508,7 @@ func (m *awsEc2query_deserializeOpEnableImage) HandleDeserialize(ctx context.Con } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableImageOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentEnableFastSnapshotRestoresOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -39332,7 +39522,7 @@ func (m *awsEc2query_deserializeOpEnableImage) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsEc2query_deserializeOpErrorEnableImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorEnableFastSnapshotRestores(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)} @@ -39365,14 +39555,14 @@ func awsEc2query_deserializeOpErrorEnableImage(response *smithyhttp.Response, me } } -type awsEc2query_deserializeOpEnableImageBlockPublicAccess struct { +type awsEc2query_deserializeOpEnableImage struct { } -func (*awsEc2query_deserializeOpEnableImageBlockPublicAccess) ID() string { +func (*awsEc2query_deserializeOpEnableImage) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpEnableImageBlockPublicAccess) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpEnableImage) 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) @@ -39390,9 +39580,9 @@ func (m *awsEc2query_deserializeOpEnableImageBlockPublicAccess) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableImageBlockPublicAccess(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorEnableImage(response, &metadata) } - output := &EnableImageBlockPublicAccessOutput{} + output := &EnableImageOutput{} out.Result = output var buff [1024]byte @@ -39413,7 +39603,7 @@ func (m *awsEc2query_deserializeOpEnableImageBlockPublicAccess) HandleDeserializ } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableImageBlockPublicAccessOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentEnableImageOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -39427,7 +39617,7 @@ func (m *awsEc2query_deserializeOpEnableImageBlockPublicAccess) HandleDeserializ return out, metadata, err } -func awsEc2query_deserializeOpErrorEnableImageBlockPublicAccess(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorEnableImage(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)} @@ -39460,14 +39650,14 @@ func awsEc2query_deserializeOpErrorEnableImageBlockPublicAccess(response *smithy } } -type awsEc2query_deserializeOpEnableImageDeprecation struct { +type awsEc2query_deserializeOpEnableImageBlockPublicAccess struct { } -func (*awsEc2query_deserializeOpEnableImageDeprecation) ID() string { +func (*awsEc2query_deserializeOpEnableImageBlockPublicAccess) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpEnableImageDeprecation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpEnableImageBlockPublicAccess) 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) @@ -39485,9 +39675,9 @@ func (m *awsEc2query_deserializeOpEnableImageDeprecation) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableImageDeprecation(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorEnableImageBlockPublicAccess(response, &metadata) } - output := &EnableImageDeprecationOutput{} + output := &EnableImageBlockPublicAccessOutput{} out.Result = output var buff [1024]byte @@ -39508,7 +39698,7 @@ func (m *awsEc2query_deserializeOpEnableImageDeprecation) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableImageDeprecationOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentEnableImageBlockPublicAccessOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -39522,7 +39712,7 @@ func (m *awsEc2query_deserializeOpEnableImageDeprecation) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorEnableImageDeprecation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorEnableImageBlockPublicAccess(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)} @@ -39555,14 +39745,14 @@ func awsEc2query_deserializeOpErrorEnableImageDeprecation(response *smithyhttp.R } } -type awsEc2query_deserializeOpEnableImageDeregistrationProtection struct { +type awsEc2query_deserializeOpEnableImageDeprecation struct { } -func (*awsEc2query_deserializeOpEnableImageDeregistrationProtection) ID() string { +func (*awsEc2query_deserializeOpEnableImageDeprecation) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpEnableImageDeregistrationProtection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpEnableImageDeprecation) 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) @@ -39580,9 +39770,9 @@ func (m *awsEc2query_deserializeOpEnableImageDeregistrationProtection) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableImageDeregistrationProtection(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorEnableImageDeprecation(response, &metadata) } - output := &EnableImageDeregistrationProtectionOutput{} + output := &EnableImageDeprecationOutput{} out.Result = output var buff [1024]byte @@ -39603,7 +39793,7 @@ func (m *awsEc2query_deserializeOpEnableImageDeregistrationProtection) HandleDes } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableImageDeregistrationProtectionOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentEnableImageDeprecationOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -39617,7 +39807,7 @@ func (m *awsEc2query_deserializeOpEnableImageDeregistrationProtection) HandleDes return out, metadata, err } -func awsEc2query_deserializeOpErrorEnableImageDeregistrationProtection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorEnableImageDeprecation(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)} @@ -39650,14 +39840,14 @@ func awsEc2query_deserializeOpErrorEnableImageDeregistrationProtection(response } } -type awsEc2query_deserializeOpEnableIpamOrganizationAdminAccount struct { +type awsEc2query_deserializeOpEnableImageDeregistrationProtection struct { } -func (*awsEc2query_deserializeOpEnableIpamOrganizationAdminAccount) ID() string { +func (*awsEc2query_deserializeOpEnableImageDeregistrationProtection) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpEnableIpamOrganizationAdminAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpEnableImageDeregistrationProtection) 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) @@ -39675,9 +39865,9 @@ func (m *awsEc2query_deserializeOpEnableIpamOrganizationAdminAccount) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableIpamOrganizationAdminAccount(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorEnableImageDeregistrationProtection(response, &metadata) } - output := &EnableIpamOrganizationAdminAccountOutput{} + output := &EnableImageDeregistrationProtectionOutput{} out.Result = output var buff [1024]byte @@ -39698,7 +39888,7 @@ func (m *awsEc2query_deserializeOpEnableIpamOrganizationAdminAccount) HandleDese } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableIpamOrganizationAdminAccountOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentEnableImageDeregistrationProtectionOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -39712,7 +39902,7 @@ func (m *awsEc2query_deserializeOpEnableIpamOrganizationAdminAccount) HandleDese return out, metadata, err } -func awsEc2query_deserializeOpErrorEnableIpamOrganizationAdminAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorEnableImageDeregistrationProtection(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)} @@ -39745,14 +39935,14 @@ func awsEc2query_deserializeOpErrorEnableIpamOrganizationAdminAccount(response * } } -type awsEc2query_deserializeOpEnableReachabilityAnalyzerOrganizationSharing struct { +type awsEc2query_deserializeOpEnableIpamOrganizationAdminAccount struct { } -func (*awsEc2query_deserializeOpEnableReachabilityAnalyzerOrganizationSharing) ID() string { +func (*awsEc2query_deserializeOpEnableIpamOrganizationAdminAccount) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpEnableReachabilityAnalyzerOrganizationSharing) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpEnableIpamOrganizationAdminAccount) 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) @@ -39770,9 +39960,9 @@ func (m *awsEc2query_deserializeOpEnableReachabilityAnalyzerOrganizationSharing) } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableReachabilityAnalyzerOrganizationSharing(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorEnableIpamOrganizationAdminAccount(response, &metadata) } - output := &EnableReachabilityAnalyzerOrganizationSharingOutput{} + output := &EnableIpamOrganizationAdminAccountOutput{} out.Result = output var buff [1024]byte @@ -39793,7 +39983,7 @@ func (m *awsEc2query_deserializeOpEnableReachabilityAnalyzerOrganizationSharing) } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableReachabilityAnalyzerOrganizationSharingOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentEnableIpamOrganizationAdminAccountOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -39807,7 +39997,7 @@ func (m *awsEc2query_deserializeOpEnableReachabilityAnalyzerOrganizationSharing) return out, metadata, err } -func awsEc2query_deserializeOpErrorEnableReachabilityAnalyzerOrganizationSharing(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorEnableIpamOrganizationAdminAccount(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)} @@ -39840,14 +40030,14 @@ func awsEc2query_deserializeOpErrorEnableReachabilityAnalyzerOrganizationSharing } } -type awsEc2query_deserializeOpEnableSerialConsoleAccess struct { +type awsEc2query_deserializeOpEnableReachabilityAnalyzerOrganizationSharing struct { } -func (*awsEc2query_deserializeOpEnableSerialConsoleAccess) ID() string { +func (*awsEc2query_deserializeOpEnableReachabilityAnalyzerOrganizationSharing) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpEnableSerialConsoleAccess) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpEnableReachabilityAnalyzerOrganizationSharing) 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) @@ -39865,9 +40055,9 @@ func (m *awsEc2query_deserializeOpEnableSerialConsoleAccess) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableSerialConsoleAccess(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorEnableReachabilityAnalyzerOrganizationSharing(response, &metadata) } - output := &EnableSerialConsoleAccessOutput{} + output := &EnableReachabilityAnalyzerOrganizationSharingOutput{} out.Result = output var buff [1024]byte @@ -39888,7 +40078,7 @@ func (m *awsEc2query_deserializeOpEnableSerialConsoleAccess) HandleDeserialize(c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableSerialConsoleAccessOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentEnableReachabilityAnalyzerOrganizationSharingOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -39902,7 +40092,7 @@ func (m *awsEc2query_deserializeOpEnableSerialConsoleAccess) HandleDeserialize(c return out, metadata, err } -func awsEc2query_deserializeOpErrorEnableSerialConsoleAccess(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorEnableReachabilityAnalyzerOrganizationSharing(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)} @@ -39935,14 +40125,14 @@ func awsEc2query_deserializeOpErrorEnableSerialConsoleAccess(response *smithyhtt } } -type awsEc2query_deserializeOpEnableSnapshotBlockPublicAccess struct { +type awsEc2query_deserializeOpEnableSerialConsoleAccess struct { } -func (*awsEc2query_deserializeOpEnableSnapshotBlockPublicAccess) ID() string { +func (*awsEc2query_deserializeOpEnableSerialConsoleAccess) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpEnableSnapshotBlockPublicAccess) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpEnableSerialConsoleAccess) 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) @@ -39960,9 +40150,9 @@ func (m *awsEc2query_deserializeOpEnableSnapshotBlockPublicAccess) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableSnapshotBlockPublicAccess(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorEnableSerialConsoleAccess(response, &metadata) } - output := &EnableSnapshotBlockPublicAccessOutput{} + output := &EnableSerialConsoleAccessOutput{} out.Result = output var buff [1024]byte @@ -39983,7 +40173,7 @@ func (m *awsEc2query_deserializeOpEnableSnapshotBlockPublicAccess) HandleDeseria } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableSnapshotBlockPublicAccessOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentEnableSerialConsoleAccessOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -39997,7 +40187,7 @@ func (m *awsEc2query_deserializeOpEnableSnapshotBlockPublicAccess) HandleDeseria return out, metadata, err } -func awsEc2query_deserializeOpErrorEnableSnapshotBlockPublicAccess(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorEnableSerialConsoleAccess(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)} @@ -40030,14 +40220,14 @@ func awsEc2query_deserializeOpErrorEnableSnapshotBlockPublicAccess(response *smi } } -type awsEc2query_deserializeOpEnableTransitGatewayRouteTablePropagation struct { +type awsEc2query_deserializeOpEnableSnapshotBlockPublicAccess struct { } -func (*awsEc2query_deserializeOpEnableTransitGatewayRouteTablePropagation) ID() string { +func (*awsEc2query_deserializeOpEnableSnapshotBlockPublicAccess) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpEnableTransitGatewayRouteTablePropagation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpEnableSnapshotBlockPublicAccess) 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) @@ -40055,9 +40245,9 @@ func (m *awsEc2query_deserializeOpEnableTransitGatewayRouteTablePropagation) Han } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableTransitGatewayRouteTablePropagation(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorEnableSnapshotBlockPublicAccess(response, &metadata) } - output := &EnableTransitGatewayRouteTablePropagationOutput{} + output := &EnableSnapshotBlockPublicAccessOutput{} out.Result = output var buff [1024]byte @@ -40078,7 +40268,7 @@ func (m *awsEc2query_deserializeOpEnableTransitGatewayRouteTablePropagation) Han } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableTransitGatewayRouteTablePropagationOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentEnableSnapshotBlockPublicAccessOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -40092,7 +40282,7 @@ func (m *awsEc2query_deserializeOpEnableTransitGatewayRouteTablePropagation) Han return out, metadata, err } -func awsEc2query_deserializeOpErrorEnableTransitGatewayRouteTablePropagation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorEnableSnapshotBlockPublicAccess(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)} @@ -40125,14 +40315,14 @@ func awsEc2query_deserializeOpErrorEnableTransitGatewayRouteTablePropagation(res } } -type awsEc2query_deserializeOpEnableVgwRoutePropagation struct { +type awsEc2query_deserializeOpEnableTransitGatewayRouteTablePropagation struct { } -func (*awsEc2query_deserializeOpEnableVgwRoutePropagation) ID() string { +func (*awsEc2query_deserializeOpEnableTransitGatewayRouteTablePropagation) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpEnableVgwRoutePropagation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpEnableTransitGatewayRouteTablePropagation) 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) @@ -40150,93 +40340,44 @@ func (m *awsEc2query_deserializeOpEnableVgwRoutePropagation) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableVgwRoutePropagation(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorEnableTransitGatewayRouteTablePropagation(response, &metadata) } - output := &EnableVgwRoutePropagationOutput{} + output := &EnableTransitGatewayRouteTablePropagationOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorEnableVgwRoutePropagation(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)} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } - return genericError - } -} -type awsEc2query_deserializeOpEnableVolumeIO struct { -} - -func (*awsEc2query_deserializeOpEnableVolumeIO) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpEnableVolumeIO) 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) + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentEnableTransitGatewayRouteTablePropagationOutput(&output, decoder) if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - 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, awsEc2query_deserializeOpErrorEnableVolumeIO(response, &metadata) - } - output := &EnableVolumeIOOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + 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 awsEc2query_deserializeOpErrorEnableVolumeIO(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorEnableTransitGatewayRouteTablePropagation(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)} @@ -40269,14 +40410,14 @@ func awsEc2query_deserializeOpErrorEnableVolumeIO(response *smithyhttp.Response, } } -type awsEc2query_deserializeOpEnableVpcClassicLink struct { +type awsEc2query_deserializeOpEnableVgwRoutePropagation struct { } -func (*awsEc2query_deserializeOpEnableVpcClassicLink) ID() string { +func (*awsEc2query_deserializeOpEnableVgwRoutePropagation) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpEnableVpcClassicLink) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpEnableVgwRoutePropagation) 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) @@ -40294,44 +40435,21 @@ func (m *awsEc2query_deserializeOpEnableVpcClassicLink) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableVpcClassicLink(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorEnableVgwRoutePropagation(response, &metadata) } - output := &EnableVpcClassicLinkOutput{} + output := &EnableVgwRoutePropagationOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableVpcClassicLinkOutput(&output, 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(), + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorEnableVpcClassicLink(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorEnableVgwRoutePropagation(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)} @@ -40364,14 +40482,14 @@ func awsEc2query_deserializeOpErrorEnableVpcClassicLink(response *smithyhttp.Res } } -type awsEc2query_deserializeOpEnableVpcClassicLinkDnsSupport struct { +type awsEc2query_deserializeOpEnableVolumeIO struct { } -func (*awsEc2query_deserializeOpEnableVpcClassicLinkDnsSupport) ID() string { +func (*awsEc2query_deserializeOpEnableVolumeIO) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpEnableVpcClassicLinkDnsSupport) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpEnableVolumeIO) 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) @@ -40389,44 +40507,21 @@ func (m *awsEc2query_deserializeOpEnableVpcClassicLinkDnsSupport) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableVpcClassicLinkDnsSupport(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorEnableVolumeIO(response, &metadata) } - output := &EnableVpcClassicLinkDnsSupportOutput{} + output := &EnableVolumeIOOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableVpcClassicLinkDnsSupportOutput(&output, 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(), + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorEnableVpcClassicLinkDnsSupport(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorEnableVolumeIO(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)} @@ -40459,14 +40554,14 @@ func awsEc2query_deserializeOpErrorEnableVpcClassicLinkDnsSupport(response *smit } } -type awsEc2query_deserializeOpExportClientVpnClientCertificateRevocationList struct { +type awsEc2query_deserializeOpEnableVpcClassicLink struct { } -func (*awsEc2query_deserializeOpExportClientVpnClientCertificateRevocationList) ID() string { +func (*awsEc2query_deserializeOpEnableVpcClassicLink) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpExportClientVpnClientCertificateRevocationList) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpEnableVpcClassicLink) 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) @@ -40484,9 +40579,9 @@ func (m *awsEc2query_deserializeOpExportClientVpnClientCertificateRevocationList } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorExportClientVpnClientCertificateRevocationList(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorEnableVpcClassicLink(response, &metadata) } - output := &ExportClientVpnClientCertificateRevocationListOutput{} + output := &EnableVpcClassicLinkOutput{} out.Result = output var buff [1024]byte @@ -40507,7 +40602,7 @@ func (m *awsEc2query_deserializeOpExportClientVpnClientCertificateRevocationList } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentExportClientVpnClientCertificateRevocationListOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentEnableVpcClassicLinkOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -40521,7 +40616,7 @@ func (m *awsEc2query_deserializeOpExportClientVpnClientCertificateRevocationList return out, metadata, err } -func awsEc2query_deserializeOpErrorExportClientVpnClientCertificateRevocationList(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorEnableVpcClassicLink(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)} @@ -40554,14 +40649,14 @@ func awsEc2query_deserializeOpErrorExportClientVpnClientCertificateRevocationLis } } -type awsEc2query_deserializeOpExportClientVpnClientConfiguration struct { +type awsEc2query_deserializeOpEnableVpcClassicLinkDnsSupport struct { } -func (*awsEc2query_deserializeOpExportClientVpnClientConfiguration) ID() string { +func (*awsEc2query_deserializeOpEnableVpcClassicLinkDnsSupport) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpExportClientVpnClientConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpEnableVpcClassicLinkDnsSupport) 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) @@ -40579,9 +40674,9 @@ func (m *awsEc2query_deserializeOpExportClientVpnClientConfiguration) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorExportClientVpnClientConfiguration(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorEnableVpcClassicLinkDnsSupport(response, &metadata) } - output := &ExportClientVpnClientConfigurationOutput{} + output := &EnableVpcClassicLinkDnsSupportOutput{} out.Result = output var buff [1024]byte @@ -40602,7 +40697,7 @@ func (m *awsEc2query_deserializeOpExportClientVpnClientConfiguration) HandleDese } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentExportClientVpnClientConfigurationOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentEnableVpcClassicLinkDnsSupportOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -40616,7 +40711,7 @@ func (m *awsEc2query_deserializeOpExportClientVpnClientConfiguration) HandleDese return out, metadata, err } -func awsEc2query_deserializeOpErrorExportClientVpnClientConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorEnableVpcClassicLinkDnsSupport(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)} @@ -40649,14 +40744,14 @@ func awsEc2query_deserializeOpErrorExportClientVpnClientConfiguration(response * } } -type awsEc2query_deserializeOpExportImage struct { +type awsEc2query_deserializeOpExportClientVpnClientCertificateRevocationList struct { } -func (*awsEc2query_deserializeOpExportImage) ID() string { +func (*awsEc2query_deserializeOpExportClientVpnClientCertificateRevocationList) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpExportImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpExportClientVpnClientCertificateRevocationList) 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) @@ -40674,9 +40769,9 @@ func (m *awsEc2query_deserializeOpExportImage) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorExportImage(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorExportClientVpnClientCertificateRevocationList(response, &metadata) } - output := &ExportImageOutput{} + output := &ExportClientVpnClientCertificateRevocationListOutput{} out.Result = output var buff [1024]byte @@ -40697,7 +40792,7 @@ func (m *awsEc2query_deserializeOpExportImage) HandleDeserialize(ctx context.Con } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentExportImageOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentExportClientVpnClientCertificateRevocationListOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -40711,7 +40806,7 @@ func (m *awsEc2query_deserializeOpExportImage) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsEc2query_deserializeOpErrorExportImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorExportClientVpnClientCertificateRevocationList(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)} @@ -40744,14 +40839,14 @@ func awsEc2query_deserializeOpErrorExportImage(response *smithyhttp.Response, me } } -type awsEc2query_deserializeOpExportTransitGatewayRoutes struct { +type awsEc2query_deserializeOpExportClientVpnClientConfiguration struct { } -func (*awsEc2query_deserializeOpExportTransitGatewayRoutes) ID() string { +func (*awsEc2query_deserializeOpExportClientVpnClientConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpExportTransitGatewayRoutes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpExportClientVpnClientConfiguration) 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) @@ -40769,9 +40864,9 @@ func (m *awsEc2query_deserializeOpExportTransitGatewayRoutes) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorExportTransitGatewayRoutes(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorExportClientVpnClientConfiguration(response, &metadata) } - output := &ExportTransitGatewayRoutesOutput{} + output := &ExportClientVpnClientConfigurationOutput{} out.Result = output var buff [1024]byte @@ -40792,7 +40887,7 @@ func (m *awsEc2query_deserializeOpExportTransitGatewayRoutes) HandleDeserialize( } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentExportTransitGatewayRoutesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentExportClientVpnClientConfigurationOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -40806,7 +40901,7 @@ func (m *awsEc2query_deserializeOpExportTransitGatewayRoutes) HandleDeserialize( return out, metadata, err } -func awsEc2query_deserializeOpErrorExportTransitGatewayRoutes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorExportClientVpnClientConfiguration(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)} @@ -40839,14 +40934,14 @@ func awsEc2query_deserializeOpErrorExportTransitGatewayRoutes(response *smithyht } } -type awsEc2query_deserializeOpGetAssociatedEnclaveCertificateIamRoles struct { +type awsEc2query_deserializeOpExportImage struct { } -func (*awsEc2query_deserializeOpGetAssociatedEnclaveCertificateIamRoles) ID() string { +func (*awsEc2query_deserializeOpExportImage) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetAssociatedEnclaveCertificateIamRoles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpExportImage) 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) @@ -40864,9 +40959,9 @@ func (m *awsEc2query_deserializeOpGetAssociatedEnclaveCertificateIamRoles) Handl } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetAssociatedEnclaveCertificateIamRoles(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorExportImage(response, &metadata) } - output := &GetAssociatedEnclaveCertificateIamRolesOutput{} + output := &ExportImageOutput{} out.Result = output var buff [1024]byte @@ -40887,7 +40982,7 @@ func (m *awsEc2query_deserializeOpGetAssociatedEnclaveCertificateIamRoles) Handl } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetAssociatedEnclaveCertificateIamRolesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentExportImageOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -40901,7 +40996,7 @@ func (m *awsEc2query_deserializeOpGetAssociatedEnclaveCertificateIamRoles) Handl return out, metadata, err } -func awsEc2query_deserializeOpErrorGetAssociatedEnclaveCertificateIamRoles(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorExportImage(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)} @@ -40934,14 +41029,14 @@ func awsEc2query_deserializeOpErrorGetAssociatedEnclaveCertificateIamRoles(respo } } -type awsEc2query_deserializeOpGetAssociatedIpv6PoolCidrs struct { +type awsEc2query_deserializeOpExportTransitGatewayRoutes struct { } -func (*awsEc2query_deserializeOpGetAssociatedIpv6PoolCidrs) ID() string { +func (*awsEc2query_deserializeOpExportTransitGatewayRoutes) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetAssociatedIpv6PoolCidrs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpExportTransitGatewayRoutes) 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) @@ -40959,9 +41054,9 @@ func (m *awsEc2query_deserializeOpGetAssociatedIpv6PoolCidrs) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetAssociatedIpv6PoolCidrs(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorExportTransitGatewayRoutes(response, &metadata) } - output := &GetAssociatedIpv6PoolCidrsOutput{} + output := &ExportTransitGatewayRoutesOutput{} out.Result = output var buff [1024]byte @@ -40982,7 +41077,7 @@ func (m *awsEc2query_deserializeOpGetAssociatedIpv6PoolCidrs) HandleDeserialize( } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetAssociatedIpv6PoolCidrsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentExportTransitGatewayRoutesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -40996,7 +41091,7 @@ func (m *awsEc2query_deserializeOpGetAssociatedIpv6PoolCidrs) HandleDeserialize( return out, metadata, err } -func awsEc2query_deserializeOpErrorGetAssociatedIpv6PoolCidrs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorExportTransitGatewayRoutes(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)} @@ -41029,14 +41124,14 @@ func awsEc2query_deserializeOpErrorGetAssociatedIpv6PoolCidrs(response *smithyht } } -type awsEc2query_deserializeOpGetAwsNetworkPerformanceData struct { +type awsEc2query_deserializeOpGetAssociatedEnclaveCertificateIamRoles struct { } -func (*awsEc2query_deserializeOpGetAwsNetworkPerformanceData) ID() string { +func (*awsEc2query_deserializeOpGetAssociatedEnclaveCertificateIamRoles) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetAwsNetworkPerformanceData) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetAssociatedEnclaveCertificateIamRoles) 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) @@ -41054,9 +41149,9 @@ func (m *awsEc2query_deserializeOpGetAwsNetworkPerformanceData) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetAwsNetworkPerformanceData(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetAssociatedEnclaveCertificateIamRoles(response, &metadata) } - output := &GetAwsNetworkPerformanceDataOutput{} + output := &GetAssociatedEnclaveCertificateIamRolesOutput{} out.Result = output var buff [1024]byte @@ -41077,7 +41172,7 @@ func (m *awsEc2query_deserializeOpGetAwsNetworkPerformanceData) HandleDeserializ } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetAwsNetworkPerformanceDataOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetAssociatedEnclaveCertificateIamRolesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -41091,7 +41186,7 @@ func (m *awsEc2query_deserializeOpGetAwsNetworkPerformanceData) HandleDeserializ return out, metadata, err } -func awsEc2query_deserializeOpErrorGetAwsNetworkPerformanceData(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetAssociatedEnclaveCertificateIamRoles(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)} @@ -41124,14 +41219,14 @@ func awsEc2query_deserializeOpErrorGetAwsNetworkPerformanceData(response *smithy } } -type awsEc2query_deserializeOpGetCapacityReservationUsage struct { +type awsEc2query_deserializeOpGetAssociatedIpv6PoolCidrs struct { } -func (*awsEc2query_deserializeOpGetCapacityReservationUsage) ID() string { +func (*awsEc2query_deserializeOpGetAssociatedIpv6PoolCidrs) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetCapacityReservationUsage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetAssociatedIpv6PoolCidrs) 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) @@ -41149,9 +41244,9 @@ func (m *awsEc2query_deserializeOpGetCapacityReservationUsage) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetCapacityReservationUsage(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetAssociatedIpv6PoolCidrs(response, &metadata) } - output := &GetCapacityReservationUsageOutput{} + output := &GetAssociatedIpv6PoolCidrsOutput{} out.Result = output var buff [1024]byte @@ -41172,7 +41267,7 @@ func (m *awsEc2query_deserializeOpGetCapacityReservationUsage) HandleDeserialize } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetCapacityReservationUsageOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetAssociatedIpv6PoolCidrsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -41186,7 +41281,7 @@ func (m *awsEc2query_deserializeOpGetCapacityReservationUsage) HandleDeserialize return out, metadata, err } -func awsEc2query_deserializeOpErrorGetCapacityReservationUsage(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetAssociatedIpv6PoolCidrs(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)} @@ -41219,14 +41314,14 @@ func awsEc2query_deserializeOpErrorGetCapacityReservationUsage(response *smithyh } } -type awsEc2query_deserializeOpGetCoipPoolUsage struct { +type awsEc2query_deserializeOpGetAwsNetworkPerformanceData struct { } -func (*awsEc2query_deserializeOpGetCoipPoolUsage) ID() string { +func (*awsEc2query_deserializeOpGetAwsNetworkPerformanceData) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetCoipPoolUsage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetAwsNetworkPerformanceData) 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) @@ -41244,9 +41339,9 @@ func (m *awsEc2query_deserializeOpGetCoipPoolUsage) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetCoipPoolUsage(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetAwsNetworkPerformanceData(response, &metadata) } - output := &GetCoipPoolUsageOutput{} + output := &GetAwsNetworkPerformanceDataOutput{} out.Result = output var buff [1024]byte @@ -41267,7 +41362,7 @@ func (m *awsEc2query_deserializeOpGetCoipPoolUsage) HandleDeserialize(ctx contex } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetCoipPoolUsageOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetAwsNetworkPerformanceDataOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -41281,7 +41376,7 @@ func (m *awsEc2query_deserializeOpGetCoipPoolUsage) HandleDeserialize(ctx contex return out, metadata, err } -func awsEc2query_deserializeOpErrorGetCoipPoolUsage(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetAwsNetworkPerformanceData(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)} @@ -41314,14 +41409,14 @@ func awsEc2query_deserializeOpErrorGetCoipPoolUsage(response *smithyhttp.Respons } } -type awsEc2query_deserializeOpGetConsoleOutput struct { +type awsEc2query_deserializeOpGetCapacityReservationUsage struct { } -func (*awsEc2query_deserializeOpGetConsoleOutput) ID() string { +func (*awsEc2query_deserializeOpGetCapacityReservationUsage) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetConsoleOutput) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetCapacityReservationUsage) 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) @@ -41339,9 +41434,9 @@ func (m *awsEc2query_deserializeOpGetConsoleOutput) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetConsoleOutput(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetCapacityReservationUsage(response, &metadata) } - output := &GetConsoleOutputOutput{} + output := &GetCapacityReservationUsageOutput{} out.Result = output var buff [1024]byte @@ -41362,7 +41457,7 @@ func (m *awsEc2query_deserializeOpGetConsoleOutput) HandleDeserialize(ctx contex } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetConsoleOutputOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetCapacityReservationUsageOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -41376,7 +41471,7 @@ func (m *awsEc2query_deserializeOpGetConsoleOutput) HandleDeserialize(ctx contex return out, metadata, err } -func awsEc2query_deserializeOpErrorGetConsoleOutput(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetCapacityReservationUsage(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)} @@ -41409,14 +41504,14 @@ func awsEc2query_deserializeOpErrorGetConsoleOutput(response *smithyhttp.Respons } } -type awsEc2query_deserializeOpGetConsoleScreenshot struct { +type awsEc2query_deserializeOpGetCoipPoolUsage struct { } -func (*awsEc2query_deserializeOpGetConsoleScreenshot) ID() string { +func (*awsEc2query_deserializeOpGetCoipPoolUsage) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetConsoleScreenshot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetCoipPoolUsage) 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) @@ -41434,9 +41529,9 @@ func (m *awsEc2query_deserializeOpGetConsoleScreenshot) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetConsoleScreenshot(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetCoipPoolUsage(response, &metadata) } - output := &GetConsoleScreenshotOutput{} + output := &GetCoipPoolUsageOutput{} out.Result = output var buff [1024]byte @@ -41457,7 +41552,7 @@ func (m *awsEc2query_deserializeOpGetConsoleScreenshot) HandleDeserialize(ctx co } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetConsoleScreenshotOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetCoipPoolUsageOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -41471,7 +41566,7 @@ func (m *awsEc2query_deserializeOpGetConsoleScreenshot) HandleDeserialize(ctx co return out, metadata, err } -func awsEc2query_deserializeOpErrorGetConsoleScreenshot(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetCoipPoolUsage(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)} @@ -41504,14 +41599,14 @@ func awsEc2query_deserializeOpErrorGetConsoleScreenshot(response *smithyhttp.Res } } -type awsEc2query_deserializeOpGetDefaultCreditSpecification struct { +type awsEc2query_deserializeOpGetConsoleOutput struct { } -func (*awsEc2query_deserializeOpGetDefaultCreditSpecification) ID() string { +func (*awsEc2query_deserializeOpGetConsoleOutput) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetDefaultCreditSpecification) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetConsoleOutput) 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) @@ -41529,9 +41624,9 @@ func (m *awsEc2query_deserializeOpGetDefaultCreditSpecification) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetDefaultCreditSpecification(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetConsoleOutput(response, &metadata) } - output := &GetDefaultCreditSpecificationOutput{} + output := &GetConsoleOutputOutput{} out.Result = output var buff [1024]byte @@ -41552,7 +41647,7 @@ func (m *awsEc2query_deserializeOpGetDefaultCreditSpecification) HandleDeseriali } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetDefaultCreditSpecificationOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetConsoleOutputOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -41566,7 +41661,7 @@ func (m *awsEc2query_deserializeOpGetDefaultCreditSpecification) HandleDeseriali return out, metadata, err } -func awsEc2query_deserializeOpErrorGetDefaultCreditSpecification(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetConsoleOutput(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)} @@ -41599,14 +41694,14 @@ func awsEc2query_deserializeOpErrorGetDefaultCreditSpecification(response *smith } } -type awsEc2query_deserializeOpGetEbsDefaultKmsKeyId struct { +type awsEc2query_deserializeOpGetConsoleScreenshot struct { } -func (*awsEc2query_deserializeOpGetEbsDefaultKmsKeyId) ID() string { +func (*awsEc2query_deserializeOpGetConsoleScreenshot) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetEbsDefaultKmsKeyId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetConsoleScreenshot) 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) @@ -41624,9 +41719,9 @@ func (m *awsEc2query_deserializeOpGetEbsDefaultKmsKeyId) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetEbsDefaultKmsKeyId(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetConsoleScreenshot(response, &metadata) } - output := &GetEbsDefaultKmsKeyIdOutput{} + output := &GetConsoleScreenshotOutput{} out.Result = output var buff [1024]byte @@ -41647,7 +41742,7 @@ func (m *awsEc2query_deserializeOpGetEbsDefaultKmsKeyId) HandleDeserialize(ctx c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetEbsDefaultKmsKeyIdOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetConsoleScreenshotOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -41661,7 +41756,7 @@ func (m *awsEc2query_deserializeOpGetEbsDefaultKmsKeyId) HandleDeserialize(ctx c return out, metadata, err } -func awsEc2query_deserializeOpErrorGetEbsDefaultKmsKeyId(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetConsoleScreenshot(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)} @@ -41694,14 +41789,14 @@ func awsEc2query_deserializeOpErrorGetEbsDefaultKmsKeyId(response *smithyhttp.Re } } -type awsEc2query_deserializeOpGetEbsEncryptionByDefault struct { +type awsEc2query_deserializeOpGetDefaultCreditSpecification struct { } -func (*awsEc2query_deserializeOpGetEbsEncryptionByDefault) ID() string { +func (*awsEc2query_deserializeOpGetDefaultCreditSpecification) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetEbsEncryptionByDefault) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetDefaultCreditSpecification) 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) @@ -41719,9 +41814,9 @@ func (m *awsEc2query_deserializeOpGetEbsEncryptionByDefault) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetEbsEncryptionByDefault(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetDefaultCreditSpecification(response, &metadata) } - output := &GetEbsEncryptionByDefaultOutput{} + output := &GetDefaultCreditSpecificationOutput{} out.Result = output var buff [1024]byte @@ -41742,7 +41837,7 @@ func (m *awsEc2query_deserializeOpGetEbsEncryptionByDefault) HandleDeserialize(c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetEbsEncryptionByDefaultOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetDefaultCreditSpecificationOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -41756,7 +41851,7 @@ func (m *awsEc2query_deserializeOpGetEbsEncryptionByDefault) HandleDeserialize(c return out, metadata, err } -func awsEc2query_deserializeOpErrorGetEbsEncryptionByDefault(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetDefaultCreditSpecification(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)} @@ -41789,14 +41884,14 @@ func awsEc2query_deserializeOpErrorGetEbsEncryptionByDefault(response *smithyhtt } } -type awsEc2query_deserializeOpGetFlowLogsIntegrationTemplate struct { +type awsEc2query_deserializeOpGetEbsDefaultKmsKeyId struct { } -func (*awsEc2query_deserializeOpGetFlowLogsIntegrationTemplate) ID() string { +func (*awsEc2query_deserializeOpGetEbsDefaultKmsKeyId) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetFlowLogsIntegrationTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetEbsDefaultKmsKeyId) 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) @@ -41814,9 +41909,9 @@ func (m *awsEc2query_deserializeOpGetFlowLogsIntegrationTemplate) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetFlowLogsIntegrationTemplate(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetEbsDefaultKmsKeyId(response, &metadata) } - output := &GetFlowLogsIntegrationTemplateOutput{} + output := &GetEbsDefaultKmsKeyIdOutput{} out.Result = output var buff [1024]byte @@ -41837,7 +41932,7 @@ func (m *awsEc2query_deserializeOpGetFlowLogsIntegrationTemplate) HandleDeserial } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetFlowLogsIntegrationTemplateOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetEbsDefaultKmsKeyIdOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -41851,7 +41946,7 @@ func (m *awsEc2query_deserializeOpGetFlowLogsIntegrationTemplate) HandleDeserial return out, metadata, err } -func awsEc2query_deserializeOpErrorGetFlowLogsIntegrationTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetEbsDefaultKmsKeyId(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)} @@ -41884,14 +41979,14 @@ func awsEc2query_deserializeOpErrorGetFlowLogsIntegrationTemplate(response *smit } } -type awsEc2query_deserializeOpGetGroupsForCapacityReservation struct { +type awsEc2query_deserializeOpGetEbsEncryptionByDefault struct { } -func (*awsEc2query_deserializeOpGetGroupsForCapacityReservation) ID() string { +func (*awsEc2query_deserializeOpGetEbsEncryptionByDefault) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetGroupsForCapacityReservation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetEbsEncryptionByDefault) 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) @@ -41909,9 +42004,9 @@ func (m *awsEc2query_deserializeOpGetGroupsForCapacityReservation) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetGroupsForCapacityReservation(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetEbsEncryptionByDefault(response, &metadata) } - output := &GetGroupsForCapacityReservationOutput{} + output := &GetEbsEncryptionByDefaultOutput{} out.Result = output var buff [1024]byte @@ -41932,7 +42027,7 @@ func (m *awsEc2query_deserializeOpGetGroupsForCapacityReservation) HandleDeseria } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetGroupsForCapacityReservationOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetEbsEncryptionByDefaultOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -41946,7 +42041,7 @@ func (m *awsEc2query_deserializeOpGetGroupsForCapacityReservation) HandleDeseria return out, metadata, err } -func awsEc2query_deserializeOpErrorGetGroupsForCapacityReservation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetEbsEncryptionByDefault(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)} @@ -41979,14 +42074,14 @@ func awsEc2query_deserializeOpErrorGetGroupsForCapacityReservation(response *smi } } -type awsEc2query_deserializeOpGetHostReservationPurchasePreview struct { +type awsEc2query_deserializeOpGetFlowLogsIntegrationTemplate struct { } -func (*awsEc2query_deserializeOpGetHostReservationPurchasePreview) ID() string { +func (*awsEc2query_deserializeOpGetFlowLogsIntegrationTemplate) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetHostReservationPurchasePreview) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetFlowLogsIntegrationTemplate) 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) @@ -42004,9 +42099,9 @@ func (m *awsEc2query_deserializeOpGetHostReservationPurchasePreview) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetHostReservationPurchasePreview(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetFlowLogsIntegrationTemplate(response, &metadata) } - output := &GetHostReservationPurchasePreviewOutput{} + output := &GetFlowLogsIntegrationTemplateOutput{} out.Result = output var buff [1024]byte @@ -42027,7 +42122,7 @@ func (m *awsEc2query_deserializeOpGetHostReservationPurchasePreview) HandleDeser } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetHostReservationPurchasePreviewOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetFlowLogsIntegrationTemplateOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -42041,7 +42136,7 @@ func (m *awsEc2query_deserializeOpGetHostReservationPurchasePreview) HandleDeser return out, metadata, err } -func awsEc2query_deserializeOpErrorGetHostReservationPurchasePreview(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetFlowLogsIntegrationTemplate(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)} @@ -42074,14 +42169,14 @@ func awsEc2query_deserializeOpErrorGetHostReservationPurchasePreview(response *s } } -type awsEc2query_deserializeOpGetImageBlockPublicAccessState struct { +type awsEc2query_deserializeOpGetGroupsForCapacityReservation struct { } -func (*awsEc2query_deserializeOpGetImageBlockPublicAccessState) ID() string { +func (*awsEc2query_deserializeOpGetGroupsForCapacityReservation) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetImageBlockPublicAccessState) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetGroupsForCapacityReservation) 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) @@ -42099,9 +42194,9 @@ func (m *awsEc2query_deserializeOpGetImageBlockPublicAccessState) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetImageBlockPublicAccessState(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetGroupsForCapacityReservation(response, &metadata) } - output := &GetImageBlockPublicAccessStateOutput{} + output := &GetGroupsForCapacityReservationOutput{} out.Result = output var buff [1024]byte @@ -42122,7 +42217,7 @@ func (m *awsEc2query_deserializeOpGetImageBlockPublicAccessState) HandleDeserial } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetImageBlockPublicAccessStateOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetGroupsForCapacityReservationOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -42136,7 +42231,7 @@ func (m *awsEc2query_deserializeOpGetImageBlockPublicAccessState) HandleDeserial return out, metadata, err } -func awsEc2query_deserializeOpErrorGetImageBlockPublicAccessState(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetGroupsForCapacityReservation(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)} @@ -42169,14 +42264,14 @@ func awsEc2query_deserializeOpErrorGetImageBlockPublicAccessState(response *smit } } -type awsEc2query_deserializeOpGetInstanceMetadataDefaults struct { +type awsEc2query_deserializeOpGetHostReservationPurchasePreview struct { } -func (*awsEc2query_deserializeOpGetInstanceMetadataDefaults) ID() string { +func (*awsEc2query_deserializeOpGetHostReservationPurchasePreview) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetInstanceMetadataDefaults) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetHostReservationPurchasePreview) 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) @@ -42194,9 +42289,9 @@ func (m *awsEc2query_deserializeOpGetInstanceMetadataDefaults) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetInstanceMetadataDefaults(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetHostReservationPurchasePreview(response, &metadata) } - output := &GetInstanceMetadataDefaultsOutput{} + output := &GetHostReservationPurchasePreviewOutput{} out.Result = output var buff [1024]byte @@ -42217,7 +42312,7 @@ func (m *awsEc2query_deserializeOpGetInstanceMetadataDefaults) HandleDeserialize } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetInstanceMetadataDefaultsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetHostReservationPurchasePreviewOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -42231,7 +42326,7 @@ func (m *awsEc2query_deserializeOpGetInstanceMetadataDefaults) HandleDeserialize return out, metadata, err } -func awsEc2query_deserializeOpErrorGetInstanceMetadataDefaults(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetHostReservationPurchasePreview(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)} @@ -42264,14 +42359,14 @@ func awsEc2query_deserializeOpErrorGetInstanceMetadataDefaults(response *smithyh } } -type awsEc2query_deserializeOpGetInstanceTpmEkPub struct { +type awsEc2query_deserializeOpGetImageBlockPublicAccessState struct { } -func (*awsEc2query_deserializeOpGetInstanceTpmEkPub) ID() string { +func (*awsEc2query_deserializeOpGetImageBlockPublicAccessState) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetInstanceTpmEkPub) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetImageBlockPublicAccessState) 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) @@ -42289,9 +42384,9 @@ func (m *awsEc2query_deserializeOpGetInstanceTpmEkPub) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetInstanceTpmEkPub(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetImageBlockPublicAccessState(response, &metadata) } - output := &GetInstanceTpmEkPubOutput{} + output := &GetImageBlockPublicAccessStateOutput{} out.Result = output var buff [1024]byte @@ -42312,7 +42407,7 @@ func (m *awsEc2query_deserializeOpGetInstanceTpmEkPub) HandleDeserialize(ctx con } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetInstanceTpmEkPubOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetImageBlockPublicAccessStateOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -42326,7 +42421,7 @@ func (m *awsEc2query_deserializeOpGetInstanceTpmEkPub) HandleDeserialize(ctx con return out, metadata, err } -func awsEc2query_deserializeOpErrorGetInstanceTpmEkPub(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetImageBlockPublicAccessState(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)} @@ -42359,14 +42454,14 @@ func awsEc2query_deserializeOpErrorGetInstanceTpmEkPub(response *smithyhttp.Resp } } -type awsEc2query_deserializeOpGetInstanceTypesFromInstanceRequirements struct { +type awsEc2query_deserializeOpGetInstanceMetadataDefaults struct { } -func (*awsEc2query_deserializeOpGetInstanceTypesFromInstanceRequirements) ID() string { +func (*awsEc2query_deserializeOpGetInstanceMetadataDefaults) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetInstanceTypesFromInstanceRequirements) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetInstanceMetadataDefaults) 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) @@ -42384,9 +42479,9 @@ func (m *awsEc2query_deserializeOpGetInstanceTypesFromInstanceRequirements) Hand } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetInstanceTypesFromInstanceRequirements(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetInstanceMetadataDefaults(response, &metadata) } - output := &GetInstanceTypesFromInstanceRequirementsOutput{} + output := &GetInstanceMetadataDefaultsOutput{} out.Result = output var buff [1024]byte @@ -42407,7 +42502,7 @@ func (m *awsEc2query_deserializeOpGetInstanceTypesFromInstanceRequirements) Hand } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetInstanceTypesFromInstanceRequirementsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetInstanceMetadataDefaultsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -42421,7 +42516,7 @@ func (m *awsEc2query_deserializeOpGetInstanceTypesFromInstanceRequirements) Hand return out, metadata, err } -func awsEc2query_deserializeOpErrorGetInstanceTypesFromInstanceRequirements(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetInstanceMetadataDefaults(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)} @@ -42454,14 +42549,14 @@ func awsEc2query_deserializeOpErrorGetInstanceTypesFromInstanceRequirements(resp } } -type awsEc2query_deserializeOpGetInstanceUefiData struct { +type awsEc2query_deserializeOpGetInstanceTpmEkPub struct { } -func (*awsEc2query_deserializeOpGetInstanceUefiData) ID() string { +func (*awsEc2query_deserializeOpGetInstanceTpmEkPub) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetInstanceUefiData) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetInstanceTpmEkPub) 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) @@ -42479,9 +42574,9 @@ func (m *awsEc2query_deserializeOpGetInstanceUefiData) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetInstanceUefiData(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetInstanceTpmEkPub(response, &metadata) } - output := &GetInstanceUefiDataOutput{} + output := &GetInstanceTpmEkPubOutput{} out.Result = output var buff [1024]byte @@ -42502,7 +42597,7 @@ func (m *awsEc2query_deserializeOpGetInstanceUefiData) HandleDeserialize(ctx con } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetInstanceUefiDataOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetInstanceTpmEkPubOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -42516,7 +42611,7 @@ func (m *awsEc2query_deserializeOpGetInstanceUefiData) HandleDeserialize(ctx con return out, metadata, err } -func awsEc2query_deserializeOpErrorGetInstanceUefiData(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetInstanceTpmEkPub(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)} @@ -42549,14 +42644,14 @@ func awsEc2query_deserializeOpErrorGetInstanceUefiData(response *smithyhttp.Resp } } -type awsEc2query_deserializeOpGetIpamAddressHistory struct { +type awsEc2query_deserializeOpGetInstanceTypesFromInstanceRequirements struct { } -func (*awsEc2query_deserializeOpGetIpamAddressHistory) ID() string { +func (*awsEc2query_deserializeOpGetInstanceTypesFromInstanceRequirements) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetIpamAddressHistory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetInstanceTypesFromInstanceRequirements) 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) @@ -42574,9 +42669,9 @@ func (m *awsEc2query_deserializeOpGetIpamAddressHistory) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetIpamAddressHistory(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetInstanceTypesFromInstanceRequirements(response, &metadata) } - output := &GetIpamAddressHistoryOutput{} + output := &GetInstanceTypesFromInstanceRequirementsOutput{} out.Result = output var buff [1024]byte @@ -42597,7 +42692,7 @@ func (m *awsEc2query_deserializeOpGetIpamAddressHistory) HandleDeserialize(ctx c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetIpamAddressHistoryOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetInstanceTypesFromInstanceRequirementsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -42611,7 +42706,7 @@ func (m *awsEc2query_deserializeOpGetIpamAddressHistory) HandleDeserialize(ctx c return out, metadata, err } -func awsEc2query_deserializeOpErrorGetIpamAddressHistory(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetInstanceTypesFromInstanceRequirements(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)} @@ -42644,14 +42739,14 @@ func awsEc2query_deserializeOpErrorGetIpamAddressHistory(response *smithyhttp.Re } } -type awsEc2query_deserializeOpGetIpamDiscoveredAccounts struct { +type awsEc2query_deserializeOpGetInstanceUefiData struct { } -func (*awsEc2query_deserializeOpGetIpamDiscoveredAccounts) ID() string { +func (*awsEc2query_deserializeOpGetInstanceUefiData) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetIpamDiscoveredAccounts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetInstanceUefiData) 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) @@ -42669,9 +42764,9 @@ func (m *awsEc2query_deserializeOpGetIpamDiscoveredAccounts) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetIpamDiscoveredAccounts(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetInstanceUefiData(response, &metadata) } - output := &GetIpamDiscoveredAccountsOutput{} + output := &GetInstanceUefiDataOutput{} out.Result = output var buff [1024]byte @@ -42692,7 +42787,7 @@ func (m *awsEc2query_deserializeOpGetIpamDiscoveredAccounts) HandleDeserialize(c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetIpamDiscoveredAccountsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetInstanceUefiDataOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -42706,7 +42801,7 @@ func (m *awsEc2query_deserializeOpGetIpamDiscoveredAccounts) HandleDeserialize(c return out, metadata, err } -func awsEc2query_deserializeOpErrorGetIpamDiscoveredAccounts(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetInstanceUefiData(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)} @@ -42739,14 +42834,14 @@ func awsEc2query_deserializeOpErrorGetIpamDiscoveredAccounts(response *smithyhtt } } -type awsEc2query_deserializeOpGetIpamDiscoveredPublicAddresses struct { +type awsEc2query_deserializeOpGetIpamAddressHistory struct { } -func (*awsEc2query_deserializeOpGetIpamDiscoveredPublicAddresses) ID() string { +func (*awsEc2query_deserializeOpGetIpamAddressHistory) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetIpamDiscoveredPublicAddresses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetIpamAddressHistory) 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) @@ -42764,9 +42859,9 @@ func (m *awsEc2query_deserializeOpGetIpamDiscoveredPublicAddresses) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetIpamDiscoveredPublicAddresses(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetIpamAddressHistory(response, &metadata) } - output := &GetIpamDiscoveredPublicAddressesOutput{} + output := &GetIpamAddressHistoryOutput{} out.Result = output var buff [1024]byte @@ -42787,7 +42882,7 @@ func (m *awsEc2query_deserializeOpGetIpamDiscoveredPublicAddresses) HandleDeseri } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetIpamDiscoveredPublicAddressesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetIpamAddressHistoryOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -42801,7 +42896,7 @@ func (m *awsEc2query_deserializeOpGetIpamDiscoveredPublicAddresses) HandleDeseri return out, metadata, err } -func awsEc2query_deserializeOpErrorGetIpamDiscoveredPublicAddresses(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetIpamAddressHistory(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)} @@ -42834,14 +42929,14 @@ func awsEc2query_deserializeOpErrorGetIpamDiscoveredPublicAddresses(response *sm } } -type awsEc2query_deserializeOpGetIpamDiscoveredResourceCidrs struct { +type awsEc2query_deserializeOpGetIpamDiscoveredAccounts struct { } -func (*awsEc2query_deserializeOpGetIpamDiscoveredResourceCidrs) ID() string { +func (*awsEc2query_deserializeOpGetIpamDiscoveredAccounts) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetIpamDiscoveredResourceCidrs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetIpamDiscoveredAccounts) 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) @@ -42859,9 +42954,9 @@ func (m *awsEc2query_deserializeOpGetIpamDiscoveredResourceCidrs) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetIpamDiscoveredResourceCidrs(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetIpamDiscoveredAccounts(response, &metadata) } - output := &GetIpamDiscoveredResourceCidrsOutput{} + output := &GetIpamDiscoveredAccountsOutput{} out.Result = output var buff [1024]byte @@ -42882,7 +42977,7 @@ func (m *awsEc2query_deserializeOpGetIpamDiscoveredResourceCidrs) HandleDeserial } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetIpamDiscoveredResourceCidrsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetIpamDiscoveredAccountsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -42896,7 +42991,7 @@ func (m *awsEc2query_deserializeOpGetIpamDiscoveredResourceCidrs) HandleDeserial return out, metadata, err } -func awsEc2query_deserializeOpErrorGetIpamDiscoveredResourceCidrs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetIpamDiscoveredAccounts(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)} @@ -42929,14 +43024,14 @@ func awsEc2query_deserializeOpErrorGetIpamDiscoveredResourceCidrs(response *smit } } -type awsEc2query_deserializeOpGetIpamPoolAllocations struct { +type awsEc2query_deserializeOpGetIpamDiscoveredPublicAddresses struct { } -func (*awsEc2query_deserializeOpGetIpamPoolAllocations) ID() string { +func (*awsEc2query_deserializeOpGetIpamDiscoveredPublicAddresses) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetIpamPoolAllocations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetIpamDiscoveredPublicAddresses) 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) @@ -42954,9 +43049,9 @@ func (m *awsEc2query_deserializeOpGetIpamPoolAllocations) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetIpamPoolAllocations(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetIpamDiscoveredPublicAddresses(response, &metadata) } - output := &GetIpamPoolAllocationsOutput{} + output := &GetIpamDiscoveredPublicAddressesOutput{} out.Result = output var buff [1024]byte @@ -42977,7 +43072,7 @@ func (m *awsEc2query_deserializeOpGetIpamPoolAllocations) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetIpamPoolAllocationsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetIpamDiscoveredPublicAddressesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -42991,7 +43086,7 @@ func (m *awsEc2query_deserializeOpGetIpamPoolAllocations) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorGetIpamPoolAllocations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetIpamDiscoveredPublicAddresses(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)} @@ -43024,14 +43119,14 @@ func awsEc2query_deserializeOpErrorGetIpamPoolAllocations(response *smithyhttp.R } } -type awsEc2query_deserializeOpGetIpamPoolCidrs struct { +type awsEc2query_deserializeOpGetIpamDiscoveredResourceCidrs struct { } -func (*awsEc2query_deserializeOpGetIpamPoolCidrs) ID() string { +func (*awsEc2query_deserializeOpGetIpamDiscoveredResourceCidrs) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetIpamPoolCidrs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetIpamDiscoveredResourceCidrs) 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) @@ -43049,9 +43144,9 @@ func (m *awsEc2query_deserializeOpGetIpamPoolCidrs) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetIpamPoolCidrs(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetIpamDiscoveredResourceCidrs(response, &metadata) } - output := &GetIpamPoolCidrsOutput{} + output := &GetIpamDiscoveredResourceCidrsOutput{} out.Result = output var buff [1024]byte @@ -43072,7 +43167,7 @@ func (m *awsEc2query_deserializeOpGetIpamPoolCidrs) HandleDeserialize(ctx contex } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetIpamPoolCidrsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetIpamDiscoveredResourceCidrsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -43086,7 +43181,7 @@ func (m *awsEc2query_deserializeOpGetIpamPoolCidrs) HandleDeserialize(ctx contex return out, metadata, err } -func awsEc2query_deserializeOpErrorGetIpamPoolCidrs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetIpamDiscoveredResourceCidrs(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)} @@ -43119,14 +43214,14 @@ func awsEc2query_deserializeOpErrorGetIpamPoolCidrs(response *smithyhttp.Respons } } -type awsEc2query_deserializeOpGetIpamResourceCidrs struct { +type awsEc2query_deserializeOpGetIpamPoolAllocations struct { } -func (*awsEc2query_deserializeOpGetIpamResourceCidrs) ID() string { +func (*awsEc2query_deserializeOpGetIpamPoolAllocations) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetIpamResourceCidrs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetIpamPoolAllocations) 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) @@ -43144,9 +43239,9 @@ func (m *awsEc2query_deserializeOpGetIpamResourceCidrs) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetIpamResourceCidrs(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetIpamPoolAllocations(response, &metadata) } - output := &GetIpamResourceCidrsOutput{} + output := &GetIpamPoolAllocationsOutput{} out.Result = output var buff [1024]byte @@ -43167,7 +43262,7 @@ func (m *awsEc2query_deserializeOpGetIpamResourceCidrs) HandleDeserialize(ctx co } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetIpamResourceCidrsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetIpamPoolAllocationsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -43181,7 +43276,7 @@ func (m *awsEc2query_deserializeOpGetIpamResourceCidrs) HandleDeserialize(ctx co return out, metadata, err } -func awsEc2query_deserializeOpErrorGetIpamResourceCidrs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetIpamPoolAllocations(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)} @@ -43214,14 +43309,14 @@ func awsEc2query_deserializeOpErrorGetIpamResourceCidrs(response *smithyhttp.Res } } -type awsEc2query_deserializeOpGetLaunchTemplateData struct { +type awsEc2query_deserializeOpGetIpamPoolCidrs struct { } -func (*awsEc2query_deserializeOpGetLaunchTemplateData) ID() string { +func (*awsEc2query_deserializeOpGetIpamPoolCidrs) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetLaunchTemplateData) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetIpamPoolCidrs) 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) @@ -43239,9 +43334,9 @@ func (m *awsEc2query_deserializeOpGetLaunchTemplateData) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetLaunchTemplateData(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetIpamPoolCidrs(response, &metadata) } - output := &GetLaunchTemplateDataOutput{} + output := &GetIpamPoolCidrsOutput{} out.Result = output var buff [1024]byte @@ -43262,7 +43357,7 @@ func (m *awsEc2query_deserializeOpGetLaunchTemplateData) HandleDeserialize(ctx c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetLaunchTemplateDataOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetIpamPoolCidrsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -43276,7 +43371,7 @@ func (m *awsEc2query_deserializeOpGetLaunchTemplateData) HandleDeserialize(ctx c return out, metadata, err } -func awsEc2query_deserializeOpErrorGetLaunchTemplateData(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetIpamPoolCidrs(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)} @@ -43309,14 +43404,14 @@ func awsEc2query_deserializeOpErrorGetLaunchTemplateData(response *smithyhttp.Re } } -type awsEc2query_deserializeOpGetManagedPrefixListAssociations struct { +type awsEc2query_deserializeOpGetIpamResourceCidrs struct { } -func (*awsEc2query_deserializeOpGetManagedPrefixListAssociations) ID() string { +func (*awsEc2query_deserializeOpGetIpamResourceCidrs) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetManagedPrefixListAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetIpamResourceCidrs) 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) @@ -43334,9 +43429,9 @@ func (m *awsEc2query_deserializeOpGetManagedPrefixListAssociations) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetManagedPrefixListAssociations(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetIpamResourceCidrs(response, &metadata) } - output := &GetManagedPrefixListAssociationsOutput{} + output := &GetIpamResourceCidrsOutput{} out.Result = output var buff [1024]byte @@ -43357,7 +43452,7 @@ func (m *awsEc2query_deserializeOpGetManagedPrefixListAssociations) HandleDeseri } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetManagedPrefixListAssociationsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetIpamResourceCidrsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -43371,7 +43466,7 @@ func (m *awsEc2query_deserializeOpGetManagedPrefixListAssociations) HandleDeseri return out, metadata, err } -func awsEc2query_deserializeOpErrorGetManagedPrefixListAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetIpamResourceCidrs(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)} @@ -43404,14 +43499,14 @@ func awsEc2query_deserializeOpErrorGetManagedPrefixListAssociations(response *sm } } -type awsEc2query_deserializeOpGetManagedPrefixListEntries struct { +type awsEc2query_deserializeOpGetLaunchTemplateData struct { } -func (*awsEc2query_deserializeOpGetManagedPrefixListEntries) ID() string { +func (*awsEc2query_deserializeOpGetLaunchTemplateData) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetManagedPrefixListEntries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetLaunchTemplateData) 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) @@ -43429,9 +43524,9 @@ func (m *awsEc2query_deserializeOpGetManagedPrefixListEntries) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetManagedPrefixListEntries(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetLaunchTemplateData(response, &metadata) } - output := &GetManagedPrefixListEntriesOutput{} + output := &GetLaunchTemplateDataOutput{} out.Result = output var buff [1024]byte @@ -43452,7 +43547,7 @@ func (m *awsEc2query_deserializeOpGetManagedPrefixListEntries) HandleDeserialize } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetManagedPrefixListEntriesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetLaunchTemplateDataOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -43466,7 +43561,7 @@ func (m *awsEc2query_deserializeOpGetManagedPrefixListEntries) HandleDeserialize return out, metadata, err } -func awsEc2query_deserializeOpErrorGetManagedPrefixListEntries(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetLaunchTemplateData(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)} @@ -43499,14 +43594,14 @@ func awsEc2query_deserializeOpErrorGetManagedPrefixListEntries(response *smithyh } } -type awsEc2query_deserializeOpGetNetworkInsightsAccessScopeAnalysisFindings struct { +type awsEc2query_deserializeOpGetManagedPrefixListAssociations struct { } -func (*awsEc2query_deserializeOpGetNetworkInsightsAccessScopeAnalysisFindings) ID() string { +func (*awsEc2query_deserializeOpGetManagedPrefixListAssociations) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetNetworkInsightsAccessScopeAnalysisFindings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetManagedPrefixListAssociations) 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) @@ -43524,9 +43619,9 @@ func (m *awsEc2query_deserializeOpGetNetworkInsightsAccessScopeAnalysisFindings) } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetNetworkInsightsAccessScopeAnalysisFindings(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetManagedPrefixListAssociations(response, &metadata) } - output := &GetNetworkInsightsAccessScopeAnalysisFindingsOutput{} + output := &GetManagedPrefixListAssociationsOutput{} out.Result = output var buff [1024]byte @@ -43547,7 +43642,7 @@ func (m *awsEc2query_deserializeOpGetNetworkInsightsAccessScopeAnalysisFindings) } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetNetworkInsightsAccessScopeAnalysisFindingsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetManagedPrefixListAssociationsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -43561,7 +43656,7 @@ func (m *awsEc2query_deserializeOpGetNetworkInsightsAccessScopeAnalysisFindings) return out, metadata, err } -func awsEc2query_deserializeOpErrorGetNetworkInsightsAccessScopeAnalysisFindings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetManagedPrefixListAssociations(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)} @@ -43594,14 +43689,14 @@ func awsEc2query_deserializeOpErrorGetNetworkInsightsAccessScopeAnalysisFindings } } -type awsEc2query_deserializeOpGetNetworkInsightsAccessScopeContent struct { +type awsEc2query_deserializeOpGetManagedPrefixListEntries struct { } -func (*awsEc2query_deserializeOpGetNetworkInsightsAccessScopeContent) ID() string { +func (*awsEc2query_deserializeOpGetManagedPrefixListEntries) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetNetworkInsightsAccessScopeContent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetManagedPrefixListEntries) 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) @@ -43619,9 +43714,9 @@ func (m *awsEc2query_deserializeOpGetNetworkInsightsAccessScopeContent) HandleDe } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetNetworkInsightsAccessScopeContent(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetManagedPrefixListEntries(response, &metadata) } - output := &GetNetworkInsightsAccessScopeContentOutput{} + output := &GetManagedPrefixListEntriesOutput{} out.Result = output var buff [1024]byte @@ -43642,7 +43737,7 @@ func (m *awsEc2query_deserializeOpGetNetworkInsightsAccessScopeContent) HandleDe } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetNetworkInsightsAccessScopeContentOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetManagedPrefixListEntriesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -43656,7 +43751,7 @@ func (m *awsEc2query_deserializeOpGetNetworkInsightsAccessScopeContent) HandleDe return out, metadata, err } -func awsEc2query_deserializeOpErrorGetNetworkInsightsAccessScopeContent(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetManagedPrefixListEntries(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)} @@ -43689,14 +43784,14 @@ func awsEc2query_deserializeOpErrorGetNetworkInsightsAccessScopeContent(response } } -type awsEc2query_deserializeOpGetPasswordData struct { +type awsEc2query_deserializeOpGetNetworkInsightsAccessScopeAnalysisFindings struct { } -func (*awsEc2query_deserializeOpGetPasswordData) ID() string { +func (*awsEc2query_deserializeOpGetNetworkInsightsAccessScopeAnalysisFindings) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetPasswordData) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetNetworkInsightsAccessScopeAnalysisFindings) 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) @@ -43714,9 +43809,9 @@ func (m *awsEc2query_deserializeOpGetPasswordData) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetPasswordData(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetNetworkInsightsAccessScopeAnalysisFindings(response, &metadata) } - output := &GetPasswordDataOutput{} + output := &GetNetworkInsightsAccessScopeAnalysisFindingsOutput{} out.Result = output var buff [1024]byte @@ -43737,7 +43832,7 @@ func (m *awsEc2query_deserializeOpGetPasswordData) HandleDeserialize(ctx context } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetPasswordDataOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetNetworkInsightsAccessScopeAnalysisFindingsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -43751,7 +43846,7 @@ func (m *awsEc2query_deserializeOpGetPasswordData) HandleDeserialize(ctx context return out, metadata, err } -func awsEc2query_deserializeOpErrorGetPasswordData(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetNetworkInsightsAccessScopeAnalysisFindings(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)} @@ -43784,14 +43879,14 @@ func awsEc2query_deserializeOpErrorGetPasswordData(response *smithyhttp.Response } } -type awsEc2query_deserializeOpGetReservedInstancesExchangeQuote struct { +type awsEc2query_deserializeOpGetNetworkInsightsAccessScopeContent struct { } -func (*awsEc2query_deserializeOpGetReservedInstancesExchangeQuote) ID() string { +func (*awsEc2query_deserializeOpGetNetworkInsightsAccessScopeContent) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetReservedInstancesExchangeQuote) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetNetworkInsightsAccessScopeContent) 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) @@ -43809,9 +43904,9 @@ func (m *awsEc2query_deserializeOpGetReservedInstancesExchangeQuote) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetReservedInstancesExchangeQuote(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetNetworkInsightsAccessScopeContent(response, &metadata) } - output := &GetReservedInstancesExchangeQuoteOutput{} + output := &GetNetworkInsightsAccessScopeContentOutput{} out.Result = output var buff [1024]byte @@ -43832,7 +43927,7 @@ func (m *awsEc2query_deserializeOpGetReservedInstancesExchangeQuote) HandleDeser } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetReservedInstancesExchangeQuoteOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetNetworkInsightsAccessScopeContentOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -43846,7 +43941,7 @@ func (m *awsEc2query_deserializeOpGetReservedInstancesExchangeQuote) HandleDeser return out, metadata, err } -func awsEc2query_deserializeOpErrorGetReservedInstancesExchangeQuote(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetNetworkInsightsAccessScopeContent(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)} @@ -43879,14 +43974,14 @@ func awsEc2query_deserializeOpErrorGetReservedInstancesExchangeQuote(response *s } } -type awsEc2query_deserializeOpGetSecurityGroupsForVpc struct { +type awsEc2query_deserializeOpGetPasswordData struct { } -func (*awsEc2query_deserializeOpGetSecurityGroupsForVpc) ID() string { +func (*awsEc2query_deserializeOpGetPasswordData) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetSecurityGroupsForVpc) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetPasswordData) 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) @@ -43904,9 +43999,9 @@ func (m *awsEc2query_deserializeOpGetSecurityGroupsForVpc) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetSecurityGroupsForVpc(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetPasswordData(response, &metadata) } - output := &GetSecurityGroupsForVpcOutput{} + output := &GetPasswordDataOutput{} out.Result = output var buff [1024]byte @@ -43927,7 +44022,7 @@ func (m *awsEc2query_deserializeOpGetSecurityGroupsForVpc) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetSecurityGroupsForVpcOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetPasswordDataOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -43941,7 +44036,7 @@ func (m *awsEc2query_deserializeOpGetSecurityGroupsForVpc) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorGetSecurityGroupsForVpc(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetPasswordData(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)} @@ -43974,14 +44069,14 @@ func awsEc2query_deserializeOpErrorGetSecurityGroupsForVpc(response *smithyhttp. } } -type awsEc2query_deserializeOpGetSerialConsoleAccessStatus struct { +type awsEc2query_deserializeOpGetReservedInstancesExchangeQuote struct { } -func (*awsEc2query_deserializeOpGetSerialConsoleAccessStatus) ID() string { +func (*awsEc2query_deserializeOpGetReservedInstancesExchangeQuote) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetSerialConsoleAccessStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetReservedInstancesExchangeQuote) 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) @@ -43999,9 +44094,9 @@ func (m *awsEc2query_deserializeOpGetSerialConsoleAccessStatus) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetSerialConsoleAccessStatus(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetReservedInstancesExchangeQuote(response, &metadata) } - output := &GetSerialConsoleAccessStatusOutput{} + output := &GetReservedInstancesExchangeQuoteOutput{} out.Result = output var buff [1024]byte @@ -44022,7 +44117,7 @@ func (m *awsEc2query_deserializeOpGetSerialConsoleAccessStatus) HandleDeserializ } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetSerialConsoleAccessStatusOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetReservedInstancesExchangeQuoteOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -44036,7 +44131,7 @@ func (m *awsEc2query_deserializeOpGetSerialConsoleAccessStatus) HandleDeserializ return out, metadata, err } -func awsEc2query_deserializeOpErrorGetSerialConsoleAccessStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetReservedInstancesExchangeQuote(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)} @@ -44069,14 +44164,14 @@ func awsEc2query_deserializeOpErrorGetSerialConsoleAccessStatus(response *smithy } } -type awsEc2query_deserializeOpGetSnapshotBlockPublicAccessState struct { +type awsEc2query_deserializeOpGetSecurityGroupsForVpc struct { } -func (*awsEc2query_deserializeOpGetSnapshotBlockPublicAccessState) ID() string { +func (*awsEc2query_deserializeOpGetSecurityGroupsForVpc) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetSnapshotBlockPublicAccessState) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetSecurityGroupsForVpc) 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) @@ -44094,9 +44189,9 @@ func (m *awsEc2query_deserializeOpGetSnapshotBlockPublicAccessState) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetSnapshotBlockPublicAccessState(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetSecurityGroupsForVpc(response, &metadata) } - output := &GetSnapshotBlockPublicAccessStateOutput{} + output := &GetSecurityGroupsForVpcOutput{} out.Result = output var buff [1024]byte @@ -44117,7 +44212,7 @@ func (m *awsEc2query_deserializeOpGetSnapshotBlockPublicAccessState) HandleDeser } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetSnapshotBlockPublicAccessStateOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetSecurityGroupsForVpcOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -44131,7 +44226,7 @@ func (m *awsEc2query_deserializeOpGetSnapshotBlockPublicAccessState) HandleDeser return out, metadata, err } -func awsEc2query_deserializeOpErrorGetSnapshotBlockPublicAccessState(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetSecurityGroupsForVpc(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)} @@ -44164,14 +44259,14 @@ func awsEc2query_deserializeOpErrorGetSnapshotBlockPublicAccessState(response *s } } -type awsEc2query_deserializeOpGetSpotPlacementScores struct { +type awsEc2query_deserializeOpGetSerialConsoleAccessStatus struct { } -func (*awsEc2query_deserializeOpGetSpotPlacementScores) ID() string { +func (*awsEc2query_deserializeOpGetSerialConsoleAccessStatus) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetSpotPlacementScores) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetSerialConsoleAccessStatus) 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) @@ -44189,9 +44284,9 @@ func (m *awsEc2query_deserializeOpGetSpotPlacementScores) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetSpotPlacementScores(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetSerialConsoleAccessStatus(response, &metadata) } - output := &GetSpotPlacementScoresOutput{} + output := &GetSerialConsoleAccessStatusOutput{} out.Result = output var buff [1024]byte @@ -44212,7 +44307,7 @@ func (m *awsEc2query_deserializeOpGetSpotPlacementScores) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetSpotPlacementScoresOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetSerialConsoleAccessStatusOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -44226,7 +44321,7 @@ func (m *awsEc2query_deserializeOpGetSpotPlacementScores) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorGetSpotPlacementScores(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetSerialConsoleAccessStatus(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)} @@ -44259,14 +44354,14 @@ func awsEc2query_deserializeOpErrorGetSpotPlacementScores(response *smithyhttp.R } } -type awsEc2query_deserializeOpGetSubnetCidrReservations struct { +type awsEc2query_deserializeOpGetSnapshotBlockPublicAccessState struct { } -func (*awsEc2query_deserializeOpGetSubnetCidrReservations) ID() string { +func (*awsEc2query_deserializeOpGetSnapshotBlockPublicAccessState) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetSubnetCidrReservations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetSnapshotBlockPublicAccessState) 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) @@ -44284,9 +44379,9 @@ func (m *awsEc2query_deserializeOpGetSubnetCidrReservations) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetSubnetCidrReservations(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetSnapshotBlockPublicAccessState(response, &metadata) } - output := &GetSubnetCidrReservationsOutput{} + output := &GetSnapshotBlockPublicAccessStateOutput{} out.Result = output var buff [1024]byte @@ -44307,7 +44402,7 @@ func (m *awsEc2query_deserializeOpGetSubnetCidrReservations) HandleDeserialize(c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetSubnetCidrReservationsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetSnapshotBlockPublicAccessStateOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -44321,7 +44416,7 @@ func (m *awsEc2query_deserializeOpGetSubnetCidrReservations) HandleDeserialize(c return out, metadata, err } -func awsEc2query_deserializeOpErrorGetSubnetCidrReservations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetSnapshotBlockPublicAccessState(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)} @@ -44354,14 +44449,14 @@ func awsEc2query_deserializeOpErrorGetSubnetCidrReservations(response *smithyhtt } } -type awsEc2query_deserializeOpGetTransitGatewayAttachmentPropagations struct { +type awsEc2query_deserializeOpGetSpotPlacementScores struct { } -func (*awsEc2query_deserializeOpGetTransitGatewayAttachmentPropagations) ID() string { +func (*awsEc2query_deserializeOpGetSpotPlacementScores) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetTransitGatewayAttachmentPropagations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetSpotPlacementScores) 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) @@ -44379,9 +44474,9 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayAttachmentPropagations) Handl } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayAttachmentPropagations(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetSpotPlacementScores(response, &metadata) } - output := &GetTransitGatewayAttachmentPropagationsOutput{} + output := &GetSpotPlacementScoresOutput{} out.Result = output var buff [1024]byte @@ -44402,7 +44497,7 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayAttachmentPropagations) Handl } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetTransitGatewayAttachmentPropagationsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetSpotPlacementScoresOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -44416,7 +44511,7 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayAttachmentPropagations) Handl return out, metadata, err } -func awsEc2query_deserializeOpErrorGetTransitGatewayAttachmentPropagations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetSpotPlacementScores(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)} @@ -44449,14 +44544,14 @@ func awsEc2query_deserializeOpErrorGetTransitGatewayAttachmentPropagations(respo } } -type awsEc2query_deserializeOpGetTransitGatewayMulticastDomainAssociations struct { +type awsEc2query_deserializeOpGetSubnetCidrReservations struct { } -func (*awsEc2query_deserializeOpGetTransitGatewayMulticastDomainAssociations) ID() string { +func (*awsEc2query_deserializeOpGetSubnetCidrReservations) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetTransitGatewayMulticastDomainAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetSubnetCidrReservations) 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) @@ -44474,9 +44569,9 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayMulticastDomainAssociations) } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayMulticastDomainAssociations(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetSubnetCidrReservations(response, &metadata) } - output := &GetTransitGatewayMulticastDomainAssociationsOutput{} + output := &GetSubnetCidrReservationsOutput{} out.Result = output var buff [1024]byte @@ -44497,7 +44592,7 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayMulticastDomainAssociations) } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetTransitGatewayMulticastDomainAssociationsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetSubnetCidrReservationsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -44511,7 +44606,7 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayMulticastDomainAssociations) return out, metadata, err } -func awsEc2query_deserializeOpErrorGetTransitGatewayMulticastDomainAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetSubnetCidrReservations(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)} @@ -44544,14 +44639,14 @@ func awsEc2query_deserializeOpErrorGetTransitGatewayMulticastDomainAssociations( } } -type awsEc2query_deserializeOpGetTransitGatewayPolicyTableAssociations struct { +type awsEc2query_deserializeOpGetTransitGatewayAttachmentPropagations struct { } -func (*awsEc2query_deserializeOpGetTransitGatewayPolicyTableAssociations) ID() string { +func (*awsEc2query_deserializeOpGetTransitGatewayAttachmentPropagations) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetTransitGatewayPolicyTableAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetTransitGatewayAttachmentPropagations) 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) @@ -44569,9 +44664,9 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayPolicyTableAssociations) Hand } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayPolicyTableAssociations(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayAttachmentPropagations(response, &metadata) } - output := &GetTransitGatewayPolicyTableAssociationsOutput{} + output := &GetTransitGatewayAttachmentPropagationsOutput{} out.Result = output var buff [1024]byte @@ -44592,7 +44687,7 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayPolicyTableAssociations) Hand } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetTransitGatewayPolicyTableAssociationsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetTransitGatewayAttachmentPropagationsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -44606,7 +44701,7 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayPolicyTableAssociations) Hand return out, metadata, err } -func awsEc2query_deserializeOpErrorGetTransitGatewayPolicyTableAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetTransitGatewayAttachmentPropagations(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)} @@ -44639,14 +44734,14 @@ func awsEc2query_deserializeOpErrorGetTransitGatewayPolicyTableAssociations(resp } } -type awsEc2query_deserializeOpGetTransitGatewayPolicyTableEntries struct { +type awsEc2query_deserializeOpGetTransitGatewayMulticastDomainAssociations struct { } -func (*awsEc2query_deserializeOpGetTransitGatewayPolicyTableEntries) ID() string { +func (*awsEc2query_deserializeOpGetTransitGatewayMulticastDomainAssociations) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetTransitGatewayPolicyTableEntries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetTransitGatewayMulticastDomainAssociations) 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) @@ -44664,9 +44759,9 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayPolicyTableEntries) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayPolicyTableEntries(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayMulticastDomainAssociations(response, &metadata) } - output := &GetTransitGatewayPolicyTableEntriesOutput{} + output := &GetTransitGatewayMulticastDomainAssociationsOutput{} out.Result = output var buff [1024]byte @@ -44687,7 +44782,7 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayPolicyTableEntries) HandleDes } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetTransitGatewayPolicyTableEntriesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetTransitGatewayMulticastDomainAssociationsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -44701,7 +44796,7 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayPolicyTableEntries) HandleDes return out, metadata, err } -func awsEc2query_deserializeOpErrorGetTransitGatewayPolicyTableEntries(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetTransitGatewayMulticastDomainAssociations(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)} @@ -44734,14 +44829,14 @@ func awsEc2query_deserializeOpErrorGetTransitGatewayPolicyTableEntries(response } } -type awsEc2query_deserializeOpGetTransitGatewayPrefixListReferences struct { +type awsEc2query_deserializeOpGetTransitGatewayPolicyTableAssociations struct { } -func (*awsEc2query_deserializeOpGetTransitGatewayPrefixListReferences) ID() string { +func (*awsEc2query_deserializeOpGetTransitGatewayPolicyTableAssociations) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetTransitGatewayPrefixListReferences) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetTransitGatewayPolicyTableAssociations) 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) @@ -44759,9 +44854,9 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayPrefixListReferences) HandleD } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayPrefixListReferences(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayPolicyTableAssociations(response, &metadata) } - output := &GetTransitGatewayPrefixListReferencesOutput{} + output := &GetTransitGatewayPolicyTableAssociationsOutput{} out.Result = output var buff [1024]byte @@ -44782,7 +44877,7 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayPrefixListReferences) HandleD } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetTransitGatewayPrefixListReferencesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetTransitGatewayPolicyTableAssociationsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -44796,7 +44891,7 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayPrefixListReferences) HandleD return out, metadata, err } -func awsEc2query_deserializeOpErrorGetTransitGatewayPrefixListReferences(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetTransitGatewayPolicyTableAssociations(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)} @@ -44829,14 +44924,14 @@ func awsEc2query_deserializeOpErrorGetTransitGatewayPrefixListReferences(respons } } -type awsEc2query_deserializeOpGetTransitGatewayRouteTableAssociations struct { +type awsEc2query_deserializeOpGetTransitGatewayPolicyTableEntries struct { } -func (*awsEc2query_deserializeOpGetTransitGatewayRouteTableAssociations) ID() string { +func (*awsEc2query_deserializeOpGetTransitGatewayPolicyTableEntries) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetTransitGatewayRouteTableAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetTransitGatewayPolicyTableEntries) 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) @@ -44854,9 +44949,9 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayRouteTableAssociations) Handl } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayRouteTableAssociations(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayPolicyTableEntries(response, &metadata) } - output := &GetTransitGatewayRouteTableAssociationsOutput{} + output := &GetTransitGatewayPolicyTableEntriesOutput{} out.Result = output var buff [1024]byte @@ -44877,7 +44972,7 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayRouteTableAssociations) Handl } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetTransitGatewayRouteTableAssociationsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetTransitGatewayPolicyTableEntriesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -44891,7 +44986,7 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayRouteTableAssociations) Handl return out, metadata, err } -func awsEc2query_deserializeOpErrorGetTransitGatewayRouteTableAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetTransitGatewayPolicyTableEntries(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)} @@ -44924,14 +45019,14 @@ func awsEc2query_deserializeOpErrorGetTransitGatewayRouteTableAssociations(respo } } -type awsEc2query_deserializeOpGetTransitGatewayRouteTablePropagations struct { +type awsEc2query_deserializeOpGetTransitGatewayPrefixListReferences struct { } -func (*awsEc2query_deserializeOpGetTransitGatewayRouteTablePropagations) ID() string { +func (*awsEc2query_deserializeOpGetTransitGatewayPrefixListReferences) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetTransitGatewayRouteTablePropagations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetTransitGatewayPrefixListReferences) 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) @@ -44949,9 +45044,9 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayRouteTablePropagations) Handl } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayRouteTablePropagations(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayPrefixListReferences(response, &metadata) } - output := &GetTransitGatewayRouteTablePropagationsOutput{} + output := &GetTransitGatewayPrefixListReferencesOutput{} out.Result = output var buff [1024]byte @@ -44972,7 +45067,7 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayRouteTablePropagations) Handl } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetTransitGatewayRouteTablePropagationsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetTransitGatewayPrefixListReferencesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -44986,7 +45081,7 @@ func (m *awsEc2query_deserializeOpGetTransitGatewayRouteTablePropagations) Handl return out, metadata, err } -func awsEc2query_deserializeOpErrorGetTransitGatewayRouteTablePropagations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetTransitGatewayPrefixListReferences(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)} @@ -45019,14 +45114,14 @@ func awsEc2query_deserializeOpErrorGetTransitGatewayRouteTablePropagations(respo } } -type awsEc2query_deserializeOpGetVerifiedAccessEndpointPolicy struct { +type awsEc2query_deserializeOpGetTransitGatewayRouteTableAssociations struct { } -func (*awsEc2query_deserializeOpGetVerifiedAccessEndpointPolicy) ID() string { +func (*awsEc2query_deserializeOpGetTransitGatewayRouteTableAssociations) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetVerifiedAccessEndpointPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetTransitGatewayRouteTableAssociations) 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) @@ -45044,9 +45139,9 @@ func (m *awsEc2query_deserializeOpGetVerifiedAccessEndpointPolicy) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetVerifiedAccessEndpointPolicy(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayRouteTableAssociations(response, &metadata) } - output := &GetVerifiedAccessEndpointPolicyOutput{} + output := &GetTransitGatewayRouteTableAssociationsOutput{} out.Result = output var buff [1024]byte @@ -45067,7 +45162,7 @@ func (m *awsEc2query_deserializeOpGetVerifiedAccessEndpointPolicy) HandleDeseria } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetVerifiedAccessEndpointPolicyOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetTransitGatewayRouteTableAssociationsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -45081,7 +45176,7 @@ func (m *awsEc2query_deserializeOpGetVerifiedAccessEndpointPolicy) HandleDeseria return out, metadata, err } -func awsEc2query_deserializeOpErrorGetVerifiedAccessEndpointPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetTransitGatewayRouteTableAssociations(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)} @@ -45114,14 +45209,14 @@ func awsEc2query_deserializeOpErrorGetVerifiedAccessEndpointPolicy(response *smi } } -type awsEc2query_deserializeOpGetVerifiedAccessGroupPolicy struct { +type awsEc2query_deserializeOpGetTransitGatewayRouteTablePropagations struct { } -func (*awsEc2query_deserializeOpGetVerifiedAccessGroupPolicy) ID() string { +func (*awsEc2query_deserializeOpGetTransitGatewayRouteTablePropagations) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetVerifiedAccessGroupPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetTransitGatewayRouteTablePropagations) 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) @@ -45139,9 +45234,9 @@ func (m *awsEc2query_deserializeOpGetVerifiedAccessGroupPolicy) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetVerifiedAccessGroupPolicy(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayRouteTablePropagations(response, &metadata) } - output := &GetVerifiedAccessGroupPolicyOutput{} + output := &GetTransitGatewayRouteTablePropagationsOutput{} out.Result = output var buff [1024]byte @@ -45162,7 +45257,7 @@ func (m *awsEc2query_deserializeOpGetVerifiedAccessGroupPolicy) HandleDeserializ } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetVerifiedAccessGroupPolicyOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetTransitGatewayRouteTablePropagationsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -45176,7 +45271,7 @@ func (m *awsEc2query_deserializeOpGetVerifiedAccessGroupPolicy) HandleDeserializ return out, metadata, err } -func awsEc2query_deserializeOpErrorGetVerifiedAccessGroupPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetTransitGatewayRouteTablePropagations(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)} @@ -45209,14 +45304,14 @@ func awsEc2query_deserializeOpErrorGetVerifiedAccessGroupPolicy(response *smithy } } -type awsEc2query_deserializeOpGetVpnConnectionDeviceSampleConfiguration struct { +type awsEc2query_deserializeOpGetVerifiedAccessEndpointPolicy struct { } -func (*awsEc2query_deserializeOpGetVpnConnectionDeviceSampleConfiguration) ID() string { +func (*awsEc2query_deserializeOpGetVerifiedAccessEndpointPolicy) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetVpnConnectionDeviceSampleConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetVerifiedAccessEndpointPolicy) 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) @@ -45234,9 +45329,9 @@ func (m *awsEc2query_deserializeOpGetVpnConnectionDeviceSampleConfiguration) Han } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetVpnConnectionDeviceSampleConfiguration(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetVerifiedAccessEndpointPolicy(response, &metadata) } - output := &GetVpnConnectionDeviceSampleConfigurationOutput{} + output := &GetVerifiedAccessEndpointPolicyOutput{} out.Result = output var buff [1024]byte @@ -45257,7 +45352,7 @@ func (m *awsEc2query_deserializeOpGetVpnConnectionDeviceSampleConfiguration) Han } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetVpnConnectionDeviceSampleConfigurationOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetVerifiedAccessEndpointPolicyOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -45271,7 +45366,7 @@ func (m *awsEc2query_deserializeOpGetVpnConnectionDeviceSampleConfiguration) Han return out, metadata, err } -func awsEc2query_deserializeOpErrorGetVpnConnectionDeviceSampleConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetVerifiedAccessEndpointPolicy(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)} @@ -45304,14 +45399,14 @@ func awsEc2query_deserializeOpErrorGetVpnConnectionDeviceSampleConfiguration(res } } -type awsEc2query_deserializeOpGetVpnConnectionDeviceTypes struct { +type awsEc2query_deserializeOpGetVerifiedAccessGroupPolicy struct { } -func (*awsEc2query_deserializeOpGetVpnConnectionDeviceTypes) ID() string { +func (*awsEc2query_deserializeOpGetVerifiedAccessGroupPolicy) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetVpnConnectionDeviceTypes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetVerifiedAccessGroupPolicy) 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) @@ -45329,9 +45424,9 @@ func (m *awsEc2query_deserializeOpGetVpnConnectionDeviceTypes) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetVpnConnectionDeviceTypes(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetVerifiedAccessGroupPolicy(response, &metadata) } - output := &GetVpnConnectionDeviceTypesOutput{} + output := &GetVerifiedAccessGroupPolicyOutput{} out.Result = output var buff [1024]byte @@ -45352,7 +45447,7 @@ func (m *awsEc2query_deserializeOpGetVpnConnectionDeviceTypes) HandleDeserialize } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetVpnConnectionDeviceTypesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetVerifiedAccessGroupPolicyOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -45366,7 +45461,7 @@ func (m *awsEc2query_deserializeOpGetVpnConnectionDeviceTypes) HandleDeserialize return out, metadata, err } -func awsEc2query_deserializeOpErrorGetVpnConnectionDeviceTypes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetVerifiedAccessGroupPolicy(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)} @@ -45399,14 +45494,14 @@ func awsEc2query_deserializeOpErrorGetVpnConnectionDeviceTypes(response *smithyh } } -type awsEc2query_deserializeOpGetVpnTunnelReplacementStatus struct { +type awsEc2query_deserializeOpGetVpnConnectionDeviceSampleConfiguration struct { } -func (*awsEc2query_deserializeOpGetVpnTunnelReplacementStatus) ID() string { +func (*awsEc2query_deserializeOpGetVpnConnectionDeviceSampleConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpGetVpnTunnelReplacementStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetVpnConnectionDeviceSampleConfiguration) 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) @@ -45424,9 +45519,9 @@ func (m *awsEc2query_deserializeOpGetVpnTunnelReplacementStatus) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetVpnTunnelReplacementStatus(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetVpnConnectionDeviceSampleConfiguration(response, &metadata) } - output := &GetVpnTunnelReplacementStatusOutput{} + output := &GetVpnConnectionDeviceSampleConfigurationOutput{} out.Result = output var buff [1024]byte @@ -45447,7 +45542,7 @@ func (m *awsEc2query_deserializeOpGetVpnTunnelReplacementStatus) HandleDeseriali } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetVpnTunnelReplacementStatusOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetVpnConnectionDeviceSampleConfigurationOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -45461,7 +45556,7 @@ func (m *awsEc2query_deserializeOpGetVpnTunnelReplacementStatus) HandleDeseriali return out, metadata, err } -func awsEc2query_deserializeOpErrorGetVpnTunnelReplacementStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetVpnConnectionDeviceSampleConfiguration(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)} @@ -45494,14 +45589,14 @@ func awsEc2query_deserializeOpErrorGetVpnTunnelReplacementStatus(response *smith } } -type awsEc2query_deserializeOpImportClientVpnClientCertificateRevocationList struct { +type awsEc2query_deserializeOpGetVpnConnectionDeviceTypes struct { } -func (*awsEc2query_deserializeOpImportClientVpnClientCertificateRevocationList) ID() string { +func (*awsEc2query_deserializeOpGetVpnConnectionDeviceTypes) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpImportClientVpnClientCertificateRevocationList) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetVpnConnectionDeviceTypes) 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) @@ -45519,9 +45614,9 @@ func (m *awsEc2query_deserializeOpImportClientVpnClientCertificateRevocationList } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorImportClientVpnClientCertificateRevocationList(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetVpnConnectionDeviceTypes(response, &metadata) } - output := &ImportClientVpnClientCertificateRevocationListOutput{} + output := &GetVpnConnectionDeviceTypesOutput{} out.Result = output var buff [1024]byte @@ -45542,7 +45637,7 @@ func (m *awsEc2query_deserializeOpImportClientVpnClientCertificateRevocationList } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentImportClientVpnClientCertificateRevocationListOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetVpnConnectionDeviceTypesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -45556,7 +45651,7 @@ func (m *awsEc2query_deserializeOpImportClientVpnClientCertificateRevocationList return out, metadata, err } -func awsEc2query_deserializeOpErrorImportClientVpnClientCertificateRevocationList(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetVpnConnectionDeviceTypes(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)} @@ -45589,14 +45684,14 @@ func awsEc2query_deserializeOpErrorImportClientVpnClientCertificateRevocationLis } } -type awsEc2query_deserializeOpImportImage struct { +type awsEc2query_deserializeOpGetVpnTunnelReplacementStatus struct { } -func (*awsEc2query_deserializeOpImportImage) ID() string { +func (*awsEc2query_deserializeOpGetVpnTunnelReplacementStatus) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpImportImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpGetVpnTunnelReplacementStatus) 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) @@ -45614,9 +45709,9 @@ func (m *awsEc2query_deserializeOpImportImage) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorImportImage(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorGetVpnTunnelReplacementStatus(response, &metadata) } - output := &ImportImageOutput{} + output := &GetVpnTunnelReplacementStatusOutput{} out.Result = output var buff [1024]byte @@ -45637,7 +45732,7 @@ func (m *awsEc2query_deserializeOpImportImage) HandleDeserialize(ctx context.Con } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentImportImageOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentGetVpnTunnelReplacementStatusOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -45651,7 +45746,7 @@ func (m *awsEc2query_deserializeOpImportImage) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsEc2query_deserializeOpErrorImportImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorGetVpnTunnelReplacementStatus(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)} @@ -45684,14 +45779,14 @@ func awsEc2query_deserializeOpErrorImportImage(response *smithyhttp.Response, me } } -type awsEc2query_deserializeOpImportInstance struct { +type awsEc2query_deserializeOpImportClientVpnClientCertificateRevocationList struct { } -func (*awsEc2query_deserializeOpImportInstance) ID() string { +func (*awsEc2query_deserializeOpImportClientVpnClientCertificateRevocationList) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpImportInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpImportClientVpnClientCertificateRevocationList) 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) @@ -45709,9 +45804,9 @@ func (m *awsEc2query_deserializeOpImportInstance) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorImportInstance(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorImportClientVpnClientCertificateRevocationList(response, &metadata) } - output := &ImportInstanceOutput{} + output := &ImportClientVpnClientCertificateRevocationListOutput{} out.Result = output var buff [1024]byte @@ -45732,7 +45827,7 @@ func (m *awsEc2query_deserializeOpImportInstance) HandleDeserialize(ctx context. } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentImportInstanceOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentImportClientVpnClientCertificateRevocationListOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -45746,7 +45841,7 @@ func (m *awsEc2query_deserializeOpImportInstance) HandleDeserialize(ctx context. return out, metadata, err } -func awsEc2query_deserializeOpErrorImportInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorImportClientVpnClientCertificateRevocationList(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)} @@ -45779,14 +45874,14 @@ func awsEc2query_deserializeOpErrorImportInstance(response *smithyhttp.Response, } } -type awsEc2query_deserializeOpImportKeyPair struct { +type awsEc2query_deserializeOpImportImage struct { } -func (*awsEc2query_deserializeOpImportKeyPair) ID() string { +func (*awsEc2query_deserializeOpImportImage) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpImportKeyPair) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpImportImage) 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) @@ -45804,9 +45899,9 @@ func (m *awsEc2query_deserializeOpImportKeyPair) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorImportKeyPair(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorImportImage(response, &metadata) } - output := &ImportKeyPairOutput{} + output := &ImportImageOutput{} out.Result = output var buff [1024]byte @@ -45827,7 +45922,7 @@ func (m *awsEc2query_deserializeOpImportKeyPair) HandleDeserialize(ctx context.C } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentImportKeyPairOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentImportImageOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -45841,7 +45936,7 @@ func (m *awsEc2query_deserializeOpImportKeyPair) HandleDeserialize(ctx context.C return out, metadata, err } -func awsEc2query_deserializeOpErrorImportKeyPair(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorImportImage(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)} @@ -45874,14 +45969,14 @@ func awsEc2query_deserializeOpErrorImportKeyPair(response *smithyhttp.Response, } } -type awsEc2query_deserializeOpImportSnapshot struct { +type awsEc2query_deserializeOpImportInstance struct { } -func (*awsEc2query_deserializeOpImportSnapshot) ID() string { +func (*awsEc2query_deserializeOpImportInstance) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpImportSnapshot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpImportInstance) 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) @@ -45899,9 +45994,9 @@ func (m *awsEc2query_deserializeOpImportSnapshot) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorImportSnapshot(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorImportInstance(response, &metadata) } - output := &ImportSnapshotOutput{} + output := &ImportInstanceOutput{} out.Result = output var buff [1024]byte @@ -45922,7 +46017,7 @@ func (m *awsEc2query_deserializeOpImportSnapshot) HandleDeserialize(ctx context. } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentImportSnapshotOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentImportInstanceOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -45936,7 +46031,7 @@ func (m *awsEc2query_deserializeOpImportSnapshot) HandleDeserialize(ctx context. return out, metadata, err } -func awsEc2query_deserializeOpErrorImportSnapshot(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorImportInstance(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)} @@ -45969,14 +46064,14 @@ func awsEc2query_deserializeOpErrorImportSnapshot(response *smithyhttp.Response, } } -type awsEc2query_deserializeOpImportVolume struct { +type awsEc2query_deserializeOpImportKeyPair struct { } -func (*awsEc2query_deserializeOpImportVolume) ID() string { +func (*awsEc2query_deserializeOpImportKeyPair) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpImportVolume) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpImportKeyPair) 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) @@ -45994,9 +46089,9 @@ func (m *awsEc2query_deserializeOpImportVolume) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorImportVolume(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorImportKeyPair(response, &metadata) } - output := &ImportVolumeOutput{} + output := &ImportKeyPairOutput{} out.Result = output var buff [1024]byte @@ -46017,7 +46112,7 @@ func (m *awsEc2query_deserializeOpImportVolume) HandleDeserialize(ctx context.Co } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentImportVolumeOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentImportKeyPairOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -46031,7 +46126,7 @@ func (m *awsEc2query_deserializeOpImportVolume) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsEc2query_deserializeOpErrorImportVolume(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorImportKeyPair(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)} @@ -46064,14 +46159,14 @@ func awsEc2query_deserializeOpErrorImportVolume(response *smithyhttp.Response, m } } -type awsEc2query_deserializeOpListImagesInRecycleBin struct { +type awsEc2query_deserializeOpImportSnapshot struct { } -func (*awsEc2query_deserializeOpListImagesInRecycleBin) ID() string { +func (*awsEc2query_deserializeOpImportSnapshot) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpListImagesInRecycleBin) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpImportSnapshot) 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) @@ -46089,9 +46184,9 @@ func (m *awsEc2query_deserializeOpListImagesInRecycleBin) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorListImagesInRecycleBin(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorImportSnapshot(response, &metadata) } - output := &ListImagesInRecycleBinOutput{} + output := &ImportSnapshotOutput{} out.Result = output var buff [1024]byte @@ -46112,7 +46207,7 @@ func (m *awsEc2query_deserializeOpListImagesInRecycleBin) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentListImagesInRecycleBinOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentImportSnapshotOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -46126,7 +46221,7 @@ func (m *awsEc2query_deserializeOpListImagesInRecycleBin) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorListImagesInRecycleBin(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorImportSnapshot(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)} @@ -46159,14 +46254,14 @@ func awsEc2query_deserializeOpErrorListImagesInRecycleBin(response *smithyhttp.R } } -type awsEc2query_deserializeOpListSnapshotsInRecycleBin struct { +type awsEc2query_deserializeOpImportVolume struct { } -func (*awsEc2query_deserializeOpListSnapshotsInRecycleBin) ID() string { +func (*awsEc2query_deserializeOpImportVolume) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpListSnapshotsInRecycleBin) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpImportVolume) 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) @@ -46184,9 +46279,9 @@ func (m *awsEc2query_deserializeOpListSnapshotsInRecycleBin) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorListSnapshotsInRecycleBin(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorImportVolume(response, &metadata) } - output := &ListSnapshotsInRecycleBinOutput{} + output := &ImportVolumeOutput{} out.Result = output var buff [1024]byte @@ -46207,7 +46302,7 @@ func (m *awsEc2query_deserializeOpListSnapshotsInRecycleBin) HandleDeserialize(c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentListSnapshotsInRecycleBinOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentImportVolumeOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -46221,7 +46316,7 @@ func (m *awsEc2query_deserializeOpListSnapshotsInRecycleBin) HandleDeserialize(c return out, metadata, err } -func awsEc2query_deserializeOpErrorListSnapshotsInRecycleBin(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorImportVolume(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)} @@ -46254,14 +46349,14 @@ func awsEc2query_deserializeOpErrorListSnapshotsInRecycleBin(response *smithyhtt } } -type awsEc2query_deserializeOpLockSnapshot struct { +type awsEc2query_deserializeOpListImagesInRecycleBin struct { } -func (*awsEc2query_deserializeOpLockSnapshot) ID() string { +func (*awsEc2query_deserializeOpListImagesInRecycleBin) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpLockSnapshot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpListImagesInRecycleBin) 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) @@ -46279,9 +46374,9 @@ func (m *awsEc2query_deserializeOpLockSnapshot) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorLockSnapshot(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorListImagesInRecycleBin(response, &metadata) } - output := &LockSnapshotOutput{} + output := &ListImagesInRecycleBinOutput{} out.Result = output var buff [1024]byte @@ -46302,7 +46397,7 @@ func (m *awsEc2query_deserializeOpLockSnapshot) HandleDeserialize(ctx context.Co } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentLockSnapshotOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentListImagesInRecycleBinOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -46316,7 +46411,7 @@ func (m *awsEc2query_deserializeOpLockSnapshot) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsEc2query_deserializeOpErrorLockSnapshot(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorListImagesInRecycleBin(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)} @@ -46349,14 +46444,14 @@ func awsEc2query_deserializeOpErrorLockSnapshot(response *smithyhttp.Response, m } } -type awsEc2query_deserializeOpModifyAddressAttribute struct { +type awsEc2query_deserializeOpListSnapshotsInRecycleBin struct { } -func (*awsEc2query_deserializeOpModifyAddressAttribute) ID() string { +func (*awsEc2query_deserializeOpListSnapshotsInRecycleBin) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyAddressAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpListSnapshotsInRecycleBin) 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) @@ -46374,9 +46469,9 @@ func (m *awsEc2query_deserializeOpModifyAddressAttribute) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyAddressAttribute(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorListSnapshotsInRecycleBin(response, &metadata) } - output := &ModifyAddressAttributeOutput{} + output := &ListSnapshotsInRecycleBinOutput{} out.Result = output var buff [1024]byte @@ -46397,7 +46492,7 @@ func (m *awsEc2query_deserializeOpModifyAddressAttribute) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyAddressAttributeOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentListSnapshotsInRecycleBinOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -46411,7 +46506,7 @@ func (m *awsEc2query_deserializeOpModifyAddressAttribute) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyAddressAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorListSnapshotsInRecycleBin(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)} @@ -46444,14 +46539,14 @@ func awsEc2query_deserializeOpErrorModifyAddressAttribute(response *smithyhttp.R } } -type awsEc2query_deserializeOpModifyAvailabilityZoneGroup struct { +type awsEc2query_deserializeOpLockSnapshot struct { } -func (*awsEc2query_deserializeOpModifyAvailabilityZoneGroup) ID() string { +func (*awsEc2query_deserializeOpLockSnapshot) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyAvailabilityZoneGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpLockSnapshot) 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) @@ -46469,9 +46564,9 @@ func (m *awsEc2query_deserializeOpModifyAvailabilityZoneGroup) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyAvailabilityZoneGroup(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorLockSnapshot(response, &metadata) } - output := &ModifyAvailabilityZoneGroupOutput{} + output := &LockSnapshotOutput{} out.Result = output var buff [1024]byte @@ -46492,7 +46587,7 @@ func (m *awsEc2query_deserializeOpModifyAvailabilityZoneGroup) HandleDeserialize } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyAvailabilityZoneGroupOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentLockSnapshotOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -46506,7 +46601,7 @@ func (m *awsEc2query_deserializeOpModifyAvailabilityZoneGroup) HandleDeserialize return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyAvailabilityZoneGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorLockSnapshot(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)} @@ -46539,14 +46634,14 @@ func awsEc2query_deserializeOpErrorModifyAvailabilityZoneGroup(response *smithyh } } -type awsEc2query_deserializeOpModifyCapacityReservation struct { +type awsEc2query_deserializeOpModifyAddressAttribute struct { } -func (*awsEc2query_deserializeOpModifyCapacityReservation) ID() string { +func (*awsEc2query_deserializeOpModifyAddressAttribute) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyCapacityReservation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyAddressAttribute) 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) @@ -46564,9 +46659,9 @@ func (m *awsEc2query_deserializeOpModifyCapacityReservation) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyCapacityReservation(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyAddressAttribute(response, &metadata) } - output := &ModifyCapacityReservationOutput{} + output := &ModifyAddressAttributeOutput{} out.Result = output var buff [1024]byte @@ -46587,7 +46682,7 @@ func (m *awsEc2query_deserializeOpModifyCapacityReservation) HandleDeserialize(c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyCapacityReservationOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyAddressAttributeOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -46601,7 +46696,7 @@ func (m *awsEc2query_deserializeOpModifyCapacityReservation) HandleDeserialize(c return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyCapacityReservation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyAddressAttribute(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)} @@ -46634,14 +46729,14 @@ func awsEc2query_deserializeOpErrorModifyCapacityReservation(response *smithyhtt } } -type awsEc2query_deserializeOpModifyCapacityReservationFleet struct { +type awsEc2query_deserializeOpModifyAvailabilityZoneGroup struct { } -func (*awsEc2query_deserializeOpModifyCapacityReservationFleet) ID() string { +func (*awsEc2query_deserializeOpModifyAvailabilityZoneGroup) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyCapacityReservationFleet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyAvailabilityZoneGroup) 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) @@ -46659,9 +46754,9 @@ func (m *awsEc2query_deserializeOpModifyCapacityReservationFleet) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyCapacityReservationFleet(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyAvailabilityZoneGroup(response, &metadata) } - output := &ModifyCapacityReservationFleetOutput{} + output := &ModifyAvailabilityZoneGroupOutput{} out.Result = output var buff [1024]byte @@ -46682,7 +46777,7 @@ func (m *awsEc2query_deserializeOpModifyCapacityReservationFleet) HandleDeserial } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyCapacityReservationFleetOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyAvailabilityZoneGroupOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -46696,7 +46791,7 @@ func (m *awsEc2query_deserializeOpModifyCapacityReservationFleet) HandleDeserial return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyCapacityReservationFleet(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyAvailabilityZoneGroup(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)} @@ -46729,14 +46824,14 @@ func awsEc2query_deserializeOpErrorModifyCapacityReservationFleet(response *smit } } -type awsEc2query_deserializeOpModifyClientVpnEndpoint struct { +type awsEc2query_deserializeOpModifyCapacityReservation struct { } -func (*awsEc2query_deserializeOpModifyClientVpnEndpoint) ID() string { +func (*awsEc2query_deserializeOpModifyCapacityReservation) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyClientVpnEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyCapacityReservation) 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) @@ -46754,9 +46849,9 @@ func (m *awsEc2query_deserializeOpModifyClientVpnEndpoint) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyClientVpnEndpoint(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyCapacityReservation(response, &metadata) } - output := &ModifyClientVpnEndpointOutput{} + output := &ModifyCapacityReservationOutput{} out.Result = output var buff [1024]byte @@ -46777,7 +46872,7 @@ func (m *awsEc2query_deserializeOpModifyClientVpnEndpoint) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyClientVpnEndpointOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyCapacityReservationOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -46791,7 +46886,7 @@ func (m *awsEc2query_deserializeOpModifyClientVpnEndpoint) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyClientVpnEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyCapacityReservation(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)} @@ -46824,14 +46919,14 @@ func awsEc2query_deserializeOpErrorModifyClientVpnEndpoint(response *smithyhttp. } } -type awsEc2query_deserializeOpModifyDefaultCreditSpecification struct { +type awsEc2query_deserializeOpModifyCapacityReservationFleet struct { } -func (*awsEc2query_deserializeOpModifyDefaultCreditSpecification) ID() string { +func (*awsEc2query_deserializeOpModifyCapacityReservationFleet) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyDefaultCreditSpecification) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyCapacityReservationFleet) 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) @@ -46849,9 +46944,9 @@ func (m *awsEc2query_deserializeOpModifyDefaultCreditSpecification) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyDefaultCreditSpecification(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyCapacityReservationFleet(response, &metadata) } - output := &ModifyDefaultCreditSpecificationOutput{} + output := &ModifyCapacityReservationFleetOutput{} out.Result = output var buff [1024]byte @@ -46872,7 +46967,7 @@ func (m *awsEc2query_deserializeOpModifyDefaultCreditSpecification) HandleDeseri } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyDefaultCreditSpecificationOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyCapacityReservationFleetOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -46886,7 +46981,7 @@ func (m *awsEc2query_deserializeOpModifyDefaultCreditSpecification) HandleDeseri return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyDefaultCreditSpecification(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyCapacityReservationFleet(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)} @@ -46919,14 +47014,14 @@ func awsEc2query_deserializeOpErrorModifyDefaultCreditSpecification(response *sm } } -type awsEc2query_deserializeOpModifyEbsDefaultKmsKeyId struct { +type awsEc2query_deserializeOpModifyClientVpnEndpoint struct { } -func (*awsEc2query_deserializeOpModifyEbsDefaultKmsKeyId) ID() string { +func (*awsEc2query_deserializeOpModifyClientVpnEndpoint) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyEbsDefaultKmsKeyId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyClientVpnEndpoint) 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) @@ -46944,9 +47039,9 @@ func (m *awsEc2query_deserializeOpModifyEbsDefaultKmsKeyId) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyEbsDefaultKmsKeyId(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyClientVpnEndpoint(response, &metadata) } - output := &ModifyEbsDefaultKmsKeyIdOutput{} + output := &ModifyClientVpnEndpointOutput{} out.Result = output var buff [1024]byte @@ -46967,7 +47062,7 @@ func (m *awsEc2query_deserializeOpModifyEbsDefaultKmsKeyId) HandleDeserialize(ct } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyEbsDefaultKmsKeyIdOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyClientVpnEndpointOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -46981,7 +47076,7 @@ func (m *awsEc2query_deserializeOpModifyEbsDefaultKmsKeyId) HandleDeserialize(ct return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyEbsDefaultKmsKeyId(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyClientVpnEndpoint(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)} @@ -47014,14 +47109,14 @@ func awsEc2query_deserializeOpErrorModifyEbsDefaultKmsKeyId(response *smithyhttp } } -type awsEc2query_deserializeOpModifyFleet struct { +type awsEc2query_deserializeOpModifyDefaultCreditSpecification struct { } -func (*awsEc2query_deserializeOpModifyFleet) ID() string { +func (*awsEc2query_deserializeOpModifyDefaultCreditSpecification) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyFleet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyDefaultCreditSpecification) 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) @@ -47039,9 +47134,9 @@ func (m *awsEc2query_deserializeOpModifyFleet) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyFleet(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyDefaultCreditSpecification(response, &metadata) } - output := &ModifyFleetOutput{} + output := &ModifyDefaultCreditSpecificationOutput{} out.Result = output var buff [1024]byte @@ -47062,7 +47157,7 @@ func (m *awsEc2query_deserializeOpModifyFleet) HandleDeserialize(ctx context.Con } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyFleetOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyDefaultCreditSpecificationOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -47076,7 +47171,7 @@ func (m *awsEc2query_deserializeOpModifyFleet) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyFleet(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyDefaultCreditSpecification(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)} @@ -47109,14 +47204,14 @@ func awsEc2query_deserializeOpErrorModifyFleet(response *smithyhttp.Response, me } } -type awsEc2query_deserializeOpModifyFpgaImageAttribute struct { +type awsEc2query_deserializeOpModifyEbsDefaultKmsKeyId struct { } -func (*awsEc2query_deserializeOpModifyFpgaImageAttribute) ID() string { +func (*awsEc2query_deserializeOpModifyEbsDefaultKmsKeyId) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyFpgaImageAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyEbsDefaultKmsKeyId) 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) @@ -47134,9 +47229,9 @@ func (m *awsEc2query_deserializeOpModifyFpgaImageAttribute) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyFpgaImageAttribute(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyEbsDefaultKmsKeyId(response, &metadata) } - output := &ModifyFpgaImageAttributeOutput{} + output := &ModifyEbsDefaultKmsKeyIdOutput{} out.Result = output var buff [1024]byte @@ -47157,7 +47252,7 @@ func (m *awsEc2query_deserializeOpModifyFpgaImageAttribute) HandleDeserialize(ct } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyFpgaImageAttributeOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyEbsDefaultKmsKeyIdOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -47171,7 +47266,7 @@ func (m *awsEc2query_deserializeOpModifyFpgaImageAttribute) HandleDeserialize(ct return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyFpgaImageAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyEbsDefaultKmsKeyId(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)} @@ -47204,14 +47299,14 @@ func awsEc2query_deserializeOpErrorModifyFpgaImageAttribute(response *smithyhttp } } -type awsEc2query_deserializeOpModifyHosts struct { +type awsEc2query_deserializeOpModifyFleet struct { } -func (*awsEc2query_deserializeOpModifyHosts) ID() string { +func (*awsEc2query_deserializeOpModifyFleet) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyHosts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyFleet) 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) @@ -47229,9 +47324,9 @@ func (m *awsEc2query_deserializeOpModifyHosts) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyHosts(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyFleet(response, &metadata) } - output := &ModifyHostsOutput{} + output := &ModifyFleetOutput{} out.Result = output var buff [1024]byte @@ -47252,7 +47347,7 @@ func (m *awsEc2query_deserializeOpModifyHosts) HandleDeserialize(ctx context.Con } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyHostsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyFleetOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -47266,7 +47361,7 @@ func (m *awsEc2query_deserializeOpModifyHosts) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyHosts(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyFleet(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)} @@ -47299,14 +47394,14 @@ func awsEc2query_deserializeOpErrorModifyHosts(response *smithyhttp.Response, me } } -type awsEc2query_deserializeOpModifyIdentityIdFormat struct { +type awsEc2query_deserializeOpModifyFpgaImageAttribute struct { } -func (*awsEc2query_deserializeOpModifyIdentityIdFormat) ID() string { +func (*awsEc2query_deserializeOpModifyFpgaImageAttribute) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyIdentityIdFormat) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyFpgaImageAttribute) 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) @@ -47324,21 +47419,44 @@ func (m *awsEc2query_deserializeOpModifyIdentityIdFormat) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyIdentityIdFormat(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyFpgaImageAttribute(response, &metadata) } - output := &ModifyIdentityIdFormatOutput{} + output := &ModifyFpgaImageAttributeOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentModifyFpgaImageAttributeOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } + return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyIdentityIdFormat(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyFpgaImageAttribute(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)} @@ -47371,14 +47489,14 @@ func awsEc2query_deserializeOpErrorModifyIdentityIdFormat(response *smithyhttp.R } } -type awsEc2query_deserializeOpModifyIdFormat struct { +type awsEc2query_deserializeOpModifyHosts struct { } -func (*awsEc2query_deserializeOpModifyIdFormat) ID() string { +func (*awsEc2query_deserializeOpModifyHosts) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyIdFormat) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyHosts) 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) @@ -47396,21 +47514,44 @@ func (m *awsEc2query_deserializeOpModifyIdFormat) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyIdFormat(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyHosts(response, &metadata) } - output := &ModifyIdFormatOutput{} + output := &ModifyHostsOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentModifyHostsOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } + return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyIdFormat(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyHosts(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)} @@ -47443,14 +47584,14 @@ func awsEc2query_deserializeOpErrorModifyIdFormat(response *smithyhttp.Response, } } -type awsEc2query_deserializeOpModifyImageAttribute struct { +type awsEc2query_deserializeOpModifyIdentityIdFormat struct { } -func (*awsEc2query_deserializeOpModifyImageAttribute) ID() string { +func (*awsEc2query_deserializeOpModifyIdentityIdFormat) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyImageAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyIdentityIdFormat) 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) @@ -47468,9 +47609,9 @@ func (m *awsEc2query_deserializeOpModifyImageAttribute) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyImageAttribute(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyIdentityIdFormat(response, &metadata) } - output := &ModifyImageAttributeOutput{} + output := &ModifyIdentityIdFormatOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -47482,7 +47623,7 @@ func (m *awsEc2query_deserializeOpModifyImageAttribute) HandleDeserialize(ctx co return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyImageAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyIdentityIdFormat(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)} @@ -47515,14 +47656,14 @@ func awsEc2query_deserializeOpErrorModifyImageAttribute(response *smithyhttp.Res } } -type awsEc2query_deserializeOpModifyInstanceAttribute struct { +type awsEc2query_deserializeOpModifyIdFormat struct { } -func (*awsEc2query_deserializeOpModifyInstanceAttribute) ID() string { +func (*awsEc2query_deserializeOpModifyIdFormat) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyInstanceAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyIdFormat) 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) @@ -47540,9 +47681,9 @@ func (m *awsEc2query_deserializeOpModifyInstanceAttribute) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceAttribute(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyIdFormat(response, &metadata) } - output := &ModifyInstanceAttributeOutput{} + output := &ModifyIdFormatOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -47554,7 +47695,7 @@ func (m *awsEc2query_deserializeOpModifyInstanceAttribute) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyInstanceAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyIdFormat(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)} @@ -47587,14 +47728,14 @@ func awsEc2query_deserializeOpErrorModifyInstanceAttribute(response *smithyhttp. } } -type awsEc2query_deserializeOpModifyInstanceCapacityReservationAttributes struct { +type awsEc2query_deserializeOpModifyImageAttribute struct { } -func (*awsEc2query_deserializeOpModifyInstanceCapacityReservationAttributes) ID() string { +func (*awsEc2query_deserializeOpModifyImageAttribute) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyInstanceCapacityReservationAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyImageAttribute) 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) @@ -47612,44 +47753,21 @@ func (m *awsEc2query_deserializeOpModifyInstanceCapacityReservationAttributes) H } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceCapacityReservationAttributes(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyImageAttribute(response, &metadata) } - output := &ModifyInstanceCapacityReservationAttributesOutput{} + output := &ModifyImageAttributeOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyInstanceCapacityReservationAttributesOutput(&output, 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(), + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyInstanceCapacityReservationAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyImageAttribute(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)} @@ -47682,14 +47800,14 @@ func awsEc2query_deserializeOpErrorModifyInstanceCapacityReservationAttributes(r } } -type awsEc2query_deserializeOpModifyInstanceCpuOptions struct { +type awsEc2query_deserializeOpModifyInstanceAttribute struct { } -func (*awsEc2query_deserializeOpModifyInstanceCpuOptions) ID() string { +func (*awsEc2query_deserializeOpModifyInstanceAttribute) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyInstanceCpuOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyInstanceAttribute) 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) @@ -47707,44 +47825,21 @@ func (m *awsEc2query_deserializeOpModifyInstanceCpuOptions) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceCpuOptions(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceAttribute(response, &metadata) } - output := &ModifyInstanceCpuOptionsOutput{} + output := &ModifyInstanceAttributeOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyInstanceCpuOptionsOutput(&output, 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(), + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyInstanceCpuOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyInstanceAttribute(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)} @@ -47777,14 +47872,14 @@ func awsEc2query_deserializeOpErrorModifyInstanceCpuOptions(response *smithyhttp } } -type awsEc2query_deserializeOpModifyInstanceCreditSpecification struct { +type awsEc2query_deserializeOpModifyInstanceCapacityReservationAttributes struct { } -func (*awsEc2query_deserializeOpModifyInstanceCreditSpecification) ID() string { +func (*awsEc2query_deserializeOpModifyInstanceCapacityReservationAttributes) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyInstanceCreditSpecification) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyInstanceCapacityReservationAttributes) 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) @@ -47802,9 +47897,9 @@ func (m *awsEc2query_deserializeOpModifyInstanceCreditSpecification) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceCreditSpecification(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceCapacityReservationAttributes(response, &metadata) } - output := &ModifyInstanceCreditSpecificationOutput{} + output := &ModifyInstanceCapacityReservationAttributesOutput{} out.Result = output var buff [1024]byte @@ -47825,7 +47920,7 @@ func (m *awsEc2query_deserializeOpModifyInstanceCreditSpecification) HandleDeser } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyInstanceCreditSpecificationOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyInstanceCapacityReservationAttributesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -47839,7 +47934,7 @@ func (m *awsEc2query_deserializeOpModifyInstanceCreditSpecification) HandleDeser return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyInstanceCreditSpecification(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyInstanceCapacityReservationAttributes(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)} @@ -47872,14 +47967,14 @@ func awsEc2query_deserializeOpErrorModifyInstanceCreditSpecification(response *s } } -type awsEc2query_deserializeOpModifyInstanceEventStartTime struct { +type awsEc2query_deserializeOpModifyInstanceCpuOptions struct { } -func (*awsEc2query_deserializeOpModifyInstanceEventStartTime) ID() string { +func (*awsEc2query_deserializeOpModifyInstanceCpuOptions) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyInstanceEventStartTime) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyInstanceCpuOptions) 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) @@ -47897,9 +47992,9 @@ func (m *awsEc2query_deserializeOpModifyInstanceEventStartTime) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceEventStartTime(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceCpuOptions(response, &metadata) } - output := &ModifyInstanceEventStartTimeOutput{} + output := &ModifyInstanceCpuOptionsOutput{} out.Result = output var buff [1024]byte @@ -47920,7 +48015,7 @@ func (m *awsEc2query_deserializeOpModifyInstanceEventStartTime) HandleDeserializ } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyInstanceEventStartTimeOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyInstanceCpuOptionsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -47934,7 +48029,7 @@ func (m *awsEc2query_deserializeOpModifyInstanceEventStartTime) HandleDeserializ return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyInstanceEventStartTime(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyInstanceCpuOptions(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)} @@ -47967,14 +48062,14 @@ func awsEc2query_deserializeOpErrorModifyInstanceEventStartTime(response *smithy } } -type awsEc2query_deserializeOpModifyInstanceEventWindow struct { +type awsEc2query_deserializeOpModifyInstanceCreditSpecification struct { } -func (*awsEc2query_deserializeOpModifyInstanceEventWindow) ID() string { +func (*awsEc2query_deserializeOpModifyInstanceCreditSpecification) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyInstanceEventWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyInstanceCreditSpecification) 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) @@ -47992,9 +48087,9 @@ func (m *awsEc2query_deserializeOpModifyInstanceEventWindow) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceEventWindow(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceCreditSpecification(response, &metadata) } - output := &ModifyInstanceEventWindowOutput{} + output := &ModifyInstanceCreditSpecificationOutput{} out.Result = output var buff [1024]byte @@ -48015,7 +48110,7 @@ func (m *awsEc2query_deserializeOpModifyInstanceEventWindow) HandleDeserialize(c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyInstanceEventWindowOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyInstanceCreditSpecificationOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -48029,7 +48124,7 @@ func (m *awsEc2query_deserializeOpModifyInstanceEventWindow) HandleDeserialize(c return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyInstanceEventWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyInstanceCreditSpecification(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)} @@ -48062,14 +48157,14 @@ func awsEc2query_deserializeOpErrorModifyInstanceEventWindow(response *smithyhtt } } -type awsEc2query_deserializeOpModifyInstanceMaintenanceOptions struct { +type awsEc2query_deserializeOpModifyInstanceEventStartTime struct { } -func (*awsEc2query_deserializeOpModifyInstanceMaintenanceOptions) ID() string { +func (*awsEc2query_deserializeOpModifyInstanceEventStartTime) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyInstanceMaintenanceOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyInstanceEventStartTime) 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) @@ -48087,9 +48182,9 @@ func (m *awsEc2query_deserializeOpModifyInstanceMaintenanceOptions) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceMaintenanceOptions(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceEventStartTime(response, &metadata) } - output := &ModifyInstanceMaintenanceOptionsOutput{} + output := &ModifyInstanceEventStartTimeOutput{} out.Result = output var buff [1024]byte @@ -48110,7 +48205,7 @@ func (m *awsEc2query_deserializeOpModifyInstanceMaintenanceOptions) HandleDeseri } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyInstanceMaintenanceOptionsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyInstanceEventStartTimeOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -48124,7 +48219,7 @@ func (m *awsEc2query_deserializeOpModifyInstanceMaintenanceOptions) HandleDeseri return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyInstanceMaintenanceOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyInstanceEventStartTime(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)} @@ -48157,14 +48252,14 @@ func awsEc2query_deserializeOpErrorModifyInstanceMaintenanceOptions(response *sm } } -type awsEc2query_deserializeOpModifyInstanceMetadataDefaults struct { +type awsEc2query_deserializeOpModifyInstanceEventWindow struct { } -func (*awsEc2query_deserializeOpModifyInstanceMetadataDefaults) ID() string { +func (*awsEc2query_deserializeOpModifyInstanceEventWindow) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyInstanceMetadataDefaults) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyInstanceEventWindow) 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) @@ -48182,9 +48277,9 @@ func (m *awsEc2query_deserializeOpModifyInstanceMetadataDefaults) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceMetadataDefaults(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceEventWindow(response, &metadata) } - output := &ModifyInstanceMetadataDefaultsOutput{} + output := &ModifyInstanceEventWindowOutput{} out.Result = output var buff [1024]byte @@ -48205,7 +48300,7 @@ func (m *awsEc2query_deserializeOpModifyInstanceMetadataDefaults) HandleDeserial } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyInstanceMetadataDefaultsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyInstanceEventWindowOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -48219,7 +48314,7 @@ func (m *awsEc2query_deserializeOpModifyInstanceMetadataDefaults) HandleDeserial return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyInstanceMetadataDefaults(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyInstanceEventWindow(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)} @@ -48252,14 +48347,14 @@ func awsEc2query_deserializeOpErrorModifyInstanceMetadataDefaults(response *smit } } -type awsEc2query_deserializeOpModifyInstanceMetadataOptions struct { +type awsEc2query_deserializeOpModifyInstanceMaintenanceOptions struct { } -func (*awsEc2query_deserializeOpModifyInstanceMetadataOptions) ID() string { +func (*awsEc2query_deserializeOpModifyInstanceMaintenanceOptions) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyInstanceMetadataOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyInstanceMaintenanceOptions) 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) @@ -48277,9 +48372,9 @@ func (m *awsEc2query_deserializeOpModifyInstanceMetadataOptions) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceMetadataOptions(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceMaintenanceOptions(response, &metadata) } - output := &ModifyInstanceMetadataOptionsOutput{} + output := &ModifyInstanceMaintenanceOptionsOutput{} out.Result = output var buff [1024]byte @@ -48300,7 +48395,7 @@ func (m *awsEc2query_deserializeOpModifyInstanceMetadataOptions) HandleDeseriali } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyInstanceMetadataOptionsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyInstanceMaintenanceOptionsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -48314,7 +48409,7 @@ func (m *awsEc2query_deserializeOpModifyInstanceMetadataOptions) HandleDeseriali return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyInstanceMetadataOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyInstanceMaintenanceOptions(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)} @@ -48347,14 +48442,14 @@ func awsEc2query_deserializeOpErrorModifyInstanceMetadataOptions(response *smith } } -type awsEc2query_deserializeOpModifyInstancePlacement struct { +type awsEc2query_deserializeOpModifyInstanceMetadataDefaults struct { } -func (*awsEc2query_deserializeOpModifyInstancePlacement) ID() string { +func (*awsEc2query_deserializeOpModifyInstanceMetadataDefaults) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyInstancePlacement) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyInstanceMetadataDefaults) 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) @@ -48372,9 +48467,9 @@ func (m *awsEc2query_deserializeOpModifyInstancePlacement) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyInstancePlacement(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceMetadataDefaults(response, &metadata) } - output := &ModifyInstancePlacementOutput{} + output := &ModifyInstanceMetadataDefaultsOutput{} out.Result = output var buff [1024]byte @@ -48395,7 +48490,7 @@ func (m *awsEc2query_deserializeOpModifyInstancePlacement) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyInstancePlacementOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyInstanceMetadataDefaultsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -48409,7 +48504,7 @@ func (m *awsEc2query_deserializeOpModifyInstancePlacement) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyInstancePlacement(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyInstanceMetadataDefaults(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)} @@ -48442,14 +48537,14 @@ func awsEc2query_deserializeOpErrorModifyInstancePlacement(response *smithyhttp. } } -type awsEc2query_deserializeOpModifyIpam struct { +type awsEc2query_deserializeOpModifyInstanceMetadataOptions struct { } -func (*awsEc2query_deserializeOpModifyIpam) ID() string { +func (*awsEc2query_deserializeOpModifyInstanceMetadataOptions) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyIpam) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyInstanceMetadataOptions) 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) @@ -48467,9 +48562,9 @@ func (m *awsEc2query_deserializeOpModifyIpam) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyIpam(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceMetadataOptions(response, &metadata) } - output := &ModifyIpamOutput{} + output := &ModifyInstanceMetadataOptionsOutput{} out.Result = output var buff [1024]byte @@ -48490,7 +48585,7 @@ func (m *awsEc2query_deserializeOpModifyIpam) HandleDeserialize(ctx context.Cont } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyIpamOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyInstanceMetadataOptionsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -48504,7 +48599,7 @@ func (m *awsEc2query_deserializeOpModifyIpam) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyIpam(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyInstanceMetadataOptions(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)} @@ -48537,14 +48632,14 @@ func awsEc2query_deserializeOpErrorModifyIpam(response *smithyhttp.Response, met } } -type awsEc2query_deserializeOpModifyIpamPool struct { +type awsEc2query_deserializeOpModifyInstancePlacement struct { } -func (*awsEc2query_deserializeOpModifyIpamPool) ID() string { +func (*awsEc2query_deserializeOpModifyInstancePlacement) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyIpamPool) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyInstancePlacement) 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) @@ -48562,9 +48657,9 @@ func (m *awsEc2query_deserializeOpModifyIpamPool) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyIpamPool(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyInstancePlacement(response, &metadata) } - output := &ModifyIpamPoolOutput{} + output := &ModifyInstancePlacementOutput{} out.Result = output var buff [1024]byte @@ -48585,7 +48680,7 @@ func (m *awsEc2query_deserializeOpModifyIpamPool) HandleDeserialize(ctx context. } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyIpamPoolOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyInstancePlacementOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -48599,7 +48694,7 @@ func (m *awsEc2query_deserializeOpModifyIpamPool) HandleDeserialize(ctx context. return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyIpamPool(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyInstancePlacement(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)} @@ -48632,14 +48727,14 @@ func awsEc2query_deserializeOpErrorModifyIpamPool(response *smithyhttp.Response, } } -type awsEc2query_deserializeOpModifyIpamResourceCidr struct { +type awsEc2query_deserializeOpModifyIpam struct { } -func (*awsEc2query_deserializeOpModifyIpamResourceCidr) ID() string { +func (*awsEc2query_deserializeOpModifyIpam) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyIpamResourceCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyIpam) 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) @@ -48657,9 +48752,9 @@ func (m *awsEc2query_deserializeOpModifyIpamResourceCidr) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyIpamResourceCidr(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyIpam(response, &metadata) } - output := &ModifyIpamResourceCidrOutput{} + output := &ModifyIpamOutput{} out.Result = output var buff [1024]byte @@ -48680,7 +48775,7 @@ func (m *awsEc2query_deserializeOpModifyIpamResourceCidr) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyIpamResourceCidrOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyIpamOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -48694,7 +48789,7 @@ func (m *awsEc2query_deserializeOpModifyIpamResourceCidr) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyIpamResourceCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyIpam(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)} @@ -48727,14 +48822,14 @@ func awsEc2query_deserializeOpErrorModifyIpamResourceCidr(response *smithyhttp.R } } -type awsEc2query_deserializeOpModifyIpamResourceDiscovery struct { +type awsEc2query_deserializeOpModifyIpamPool struct { } -func (*awsEc2query_deserializeOpModifyIpamResourceDiscovery) ID() string { +func (*awsEc2query_deserializeOpModifyIpamPool) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyIpamResourceDiscovery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyIpamPool) 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) @@ -48752,9 +48847,9 @@ func (m *awsEc2query_deserializeOpModifyIpamResourceDiscovery) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyIpamResourceDiscovery(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyIpamPool(response, &metadata) } - output := &ModifyIpamResourceDiscoveryOutput{} + output := &ModifyIpamPoolOutput{} out.Result = output var buff [1024]byte @@ -48775,7 +48870,7 @@ func (m *awsEc2query_deserializeOpModifyIpamResourceDiscovery) HandleDeserialize } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyIpamResourceDiscoveryOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyIpamPoolOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -48789,7 +48884,7 @@ func (m *awsEc2query_deserializeOpModifyIpamResourceDiscovery) HandleDeserialize return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyIpamResourceDiscovery(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyIpamPool(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)} @@ -48822,14 +48917,14 @@ func awsEc2query_deserializeOpErrorModifyIpamResourceDiscovery(response *smithyh } } -type awsEc2query_deserializeOpModifyIpamScope struct { +type awsEc2query_deserializeOpModifyIpamResourceCidr struct { } -func (*awsEc2query_deserializeOpModifyIpamScope) ID() string { +func (*awsEc2query_deserializeOpModifyIpamResourceCidr) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyIpamScope) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyIpamResourceCidr) 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) @@ -48847,9 +48942,9 @@ func (m *awsEc2query_deserializeOpModifyIpamScope) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyIpamScope(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyIpamResourceCidr(response, &metadata) } - output := &ModifyIpamScopeOutput{} + output := &ModifyIpamResourceCidrOutput{} out.Result = output var buff [1024]byte @@ -48870,7 +48965,7 @@ func (m *awsEc2query_deserializeOpModifyIpamScope) HandleDeserialize(ctx context } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyIpamScopeOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyIpamResourceCidrOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -48884,7 +48979,7 @@ func (m *awsEc2query_deserializeOpModifyIpamScope) HandleDeserialize(ctx context return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyIpamScope(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyIpamResourceCidr(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)} @@ -48917,14 +49012,14 @@ func awsEc2query_deserializeOpErrorModifyIpamScope(response *smithyhttp.Response } } -type awsEc2query_deserializeOpModifyLaunchTemplate struct { +type awsEc2query_deserializeOpModifyIpamResourceDiscovery struct { } -func (*awsEc2query_deserializeOpModifyLaunchTemplate) ID() string { +func (*awsEc2query_deserializeOpModifyIpamResourceDiscovery) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyLaunchTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyIpamResourceDiscovery) 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) @@ -48942,9 +49037,9 @@ func (m *awsEc2query_deserializeOpModifyLaunchTemplate) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyLaunchTemplate(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyIpamResourceDiscovery(response, &metadata) } - output := &ModifyLaunchTemplateOutput{} + output := &ModifyIpamResourceDiscoveryOutput{} out.Result = output var buff [1024]byte @@ -48965,7 +49060,7 @@ func (m *awsEc2query_deserializeOpModifyLaunchTemplate) HandleDeserialize(ctx co } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyLaunchTemplateOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyIpamResourceDiscoveryOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -48979,7 +49074,7 @@ func (m *awsEc2query_deserializeOpModifyLaunchTemplate) HandleDeserialize(ctx co return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyLaunchTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyIpamResourceDiscovery(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)} @@ -49012,14 +49107,14 @@ func awsEc2query_deserializeOpErrorModifyLaunchTemplate(response *smithyhttp.Res } } -type awsEc2query_deserializeOpModifyLocalGatewayRoute struct { +type awsEc2query_deserializeOpModifyIpamScope struct { } -func (*awsEc2query_deserializeOpModifyLocalGatewayRoute) ID() string { +func (*awsEc2query_deserializeOpModifyIpamScope) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyLocalGatewayRoute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyIpamScope) 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) @@ -49037,9 +49132,9 @@ func (m *awsEc2query_deserializeOpModifyLocalGatewayRoute) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyLocalGatewayRoute(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyIpamScope(response, &metadata) } - output := &ModifyLocalGatewayRouteOutput{} + output := &ModifyIpamScopeOutput{} out.Result = output var buff [1024]byte @@ -49060,7 +49155,7 @@ func (m *awsEc2query_deserializeOpModifyLocalGatewayRoute) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyLocalGatewayRouteOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyIpamScopeOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -49074,7 +49169,7 @@ func (m *awsEc2query_deserializeOpModifyLocalGatewayRoute) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyLocalGatewayRoute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyIpamScope(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)} @@ -49107,14 +49202,14 @@ func awsEc2query_deserializeOpErrorModifyLocalGatewayRoute(response *smithyhttp. } } -type awsEc2query_deserializeOpModifyManagedPrefixList struct { +type awsEc2query_deserializeOpModifyLaunchTemplate struct { } -func (*awsEc2query_deserializeOpModifyManagedPrefixList) ID() string { +func (*awsEc2query_deserializeOpModifyLaunchTemplate) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyManagedPrefixList) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyLaunchTemplate) 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) @@ -49132,9 +49227,9 @@ func (m *awsEc2query_deserializeOpModifyManagedPrefixList) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyManagedPrefixList(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyLaunchTemplate(response, &metadata) } - output := &ModifyManagedPrefixListOutput{} + output := &ModifyLaunchTemplateOutput{} out.Result = output var buff [1024]byte @@ -49155,7 +49250,7 @@ func (m *awsEc2query_deserializeOpModifyManagedPrefixList) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyManagedPrefixListOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyLaunchTemplateOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -49169,79 +49264,7 @@ func (m *awsEc2query_deserializeOpModifyManagedPrefixList) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyManagedPrefixList(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 - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyNetworkInterfaceAttribute struct { -} - -func (*awsEc2query_deserializeOpModifyNetworkInterfaceAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyNetworkInterfaceAttribute) 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 - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - 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, awsEc2query_deserializeOpErrorModifyNetworkInterfaceAttribute(response, &metadata) - } - output := &ModifyNetworkInterfaceAttributeOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyNetworkInterfaceAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyLaunchTemplate(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)} @@ -49274,14 +49297,14 @@ func awsEc2query_deserializeOpErrorModifyNetworkInterfaceAttribute(response *smi } } -type awsEc2query_deserializeOpModifyPrivateDnsNameOptions struct { +type awsEc2query_deserializeOpModifyLocalGatewayRoute struct { } -func (*awsEc2query_deserializeOpModifyPrivateDnsNameOptions) ID() string { +func (*awsEc2query_deserializeOpModifyLocalGatewayRoute) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyPrivateDnsNameOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyLocalGatewayRoute) 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) @@ -49299,9 +49322,9 @@ func (m *awsEc2query_deserializeOpModifyPrivateDnsNameOptions) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyPrivateDnsNameOptions(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyLocalGatewayRoute(response, &metadata) } - output := &ModifyPrivateDnsNameOptionsOutput{} + output := &ModifyLocalGatewayRouteOutput{} out.Result = output var buff [1024]byte @@ -49322,7 +49345,7 @@ func (m *awsEc2query_deserializeOpModifyPrivateDnsNameOptions) HandleDeserialize } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyPrivateDnsNameOptionsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyLocalGatewayRouteOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -49336,7 +49359,7 @@ func (m *awsEc2query_deserializeOpModifyPrivateDnsNameOptions) HandleDeserialize return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyPrivateDnsNameOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyLocalGatewayRoute(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)} @@ -49369,14 +49392,14 @@ func awsEc2query_deserializeOpErrorModifyPrivateDnsNameOptions(response *smithyh } } -type awsEc2query_deserializeOpModifyReservedInstances struct { +type awsEc2query_deserializeOpModifyManagedPrefixList struct { } -func (*awsEc2query_deserializeOpModifyReservedInstances) ID() string { +func (*awsEc2query_deserializeOpModifyManagedPrefixList) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyReservedInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyManagedPrefixList) 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) @@ -49394,9 +49417,9 @@ func (m *awsEc2query_deserializeOpModifyReservedInstances) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyReservedInstances(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyManagedPrefixList(response, &metadata) } - output := &ModifyReservedInstancesOutput{} + output := &ModifyManagedPrefixListOutput{} out.Result = output var buff [1024]byte @@ -49417,7 +49440,7 @@ func (m *awsEc2query_deserializeOpModifyReservedInstances) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyReservedInstancesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyManagedPrefixListOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -49431,7 +49454,7 @@ func (m *awsEc2query_deserializeOpModifyReservedInstances) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyReservedInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyManagedPrefixList(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)} @@ -49464,14 +49487,14 @@ func awsEc2query_deserializeOpErrorModifyReservedInstances(response *smithyhttp. } } -type awsEc2query_deserializeOpModifySecurityGroupRules struct { +type awsEc2query_deserializeOpModifyNetworkInterfaceAttribute struct { } -func (*awsEc2query_deserializeOpModifySecurityGroupRules) ID() string { +func (*awsEc2query_deserializeOpModifyNetworkInterfaceAttribute) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifySecurityGroupRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyNetworkInterfaceAttribute) 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) @@ -49489,44 +49512,21 @@ func (m *awsEc2query_deserializeOpModifySecurityGroupRules) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifySecurityGroupRules(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyNetworkInterfaceAttribute(response, &metadata) } - output := &ModifySecurityGroupRulesOutput{} + output := &ModifyNetworkInterfaceAttributeOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifySecurityGroupRulesOutput(&output, 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(), + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorModifySecurityGroupRules(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyNetworkInterfaceAttribute(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)} @@ -49559,14 +49559,14 @@ func awsEc2query_deserializeOpErrorModifySecurityGroupRules(response *smithyhttp } } -type awsEc2query_deserializeOpModifySnapshotAttribute struct { +type awsEc2query_deserializeOpModifyPrivateDnsNameOptions struct { } -func (*awsEc2query_deserializeOpModifySnapshotAttribute) ID() string { +func (*awsEc2query_deserializeOpModifyPrivateDnsNameOptions) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifySnapshotAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyPrivateDnsNameOptions) 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) @@ -49584,21 +49584,44 @@ func (m *awsEc2query_deserializeOpModifySnapshotAttribute) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifySnapshotAttribute(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyPrivateDnsNameOptions(response, &metadata) } - output := &ModifySnapshotAttributeOutput{} + output := &ModifyPrivateDnsNameOptionsOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } } + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentModifyPrivateDnsNameOptionsOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + return out, metadata, err } -func awsEc2query_deserializeOpErrorModifySnapshotAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyPrivateDnsNameOptions(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)} @@ -49631,14 +49654,14 @@ func awsEc2query_deserializeOpErrorModifySnapshotAttribute(response *smithyhttp. } } -type awsEc2query_deserializeOpModifySnapshotTier struct { +type awsEc2query_deserializeOpModifyReservedInstances struct { } -func (*awsEc2query_deserializeOpModifySnapshotTier) ID() string { +func (*awsEc2query_deserializeOpModifyReservedInstances) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifySnapshotTier) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyReservedInstances) 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) @@ -49656,9 +49679,9 @@ func (m *awsEc2query_deserializeOpModifySnapshotTier) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifySnapshotTier(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyReservedInstances(response, &metadata) } - output := &ModifySnapshotTierOutput{} + output := &ModifyReservedInstancesOutput{} out.Result = output var buff [1024]byte @@ -49679,7 +49702,7 @@ func (m *awsEc2query_deserializeOpModifySnapshotTier) HandleDeserialize(ctx cont } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifySnapshotTierOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyReservedInstancesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -49693,7 +49716,7 @@ func (m *awsEc2query_deserializeOpModifySnapshotTier) HandleDeserialize(ctx cont return out, metadata, err } -func awsEc2query_deserializeOpErrorModifySnapshotTier(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyReservedInstances(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)} @@ -49726,14 +49749,14 @@ func awsEc2query_deserializeOpErrorModifySnapshotTier(response *smithyhttp.Respo } } -type awsEc2query_deserializeOpModifySpotFleetRequest struct { +type awsEc2query_deserializeOpModifySecurityGroupRules struct { } -func (*awsEc2query_deserializeOpModifySpotFleetRequest) ID() string { +func (*awsEc2query_deserializeOpModifySecurityGroupRules) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifySpotFleetRequest) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifySecurityGroupRules) 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) @@ -49751,9 +49774,9 @@ func (m *awsEc2query_deserializeOpModifySpotFleetRequest) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifySpotFleetRequest(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifySecurityGroupRules(response, &metadata) } - output := &ModifySpotFleetRequestOutput{} + output := &ModifySecurityGroupRulesOutput{} out.Result = output var buff [1024]byte @@ -49774,7 +49797,7 @@ func (m *awsEc2query_deserializeOpModifySpotFleetRequest) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifySpotFleetRequestOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifySecurityGroupRulesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -49788,7 +49811,7 @@ func (m *awsEc2query_deserializeOpModifySpotFleetRequest) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorModifySpotFleetRequest(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifySecurityGroupRules(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)} @@ -49821,14 +49844,14 @@ func awsEc2query_deserializeOpErrorModifySpotFleetRequest(response *smithyhttp.R } } -type awsEc2query_deserializeOpModifySubnetAttribute struct { +type awsEc2query_deserializeOpModifySnapshotAttribute struct { } -func (*awsEc2query_deserializeOpModifySubnetAttribute) ID() string { +func (*awsEc2query_deserializeOpModifySnapshotAttribute) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifySubnetAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifySnapshotAttribute) 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) @@ -49846,9 +49869,9 @@ func (m *awsEc2query_deserializeOpModifySubnetAttribute) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifySubnetAttribute(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifySnapshotAttribute(response, &metadata) } - output := &ModifySubnetAttributeOutput{} + output := &ModifySnapshotAttributeOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -49860,7 +49883,7 @@ func (m *awsEc2query_deserializeOpModifySubnetAttribute) HandleDeserialize(ctx c return out, metadata, err } -func awsEc2query_deserializeOpErrorModifySubnetAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifySnapshotAttribute(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)} @@ -49893,14 +49916,14 @@ func awsEc2query_deserializeOpErrorModifySubnetAttribute(response *smithyhttp.Re } } -type awsEc2query_deserializeOpModifyTrafficMirrorFilterNetworkServices struct { +type awsEc2query_deserializeOpModifySnapshotTier struct { } -func (*awsEc2query_deserializeOpModifyTrafficMirrorFilterNetworkServices) ID() string { +func (*awsEc2query_deserializeOpModifySnapshotTier) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyTrafficMirrorFilterNetworkServices) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifySnapshotTier) 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) @@ -49918,9 +49941,9 @@ func (m *awsEc2query_deserializeOpModifyTrafficMirrorFilterNetworkServices) Hand } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyTrafficMirrorFilterNetworkServices(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifySnapshotTier(response, &metadata) } - output := &ModifyTrafficMirrorFilterNetworkServicesOutput{} + output := &ModifySnapshotTierOutput{} out.Result = output var buff [1024]byte @@ -49941,7 +49964,7 @@ func (m *awsEc2query_deserializeOpModifyTrafficMirrorFilterNetworkServices) Hand } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyTrafficMirrorFilterNetworkServicesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifySnapshotTierOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -49955,7 +49978,7 @@ func (m *awsEc2query_deserializeOpModifyTrafficMirrorFilterNetworkServices) Hand return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyTrafficMirrorFilterNetworkServices(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifySnapshotTier(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)} @@ -49988,14 +50011,14 @@ func awsEc2query_deserializeOpErrorModifyTrafficMirrorFilterNetworkServices(resp } } -type awsEc2query_deserializeOpModifyTrafficMirrorFilterRule struct { +type awsEc2query_deserializeOpModifySpotFleetRequest struct { } -func (*awsEc2query_deserializeOpModifyTrafficMirrorFilterRule) ID() string { +func (*awsEc2query_deserializeOpModifySpotFleetRequest) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyTrafficMirrorFilterRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifySpotFleetRequest) 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) @@ -50013,9 +50036,9 @@ func (m *awsEc2query_deserializeOpModifyTrafficMirrorFilterRule) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyTrafficMirrorFilterRule(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifySpotFleetRequest(response, &metadata) } - output := &ModifyTrafficMirrorFilterRuleOutput{} + output := &ModifySpotFleetRequestOutput{} out.Result = output var buff [1024]byte @@ -50036,7 +50059,7 @@ func (m *awsEc2query_deserializeOpModifyTrafficMirrorFilterRule) HandleDeseriali } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyTrafficMirrorFilterRuleOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifySpotFleetRequestOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -50050,7 +50073,7 @@ func (m *awsEc2query_deserializeOpModifyTrafficMirrorFilterRule) HandleDeseriali return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyTrafficMirrorFilterRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifySpotFleetRequest(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)} @@ -50083,14 +50106,14 @@ func awsEc2query_deserializeOpErrorModifyTrafficMirrorFilterRule(response *smith } } -type awsEc2query_deserializeOpModifyTrafficMirrorSession struct { +type awsEc2query_deserializeOpModifySubnetAttribute struct { } -func (*awsEc2query_deserializeOpModifyTrafficMirrorSession) ID() string { +func (*awsEc2query_deserializeOpModifySubnetAttribute) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyTrafficMirrorSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifySubnetAttribute) 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) @@ -50108,44 +50131,21 @@ func (m *awsEc2query_deserializeOpModifyTrafficMirrorSession) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyTrafficMirrorSession(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifySubnetAttribute(response, &metadata) } - output := &ModifyTrafficMirrorSessionOutput{} + output := &ModifySubnetAttributeOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyTrafficMirrorSessionOutput(&output, 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(), + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyTrafficMirrorSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifySubnetAttribute(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)} @@ -50178,14 +50178,14 @@ func awsEc2query_deserializeOpErrorModifyTrafficMirrorSession(response *smithyht } } -type awsEc2query_deserializeOpModifyTransitGateway struct { +type awsEc2query_deserializeOpModifyTrafficMirrorFilterNetworkServices struct { } -func (*awsEc2query_deserializeOpModifyTransitGateway) ID() string { +func (*awsEc2query_deserializeOpModifyTrafficMirrorFilterNetworkServices) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyTransitGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyTrafficMirrorFilterNetworkServices) 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) @@ -50203,9 +50203,9 @@ func (m *awsEc2query_deserializeOpModifyTransitGateway) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyTransitGateway(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyTrafficMirrorFilterNetworkServices(response, &metadata) } - output := &ModifyTransitGatewayOutput{} + output := &ModifyTrafficMirrorFilterNetworkServicesOutput{} out.Result = output var buff [1024]byte @@ -50226,7 +50226,7 @@ func (m *awsEc2query_deserializeOpModifyTransitGateway) HandleDeserialize(ctx co } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyTransitGatewayOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyTrafficMirrorFilterNetworkServicesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -50240,7 +50240,7 @@ func (m *awsEc2query_deserializeOpModifyTransitGateway) HandleDeserialize(ctx co return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyTransitGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyTrafficMirrorFilterNetworkServices(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)} @@ -50273,14 +50273,14 @@ func awsEc2query_deserializeOpErrorModifyTransitGateway(response *smithyhttp.Res } } -type awsEc2query_deserializeOpModifyTransitGatewayPrefixListReference struct { +type awsEc2query_deserializeOpModifyTrafficMirrorFilterRule struct { } -func (*awsEc2query_deserializeOpModifyTransitGatewayPrefixListReference) ID() string { +func (*awsEc2query_deserializeOpModifyTrafficMirrorFilterRule) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyTransitGatewayPrefixListReference) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyTrafficMirrorFilterRule) 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) @@ -50298,9 +50298,9 @@ func (m *awsEc2query_deserializeOpModifyTransitGatewayPrefixListReference) Handl } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyTransitGatewayPrefixListReference(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyTrafficMirrorFilterRule(response, &metadata) } - output := &ModifyTransitGatewayPrefixListReferenceOutput{} + output := &ModifyTrafficMirrorFilterRuleOutput{} out.Result = output var buff [1024]byte @@ -50321,7 +50321,7 @@ func (m *awsEc2query_deserializeOpModifyTransitGatewayPrefixListReference) Handl } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyTransitGatewayPrefixListReferenceOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyTrafficMirrorFilterRuleOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -50335,7 +50335,7 @@ func (m *awsEc2query_deserializeOpModifyTransitGatewayPrefixListReference) Handl return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyTransitGatewayPrefixListReference(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyTrafficMirrorFilterRule(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)} @@ -50368,14 +50368,14 @@ func awsEc2query_deserializeOpErrorModifyTransitGatewayPrefixListReference(respo } } -type awsEc2query_deserializeOpModifyTransitGatewayVpcAttachment struct { +type awsEc2query_deserializeOpModifyTrafficMirrorSession struct { } -func (*awsEc2query_deserializeOpModifyTransitGatewayVpcAttachment) ID() string { +func (*awsEc2query_deserializeOpModifyTrafficMirrorSession) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyTransitGatewayVpcAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyTrafficMirrorSession) 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) @@ -50393,9 +50393,9 @@ func (m *awsEc2query_deserializeOpModifyTransitGatewayVpcAttachment) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyTransitGatewayVpcAttachment(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyTrafficMirrorSession(response, &metadata) } - output := &ModifyTransitGatewayVpcAttachmentOutput{} + output := &ModifyTrafficMirrorSessionOutput{} out.Result = output var buff [1024]byte @@ -50416,7 +50416,7 @@ func (m *awsEc2query_deserializeOpModifyTransitGatewayVpcAttachment) HandleDeser } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyTransitGatewayVpcAttachmentOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyTrafficMirrorSessionOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -50430,7 +50430,7 @@ func (m *awsEc2query_deserializeOpModifyTransitGatewayVpcAttachment) HandleDeser return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyTransitGatewayVpcAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyTrafficMirrorSession(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)} @@ -50463,14 +50463,14 @@ func awsEc2query_deserializeOpErrorModifyTransitGatewayVpcAttachment(response *s } } -type awsEc2query_deserializeOpModifyVerifiedAccessEndpoint struct { +type awsEc2query_deserializeOpModifyTransitGateway struct { } -func (*awsEc2query_deserializeOpModifyVerifiedAccessEndpoint) ID() string { +func (*awsEc2query_deserializeOpModifyTransitGateway) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVerifiedAccessEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyTransitGateway) 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) @@ -50488,9 +50488,9 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessEndpoint) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessEndpoint(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyTransitGateway(response, &metadata) } - output := &ModifyVerifiedAccessEndpointOutput{} + output := &ModifyTransitGatewayOutput{} out.Result = output var buff [1024]byte @@ -50511,7 +50511,7 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessEndpoint) HandleDeserializ } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessEndpointOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyTransitGatewayOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -50525,7 +50525,7 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessEndpoint) HandleDeserializ return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVerifiedAccessEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyTransitGateway(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)} @@ -50558,14 +50558,14 @@ func awsEc2query_deserializeOpErrorModifyVerifiedAccessEndpoint(response *smithy } } -type awsEc2query_deserializeOpModifyVerifiedAccessEndpointPolicy struct { +type awsEc2query_deserializeOpModifyTransitGatewayPrefixListReference struct { } -func (*awsEc2query_deserializeOpModifyVerifiedAccessEndpointPolicy) ID() string { +func (*awsEc2query_deserializeOpModifyTransitGatewayPrefixListReference) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVerifiedAccessEndpointPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyTransitGatewayPrefixListReference) 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) @@ -50583,9 +50583,9 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessEndpointPolicy) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessEndpointPolicy(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyTransitGatewayPrefixListReference(response, &metadata) } - output := &ModifyVerifiedAccessEndpointPolicyOutput{} + output := &ModifyTransitGatewayPrefixListReferenceOutput{} out.Result = output var buff [1024]byte @@ -50606,7 +50606,7 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessEndpointPolicy) HandleDese } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessEndpointPolicyOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyTransitGatewayPrefixListReferenceOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -50620,7 +50620,7 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessEndpointPolicy) HandleDese return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVerifiedAccessEndpointPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyTransitGatewayPrefixListReference(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)} @@ -50653,14 +50653,14 @@ func awsEc2query_deserializeOpErrorModifyVerifiedAccessEndpointPolicy(response * } } -type awsEc2query_deserializeOpModifyVerifiedAccessGroup struct { +type awsEc2query_deserializeOpModifyTransitGatewayVpcAttachment struct { } -func (*awsEc2query_deserializeOpModifyVerifiedAccessGroup) ID() string { +func (*awsEc2query_deserializeOpModifyTransitGatewayVpcAttachment) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVerifiedAccessGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyTransitGatewayVpcAttachment) 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) @@ -50678,9 +50678,9 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessGroup) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessGroup(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyTransitGatewayVpcAttachment(response, &metadata) } - output := &ModifyVerifiedAccessGroupOutput{} + output := &ModifyTransitGatewayVpcAttachmentOutput{} out.Result = output var buff [1024]byte @@ -50701,7 +50701,7 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessGroup) HandleDeserialize(c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessGroupOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyTransitGatewayVpcAttachmentOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -50715,7 +50715,7 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessGroup) HandleDeserialize(c return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVerifiedAccessGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyTransitGatewayVpcAttachment(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)} @@ -50748,14 +50748,14 @@ func awsEc2query_deserializeOpErrorModifyVerifiedAccessGroup(response *smithyhtt } } -type awsEc2query_deserializeOpModifyVerifiedAccessGroupPolicy struct { +type awsEc2query_deserializeOpModifyVerifiedAccessEndpoint struct { } -func (*awsEc2query_deserializeOpModifyVerifiedAccessGroupPolicy) ID() string { +func (*awsEc2query_deserializeOpModifyVerifiedAccessEndpoint) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVerifiedAccessGroupPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVerifiedAccessEndpoint) 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) @@ -50773,9 +50773,9 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessGroupPolicy) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessGroupPolicy(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessEndpoint(response, &metadata) } - output := &ModifyVerifiedAccessGroupPolicyOutput{} + output := &ModifyVerifiedAccessEndpointOutput{} out.Result = output var buff [1024]byte @@ -50796,7 +50796,7 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessGroupPolicy) HandleDeseria } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessGroupPolicyOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessEndpointOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -50810,7 +50810,7 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessGroupPolicy) HandleDeseria return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVerifiedAccessGroupPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVerifiedAccessEndpoint(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)} @@ -50843,14 +50843,14 @@ func awsEc2query_deserializeOpErrorModifyVerifiedAccessGroupPolicy(response *smi } } -type awsEc2query_deserializeOpModifyVerifiedAccessInstance struct { +type awsEc2query_deserializeOpModifyVerifiedAccessEndpointPolicy struct { } -func (*awsEc2query_deserializeOpModifyVerifiedAccessInstance) ID() string { +func (*awsEc2query_deserializeOpModifyVerifiedAccessEndpointPolicy) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVerifiedAccessInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVerifiedAccessEndpointPolicy) 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) @@ -50868,9 +50868,9 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessInstance) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessInstance(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessEndpointPolicy(response, &metadata) } - output := &ModifyVerifiedAccessInstanceOutput{} + output := &ModifyVerifiedAccessEndpointPolicyOutput{} out.Result = output var buff [1024]byte @@ -50891,7 +50891,7 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessInstance) HandleDeserializ } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessInstanceOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessEndpointPolicyOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -50905,7 +50905,7 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessInstance) HandleDeserializ return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVerifiedAccessInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVerifiedAccessEndpointPolicy(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)} @@ -50938,14 +50938,14 @@ func awsEc2query_deserializeOpErrorModifyVerifiedAccessInstance(response *smithy } } -type awsEc2query_deserializeOpModifyVerifiedAccessInstanceLoggingConfiguration struct { +type awsEc2query_deserializeOpModifyVerifiedAccessGroup struct { } -func (*awsEc2query_deserializeOpModifyVerifiedAccessInstanceLoggingConfiguration) ID() string { +func (*awsEc2query_deserializeOpModifyVerifiedAccessGroup) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVerifiedAccessInstanceLoggingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVerifiedAccessGroup) 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) @@ -50963,9 +50963,9 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessInstanceLoggingConfigurati } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessInstanceLoggingConfiguration(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessGroup(response, &metadata) } - output := &ModifyVerifiedAccessInstanceLoggingConfigurationOutput{} + output := &ModifyVerifiedAccessGroupOutput{} out.Result = output var buff [1024]byte @@ -50986,7 +50986,7 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessInstanceLoggingConfigurati } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessInstanceLoggingConfigurationOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessGroupOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -51000,7 +51000,7 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessInstanceLoggingConfigurati return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVerifiedAccessInstanceLoggingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVerifiedAccessGroup(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)} @@ -51033,14 +51033,14 @@ func awsEc2query_deserializeOpErrorModifyVerifiedAccessInstanceLoggingConfigurat } } -type awsEc2query_deserializeOpModifyVerifiedAccessTrustProvider struct { +type awsEc2query_deserializeOpModifyVerifiedAccessGroupPolicy struct { } -func (*awsEc2query_deserializeOpModifyVerifiedAccessTrustProvider) ID() string { +func (*awsEc2query_deserializeOpModifyVerifiedAccessGroupPolicy) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVerifiedAccessTrustProvider) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVerifiedAccessGroupPolicy) 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) @@ -51058,9 +51058,9 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessTrustProvider) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessTrustProvider(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessGroupPolicy(response, &metadata) } - output := &ModifyVerifiedAccessTrustProviderOutput{} + output := &ModifyVerifiedAccessGroupPolicyOutput{} out.Result = output var buff [1024]byte @@ -51081,7 +51081,7 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessTrustProvider) HandleDeser } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessTrustProviderOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessGroupPolicyOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -51095,7 +51095,7 @@ func (m *awsEc2query_deserializeOpModifyVerifiedAccessTrustProvider) HandleDeser return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVerifiedAccessTrustProvider(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVerifiedAccessGroupPolicy(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)} @@ -51128,14 +51128,14 @@ func awsEc2query_deserializeOpErrorModifyVerifiedAccessTrustProvider(response *s } } -type awsEc2query_deserializeOpModifyVolume struct { +type awsEc2query_deserializeOpModifyVerifiedAccessInstance struct { } -func (*awsEc2query_deserializeOpModifyVolume) ID() string { +func (*awsEc2query_deserializeOpModifyVerifiedAccessInstance) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVolume) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVerifiedAccessInstance) 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) @@ -51153,9 +51153,9 @@ func (m *awsEc2query_deserializeOpModifyVolume) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVolume(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessInstance(response, &metadata) } - output := &ModifyVolumeOutput{} + output := &ModifyVerifiedAccessInstanceOutput{} out.Result = output var buff [1024]byte @@ -51176,7 +51176,7 @@ func (m *awsEc2query_deserializeOpModifyVolume) HandleDeserialize(ctx context.Co } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVolumeOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessInstanceOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -51190,7 +51190,7 @@ func (m *awsEc2query_deserializeOpModifyVolume) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVolume(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVerifiedAccessInstance(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)} @@ -51223,14 +51223,14 @@ func awsEc2query_deserializeOpErrorModifyVolume(response *smithyhttp.Response, m } } -type awsEc2query_deserializeOpModifyVolumeAttribute struct { +type awsEc2query_deserializeOpModifyVerifiedAccessInstanceLoggingConfiguration struct { } -func (*awsEc2query_deserializeOpModifyVolumeAttribute) ID() string { +func (*awsEc2query_deserializeOpModifyVerifiedAccessInstanceLoggingConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVolumeAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVerifiedAccessInstanceLoggingConfiguration) 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) @@ -51248,21 +51248,44 @@ func (m *awsEc2query_deserializeOpModifyVolumeAttribute) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVolumeAttribute(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessInstanceLoggingConfiguration(response, &metadata) } - output := &ModifyVolumeAttributeOutput{} + output := &ModifyVerifiedAccessInstanceLoggingConfigurationOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessInstanceLoggingConfigurationOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } + return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVolumeAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVerifiedAccessInstanceLoggingConfiguration(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)} @@ -51295,14 +51318,14 @@ func awsEc2query_deserializeOpErrorModifyVolumeAttribute(response *smithyhttp.Re } } -type awsEc2query_deserializeOpModifyVpcAttribute struct { +type awsEc2query_deserializeOpModifyVerifiedAccessTrustProvider struct { } -func (*awsEc2query_deserializeOpModifyVpcAttribute) ID() string { +func (*awsEc2query_deserializeOpModifyVerifiedAccessTrustProvider) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVpcAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVerifiedAccessTrustProvider) 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) @@ -51320,21 +51343,44 @@ func (m *awsEc2query_deserializeOpModifyVpcAttribute) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpcAttribute(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessTrustProvider(response, &metadata) } - output := &ModifyVpcAttributeOutput{} + output := &ModifyVerifiedAccessTrustProviderOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } } + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessTrustProviderOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVpcAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVerifiedAccessTrustProvider(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)} @@ -51367,14 +51413,14 @@ func awsEc2query_deserializeOpErrorModifyVpcAttribute(response *smithyhttp.Respo } } -type awsEc2query_deserializeOpModifyVpcEndpoint struct { +type awsEc2query_deserializeOpModifyVolume struct { } -func (*awsEc2query_deserializeOpModifyVpcEndpoint) ID() string { +func (*awsEc2query_deserializeOpModifyVolume) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVpcEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVolume) 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) @@ -51392,9 +51438,9 @@ func (m *awsEc2query_deserializeOpModifyVpcEndpoint) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpcEndpoint(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVolume(response, &metadata) } - output := &ModifyVpcEndpointOutput{} + output := &ModifyVolumeOutput{} out.Result = output var buff [1024]byte @@ -51415,7 +51461,7 @@ func (m *awsEc2query_deserializeOpModifyVpcEndpoint) HandleDeserialize(ctx conte } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpcEndpointOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyVolumeOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -51429,7 +51475,7 @@ func (m *awsEc2query_deserializeOpModifyVpcEndpoint) HandleDeserialize(ctx conte return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVpcEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVolume(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)} @@ -51462,14 +51508,14 @@ func awsEc2query_deserializeOpErrorModifyVpcEndpoint(response *smithyhttp.Respon } } -type awsEc2query_deserializeOpModifyVpcEndpointConnectionNotification struct { +type awsEc2query_deserializeOpModifyVolumeAttribute struct { } -func (*awsEc2query_deserializeOpModifyVpcEndpointConnectionNotification) ID() string { +func (*awsEc2query_deserializeOpModifyVolumeAttribute) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVpcEndpointConnectionNotification) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVolumeAttribute) 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) @@ -51487,44 +51533,21 @@ func (m *awsEc2query_deserializeOpModifyVpcEndpointConnectionNotification) Handl } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpcEndpointConnectionNotification(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVolumeAttribute(response, &metadata) } - output := &ModifyVpcEndpointConnectionNotificationOutput{} + output := &ModifyVolumeAttributeOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpcEndpointConnectionNotificationOutput(&output, 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(), + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVpcEndpointConnectionNotification(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVolumeAttribute(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)} @@ -51557,14 +51580,14 @@ func awsEc2query_deserializeOpErrorModifyVpcEndpointConnectionNotification(respo } } -type awsEc2query_deserializeOpModifyVpcEndpointServiceConfiguration struct { +type awsEc2query_deserializeOpModifyVpcAttribute struct { } -func (*awsEc2query_deserializeOpModifyVpcEndpointServiceConfiguration) ID() string { +func (*awsEc2query_deserializeOpModifyVpcAttribute) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVpcEndpointServiceConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVpcAttribute) 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) @@ -51582,44 +51605,21 @@ func (m *awsEc2query_deserializeOpModifyVpcEndpointServiceConfiguration) HandleD } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpcEndpointServiceConfiguration(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVpcAttribute(response, &metadata) } - output := &ModifyVpcEndpointServiceConfigurationOutput{} + output := &ModifyVpcAttributeOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpcEndpointServiceConfigurationOutput(&output, 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(), + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVpcEndpointServiceConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVpcAttribute(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)} @@ -51652,14 +51652,14 @@ func awsEc2query_deserializeOpErrorModifyVpcEndpointServiceConfiguration(respons } } -type awsEc2query_deserializeOpModifyVpcEndpointServicePayerResponsibility struct { +type awsEc2query_deserializeOpModifyVpcEndpoint struct { } -func (*awsEc2query_deserializeOpModifyVpcEndpointServicePayerResponsibility) ID() string { +func (*awsEc2query_deserializeOpModifyVpcEndpoint) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVpcEndpointServicePayerResponsibility) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVpcEndpoint) 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) @@ -51677,9 +51677,9 @@ func (m *awsEc2query_deserializeOpModifyVpcEndpointServicePayerResponsibility) H } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpcEndpointServicePayerResponsibility(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVpcEndpoint(response, &metadata) } - output := &ModifyVpcEndpointServicePayerResponsibilityOutput{} + output := &ModifyVpcEndpointOutput{} out.Result = output var buff [1024]byte @@ -51700,7 +51700,7 @@ func (m *awsEc2query_deserializeOpModifyVpcEndpointServicePayerResponsibility) H } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpcEndpointServicePayerResponsibilityOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyVpcEndpointOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -51714,7 +51714,7 @@ func (m *awsEc2query_deserializeOpModifyVpcEndpointServicePayerResponsibility) H return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVpcEndpointServicePayerResponsibility(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVpcEndpoint(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)} @@ -51747,14 +51747,14 @@ func awsEc2query_deserializeOpErrorModifyVpcEndpointServicePayerResponsibility(r } } -type awsEc2query_deserializeOpModifyVpcEndpointServicePermissions struct { +type awsEc2query_deserializeOpModifyVpcEndpointConnectionNotification struct { } -func (*awsEc2query_deserializeOpModifyVpcEndpointServicePermissions) ID() string { +func (*awsEc2query_deserializeOpModifyVpcEndpointConnectionNotification) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVpcEndpointServicePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVpcEndpointConnectionNotification) 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) @@ -51772,9 +51772,9 @@ func (m *awsEc2query_deserializeOpModifyVpcEndpointServicePermissions) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpcEndpointServicePermissions(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVpcEndpointConnectionNotification(response, &metadata) } - output := &ModifyVpcEndpointServicePermissionsOutput{} + output := &ModifyVpcEndpointConnectionNotificationOutput{} out.Result = output var buff [1024]byte @@ -51795,7 +51795,7 @@ func (m *awsEc2query_deserializeOpModifyVpcEndpointServicePermissions) HandleDes } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpcEndpointServicePermissionsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyVpcEndpointConnectionNotificationOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -51809,7 +51809,7 @@ func (m *awsEc2query_deserializeOpModifyVpcEndpointServicePermissions) HandleDes return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVpcEndpointServicePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVpcEndpointConnectionNotification(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)} @@ -51842,14 +51842,14 @@ func awsEc2query_deserializeOpErrorModifyVpcEndpointServicePermissions(response } } -type awsEc2query_deserializeOpModifyVpcPeeringConnectionOptions struct { +type awsEc2query_deserializeOpModifyVpcEndpointServiceConfiguration struct { } -func (*awsEc2query_deserializeOpModifyVpcPeeringConnectionOptions) ID() string { +func (*awsEc2query_deserializeOpModifyVpcEndpointServiceConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVpcPeeringConnectionOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVpcEndpointServiceConfiguration) 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) @@ -51867,9 +51867,9 @@ func (m *awsEc2query_deserializeOpModifyVpcPeeringConnectionOptions) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpcPeeringConnectionOptions(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVpcEndpointServiceConfiguration(response, &metadata) } - output := &ModifyVpcPeeringConnectionOptionsOutput{} + output := &ModifyVpcEndpointServiceConfigurationOutput{} out.Result = output var buff [1024]byte @@ -51890,7 +51890,7 @@ func (m *awsEc2query_deserializeOpModifyVpcPeeringConnectionOptions) HandleDeser } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpcPeeringConnectionOptionsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyVpcEndpointServiceConfigurationOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -51904,7 +51904,7 @@ func (m *awsEc2query_deserializeOpModifyVpcPeeringConnectionOptions) HandleDeser return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVpcPeeringConnectionOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVpcEndpointServiceConfiguration(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)} @@ -51937,14 +51937,14 @@ func awsEc2query_deserializeOpErrorModifyVpcPeeringConnectionOptions(response *s } } -type awsEc2query_deserializeOpModifyVpcTenancy struct { +type awsEc2query_deserializeOpModifyVpcEndpointServicePayerResponsibility struct { } -func (*awsEc2query_deserializeOpModifyVpcTenancy) ID() string { +func (*awsEc2query_deserializeOpModifyVpcEndpointServicePayerResponsibility) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVpcTenancy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVpcEndpointServicePayerResponsibility) 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) @@ -51962,9 +51962,9 @@ func (m *awsEc2query_deserializeOpModifyVpcTenancy) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpcTenancy(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVpcEndpointServicePayerResponsibility(response, &metadata) } - output := &ModifyVpcTenancyOutput{} + output := &ModifyVpcEndpointServicePayerResponsibilityOutput{} out.Result = output var buff [1024]byte @@ -51985,7 +51985,7 @@ func (m *awsEc2query_deserializeOpModifyVpcTenancy) HandleDeserialize(ctx contex } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpcTenancyOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyVpcEndpointServicePayerResponsibilityOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -51999,7 +51999,7 @@ func (m *awsEc2query_deserializeOpModifyVpcTenancy) HandleDeserialize(ctx contex return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVpcTenancy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVpcEndpointServicePayerResponsibility(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)} @@ -52032,14 +52032,14 @@ func awsEc2query_deserializeOpErrorModifyVpcTenancy(response *smithyhttp.Respons } } -type awsEc2query_deserializeOpModifyVpnConnection struct { +type awsEc2query_deserializeOpModifyVpcEndpointServicePermissions struct { } -func (*awsEc2query_deserializeOpModifyVpnConnection) ID() string { +func (*awsEc2query_deserializeOpModifyVpcEndpointServicePermissions) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVpnConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVpcEndpointServicePermissions) 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) @@ -52057,9 +52057,9 @@ func (m *awsEc2query_deserializeOpModifyVpnConnection) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpnConnection(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVpcEndpointServicePermissions(response, &metadata) } - output := &ModifyVpnConnectionOutput{} + output := &ModifyVpcEndpointServicePermissionsOutput{} out.Result = output var buff [1024]byte @@ -52080,7 +52080,7 @@ func (m *awsEc2query_deserializeOpModifyVpnConnection) HandleDeserialize(ctx con } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpnConnectionOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyVpcEndpointServicePermissionsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -52094,7 +52094,7 @@ func (m *awsEc2query_deserializeOpModifyVpnConnection) HandleDeserialize(ctx con return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVpnConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVpcEndpointServicePermissions(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)} @@ -52127,14 +52127,14 @@ func awsEc2query_deserializeOpErrorModifyVpnConnection(response *smithyhttp.Resp } } -type awsEc2query_deserializeOpModifyVpnConnectionOptions struct { +type awsEc2query_deserializeOpModifyVpcPeeringConnectionOptions struct { } -func (*awsEc2query_deserializeOpModifyVpnConnectionOptions) ID() string { +func (*awsEc2query_deserializeOpModifyVpcPeeringConnectionOptions) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVpnConnectionOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVpcPeeringConnectionOptions) 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) @@ -52152,9 +52152,9 @@ func (m *awsEc2query_deserializeOpModifyVpnConnectionOptions) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpnConnectionOptions(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVpcPeeringConnectionOptions(response, &metadata) } - output := &ModifyVpnConnectionOptionsOutput{} + output := &ModifyVpcPeeringConnectionOptionsOutput{} out.Result = output var buff [1024]byte @@ -52175,7 +52175,7 @@ func (m *awsEc2query_deserializeOpModifyVpnConnectionOptions) HandleDeserialize( } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpnConnectionOptionsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyVpcPeeringConnectionOptionsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -52189,7 +52189,7 @@ func (m *awsEc2query_deserializeOpModifyVpnConnectionOptions) HandleDeserialize( return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVpnConnectionOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVpcPeeringConnectionOptions(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)} @@ -52222,14 +52222,14 @@ func awsEc2query_deserializeOpErrorModifyVpnConnectionOptions(response *smithyht } } -type awsEc2query_deserializeOpModifyVpnTunnelCertificate struct { +type awsEc2query_deserializeOpModifyVpcTenancy struct { } -func (*awsEc2query_deserializeOpModifyVpnTunnelCertificate) ID() string { +func (*awsEc2query_deserializeOpModifyVpcTenancy) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVpnTunnelCertificate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVpcTenancy) 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) @@ -52247,9 +52247,9 @@ func (m *awsEc2query_deserializeOpModifyVpnTunnelCertificate) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpnTunnelCertificate(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVpcTenancy(response, &metadata) } - output := &ModifyVpnTunnelCertificateOutput{} + output := &ModifyVpcTenancyOutput{} out.Result = output var buff [1024]byte @@ -52270,7 +52270,7 @@ func (m *awsEc2query_deserializeOpModifyVpnTunnelCertificate) HandleDeserialize( } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpnTunnelCertificateOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyVpcTenancyOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -52284,7 +52284,7 @@ func (m *awsEc2query_deserializeOpModifyVpnTunnelCertificate) HandleDeserialize( return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVpnTunnelCertificate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVpcTenancy(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)} @@ -52317,14 +52317,14 @@ func awsEc2query_deserializeOpErrorModifyVpnTunnelCertificate(response *smithyht } } -type awsEc2query_deserializeOpModifyVpnTunnelOptions struct { +type awsEc2query_deserializeOpModifyVpnConnection struct { } -func (*awsEc2query_deserializeOpModifyVpnTunnelOptions) ID() string { +func (*awsEc2query_deserializeOpModifyVpnConnection) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifyVpnTunnelOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVpnConnection) 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) @@ -52342,9 +52342,9 @@ func (m *awsEc2query_deserializeOpModifyVpnTunnelOptions) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpnTunnelOptions(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVpnConnection(response, &metadata) } - output := &ModifyVpnTunnelOptionsOutput{} + output := &ModifyVpnConnectionOutput{} out.Result = output var buff [1024]byte @@ -52365,7 +52365,7 @@ func (m *awsEc2query_deserializeOpModifyVpnTunnelOptions) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpnTunnelOptionsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyVpnConnectionOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -52379,7 +52379,7 @@ func (m *awsEc2query_deserializeOpModifyVpnTunnelOptions) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorModifyVpnTunnelOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVpnConnection(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)} @@ -52412,14 +52412,14 @@ func awsEc2query_deserializeOpErrorModifyVpnTunnelOptions(response *smithyhttp.R } } -type awsEc2query_deserializeOpMonitorInstances struct { +type awsEc2query_deserializeOpModifyVpnConnectionOptions struct { } -func (*awsEc2query_deserializeOpMonitorInstances) ID() string { +func (*awsEc2query_deserializeOpModifyVpnConnectionOptions) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpMonitorInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVpnConnectionOptions) 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) @@ -52437,9 +52437,9 @@ func (m *awsEc2query_deserializeOpMonitorInstances) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorMonitorInstances(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVpnConnectionOptions(response, &metadata) } - output := &MonitorInstancesOutput{} + output := &ModifyVpnConnectionOptionsOutput{} out.Result = output var buff [1024]byte @@ -52460,7 +52460,7 @@ func (m *awsEc2query_deserializeOpMonitorInstances) HandleDeserialize(ctx contex } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentMonitorInstancesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyVpnConnectionOptionsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -52474,7 +52474,7 @@ func (m *awsEc2query_deserializeOpMonitorInstances) HandleDeserialize(ctx contex return out, metadata, err } -func awsEc2query_deserializeOpErrorMonitorInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVpnConnectionOptions(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)} @@ -52507,14 +52507,14 @@ func awsEc2query_deserializeOpErrorMonitorInstances(response *smithyhttp.Respons } } -type awsEc2query_deserializeOpMoveAddressToVpc struct { +type awsEc2query_deserializeOpModifyVpnTunnelCertificate struct { } -func (*awsEc2query_deserializeOpMoveAddressToVpc) ID() string { +func (*awsEc2query_deserializeOpModifyVpnTunnelCertificate) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpMoveAddressToVpc) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVpnTunnelCertificate) 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) @@ -52532,9 +52532,9 @@ func (m *awsEc2query_deserializeOpMoveAddressToVpc) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorMoveAddressToVpc(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVpnTunnelCertificate(response, &metadata) } - output := &MoveAddressToVpcOutput{} + output := &ModifyVpnTunnelCertificateOutput{} out.Result = output var buff [1024]byte @@ -52555,7 +52555,7 @@ func (m *awsEc2query_deserializeOpMoveAddressToVpc) HandleDeserialize(ctx contex } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentMoveAddressToVpcOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyVpnTunnelCertificateOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -52569,7 +52569,7 @@ func (m *awsEc2query_deserializeOpMoveAddressToVpc) HandleDeserialize(ctx contex return out, metadata, err } -func awsEc2query_deserializeOpErrorMoveAddressToVpc(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVpnTunnelCertificate(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)} @@ -52602,14 +52602,14 @@ func awsEc2query_deserializeOpErrorMoveAddressToVpc(response *smithyhttp.Respons } } -type awsEc2query_deserializeOpMoveByoipCidrToIpam struct { +type awsEc2query_deserializeOpModifyVpnTunnelOptions struct { } -func (*awsEc2query_deserializeOpMoveByoipCidrToIpam) ID() string { +func (*awsEc2query_deserializeOpModifyVpnTunnelOptions) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpMoveByoipCidrToIpam) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifyVpnTunnelOptions) 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) @@ -52627,9 +52627,9 @@ func (m *awsEc2query_deserializeOpMoveByoipCidrToIpam) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorMoveByoipCidrToIpam(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifyVpnTunnelOptions(response, &metadata) } - output := &MoveByoipCidrToIpamOutput{} + output := &ModifyVpnTunnelOptionsOutput{} out.Result = output var buff [1024]byte @@ -52650,7 +52650,7 @@ func (m *awsEc2query_deserializeOpMoveByoipCidrToIpam) HandleDeserialize(ctx con } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentMoveByoipCidrToIpamOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifyVpnTunnelOptionsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -52664,7 +52664,7 @@ func (m *awsEc2query_deserializeOpMoveByoipCidrToIpam) HandleDeserialize(ctx con return out, metadata, err } -func awsEc2query_deserializeOpErrorMoveByoipCidrToIpam(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifyVpnTunnelOptions(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)} @@ -52697,14 +52697,14 @@ func awsEc2query_deserializeOpErrorMoveByoipCidrToIpam(response *smithyhttp.Resp } } -type awsEc2query_deserializeOpMoveCapacityReservationInstances struct { +type awsEc2query_deserializeOpMonitorInstances struct { } -func (*awsEc2query_deserializeOpMoveCapacityReservationInstances) ID() string { +func (*awsEc2query_deserializeOpMonitorInstances) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpMoveCapacityReservationInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpMonitorInstances) 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) @@ -52722,9 +52722,9 @@ func (m *awsEc2query_deserializeOpMoveCapacityReservationInstances) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorMoveCapacityReservationInstances(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorMonitorInstances(response, &metadata) } - output := &MoveCapacityReservationInstancesOutput{} + output := &MonitorInstancesOutput{} out.Result = output var buff [1024]byte @@ -52745,7 +52745,7 @@ func (m *awsEc2query_deserializeOpMoveCapacityReservationInstances) HandleDeseri } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentMoveCapacityReservationInstancesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentMonitorInstancesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -52759,7 +52759,7 @@ func (m *awsEc2query_deserializeOpMoveCapacityReservationInstances) HandleDeseri return out, metadata, err } -func awsEc2query_deserializeOpErrorMoveCapacityReservationInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorMonitorInstances(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)} @@ -52792,14 +52792,14 @@ func awsEc2query_deserializeOpErrorMoveCapacityReservationInstances(response *sm } } -type awsEc2query_deserializeOpProvisionByoipCidr struct { +type awsEc2query_deserializeOpMoveAddressToVpc struct { } -func (*awsEc2query_deserializeOpProvisionByoipCidr) ID() string { +func (*awsEc2query_deserializeOpMoveAddressToVpc) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpProvisionByoipCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpMoveAddressToVpc) 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) @@ -52817,9 +52817,9 @@ func (m *awsEc2query_deserializeOpProvisionByoipCidr) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorProvisionByoipCidr(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorMoveAddressToVpc(response, &metadata) } - output := &ProvisionByoipCidrOutput{} + output := &MoveAddressToVpcOutput{} out.Result = output var buff [1024]byte @@ -52840,7 +52840,7 @@ func (m *awsEc2query_deserializeOpProvisionByoipCidr) HandleDeserialize(ctx cont } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentProvisionByoipCidrOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentMoveAddressToVpcOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -52854,7 +52854,7 @@ func (m *awsEc2query_deserializeOpProvisionByoipCidr) HandleDeserialize(ctx cont return out, metadata, err } -func awsEc2query_deserializeOpErrorProvisionByoipCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorMoveAddressToVpc(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)} @@ -52887,14 +52887,14 @@ func awsEc2query_deserializeOpErrorProvisionByoipCidr(response *smithyhttp.Respo } } -type awsEc2query_deserializeOpProvisionIpamByoasn struct { +type awsEc2query_deserializeOpMoveByoipCidrToIpam struct { } -func (*awsEc2query_deserializeOpProvisionIpamByoasn) ID() string { +func (*awsEc2query_deserializeOpMoveByoipCidrToIpam) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpProvisionIpamByoasn) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpMoveByoipCidrToIpam) 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) @@ -52912,9 +52912,9 @@ func (m *awsEc2query_deserializeOpProvisionIpamByoasn) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorProvisionIpamByoasn(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorMoveByoipCidrToIpam(response, &metadata) } - output := &ProvisionIpamByoasnOutput{} + output := &MoveByoipCidrToIpamOutput{} out.Result = output var buff [1024]byte @@ -52935,7 +52935,7 @@ func (m *awsEc2query_deserializeOpProvisionIpamByoasn) HandleDeserialize(ctx con } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentProvisionIpamByoasnOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentMoveByoipCidrToIpamOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -52949,7 +52949,7 @@ func (m *awsEc2query_deserializeOpProvisionIpamByoasn) HandleDeserialize(ctx con return out, metadata, err } -func awsEc2query_deserializeOpErrorProvisionIpamByoasn(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorMoveByoipCidrToIpam(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)} @@ -52982,14 +52982,14 @@ func awsEc2query_deserializeOpErrorProvisionIpamByoasn(response *smithyhttp.Resp } } -type awsEc2query_deserializeOpProvisionIpamPoolCidr struct { +type awsEc2query_deserializeOpMoveCapacityReservationInstances struct { } -func (*awsEc2query_deserializeOpProvisionIpamPoolCidr) ID() string { +func (*awsEc2query_deserializeOpMoveCapacityReservationInstances) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpProvisionIpamPoolCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpMoveCapacityReservationInstances) 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) @@ -53007,9 +53007,9 @@ func (m *awsEc2query_deserializeOpProvisionIpamPoolCidr) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorProvisionIpamPoolCidr(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorMoveCapacityReservationInstances(response, &metadata) } - output := &ProvisionIpamPoolCidrOutput{} + output := &MoveCapacityReservationInstancesOutput{} out.Result = output var buff [1024]byte @@ -53030,7 +53030,7 @@ func (m *awsEc2query_deserializeOpProvisionIpamPoolCidr) HandleDeserialize(ctx c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentProvisionIpamPoolCidrOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentMoveCapacityReservationInstancesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -53044,7 +53044,7 @@ func (m *awsEc2query_deserializeOpProvisionIpamPoolCidr) HandleDeserialize(ctx c return out, metadata, err } -func awsEc2query_deserializeOpErrorProvisionIpamPoolCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorMoveCapacityReservationInstances(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)} @@ -53077,14 +53077,14 @@ func awsEc2query_deserializeOpErrorProvisionIpamPoolCidr(response *smithyhttp.Re } } -type awsEc2query_deserializeOpProvisionPublicIpv4PoolCidr struct { +type awsEc2query_deserializeOpProvisionByoipCidr struct { } -func (*awsEc2query_deserializeOpProvisionPublicIpv4PoolCidr) ID() string { +func (*awsEc2query_deserializeOpProvisionByoipCidr) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpProvisionPublicIpv4PoolCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpProvisionByoipCidr) 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) @@ -53102,9 +53102,9 @@ func (m *awsEc2query_deserializeOpProvisionPublicIpv4PoolCidr) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorProvisionPublicIpv4PoolCidr(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorProvisionByoipCidr(response, &metadata) } - output := &ProvisionPublicIpv4PoolCidrOutput{} + output := &ProvisionByoipCidrOutput{} out.Result = output var buff [1024]byte @@ -53125,7 +53125,7 @@ func (m *awsEc2query_deserializeOpProvisionPublicIpv4PoolCidr) HandleDeserialize } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentProvisionPublicIpv4PoolCidrOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentProvisionByoipCidrOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -53139,7 +53139,7 @@ func (m *awsEc2query_deserializeOpProvisionPublicIpv4PoolCidr) HandleDeserialize return out, metadata, err } -func awsEc2query_deserializeOpErrorProvisionPublicIpv4PoolCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorProvisionByoipCidr(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)} @@ -53172,14 +53172,14 @@ func awsEc2query_deserializeOpErrorProvisionPublicIpv4PoolCidr(response *smithyh } } -type awsEc2query_deserializeOpPurchaseCapacityBlock struct { +type awsEc2query_deserializeOpProvisionIpamByoasn struct { } -func (*awsEc2query_deserializeOpPurchaseCapacityBlock) ID() string { +func (*awsEc2query_deserializeOpProvisionIpamByoasn) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpPurchaseCapacityBlock) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpProvisionIpamByoasn) 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) @@ -53197,9 +53197,9 @@ func (m *awsEc2query_deserializeOpPurchaseCapacityBlock) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorPurchaseCapacityBlock(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorProvisionIpamByoasn(response, &metadata) } - output := &PurchaseCapacityBlockOutput{} + output := &ProvisionIpamByoasnOutput{} out.Result = output var buff [1024]byte @@ -53220,7 +53220,7 @@ func (m *awsEc2query_deserializeOpPurchaseCapacityBlock) HandleDeserialize(ctx c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentPurchaseCapacityBlockOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentProvisionIpamByoasnOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -53234,7 +53234,7 @@ func (m *awsEc2query_deserializeOpPurchaseCapacityBlock) HandleDeserialize(ctx c return out, metadata, err } -func awsEc2query_deserializeOpErrorPurchaseCapacityBlock(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorProvisionIpamByoasn(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)} @@ -53267,14 +53267,14 @@ func awsEc2query_deserializeOpErrorPurchaseCapacityBlock(response *smithyhttp.Re } } -type awsEc2query_deserializeOpPurchaseHostReservation struct { +type awsEc2query_deserializeOpProvisionIpamPoolCidr struct { } -func (*awsEc2query_deserializeOpPurchaseHostReservation) ID() string { +func (*awsEc2query_deserializeOpProvisionIpamPoolCidr) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpPurchaseHostReservation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpProvisionIpamPoolCidr) 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) @@ -53292,9 +53292,9 @@ func (m *awsEc2query_deserializeOpPurchaseHostReservation) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorPurchaseHostReservation(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorProvisionIpamPoolCidr(response, &metadata) } - output := &PurchaseHostReservationOutput{} + output := &ProvisionIpamPoolCidrOutput{} out.Result = output var buff [1024]byte @@ -53315,7 +53315,7 @@ func (m *awsEc2query_deserializeOpPurchaseHostReservation) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentPurchaseHostReservationOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentProvisionIpamPoolCidrOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -53329,7 +53329,7 @@ func (m *awsEc2query_deserializeOpPurchaseHostReservation) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorPurchaseHostReservation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorProvisionIpamPoolCidr(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)} @@ -53362,14 +53362,14 @@ func awsEc2query_deserializeOpErrorPurchaseHostReservation(response *smithyhttp. } } -type awsEc2query_deserializeOpPurchaseReservedInstancesOffering struct { +type awsEc2query_deserializeOpProvisionPublicIpv4PoolCidr struct { } -func (*awsEc2query_deserializeOpPurchaseReservedInstancesOffering) ID() string { +func (*awsEc2query_deserializeOpProvisionPublicIpv4PoolCidr) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpPurchaseReservedInstancesOffering) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpProvisionPublicIpv4PoolCidr) 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) @@ -53387,9 +53387,9 @@ func (m *awsEc2query_deserializeOpPurchaseReservedInstancesOffering) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorPurchaseReservedInstancesOffering(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorProvisionPublicIpv4PoolCidr(response, &metadata) } - output := &PurchaseReservedInstancesOfferingOutput{} + output := &ProvisionPublicIpv4PoolCidrOutput{} out.Result = output var buff [1024]byte @@ -53410,7 +53410,7 @@ func (m *awsEc2query_deserializeOpPurchaseReservedInstancesOffering) HandleDeser } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentPurchaseReservedInstancesOfferingOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentProvisionPublicIpv4PoolCidrOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -53424,7 +53424,7 @@ func (m *awsEc2query_deserializeOpPurchaseReservedInstancesOffering) HandleDeser return out, metadata, err } -func awsEc2query_deserializeOpErrorPurchaseReservedInstancesOffering(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorProvisionPublicIpv4PoolCidr(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)} @@ -53457,14 +53457,14 @@ func awsEc2query_deserializeOpErrorPurchaseReservedInstancesOffering(response *s } } -type awsEc2query_deserializeOpPurchaseScheduledInstances struct { +type awsEc2query_deserializeOpPurchaseCapacityBlock struct { } -func (*awsEc2query_deserializeOpPurchaseScheduledInstances) ID() string { +func (*awsEc2query_deserializeOpPurchaseCapacityBlock) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpPurchaseScheduledInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpPurchaseCapacityBlock) 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) @@ -53482,9 +53482,9 @@ func (m *awsEc2query_deserializeOpPurchaseScheduledInstances) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorPurchaseScheduledInstances(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorPurchaseCapacityBlock(response, &metadata) } - output := &PurchaseScheduledInstancesOutput{} + output := &PurchaseCapacityBlockOutput{} out.Result = output var buff [1024]byte @@ -53505,7 +53505,7 @@ func (m *awsEc2query_deserializeOpPurchaseScheduledInstances) HandleDeserialize( } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentPurchaseScheduledInstancesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentPurchaseCapacityBlockOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -53519,7 +53519,7 @@ func (m *awsEc2query_deserializeOpPurchaseScheduledInstances) HandleDeserialize( return out, metadata, err } -func awsEc2query_deserializeOpErrorPurchaseScheduledInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorPurchaseCapacityBlock(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)} @@ -53552,14 +53552,14 @@ func awsEc2query_deserializeOpErrorPurchaseScheduledInstances(response *smithyht } } -type awsEc2query_deserializeOpRebootInstances struct { +type awsEc2query_deserializeOpPurchaseHostReservation struct { } -func (*awsEc2query_deserializeOpRebootInstances) ID() string { +func (*awsEc2query_deserializeOpPurchaseHostReservation) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRebootInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpPurchaseHostReservation) 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) @@ -53577,21 +53577,44 @@ func (m *awsEc2query_deserializeOpRebootInstances) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRebootInstances(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorPurchaseHostReservation(response, &metadata) } - output := &RebootInstancesOutput{} + output := &PurchaseHostReservationOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } } + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentPurchaseHostReservationOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + return out, metadata, err } -func awsEc2query_deserializeOpErrorRebootInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorPurchaseHostReservation(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)} @@ -53624,14 +53647,14 @@ func awsEc2query_deserializeOpErrorRebootInstances(response *smithyhttp.Response } } -type awsEc2query_deserializeOpRegisterImage struct { +type awsEc2query_deserializeOpPurchaseReservedInstancesOffering struct { } -func (*awsEc2query_deserializeOpRegisterImage) ID() string { +func (*awsEc2query_deserializeOpPurchaseReservedInstancesOffering) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRegisterImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpPurchaseReservedInstancesOffering) 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) @@ -53649,9 +53672,9 @@ func (m *awsEc2query_deserializeOpRegisterImage) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRegisterImage(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorPurchaseReservedInstancesOffering(response, &metadata) } - output := &RegisterImageOutput{} + output := &PurchaseReservedInstancesOfferingOutput{} out.Result = output var buff [1024]byte @@ -53672,7 +53695,7 @@ func (m *awsEc2query_deserializeOpRegisterImage) HandleDeserialize(ctx context.C } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRegisterImageOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentPurchaseReservedInstancesOfferingOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -53686,7 +53709,7 @@ func (m *awsEc2query_deserializeOpRegisterImage) HandleDeserialize(ctx context.C return out, metadata, err } -func awsEc2query_deserializeOpErrorRegisterImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorPurchaseReservedInstancesOffering(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)} @@ -53719,14 +53742,14 @@ func awsEc2query_deserializeOpErrorRegisterImage(response *smithyhttp.Response, } } -type awsEc2query_deserializeOpRegisterInstanceEventNotificationAttributes struct { +type awsEc2query_deserializeOpPurchaseScheduledInstances struct { } -func (*awsEc2query_deserializeOpRegisterInstanceEventNotificationAttributes) ID() string { +func (*awsEc2query_deserializeOpPurchaseScheduledInstances) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRegisterInstanceEventNotificationAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpPurchaseScheduledInstances) 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) @@ -53744,9 +53767,9 @@ func (m *awsEc2query_deserializeOpRegisterInstanceEventNotificationAttributes) H } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRegisterInstanceEventNotificationAttributes(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorPurchaseScheduledInstances(response, &metadata) } - output := &RegisterInstanceEventNotificationAttributesOutput{} + output := &PurchaseScheduledInstancesOutput{} out.Result = output var buff [1024]byte @@ -53767,7 +53790,7 @@ func (m *awsEc2query_deserializeOpRegisterInstanceEventNotificationAttributes) H } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRegisterInstanceEventNotificationAttributesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentPurchaseScheduledInstancesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -53781,7 +53804,7 @@ func (m *awsEc2query_deserializeOpRegisterInstanceEventNotificationAttributes) H return out, metadata, err } -func awsEc2query_deserializeOpErrorRegisterInstanceEventNotificationAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorPurchaseScheduledInstances(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)} @@ -53814,14 +53837,14 @@ func awsEc2query_deserializeOpErrorRegisterInstanceEventNotificationAttributes(r } } -type awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupMembers struct { +type awsEc2query_deserializeOpRebootInstances struct { } -func (*awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupMembers) ID() string { +func (*awsEc2query_deserializeOpRebootInstances) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupMembers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRebootInstances) 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) @@ -53839,44 +53862,21 @@ func (m *awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupMembers) H } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRegisterTransitGatewayMulticastGroupMembers(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRebootInstances(response, &metadata) } - output := &RegisterTransitGatewayMulticastGroupMembersOutput{} + output := &RebootInstancesOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRegisterTransitGatewayMulticastGroupMembersOutput(&output, 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(), + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorRegisterTransitGatewayMulticastGroupMembers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRebootInstances(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)} @@ -53909,14 +53909,14 @@ func awsEc2query_deserializeOpErrorRegisterTransitGatewayMulticastGroupMembers(r } } -type awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupSources struct { +type awsEc2query_deserializeOpRegisterImage struct { } -func (*awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupSources) ID() string { +func (*awsEc2query_deserializeOpRegisterImage) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupSources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRegisterImage) 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) @@ -53934,9 +53934,9 @@ func (m *awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupSources) H } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRegisterTransitGatewayMulticastGroupSources(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRegisterImage(response, &metadata) } - output := &RegisterTransitGatewayMulticastGroupSourcesOutput{} + output := &RegisterImageOutput{} out.Result = output var buff [1024]byte @@ -53957,7 +53957,7 @@ func (m *awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupSources) H } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRegisterTransitGatewayMulticastGroupSourcesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRegisterImageOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -53971,7 +53971,7 @@ func (m *awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupSources) H return out, metadata, err } -func awsEc2query_deserializeOpErrorRegisterTransitGatewayMulticastGroupSources(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRegisterImage(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)} @@ -54004,14 +54004,14 @@ func awsEc2query_deserializeOpErrorRegisterTransitGatewayMulticastGroupSources(r } } -type awsEc2query_deserializeOpRejectCapacityReservationBillingOwnership struct { +type awsEc2query_deserializeOpRegisterInstanceEventNotificationAttributes struct { } -func (*awsEc2query_deserializeOpRejectCapacityReservationBillingOwnership) ID() string { +func (*awsEc2query_deserializeOpRegisterInstanceEventNotificationAttributes) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRejectCapacityReservationBillingOwnership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRegisterInstanceEventNotificationAttributes) 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) @@ -54029,9 +54029,9 @@ func (m *awsEc2query_deserializeOpRejectCapacityReservationBillingOwnership) Han } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRejectCapacityReservationBillingOwnership(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRegisterInstanceEventNotificationAttributes(response, &metadata) } - output := &RejectCapacityReservationBillingOwnershipOutput{} + output := &RegisterInstanceEventNotificationAttributesOutput{} out.Result = output var buff [1024]byte @@ -54052,7 +54052,7 @@ func (m *awsEc2query_deserializeOpRejectCapacityReservationBillingOwnership) Han } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRejectCapacityReservationBillingOwnershipOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRegisterInstanceEventNotificationAttributesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -54066,7 +54066,7 @@ func (m *awsEc2query_deserializeOpRejectCapacityReservationBillingOwnership) Han return out, metadata, err } -func awsEc2query_deserializeOpErrorRejectCapacityReservationBillingOwnership(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRegisterInstanceEventNotificationAttributes(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)} @@ -54099,14 +54099,14 @@ func awsEc2query_deserializeOpErrorRejectCapacityReservationBillingOwnership(res } } -type awsEc2query_deserializeOpRejectTransitGatewayMulticastDomainAssociations struct { +type awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupMembers struct { } -func (*awsEc2query_deserializeOpRejectTransitGatewayMulticastDomainAssociations) ID() string { +func (*awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupMembers) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRejectTransitGatewayMulticastDomainAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupMembers) 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) @@ -54124,9 +54124,9 @@ func (m *awsEc2query_deserializeOpRejectTransitGatewayMulticastDomainAssociation } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRejectTransitGatewayMulticastDomainAssociations(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRegisterTransitGatewayMulticastGroupMembers(response, &metadata) } - output := &RejectTransitGatewayMulticastDomainAssociationsOutput{} + output := &RegisterTransitGatewayMulticastGroupMembersOutput{} out.Result = output var buff [1024]byte @@ -54147,7 +54147,7 @@ func (m *awsEc2query_deserializeOpRejectTransitGatewayMulticastDomainAssociation } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRejectTransitGatewayMulticastDomainAssociationsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRegisterTransitGatewayMulticastGroupMembersOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -54161,7 +54161,7 @@ func (m *awsEc2query_deserializeOpRejectTransitGatewayMulticastDomainAssociation return out, metadata, err } -func awsEc2query_deserializeOpErrorRejectTransitGatewayMulticastDomainAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRegisterTransitGatewayMulticastGroupMembers(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)} @@ -54194,14 +54194,14 @@ func awsEc2query_deserializeOpErrorRejectTransitGatewayMulticastDomainAssociatio } } -type awsEc2query_deserializeOpRejectTransitGatewayPeeringAttachment struct { +type awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupSources struct { } -func (*awsEc2query_deserializeOpRejectTransitGatewayPeeringAttachment) ID() string { +func (*awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupSources) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRejectTransitGatewayPeeringAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupSources) 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) @@ -54219,9 +54219,9 @@ func (m *awsEc2query_deserializeOpRejectTransitGatewayPeeringAttachment) HandleD } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRejectTransitGatewayPeeringAttachment(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRegisterTransitGatewayMulticastGroupSources(response, &metadata) } - output := &RejectTransitGatewayPeeringAttachmentOutput{} + output := &RegisterTransitGatewayMulticastGroupSourcesOutput{} out.Result = output var buff [1024]byte @@ -54242,7 +54242,7 @@ func (m *awsEc2query_deserializeOpRejectTransitGatewayPeeringAttachment) HandleD } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRejectTransitGatewayPeeringAttachmentOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRegisterTransitGatewayMulticastGroupSourcesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -54256,7 +54256,7 @@ func (m *awsEc2query_deserializeOpRejectTransitGatewayPeeringAttachment) HandleD return out, metadata, err } -func awsEc2query_deserializeOpErrorRejectTransitGatewayPeeringAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRegisterTransitGatewayMulticastGroupSources(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)} @@ -54289,14 +54289,14 @@ func awsEc2query_deserializeOpErrorRejectTransitGatewayPeeringAttachment(respons } } -type awsEc2query_deserializeOpRejectTransitGatewayVpcAttachment struct { +type awsEc2query_deserializeOpRejectCapacityReservationBillingOwnership struct { } -func (*awsEc2query_deserializeOpRejectTransitGatewayVpcAttachment) ID() string { +func (*awsEc2query_deserializeOpRejectCapacityReservationBillingOwnership) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRejectTransitGatewayVpcAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRejectCapacityReservationBillingOwnership) 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) @@ -54314,9 +54314,9 @@ func (m *awsEc2query_deserializeOpRejectTransitGatewayVpcAttachment) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRejectTransitGatewayVpcAttachment(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRejectCapacityReservationBillingOwnership(response, &metadata) } - output := &RejectTransitGatewayVpcAttachmentOutput{} + output := &RejectCapacityReservationBillingOwnershipOutput{} out.Result = output var buff [1024]byte @@ -54337,7 +54337,7 @@ func (m *awsEc2query_deserializeOpRejectTransitGatewayVpcAttachment) HandleDeser } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRejectTransitGatewayVpcAttachmentOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRejectCapacityReservationBillingOwnershipOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -54351,7 +54351,7 @@ func (m *awsEc2query_deserializeOpRejectTransitGatewayVpcAttachment) HandleDeser return out, metadata, err } -func awsEc2query_deserializeOpErrorRejectTransitGatewayVpcAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRejectCapacityReservationBillingOwnership(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)} @@ -54384,14 +54384,14 @@ func awsEc2query_deserializeOpErrorRejectTransitGatewayVpcAttachment(response *s } } -type awsEc2query_deserializeOpRejectVpcEndpointConnections struct { +type awsEc2query_deserializeOpRejectTransitGatewayMulticastDomainAssociations struct { } -func (*awsEc2query_deserializeOpRejectVpcEndpointConnections) ID() string { +func (*awsEc2query_deserializeOpRejectTransitGatewayMulticastDomainAssociations) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRejectVpcEndpointConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRejectTransitGatewayMulticastDomainAssociations) 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) @@ -54409,9 +54409,9 @@ func (m *awsEc2query_deserializeOpRejectVpcEndpointConnections) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRejectVpcEndpointConnections(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRejectTransitGatewayMulticastDomainAssociations(response, &metadata) } - output := &RejectVpcEndpointConnectionsOutput{} + output := &RejectTransitGatewayMulticastDomainAssociationsOutput{} out.Result = output var buff [1024]byte @@ -54432,7 +54432,7 @@ func (m *awsEc2query_deserializeOpRejectVpcEndpointConnections) HandleDeserializ } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRejectVpcEndpointConnectionsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRejectTransitGatewayMulticastDomainAssociationsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -54446,7 +54446,7 @@ func (m *awsEc2query_deserializeOpRejectVpcEndpointConnections) HandleDeserializ return out, metadata, err } -func awsEc2query_deserializeOpErrorRejectVpcEndpointConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRejectTransitGatewayMulticastDomainAssociations(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)} @@ -54479,14 +54479,14 @@ func awsEc2query_deserializeOpErrorRejectVpcEndpointConnections(response *smithy } } -type awsEc2query_deserializeOpRejectVpcPeeringConnection struct { +type awsEc2query_deserializeOpRejectTransitGatewayPeeringAttachment struct { } -func (*awsEc2query_deserializeOpRejectVpcPeeringConnection) ID() string { +func (*awsEc2query_deserializeOpRejectTransitGatewayPeeringAttachment) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRejectVpcPeeringConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRejectTransitGatewayPeeringAttachment) 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) @@ -54504,9 +54504,9 @@ func (m *awsEc2query_deserializeOpRejectVpcPeeringConnection) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRejectVpcPeeringConnection(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRejectTransitGatewayPeeringAttachment(response, &metadata) } - output := &RejectVpcPeeringConnectionOutput{} + output := &RejectTransitGatewayPeeringAttachmentOutput{} out.Result = output var buff [1024]byte @@ -54527,7 +54527,7 @@ func (m *awsEc2query_deserializeOpRejectVpcPeeringConnection) HandleDeserialize( } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRejectVpcPeeringConnectionOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRejectTransitGatewayPeeringAttachmentOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -54541,7 +54541,7 @@ func (m *awsEc2query_deserializeOpRejectVpcPeeringConnection) HandleDeserialize( return out, metadata, err } -func awsEc2query_deserializeOpErrorRejectVpcPeeringConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRejectTransitGatewayPeeringAttachment(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)} @@ -54574,14 +54574,14 @@ func awsEc2query_deserializeOpErrorRejectVpcPeeringConnection(response *smithyht } } -type awsEc2query_deserializeOpReleaseAddress struct { +type awsEc2query_deserializeOpRejectTransitGatewayVpcAttachment struct { } -func (*awsEc2query_deserializeOpReleaseAddress) ID() string { +func (*awsEc2query_deserializeOpRejectTransitGatewayVpcAttachment) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpReleaseAddress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRejectTransitGatewayVpcAttachment) 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) @@ -54599,21 +54599,44 @@ func (m *awsEc2query_deserializeOpReleaseAddress) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReleaseAddress(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRejectTransitGatewayVpcAttachment(response, &metadata) } - output := &ReleaseAddressOutput{} + output := &RejectTransitGatewayVpcAttachmentOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } } + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentRejectTransitGatewayVpcAttachmentOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + return out, metadata, err } -func awsEc2query_deserializeOpErrorReleaseAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRejectTransitGatewayVpcAttachment(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)} @@ -54646,14 +54669,14 @@ func awsEc2query_deserializeOpErrorReleaseAddress(response *smithyhttp.Response, } } -type awsEc2query_deserializeOpReleaseHosts struct { +type awsEc2query_deserializeOpRejectVpcEndpointConnections struct { } -func (*awsEc2query_deserializeOpReleaseHosts) ID() string { +func (*awsEc2query_deserializeOpRejectVpcEndpointConnections) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpReleaseHosts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRejectVpcEndpointConnections) 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) @@ -54671,9 +54694,9 @@ func (m *awsEc2query_deserializeOpReleaseHosts) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReleaseHosts(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRejectVpcEndpointConnections(response, &metadata) } - output := &ReleaseHostsOutput{} + output := &RejectVpcEndpointConnectionsOutput{} out.Result = output var buff [1024]byte @@ -54694,7 +54717,7 @@ func (m *awsEc2query_deserializeOpReleaseHosts) HandleDeserialize(ctx context.Co } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentReleaseHostsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRejectVpcEndpointConnectionsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -54708,7 +54731,7 @@ func (m *awsEc2query_deserializeOpReleaseHosts) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsEc2query_deserializeOpErrorReleaseHosts(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRejectVpcEndpointConnections(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)} @@ -54741,14 +54764,14 @@ func awsEc2query_deserializeOpErrorReleaseHosts(response *smithyhttp.Response, m } } -type awsEc2query_deserializeOpReleaseIpamPoolAllocation struct { +type awsEc2query_deserializeOpRejectVpcPeeringConnection struct { } -func (*awsEc2query_deserializeOpReleaseIpamPoolAllocation) ID() string { +func (*awsEc2query_deserializeOpRejectVpcPeeringConnection) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpReleaseIpamPoolAllocation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRejectVpcPeeringConnection) 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) @@ -54766,9 +54789,9 @@ func (m *awsEc2query_deserializeOpReleaseIpamPoolAllocation) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReleaseIpamPoolAllocation(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRejectVpcPeeringConnection(response, &metadata) } - output := &ReleaseIpamPoolAllocationOutput{} + output := &RejectVpcPeeringConnectionOutput{} out.Result = output var buff [1024]byte @@ -54789,7 +54812,7 @@ func (m *awsEc2query_deserializeOpReleaseIpamPoolAllocation) HandleDeserialize(c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentReleaseIpamPoolAllocationOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRejectVpcPeeringConnectionOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -54803,7 +54826,7 @@ func (m *awsEc2query_deserializeOpReleaseIpamPoolAllocation) HandleDeserialize(c return out, metadata, err } -func awsEc2query_deserializeOpErrorReleaseIpamPoolAllocation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRejectVpcPeeringConnection(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)} @@ -54836,14 +54859,14 @@ func awsEc2query_deserializeOpErrorReleaseIpamPoolAllocation(response *smithyhtt } } -type awsEc2query_deserializeOpReplaceIamInstanceProfileAssociation struct { +type awsEc2query_deserializeOpReleaseAddress struct { } -func (*awsEc2query_deserializeOpReplaceIamInstanceProfileAssociation) ID() string { +func (*awsEc2query_deserializeOpReleaseAddress) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpReplaceIamInstanceProfileAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpReleaseAddress) 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) @@ -54861,44 +54884,21 @@ func (m *awsEc2query_deserializeOpReplaceIamInstanceProfileAssociation) HandleDe } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReplaceIamInstanceProfileAssociation(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorReleaseAddress(response, &metadata) } - output := &ReplaceIamInstanceProfileAssociationOutput{} + output := &ReleaseAddressOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentReplaceIamInstanceProfileAssociationOutput(&output, 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(), + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorReplaceIamInstanceProfileAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorReleaseAddress(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)} @@ -54931,14 +54931,14 @@ func awsEc2query_deserializeOpErrorReplaceIamInstanceProfileAssociation(response } } -type awsEc2query_deserializeOpReplaceNetworkAclAssociation struct { +type awsEc2query_deserializeOpReleaseHosts struct { } -func (*awsEc2query_deserializeOpReplaceNetworkAclAssociation) ID() string { +func (*awsEc2query_deserializeOpReleaseHosts) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpReplaceNetworkAclAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpReleaseHosts) 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) @@ -54956,9 +54956,9 @@ func (m *awsEc2query_deserializeOpReplaceNetworkAclAssociation) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReplaceNetworkAclAssociation(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorReleaseHosts(response, &metadata) } - output := &ReplaceNetworkAclAssociationOutput{} + output := &ReleaseHostsOutput{} out.Result = output var buff [1024]byte @@ -54979,7 +54979,7 @@ func (m *awsEc2query_deserializeOpReplaceNetworkAclAssociation) HandleDeserializ } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentReplaceNetworkAclAssociationOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentReleaseHostsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -54993,7 +54993,7 @@ func (m *awsEc2query_deserializeOpReplaceNetworkAclAssociation) HandleDeserializ return out, metadata, err } -func awsEc2query_deserializeOpErrorReplaceNetworkAclAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorReleaseHosts(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)} @@ -55026,14 +55026,14 @@ func awsEc2query_deserializeOpErrorReplaceNetworkAclAssociation(response *smithy } } -type awsEc2query_deserializeOpReplaceNetworkAclEntry struct { +type awsEc2query_deserializeOpReleaseIpamPoolAllocation struct { } -func (*awsEc2query_deserializeOpReplaceNetworkAclEntry) ID() string { +func (*awsEc2query_deserializeOpReleaseIpamPoolAllocation) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpReplaceNetworkAclEntry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpReleaseIpamPoolAllocation) 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) @@ -55051,21 +55051,44 @@ func (m *awsEc2query_deserializeOpReplaceNetworkAclEntry) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReplaceNetworkAclEntry(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorReleaseIpamPoolAllocation(response, &metadata) } - output := &ReplaceNetworkAclEntryOutput{} + output := &ReleaseIpamPoolAllocationOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentReleaseIpamPoolAllocationOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } + return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorReplaceNetworkAclEntry(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorReleaseIpamPoolAllocation(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)} @@ -55098,14 +55121,14 @@ func awsEc2query_deserializeOpErrorReplaceNetworkAclEntry(response *smithyhttp.R } } -type awsEc2query_deserializeOpReplaceRoute struct { +type awsEc2query_deserializeOpReplaceIamInstanceProfileAssociation struct { } -func (*awsEc2query_deserializeOpReplaceRoute) ID() string { +func (*awsEc2query_deserializeOpReplaceIamInstanceProfileAssociation) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpReplaceRoute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpReplaceIamInstanceProfileAssociation) 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) @@ -55123,21 +55146,44 @@ func (m *awsEc2query_deserializeOpReplaceRoute) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReplaceRoute(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorReplaceIamInstanceProfileAssociation(response, &metadata) } - output := &ReplaceRouteOutput{} + output := &ReplaceIamInstanceProfileAssociationOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } } + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentReplaceIamInstanceProfileAssociationOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + return out, metadata, err } -func awsEc2query_deserializeOpErrorReplaceRoute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorReplaceIamInstanceProfileAssociation(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)} @@ -55170,14 +55216,14 @@ func awsEc2query_deserializeOpErrorReplaceRoute(response *smithyhttp.Response, m } } -type awsEc2query_deserializeOpReplaceRouteTableAssociation struct { +type awsEc2query_deserializeOpReplaceNetworkAclAssociation struct { } -func (*awsEc2query_deserializeOpReplaceRouteTableAssociation) ID() string { +func (*awsEc2query_deserializeOpReplaceNetworkAclAssociation) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpReplaceRouteTableAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpReplaceNetworkAclAssociation) 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) @@ -55195,9 +55241,9 @@ func (m *awsEc2query_deserializeOpReplaceRouteTableAssociation) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReplaceRouteTableAssociation(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorReplaceNetworkAclAssociation(response, &metadata) } - output := &ReplaceRouteTableAssociationOutput{} + output := &ReplaceNetworkAclAssociationOutput{} out.Result = output var buff [1024]byte @@ -55218,7 +55264,7 @@ func (m *awsEc2query_deserializeOpReplaceRouteTableAssociation) HandleDeserializ } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentReplaceRouteTableAssociationOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentReplaceNetworkAclAssociationOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -55232,7 +55278,7 @@ func (m *awsEc2query_deserializeOpReplaceRouteTableAssociation) HandleDeserializ return out, metadata, err } -func awsEc2query_deserializeOpErrorReplaceRouteTableAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorReplaceNetworkAclAssociation(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)} @@ -55265,14 +55311,14 @@ func awsEc2query_deserializeOpErrorReplaceRouteTableAssociation(response *smithy } } -type awsEc2query_deserializeOpReplaceTransitGatewayRoute struct { +type awsEc2query_deserializeOpReplaceNetworkAclEntry struct { } -func (*awsEc2query_deserializeOpReplaceTransitGatewayRoute) ID() string { +func (*awsEc2query_deserializeOpReplaceNetworkAclEntry) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpReplaceTransitGatewayRoute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpReplaceNetworkAclEntry) 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) @@ -55290,44 +55336,93 @@ func (m *awsEc2query_deserializeOpReplaceTransitGatewayRoute) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReplaceTransitGatewayRoute(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorReplaceNetworkAclEntry(response, &metadata) } - output := &ReplaceTransitGatewayRouteOutput{} + output := &ReplaceNetworkAclEntryOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + Err: fmt.Errorf("failed to discard response body, %w", err), } } - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentReplaceTransitGatewayRouteOutput(&output, decoder) + return out, metadata, err +} + +func awsEc2query_deserializeOpErrorReplaceNetworkAclEntry(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 + + errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } + return genericError + + } +} + +type awsEc2query_deserializeOpReplaceRoute struct { +} + +func (*awsEc2query_deserializeOpReplaceRoute) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpReplaceRoute) 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 } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsEc2query_deserializeOpErrorReplaceRoute(response, &metadata) + } + output := &ReplaceRouteOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + return out, metadata, err } -func awsEc2query_deserializeOpErrorReplaceTransitGatewayRoute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorReplaceRoute(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)} @@ -55360,14 +55455,14 @@ func awsEc2query_deserializeOpErrorReplaceTransitGatewayRoute(response *smithyht } } -type awsEc2query_deserializeOpReplaceVpnTunnel struct { +type awsEc2query_deserializeOpReplaceRouteTableAssociation struct { } -func (*awsEc2query_deserializeOpReplaceVpnTunnel) ID() string { +func (*awsEc2query_deserializeOpReplaceRouteTableAssociation) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpReplaceVpnTunnel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpReplaceRouteTableAssociation) 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) @@ -55385,9 +55480,9 @@ func (m *awsEc2query_deserializeOpReplaceVpnTunnel) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReplaceVpnTunnel(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorReplaceRouteTableAssociation(response, &metadata) } - output := &ReplaceVpnTunnelOutput{} + output := &ReplaceRouteTableAssociationOutput{} out.Result = output var buff [1024]byte @@ -55408,7 +55503,7 @@ func (m *awsEc2query_deserializeOpReplaceVpnTunnel) HandleDeserialize(ctx contex } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentReplaceVpnTunnelOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentReplaceRouteTableAssociationOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -55422,7 +55517,7 @@ func (m *awsEc2query_deserializeOpReplaceVpnTunnel) HandleDeserialize(ctx contex return out, metadata, err } -func awsEc2query_deserializeOpErrorReplaceVpnTunnel(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorReplaceRouteTableAssociation(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)} @@ -55455,14 +55550,14 @@ func awsEc2query_deserializeOpErrorReplaceVpnTunnel(response *smithyhttp.Respons } } -type awsEc2query_deserializeOpReportInstanceStatus struct { +type awsEc2query_deserializeOpReplaceTransitGatewayRoute struct { } -func (*awsEc2query_deserializeOpReportInstanceStatus) ID() string { +func (*awsEc2query_deserializeOpReplaceTransitGatewayRoute) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpReportInstanceStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpReplaceTransitGatewayRoute) 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) @@ -55480,21 +55575,44 @@ func (m *awsEc2query_deserializeOpReportInstanceStatus) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReportInstanceStatus(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorReplaceTransitGatewayRoute(response, &metadata) } - output := &ReportInstanceStatusOutput{} + output := &ReplaceTransitGatewayRouteOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentReplaceTransitGatewayRouteOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } + return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorReportInstanceStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorReplaceTransitGatewayRoute(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)} @@ -55527,14 +55645,14 @@ func awsEc2query_deserializeOpErrorReportInstanceStatus(response *smithyhttp.Res } } -type awsEc2query_deserializeOpRequestSpotFleet struct { +type awsEc2query_deserializeOpReplaceVpnTunnel struct { } -func (*awsEc2query_deserializeOpRequestSpotFleet) ID() string { +func (*awsEc2query_deserializeOpReplaceVpnTunnel) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRequestSpotFleet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpReplaceVpnTunnel) 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) @@ -55552,9 +55670,9 @@ func (m *awsEc2query_deserializeOpRequestSpotFleet) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRequestSpotFleet(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorReplaceVpnTunnel(response, &metadata) } - output := &RequestSpotFleetOutput{} + output := &ReplaceVpnTunnelOutput{} out.Result = output var buff [1024]byte @@ -55575,7 +55693,7 @@ func (m *awsEc2query_deserializeOpRequestSpotFleet) HandleDeserialize(ctx contex } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRequestSpotFleetOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentReplaceVpnTunnelOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -55589,7 +55707,7 @@ func (m *awsEc2query_deserializeOpRequestSpotFleet) HandleDeserialize(ctx contex return out, metadata, err } -func awsEc2query_deserializeOpErrorRequestSpotFleet(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorReplaceVpnTunnel(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)} @@ -55622,14 +55740,14 @@ func awsEc2query_deserializeOpErrorRequestSpotFleet(response *smithyhttp.Respons } } -type awsEc2query_deserializeOpRequestSpotInstances struct { +type awsEc2query_deserializeOpReportInstanceStatus struct { } -func (*awsEc2query_deserializeOpRequestSpotInstances) ID() string { +func (*awsEc2query_deserializeOpReportInstanceStatus) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRequestSpotInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpReportInstanceStatus) 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) @@ -55647,44 +55765,21 @@ func (m *awsEc2query_deserializeOpRequestSpotInstances) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRequestSpotInstances(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorReportInstanceStatus(response, &metadata) } - output := &RequestSpotInstancesOutput{} + output := &ReportInstanceStatusOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRequestSpotInstancesOutput(&output, 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(), + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorRequestSpotInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorReportInstanceStatus(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)} @@ -55717,14 +55812,14 @@ func awsEc2query_deserializeOpErrorRequestSpotInstances(response *smithyhttp.Res } } -type awsEc2query_deserializeOpResetAddressAttribute struct { +type awsEc2query_deserializeOpRequestSpotFleet struct { } -func (*awsEc2query_deserializeOpResetAddressAttribute) ID() string { +func (*awsEc2query_deserializeOpRequestSpotFleet) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpResetAddressAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRequestSpotFleet) 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) @@ -55742,9 +55837,9 @@ func (m *awsEc2query_deserializeOpResetAddressAttribute) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorResetAddressAttribute(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRequestSpotFleet(response, &metadata) } - output := &ResetAddressAttributeOutput{} + output := &RequestSpotFleetOutput{} out.Result = output var buff [1024]byte @@ -55765,7 +55860,7 @@ func (m *awsEc2query_deserializeOpResetAddressAttribute) HandleDeserialize(ctx c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentResetAddressAttributeOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRequestSpotFleetOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -55779,7 +55874,7 @@ func (m *awsEc2query_deserializeOpResetAddressAttribute) HandleDeserialize(ctx c return out, metadata, err } -func awsEc2query_deserializeOpErrorResetAddressAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRequestSpotFleet(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)} @@ -55812,14 +55907,14 @@ func awsEc2query_deserializeOpErrorResetAddressAttribute(response *smithyhttp.Re } } -type awsEc2query_deserializeOpResetEbsDefaultKmsKeyId struct { +type awsEc2query_deserializeOpRequestSpotInstances struct { } -func (*awsEc2query_deserializeOpResetEbsDefaultKmsKeyId) ID() string { +func (*awsEc2query_deserializeOpRequestSpotInstances) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpResetEbsDefaultKmsKeyId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRequestSpotInstances) 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) @@ -55837,9 +55932,9 @@ func (m *awsEc2query_deserializeOpResetEbsDefaultKmsKeyId) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorResetEbsDefaultKmsKeyId(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRequestSpotInstances(response, &metadata) } - output := &ResetEbsDefaultKmsKeyIdOutput{} + output := &RequestSpotInstancesOutput{} out.Result = output var buff [1024]byte @@ -55860,7 +55955,7 @@ func (m *awsEc2query_deserializeOpResetEbsDefaultKmsKeyId) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentResetEbsDefaultKmsKeyIdOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRequestSpotInstancesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -55874,7 +55969,7 @@ func (m *awsEc2query_deserializeOpResetEbsDefaultKmsKeyId) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorResetEbsDefaultKmsKeyId(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRequestSpotInstances(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)} @@ -55907,14 +56002,14 @@ func awsEc2query_deserializeOpErrorResetEbsDefaultKmsKeyId(response *smithyhttp. } } -type awsEc2query_deserializeOpResetFpgaImageAttribute struct { +type awsEc2query_deserializeOpResetAddressAttribute struct { } -func (*awsEc2query_deserializeOpResetFpgaImageAttribute) ID() string { +func (*awsEc2query_deserializeOpResetAddressAttribute) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpResetFpgaImageAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpResetAddressAttribute) 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) @@ -55932,9 +56027,9 @@ func (m *awsEc2query_deserializeOpResetFpgaImageAttribute) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorResetFpgaImageAttribute(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorResetAddressAttribute(response, &metadata) } - output := &ResetFpgaImageAttributeOutput{} + output := &ResetAddressAttributeOutput{} out.Result = output var buff [1024]byte @@ -55955,7 +56050,7 @@ func (m *awsEc2query_deserializeOpResetFpgaImageAttribute) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentResetFpgaImageAttributeOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentResetAddressAttributeOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -55969,7 +56064,7 @@ func (m *awsEc2query_deserializeOpResetFpgaImageAttribute) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorResetFpgaImageAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorResetAddressAttribute(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)} @@ -56002,14 +56097,14 @@ func awsEc2query_deserializeOpErrorResetFpgaImageAttribute(response *smithyhttp. } } -type awsEc2query_deserializeOpResetImageAttribute struct { +type awsEc2query_deserializeOpResetEbsDefaultKmsKeyId struct { } -func (*awsEc2query_deserializeOpResetImageAttribute) ID() string { +func (*awsEc2query_deserializeOpResetEbsDefaultKmsKeyId) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpResetImageAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpResetEbsDefaultKmsKeyId) 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) @@ -56027,21 +56122,44 @@ func (m *awsEc2query_deserializeOpResetImageAttribute) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorResetImageAttribute(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorResetEbsDefaultKmsKeyId(response, &metadata) } - output := &ResetImageAttributeOutput{} + output := &ResetEbsDefaultKmsKeyIdOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } } + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentResetEbsDefaultKmsKeyIdOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + return out, metadata, err } -func awsEc2query_deserializeOpErrorResetImageAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorResetEbsDefaultKmsKeyId(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)} @@ -56074,14 +56192,14 @@ func awsEc2query_deserializeOpErrorResetImageAttribute(response *smithyhttp.Resp } } -type awsEc2query_deserializeOpResetInstanceAttribute struct { +type awsEc2query_deserializeOpResetFpgaImageAttribute struct { } -func (*awsEc2query_deserializeOpResetInstanceAttribute) ID() string { +func (*awsEc2query_deserializeOpResetFpgaImageAttribute) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpResetInstanceAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpResetFpgaImageAttribute) 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) @@ -56099,21 +56217,44 @@ func (m *awsEc2query_deserializeOpResetInstanceAttribute) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorResetInstanceAttribute(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorResetFpgaImageAttribute(response, &metadata) } - output := &ResetInstanceAttributeOutput{} + output := &ResetFpgaImageAttributeOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentResetFpgaImageAttributeOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } + return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorResetInstanceAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorResetFpgaImageAttribute(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)} @@ -56146,14 +56287,14 @@ func awsEc2query_deserializeOpErrorResetInstanceAttribute(response *smithyhttp.R } } -type awsEc2query_deserializeOpResetNetworkInterfaceAttribute struct { +type awsEc2query_deserializeOpResetImageAttribute struct { } -func (*awsEc2query_deserializeOpResetNetworkInterfaceAttribute) ID() string { +func (*awsEc2query_deserializeOpResetImageAttribute) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpResetNetworkInterfaceAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpResetImageAttribute) 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) @@ -56171,9 +56312,9 @@ func (m *awsEc2query_deserializeOpResetNetworkInterfaceAttribute) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorResetNetworkInterfaceAttribute(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorResetImageAttribute(response, &metadata) } - output := &ResetNetworkInterfaceAttributeOutput{} + output := &ResetImageAttributeOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -56185,7 +56326,7 @@ func (m *awsEc2query_deserializeOpResetNetworkInterfaceAttribute) HandleDeserial return out, metadata, err } -func awsEc2query_deserializeOpErrorResetNetworkInterfaceAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorResetImageAttribute(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)} @@ -56218,14 +56359,14 @@ func awsEc2query_deserializeOpErrorResetNetworkInterfaceAttribute(response *smit } } -type awsEc2query_deserializeOpResetSnapshotAttribute struct { +type awsEc2query_deserializeOpResetInstanceAttribute struct { } -func (*awsEc2query_deserializeOpResetSnapshotAttribute) ID() string { +func (*awsEc2query_deserializeOpResetInstanceAttribute) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpResetSnapshotAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpResetInstanceAttribute) 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) @@ -56243,9 +56384,9 @@ func (m *awsEc2query_deserializeOpResetSnapshotAttribute) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorResetSnapshotAttribute(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorResetInstanceAttribute(response, &metadata) } - output := &ResetSnapshotAttributeOutput{} + output := &ResetInstanceAttributeOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -56257,7 +56398,7 @@ func (m *awsEc2query_deserializeOpResetSnapshotAttribute) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorResetSnapshotAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorResetInstanceAttribute(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)} @@ -56290,14 +56431,14 @@ func awsEc2query_deserializeOpErrorResetSnapshotAttribute(response *smithyhttp.R } } -type awsEc2query_deserializeOpRestoreAddressToClassic struct { +type awsEc2query_deserializeOpResetNetworkInterfaceAttribute struct { } -func (*awsEc2query_deserializeOpRestoreAddressToClassic) ID() string { +func (*awsEc2query_deserializeOpResetNetworkInterfaceAttribute) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRestoreAddressToClassic) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpResetNetworkInterfaceAttribute) 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) @@ -56315,44 +56456,93 @@ func (m *awsEc2query_deserializeOpRestoreAddressToClassic) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRestoreAddressToClassic(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorResetNetworkInterfaceAttribute(response, &metadata) } - output := &RestoreAddressToClassicOutput{} + output := &ResetNetworkInterfaceAttributeOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + Err: fmt.Errorf("failed to discard response body, %w", err), } } - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRestoreAddressToClassicOutput(&output, decoder) + return out, metadata, err +} + +func awsEc2query_deserializeOpErrorResetNetworkInterfaceAttribute(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 + + errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } + return genericError + + } +} + +type awsEc2query_deserializeOpResetSnapshotAttribute struct { +} + +func (*awsEc2query_deserializeOpResetSnapshotAttribute) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpResetSnapshotAttribute) 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 } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsEc2query_deserializeOpErrorResetSnapshotAttribute(response, &metadata) + } + output := &ResetSnapshotAttributeOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + return out, metadata, err } -func awsEc2query_deserializeOpErrorRestoreAddressToClassic(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorResetSnapshotAttribute(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)} @@ -56385,14 +56575,14 @@ func awsEc2query_deserializeOpErrorRestoreAddressToClassic(response *smithyhttp. } } -type awsEc2query_deserializeOpRestoreImageFromRecycleBin struct { +type awsEc2query_deserializeOpRestoreAddressToClassic struct { } -func (*awsEc2query_deserializeOpRestoreImageFromRecycleBin) ID() string { +func (*awsEc2query_deserializeOpRestoreAddressToClassic) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRestoreImageFromRecycleBin) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRestoreAddressToClassic) 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) @@ -56410,9 +56600,9 @@ func (m *awsEc2query_deserializeOpRestoreImageFromRecycleBin) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRestoreImageFromRecycleBin(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRestoreAddressToClassic(response, &metadata) } - output := &RestoreImageFromRecycleBinOutput{} + output := &RestoreAddressToClassicOutput{} out.Result = output var buff [1024]byte @@ -56433,7 +56623,7 @@ func (m *awsEc2query_deserializeOpRestoreImageFromRecycleBin) HandleDeserialize( } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRestoreImageFromRecycleBinOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRestoreAddressToClassicOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -56447,7 +56637,7 @@ func (m *awsEc2query_deserializeOpRestoreImageFromRecycleBin) HandleDeserialize( return out, metadata, err } -func awsEc2query_deserializeOpErrorRestoreImageFromRecycleBin(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRestoreAddressToClassic(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)} @@ -56480,14 +56670,14 @@ func awsEc2query_deserializeOpErrorRestoreImageFromRecycleBin(response *smithyht } } -type awsEc2query_deserializeOpRestoreManagedPrefixListVersion struct { +type awsEc2query_deserializeOpRestoreImageFromRecycleBin struct { } -func (*awsEc2query_deserializeOpRestoreManagedPrefixListVersion) ID() string { +func (*awsEc2query_deserializeOpRestoreImageFromRecycleBin) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRestoreManagedPrefixListVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRestoreImageFromRecycleBin) 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) @@ -56505,9 +56695,9 @@ func (m *awsEc2query_deserializeOpRestoreManagedPrefixListVersion) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRestoreManagedPrefixListVersion(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRestoreImageFromRecycleBin(response, &metadata) } - output := &RestoreManagedPrefixListVersionOutput{} + output := &RestoreImageFromRecycleBinOutput{} out.Result = output var buff [1024]byte @@ -56528,7 +56718,7 @@ func (m *awsEc2query_deserializeOpRestoreManagedPrefixListVersion) HandleDeseria } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRestoreManagedPrefixListVersionOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRestoreImageFromRecycleBinOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -56542,7 +56732,7 @@ func (m *awsEc2query_deserializeOpRestoreManagedPrefixListVersion) HandleDeseria return out, metadata, err } -func awsEc2query_deserializeOpErrorRestoreManagedPrefixListVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRestoreImageFromRecycleBin(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)} @@ -56575,14 +56765,14 @@ func awsEc2query_deserializeOpErrorRestoreManagedPrefixListVersion(response *smi } } -type awsEc2query_deserializeOpRestoreSnapshotFromRecycleBin struct { +type awsEc2query_deserializeOpRestoreManagedPrefixListVersion struct { } -func (*awsEc2query_deserializeOpRestoreSnapshotFromRecycleBin) ID() string { +func (*awsEc2query_deserializeOpRestoreManagedPrefixListVersion) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRestoreSnapshotFromRecycleBin) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRestoreManagedPrefixListVersion) 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) @@ -56600,9 +56790,9 @@ func (m *awsEc2query_deserializeOpRestoreSnapshotFromRecycleBin) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRestoreSnapshotFromRecycleBin(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRestoreManagedPrefixListVersion(response, &metadata) } - output := &RestoreSnapshotFromRecycleBinOutput{} + output := &RestoreManagedPrefixListVersionOutput{} out.Result = output var buff [1024]byte @@ -56623,7 +56813,7 @@ func (m *awsEc2query_deserializeOpRestoreSnapshotFromRecycleBin) HandleDeseriali } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRestoreSnapshotFromRecycleBinOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRestoreManagedPrefixListVersionOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -56637,7 +56827,7 @@ func (m *awsEc2query_deserializeOpRestoreSnapshotFromRecycleBin) HandleDeseriali return out, metadata, err } -func awsEc2query_deserializeOpErrorRestoreSnapshotFromRecycleBin(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRestoreManagedPrefixListVersion(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)} @@ -56670,14 +56860,14 @@ func awsEc2query_deserializeOpErrorRestoreSnapshotFromRecycleBin(response *smith } } -type awsEc2query_deserializeOpRestoreSnapshotTier struct { +type awsEc2query_deserializeOpRestoreSnapshotFromRecycleBin struct { } -func (*awsEc2query_deserializeOpRestoreSnapshotTier) ID() string { +func (*awsEc2query_deserializeOpRestoreSnapshotFromRecycleBin) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRestoreSnapshotTier) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRestoreSnapshotFromRecycleBin) 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) @@ -56695,9 +56885,9 @@ func (m *awsEc2query_deserializeOpRestoreSnapshotTier) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRestoreSnapshotTier(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRestoreSnapshotFromRecycleBin(response, &metadata) } - output := &RestoreSnapshotTierOutput{} + output := &RestoreSnapshotFromRecycleBinOutput{} out.Result = output var buff [1024]byte @@ -56718,7 +56908,7 @@ func (m *awsEc2query_deserializeOpRestoreSnapshotTier) HandleDeserialize(ctx con } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRestoreSnapshotTierOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRestoreSnapshotFromRecycleBinOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -56732,7 +56922,7 @@ func (m *awsEc2query_deserializeOpRestoreSnapshotTier) HandleDeserialize(ctx con return out, metadata, err } -func awsEc2query_deserializeOpErrorRestoreSnapshotTier(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRestoreSnapshotFromRecycleBin(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)} @@ -56765,14 +56955,14 @@ func awsEc2query_deserializeOpErrorRestoreSnapshotTier(response *smithyhttp.Resp } } -type awsEc2query_deserializeOpRevokeClientVpnIngress struct { +type awsEc2query_deserializeOpRestoreSnapshotTier struct { } -func (*awsEc2query_deserializeOpRevokeClientVpnIngress) ID() string { +func (*awsEc2query_deserializeOpRestoreSnapshotTier) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRevokeClientVpnIngress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRestoreSnapshotTier) 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) @@ -56790,9 +56980,9 @@ func (m *awsEc2query_deserializeOpRevokeClientVpnIngress) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRevokeClientVpnIngress(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRestoreSnapshotTier(response, &metadata) } - output := &RevokeClientVpnIngressOutput{} + output := &RestoreSnapshotTierOutput{} out.Result = output var buff [1024]byte @@ -56813,7 +57003,7 @@ func (m *awsEc2query_deserializeOpRevokeClientVpnIngress) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRevokeClientVpnIngressOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRestoreSnapshotTierOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -56827,7 +57017,7 @@ func (m *awsEc2query_deserializeOpRevokeClientVpnIngress) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorRevokeClientVpnIngress(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRestoreSnapshotTier(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)} @@ -56860,14 +57050,14 @@ func awsEc2query_deserializeOpErrorRevokeClientVpnIngress(response *smithyhttp.R } } -type awsEc2query_deserializeOpRevokeSecurityGroupEgress struct { +type awsEc2query_deserializeOpRevokeClientVpnIngress struct { } -func (*awsEc2query_deserializeOpRevokeSecurityGroupEgress) ID() string { +func (*awsEc2query_deserializeOpRevokeClientVpnIngress) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRevokeSecurityGroupEgress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRevokeClientVpnIngress) 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) @@ -56885,9 +57075,9 @@ func (m *awsEc2query_deserializeOpRevokeSecurityGroupEgress) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRevokeSecurityGroupEgress(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRevokeClientVpnIngress(response, &metadata) } - output := &RevokeSecurityGroupEgressOutput{} + output := &RevokeClientVpnIngressOutput{} out.Result = output var buff [1024]byte @@ -56908,7 +57098,7 @@ func (m *awsEc2query_deserializeOpRevokeSecurityGroupEgress) HandleDeserialize(c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRevokeSecurityGroupEgressOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRevokeClientVpnIngressOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -56922,7 +57112,7 @@ func (m *awsEc2query_deserializeOpRevokeSecurityGroupEgress) HandleDeserialize(c return out, metadata, err } -func awsEc2query_deserializeOpErrorRevokeSecurityGroupEgress(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRevokeClientVpnIngress(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)} @@ -56955,14 +57145,14 @@ func awsEc2query_deserializeOpErrorRevokeSecurityGroupEgress(response *smithyhtt } } -type awsEc2query_deserializeOpRevokeSecurityGroupIngress struct { +type awsEc2query_deserializeOpRevokeSecurityGroupEgress struct { } -func (*awsEc2query_deserializeOpRevokeSecurityGroupIngress) ID() string { +func (*awsEc2query_deserializeOpRevokeSecurityGroupEgress) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRevokeSecurityGroupIngress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRevokeSecurityGroupEgress) 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) @@ -56980,9 +57170,9 @@ func (m *awsEc2query_deserializeOpRevokeSecurityGroupIngress) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRevokeSecurityGroupIngress(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRevokeSecurityGroupEgress(response, &metadata) } - output := &RevokeSecurityGroupIngressOutput{} + output := &RevokeSecurityGroupEgressOutput{} out.Result = output var buff [1024]byte @@ -57003,7 +57193,7 @@ func (m *awsEc2query_deserializeOpRevokeSecurityGroupIngress) HandleDeserialize( } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRevokeSecurityGroupIngressOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRevokeSecurityGroupEgressOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -57017,7 +57207,7 @@ func (m *awsEc2query_deserializeOpRevokeSecurityGroupIngress) HandleDeserialize( return out, metadata, err } -func awsEc2query_deserializeOpErrorRevokeSecurityGroupIngress(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRevokeSecurityGroupEgress(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)} @@ -57050,14 +57240,14 @@ func awsEc2query_deserializeOpErrorRevokeSecurityGroupIngress(response *smithyht } } -type awsEc2query_deserializeOpRunInstances struct { +type awsEc2query_deserializeOpRevokeSecurityGroupIngress struct { } -func (*awsEc2query_deserializeOpRunInstances) ID() string { +func (*awsEc2query_deserializeOpRevokeSecurityGroupIngress) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRunInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRevokeSecurityGroupIngress) 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) @@ -57075,9 +57265,9 @@ func (m *awsEc2query_deserializeOpRunInstances) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRunInstances(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRevokeSecurityGroupIngress(response, &metadata) } - output := &RunInstancesOutput{} + output := &RevokeSecurityGroupIngressOutput{} out.Result = output var buff [1024]byte @@ -57098,7 +57288,7 @@ func (m *awsEc2query_deserializeOpRunInstances) HandleDeserialize(ctx context.Co } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRunInstancesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRevokeSecurityGroupIngressOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -57112,7 +57302,7 @@ func (m *awsEc2query_deserializeOpRunInstances) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsEc2query_deserializeOpErrorRunInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRevokeSecurityGroupIngress(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)} @@ -57145,14 +57335,14 @@ func awsEc2query_deserializeOpErrorRunInstances(response *smithyhttp.Response, m } } -type awsEc2query_deserializeOpRunScheduledInstances struct { +type awsEc2query_deserializeOpRunInstances struct { } -func (*awsEc2query_deserializeOpRunScheduledInstances) ID() string { +func (*awsEc2query_deserializeOpRunInstances) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpRunScheduledInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRunInstances) 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) @@ -57170,9 +57360,9 @@ func (m *awsEc2query_deserializeOpRunScheduledInstances) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRunScheduledInstances(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRunInstances(response, &metadata) } - output := &RunScheduledInstancesOutput{} + output := &RunInstancesOutput{} out.Result = output var buff [1024]byte @@ -57193,7 +57383,7 @@ func (m *awsEc2query_deserializeOpRunScheduledInstances) HandleDeserialize(ctx c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRunScheduledInstancesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRunInstancesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -57207,7 +57397,7 @@ func (m *awsEc2query_deserializeOpRunScheduledInstances) HandleDeserialize(ctx c return out, metadata, err } -func awsEc2query_deserializeOpErrorRunScheduledInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRunInstances(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)} @@ -57240,14 +57430,14 @@ func awsEc2query_deserializeOpErrorRunScheduledInstances(response *smithyhttp.Re } } -type awsEc2query_deserializeOpSearchLocalGatewayRoutes struct { +type awsEc2query_deserializeOpRunScheduledInstances struct { } -func (*awsEc2query_deserializeOpSearchLocalGatewayRoutes) ID() string { +func (*awsEc2query_deserializeOpRunScheduledInstances) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpSearchLocalGatewayRoutes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpRunScheduledInstances) 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) @@ -57265,9 +57455,9 @@ func (m *awsEc2query_deserializeOpSearchLocalGatewayRoutes) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorSearchLocalGatewayRoutes(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorRunScheduledInstances(response, &metadata) } - output := &SearchLocalGatewayRoutesOutput{} + output := &RunScheduledInstancesOutput{} out.Result = output var buff [1024]byte @@ -57288,7 +57478,7 @@ func (m *awsEc2query_deserializeOpSearchLocalGatewayRoutes) HandleDeserialize(ct } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentSearchLocalGatewayRoutesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentRunScheduledInstancesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -57302,7 +57492,7 @@ func (m *awsEc2query_deserializeOpSearchLocalGatewayRoutes) HandleDeserialize(ct return out, metadata, err } -func awsEc2query_deserializeOpErrorSearchLocalGatewayRoutes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorRunScheduledInstances(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)} @@ -57335,14 +57525,14 @@ func awsEc2query_deserializeOpErrorSearchLocalGatewayRoutes(response *smithyhttp } } -type awsEc2query_deserializeOpSearchTransitGatewayMulticastGroups struct { +type awsEc2query_deserializeOpSearchLocalGatewayRoutes struct { } -func (*awsEc2query_deserializeOpSearchTransitGatewayMulticastGroups) ID() string { +func (*awsEc2query_deserializeOpSearchLocalGatewayRoutes) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpSearchTransitGatewayMulticastGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpSearchLocalGatewayRoutes) 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) @@ -57360,9 +57550,9 @@ func (m *awsEc2query_deserializeOpSearchTransitGatewayMulticastGroups) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorSearchTransitGatewayMulticastGroups(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorSearchLocalGatewayRoutes(response, &metadata) } - output := &SearchTransitGatewayMulticastGroupsOutput{} + output := &SearchLocalGatewayRoutesOutput{} out.Result = output var buff [1024]byte @@ -57383,7 +57573,7 @@ func (m *awsEc2query_deserializeOpSearchTransitGatewayMulticastGroups) HandleDes } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentSearchTransitGatewayMulticastGroupsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentSearchLocalGatewayRoutesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -57397,7 +57587,7 @@ func (m *awsEc2query_deserializeOpSearchTransitGatewayMulticastGroups) HandleDes return out, metadata, err } -func awsEc2query_deserializeOpErrorSearchTransitGatewayMulticastGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorSearchLocalGatewayRoutes(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)} @@ -57430,14 +57620,14 @@ func awsEc2query_deserializeOpErrorSearchTransitGatewayMulticastGroups(response } } -type awsEc2query_deserializeOpSearchTransitGatewayRoutes struct { +type awsEc2query_deserializeOpSearchTransitGatewayMulticastGroups struct { } -func (*awsEc2query_deserializeOpSearchTransitGatewayRoutes) ID() string { +func (*awsEc2query_deserializeOpSearchTransitGatewayMulticastGroups) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpSearchTransitGatewayRoutes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpSearchTransitGatewayMulticastGroups) 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) @@ -57455,9 +57645,9 @@ func (m *awsEc2query_deserializeOpSearchTransitGatewayRoutes) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorSearchTransitGatewayRoutes(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorSearchTransitGatewayMulticastGroups(response, &metadata) } - output := &SearchTransitGatewayRoutesOutput{} + output := &SearchTransitGatewayMulticastGroupsOutput{} out.Result = output var buff [1024]byte @@ -57478,7 +57668,7 @@ func (m *awsEc2query_deserializeOpSearchTransitGatewayRoutes) HandleDeserialize( } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentSearchTransitGatewayRoutesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentSearchTransitGatewayMulticastGroupsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -57492,79 +57682,7 @@ func (m *awsEc2query_deserializeOpSearchTransitGatewayRoutes) HandleDeserialize( return out, metadata, err } -func awsEc2query_deserializeOpErrorSearchTransitGatewayRoutes(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 - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpSendDiagnosticInterrupt struct { -} - -func (*awsEc2query_deserializeOpSendDiagnosticInterrupt) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpSendDiagnosticInterrupt) 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 - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - 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, awsEc2query_deserializeOpErrorSendDiagnosticInterrupt(response, &metadata) - } - output := &SendDiagnosticInterruptOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorSendDiagnosticInterrupt(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorSearchTransitGatewayMulticastGroups(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)} @@ -57597,14 +57715,14 @@ func awsEc2query_deserializeOpErrorSendDiagnosticInterrupt(response *smithyhttp. } } -type awsEc2query_deserializeOpStartInstances struct { +type awsEc2query_deserializeOpSearchTransitGatewayRoutes struct { } -func (*awsEc2query_deserializeOpStartInstances) ID() string { +func (*awsEc2query_deserializeOpSearchTransitGatewayRoutes) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpStartInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpSearchTransitGatewayRoutes) 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) @@ -57622,9 +57740,9 @@ func (m *awsEc2query_deserializeOpStartInstances) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorStartInstances(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorSearchTransitGatewayRoutes(response, &metadata) } - output := &StartInstancesOutput{} + output := &SearchTransitGatewayRoutesOutput{} out.Result = output var buff [1024]byte @@ -57645,7 +57763,7 @@ func (m *awsEc2query_deserializeOpStartInstances) HandleDeserialize(ctx context. } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentStartInstancesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentSearchTransitGatewayRoutesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -57659,7 +57777,7 @@ func (m *awsEc2query_deserializeOpStartInstances) HandleDeserialize(ctx context. return out, metadata, err } -func awsEc2query_deserializeOpErrorStartInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorSearchTransitGatewayRoutes(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)} @@ -57692,14 +57810,14 @@ func awsEc2query_deserializeOpErrorStartInstances(response *smithyhttp.Response, } } -type awsEc2query_deserializeOpStartNetworkInsightsAccessScopeAnalysis struct { +type awsEc2query_deserializeOpSendDiagnosticInterrupt struct { } -func (*awsEc2query_deserializeOpStartNetworkInsightsAccessScopeAnalysis) ID() string { +func (*awsEc2query_deserializeOpSendDiagnosticInterrupt) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpStartNetworkInsightsAccessScopeAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpSendDiagnosticInterrupt) 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) @@ -57717,44 +57835,21 @@ func (m *awsEc2query_deserializeOpStartNetworkInsightsAccessScopeAnalysis) Handl } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorStartNetworkInsightsAccessScopeAnalysis(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorSendDiagnosticInterrupt(response, &metadata) } - output := &StartNetworkInsightsAccessScopeAnalysisOutput{} + output := &SendDiagnosticInterruptOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentStartNetworkInsightsAccessScopeAnalysisOutput(&output, 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(), + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorStartNetworkInsightsAccessScopeAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorSendDiagnosticInterrupt(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)} @@ -57787,14 +57882,14 @@ func awsEc2query_deserializeOpErrorStartNetworkInsightsAccessScopeAnalysis(respo } } -type awsEc2query_deserializeOpStartNetworkInsightsAnalysis struct { +type awsEc2query_deserializeOpStartInstances struct { } -func (*awsEc2query_deserializeOpStartNetworkInsightsAnalysis) ID() string { +func (*awsEc2query_deserializeOpStartInstances) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpStartNetworkInsightsAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpStartInstances) 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) @@ -57812,9 +57907,9 @@ func (m *awsEc2query_deserializeOpStartNetworkInsightsAnalysis) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorStartNetworkInsightsAnalysis(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorStartInstances(response, &metadata) } - output := &StartNetworkInsightsAnalysisOutput{} + output := &StartInstancesOutput{} out.Result = output var buff [1024]byte @@ -57835,7 +57930,7 @@ func (m *awsEc2query_deserializeOpStartNetworkInsightsAnalysis) HandleDeserializ } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentStartNetworkInsightsAnalysisOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentStartInstancesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -57849,7 +57944,7 @@ func (m *awsEc2query_deserializeOpStartNetworkInsightsAnalysis) HandleDeserializ return out, metadata, err } -func awsEc2query_deserializeOpErrorStartNetworkInsightsAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorStartInstances(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)} @@ -57882,14 +57977,14 @@ func awsEc2query_deserializeOpErrorStartNetworkInsightsAnalysis(response *smithy } } -type awsEc2query_deserializeOpStartVpcEndpointServicePrivateDnsVerification struct { +type awsEc2query_deserializeOpStartNetworkInsightsAccessScopeAnalysis struct { } -func (*awsEc2query_deserializeOpStartVpcEndpointServicePrivateDnsVerification) ID() string { +func (*awsEc2query_deserializeOpStartNetworkInsightsAccessScopeAnalysis) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpStartVpcEndpointServicePrivateDnsVerification) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpStartNetworkInsightsAccessScopeAnalysis) 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) @@ -57907,9 +58002,9 @@ func (m *awsEc2query_deserializeOpStartVpcEndpointServicePrivateDnsVerification) } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorStartVpcEndpointServicePrivateDnsVerification(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorStartNetworkInsightsAccessScopeAnalysis(response, &metadata) } - output := &StartVpcEndpointServicePrivateDnsVerificationOutput{} + output := &StartNetworkInsightsAccessScopeAnalysisOutput{} out.Result = output var buff [1024]byte @@ -57930,7 +58025,7 @@ func (m *awsEc2query_deserializeOpStartVpcEndpointServicePrivateDnsVerification) } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentStartVpcEndpointServicePrivateDnsVerificationOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentStartNetworkInsightsAccessScopeAnalysisOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -57944,7 +58039,7 @@ func (m *awsEc2query_deserializeOpStartVpcEndpointServicePrivateDnsVerification) return out, metadata, err } -func awsEc2query_deserializeOpErrorStartVpcEndpointServicePrivateDnsVerification(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorStartNetworkInsightsAccessScopeAnalysis(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)} @@ -57977,14 +58072,14 @@ func awsEc2query_deserializeOpErrorStartVpcEndpointServicePrivateDnsVerification } } -type awsEc2query_deserializeOpStopInstances struct { +type awsEc2query_deserializeOpStartNetworkInsightsAnalysis struct { } -func (*awsEc2query_deserializeOpStopInstances) ID() string { +func (*awsEc2query_deserializeOpStartNetworkInsightsAnalysis) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpStopInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpStartNetworkInsightsAnalysis) 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) @@ -58002,9 +58097,9 @@ func (m *awsEc2query_deserializeOpStopInstances) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorStopInstances(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorStartNetworkInsightsAnalysis(response, &metadata) } - output := &StopInstancesOutput{} + output := &StartNetworkInsightsAnalysisOutput{} out.Result = output var buff [1024]byte @@ -58025,7 +58120,7 @@ func (m *awsEc2query_deserializeOpStopInstances) HandleDeserialize(ctx context.C } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentStopInstancesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentStartNetworkInsightsAnalysisOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -58039,7 +58134,7 @@ func (m *awsEc2query_deserializeOpStopInstances) HandleDeserialize(ctx context.C return out, metadata, err } -func awsEc2query_deserializeOpErrorStopInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorStartNetworkInsightsAnalysis(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)} @@ -58072,14 +58167,14 @@ func awsEc2query_deserializeOpErrorStopInstances(response *smithyhttp.Response, } } -type awsEc2query_deserializeOpTerminateClientVpnConnections struct { +type awsEc2query_deserializeOpStartVpcEndpointServicePrivateDnsVerification struct { } -func (*awsEc2query_deserializeOpTerminateClientVpnConnections) ID() string { +func (*awsEc2query_deserializeOpStartVpcEndpointServicePrivateDnsVerification) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpTerminateClientVpnConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpStartVpcEndpointServicePrivateDnsVerification) 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) @@ -58097,9 +58192,9 @@ func (m *awsEc2query_deserializeOpTerminateClientVpnConnections) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorTerminateClientVpnConnections(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorStartVpcEndpointServicePrivateDnsVerification(response, &metadata) } - output := &TerminateClientVpnConnectionsOutput{} + output := &StartVpcEndpointServicePrivateDnsVerificationOutput{} out.Result = output var buff [1024]byte @@ -58120,7 +58215,7 @@ func (m *awsEc2query_deserializeOpTerminateClientVpnConnections) HandleDeseriali } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentTerminateClientVpnConnectionsOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentStartVpcEndpointServicePrivateDnsVerificationOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -58134,7 +58229,7 @@ func (m *awsEc2query_deserializeOpTerminateClientVpnConnections) HandleDeseriali return out, metadata, err } -func awsEc2query_deserializeOpErrorTerminateClientVpnConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorStartVpcEndpointServicePrivateDnsVerification(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)} @@ -58167,14 +58262,14 @@ func awsEc2query_deserializeOpErrorTerminateClientVpnConnections(response *smith } } -type awsEc2query_deserializeOpTerminateInstances struct { +type awsEc2query_deserializeOpStopInstances struct { } -func (*awsEc2query_deserializeOpTerminateInstances) ID() string { +func (*awsEc2query_deserializeOpStopInstances) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpTerminateInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpStopInstances) 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) @@ -58192,9 +58287,9 @@ func (m *awsEc2query_deserializeOpTerminateInstances) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorTerminateInstances(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorStopInstances(response, &metadata) } - output := &TerminateInstancesOutput{} + output := &StopInstancesOutput{} out.Result = output var buff [1024]byte @@ -58215,7 +58310,7 @@ func (m *awsEc2query_deserializeOpTerminateInstances) HandleDeserialize(ctx cont } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentTerminateInstancesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentStopInstancesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -58229,7 +58324,7 @@ func (m *awsEc2query_deserializeOpTerminateInstances) HandleDeserialize(ctx cont return out, metadata, err } -func awsEc2query_deserializeOpErrorTerminateInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorStopInstances(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)} @@ -58262,14 +58357,14 @@ func awsEc2query_deserializeOpErrorTerminateInstances(response *smithyhttp.Respo } } -type awsEc2query_deserializeOpUnassignIpv6Addresses struct { +type awsEc2query_deserializeOpTerminateClientVpnConnections struct { } -func (*awsEc2query_deserializeOpUnassignIpv6Addresses) ID() string { +func (*awsEc2query_deserializeOpTerminateClientVpnConnections) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpUnassignIpv6Addresses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpTerminateClientVpnConnections) 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) @@ -58287,9 +58382,9 @@ func (m *awsEc2query_deserializeOpUnassignIpv6Addresses) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorUnassignIpv6Addresses(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorTerminateClientVpnConnections(response, &metadata) } - output := &UnassignIpv6AddressesOutput{} + output := &TerminateClientVpnConnectionsOutput{} out.Result = output var buff [1024]byte @@ -58310,7 +58405,7 @@ func (m *awsEc2query_deserializeOpUnassignIpv6Addresses) HandleDeserialize(ctx c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentUnassignIpv6AddressesOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentTerminateClientVpnConnectionsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -58324,79 +58419,7 @@ func (m *awsEc2query_deserializeOpUnassignIpv6Addresses) HandleDeserialize(ctx c return out, metadata, err } -func awsEc2query_deserializeOpErrorUnassignIpv6Addresses(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 - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpUnassignPrivateIpAddresses struct { -} - -func (*awsEc2query_deserializeOpUnassignPrivateIpAddresses) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpUnassignPrivateIpAddresses) 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 - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - 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, awsEc2query_deserializeOpErrorUnassignPrivateIpAddresses(response, &metadata) - } - output := &UnassignPrivateIpAddressesOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorUnassignPrivateIpAddresses(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorTerminateClientVpnConnections(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)} @@ -58429,14 +58452,14 @@ func awsEc2query_deserializeOpErrorUnassignPrivateIpAddresses(response *smithyht } } -type awsEc2query_deserializeOpUnassignPrivateNatGatewayAddress struct { +type awsEc2query_deserializeOpTerminateInstances struct { } -func (*awsEc2query_deserializeOpUnassignPrivateNatGatewayAddress) ID() string { +func (*awsEc2query_deserializeOpTerminateInstances) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpUnassignPrivateNatGatewayAddress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpTerminateInstances) 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) @@ -58454,9 +58477,9 @@ func (m *awsEc2query_deserializeOpUnassignPrivateNatGatewayAddress) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorUnassignPrivateNatGatewayAddress(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorTerminateInstances(response, &metadata) } - output := &UnassignPrivateNatGatewayAddressOutput{} + output := &TerminateInstancesOutput{} out.Result = output var buff [1024]byte @@ -58477,7 +58500,7 @@ func (m *awsEc2query_deserializeOpUnassignPrivateNatGatewayAddress) HandleDeseri } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentUnassignPrivateNatGatewayAddressOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentTerminateInstancesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -58491,7 +58514,7 @@ func (m *awsEc2query_deserializeOpUnassignPrivateNatGatewayAddress) HandleDeseri return out, metadata, err } -func awsEc2query_deserializeOpErrorUnassignPrivateNatGatewayAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorTerminateInstances(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)} @@ -58524,14 +58547,14 @@ func awsEc2query_deserializeOpErrorUnassignPrivateNatGatewayAddress(response *sm } } -type awsEc2query_deserializeOpUnlockSnapshot struct { +type awsEc2query_deserializeOpUnassignIpv6Addresses struct { } -func (*awsEc2query_deserializeOpUnlockSnapshot) ID() string { +func (*awsEc2query_deserializeOpUnassignIpv6Addresses) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpUnlockSnapshot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpUnassignIpv6Addresses) 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) @@ -58549,9 +58572,9 @@ func (m *awsEc2query_deserializeOpUnlockSnapshot) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorUnlockSnapshot(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorUnassignIpv6Addresses(response, &metadata) } - output := &UnlockSnapshotOutput{} + output := &UnassignIpv6AddressesOutput{} out.Result = output var buff [1024]byte @@ -58572,7 +58595,7 @@ func (m *awsEc2query_deserializeOpUnlockSnapshot) HandleDeserialize(ctx context. } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentUnlockSnapshotOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentUnassignIpv6AddressesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -58586,7 +58609,7 @@ func (m *awsEc2query_deserializeOpUnlockSnapshot) HandleDeserialize(ctx context. return out, metadata, err } -func awsEc2query_deserializeOpErrorUnlockSnapshot(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorUnassignIpv6Addresses(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)} @@ -58619,14 +58642,14 @@ func awsEc2query_deserializeOpErrorUnlockSnapshot(response *smithyhttp.Response, } } -type awsEc2query_deserializeOpUnmonitorInstances struct { +type awsEc2query_deserializeOpUnassignPrivateIpAddresses struct { } -func (*awsEc2query_deserializeOpUnmonitorInstances) ID() string { +func (*awsEc2query_deserializeOpUnassignPrivateIpAddresses) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpUnmonitorInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpUnassignPrivateIpAddresses) 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) @@ -58644,44 +58667,21 @@ func (m *awsEc2query_deserializeOpUnmonitorInstances) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorUnmonitorInstances(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorUnassignPrivateIpAddresses(response, &metadata) } - output := &UnmonitorInstancesOutput{} + output := &UnassignPrivateIpAddressesOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentUnmonitorInstancesOutput(&output, 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(), + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsEc2query_deserializeOpErrorUnmonitorInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorUnassignPrivateIpAddresses(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)} @@ -58714,14 +58714,14 @@ func awsEc2query_deserializeOpErrorUnmonitorInstances(response *smithyhttp.Respo } } -type awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsEgress struct { +type awsEc2query_deserializeOpUnassignPrivateNatGatewayAddress struct { } -func (*awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsEgress) ID() string { +func (*awsEc2query_deserializeOpUnassignPrivateNatGatewayAddress) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsEgress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpUnassignPrivateNatGatewayAddress) 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) @@ -58739,9 +58739,9 @@ func (m *awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsEgress) Han } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorUpdateSecurityGroupRuleDescriptionsEgress(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorUnassignPrivateNatGatewayAddress(response, &metadata) } - output := &UpdateSecurityGroupRuleDescriptionsEgressOutput{} + output := &UnassignPrivateNatGatewayAddressOutput{} out.Result = output var buff [1024]byte @@ -58762,7 +58762,7 @@ func (m *awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsEgress) Han } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentUpdateSecurityGroupRuleDescriptionsEgressOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentUnassignPrivateNatGatewayAddressOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -58776,7 +58776,7 @@ func (m *awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsEgress) Han return out, metadata, err } -func awsEc2query_deserializeOpErrorUpdateSecurityGroupRuleDescriptionsEgress(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorUnassignPrivateNatGatewayAddress(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)} @@ -58809,14 +58809,14 @@ func awsEc2query_deserializeOpErrorUpdateSecurityGroupRuleDescriptionsEgress(res } } -type awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsIngress struct { +type awsEc2query_deserializeOpUnlockSnapshot struct { } -func (*awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsIngress) ID() string { +func (*awsEc2query_deserializeOpUnlockSnapshot) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsIngress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpUnlockSnapshot) 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) @@ -58834,9 +58834,9 @@ func (m *awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsIngress) Ha } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorUpdateSecurityGroupRuleDescriptionsIngress(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorUnlockSnapshot(response, &metadata) } - output := &UpdateSecurityGroupRuleDescriptionsIngressOutput{} + output := &UnlockSnapshotOutput{} out.Result = output var buff [1024]byte @@ -58857,7 +58857,7 @@ func (m *awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsIngress) Ha } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentUpdateSecurityGroupRuleDescriptionsIngressOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentUnlockSnapshotOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -58871,7 +58871,7 @@ func (m *awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsIngress) Ha return out, metadata, err } -func awsEc2query_deserializeOpErrorUpdateSecurityGroupRuleDescriptionsIngress(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorUnlockSnapshot(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)} @@ -58904,14 +58904,14 @@ func awsEc2query_deserializeOpErrorUpdateSecurityGroupRuleDescriptionsIngress(re } } -type awsEc2query_deserializeOpWithdrawByoipCidr struct { +type awsEc2query_deserializeOpUnmonitorInstances struct { } -func (*awsEc2query_deserializeOpWithdrawByoipCidr) ID() string { +func (*awsEc2query_deserializeOpUnmonitorInstances) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpWithdrawByoipCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpUnmonitorInstances) 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) @@ -58929,9 +58929,9 @@ func (m *awsEc2query_deserializeOpWithdrawByoipCidr) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorWithdrawByoipCidr(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorUnmonitorInstances(response, &metadata) } - output := &WithdrawByoipCidrOutput{} + output := &UnmonitorInstancesOutput{} out.Result = output var buff [1024]byte @@ -58952,7 +58952,7 @@ func (m *awsEc2query_deserializeOpWithdrawByoipCidr) HandleDeserialize(ctx conte } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentWithdrawByoipCidrOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentUnmonitorInstancesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -58966,7 +58966,292 @@ func (m *awsEc2query_deserializeOpWithdrawByoipCidr) HandleDeserialize(ctx conte return out, metadata, err } -func awsEc2query_deserializeOpErrorWithdrawByoipCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorUnmonitorInstances(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 + + errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsEgress struct { +} + +func (*awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsEgress) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsEgress) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsEc2query_deserializeOpErrorUpdateSecurityGroupRuleDescriptionsEgress(response, &metadata) + } + output := &UpdateSecurityGroupRuleDescriptionsEgressOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentUpdateSecurityGroupRuleDescriptionsEgressOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsEc2query_deserializeOpErrorUpdateSecurityGroupRuleDescriptionsEgress(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 + + errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsIngress struct { +} + +func (*awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsIngress) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsIngress) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsEc2query_deserializeOpErrorUpdateSecurityGroupRuleDescriptionsIngress(response, &metadata) + } + output := &UpdateSecurityGroupRuleDescriptionsIngressOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentUpdateSecurityGroupRuleDescriptionsIngressOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsEc2query_deserializeOpErrorUpdateSecurityGroupRuleDescriptionsIngress(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 + + errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsEc2query_deserializeOpWithdrawByoipCidr struct { +} + +func (*awsEc2query_deserializeOpWithdrawByoipCidr) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpWithdrawByoipCidr) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsEc2query_deserializeOpErrorWithdrawByoipCidr(response, &metadata) + } + output := &WithdrawByoipCidrOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentWithdrawByoipCidrOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsEc2query_deserializeOpErrorWithdrawByoipCidr(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)} @@ -118856,6 +119141,264 @@ func awsEc2query_deserializeDocumentResponseLaunchTemplateData(v **types.Respons return nil } +func awsEc2query_deserializeDocumentRevokedSecurityGroupRule(v **types.RevokedSecurityGroupRule, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.RevokedSecurityGroupRule + if *v == nil { + sv = &types.RevokedSecurityGroupRule{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("cidrIpv4", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CidrIpv4 = ptr.String(xtv) + } + + case strings.EqualFold("cidrIpv6", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CidrIpv6 = ptr.String(xtv) + } + + case strings.EqualFold("description", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Description = ptr.String(xtv) + } + + case strings.EqualFold("fromPort", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.FromPort = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("groupId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.GroupId = ptr.String(xtv) + } + + case strings.EqualFold("ipProtocol", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.IpProtocol = ptr.String(xtv) + } + + case strings.EqualFold("isEgress", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.IsEgress = ptr.Bool(xtv) + } + + case strings.EqualFold("prefixListId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PrefixListId = ptr.String(xtv) + } + + case strings.EqualFold("referencedGroupId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ReferencedGroupId = ptr.String(xtv) + } + + case strings.EqualFold("securityGroupRuleId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SecurityGroupRuleId = ptr.String(xtv) + } + + case strings.EqualFold("toPort", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.ToPort = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentRevokedSecurityGroupRuleList(v *[]types.RevokedSecurityGroupRule, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.RevokedSecurityGroupRule + if *v == nil { + sv = make([]types.RevokedSecurityGroupRule, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("item", t.Name.Local): + var col types.RevokedSecurityGroupRule + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsEc2query_deserializeDocumentRevokedSecurityGroupRule(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentRevokedSecurityGroupRuleListUnwrapped(v *[]types.RevokedSecurityGroupRule, decoder smithyxml.NodeDecoder) error { + var sv []types.RevokedSecurityGroupRule + if *v == nil { + sv = make([]types.RevokedSecurityGroupRule, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.RevokedSecurityGroupRule + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsEc2query_deserializeDocumentRevokedSecurityGroupRule(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} func awsEc2query_deserializeDocumentRootDeviceTypeList(v *[]types.RootDeviceType, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -120990,6 +121533,19 @@ func awsEc2query_deserializeDocumentSecurityGroup(v **types.SecurityGroup, decod sv.OwnerId = ptr.String(xtv) } + case strings.EqualFold("securityGroupArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SecurityGroupArn = ptr.String(xtv) + } + case strings.EqualFold("tagSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { @@ -121876,6 +122432,19 @@ func awsEc2query_deserializeDocumentSecurityGroupRule(v **types.SecurityGroupRul return err } + case strings.EqualFold("securityGroupRuleArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SecurityGroupRuleArn = ptr.String(xtv) + } + case strings.EqualFold("securityGroupRuleId", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -121994,6 +122563,175 @@ func awsEc2query_deserializeDocumentSecurityGroupRuleListUnwrapped(v *[]types.Se *v = sv return nil } +func awsEc2query_deserializeDocumentSecurityGroupVpcAssociation(v **types.SecurityGroupVpcAssociation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.SecurityGroupVpcAssociation + if *v == nil { + sv = &types.SecurityGroupVpcAssociation{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("groupId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.GroupId = ptr.String(xtv) + } + + case strings.EqualFold("state", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.State = types.SecurityGroupVpcAssociationState(xtv) + } + + case strings.EqualFold("stateReason", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.StateReason = ptr.String(xtv) + } + + case strings.EqualFold("vpcId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.VpcId = ptr.String(xtv) + } + + case strings.EqualFold("vpcOwnerId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.VpcOwnerId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentSecurityGroupVpcAssociationList(v *[]types.SecurityGroupVpcAssociation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.SecurityGroupVpcAssociation + if *v == nil { + sv = make([]types.SecurityGroupVpcAssociation, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("item", t.Name.Local): + var col types.SecurityGroupVpcAssociation + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsEc2query_deserializeDocumentSecurityGroupVpcAssociation(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentSecurityGroupVpcAssociationListUnwrapped(v *[]types.SecurityGroupVpcAssociation, decoder smithyxml.NodeDecoder) error { + var sv []types.SecurityGroupVpcAssociation + if *v == nil { + sv = make([]types.SecurityGroupVpcAssociation, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.SecurityGroupVpcAssociation + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsEc2query_deserializeDocumentSecurityGroupVpcAssociation(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} func awsEc2query_deserializeDocumentServiceConfiguration(v **types.ServiceConfiguration, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -146199,6 +146937,55 @@ func awsEc2query_deserializeOpDocumentAssociateRouteTableOutput(v **AssociateRou return nil } +func awsEc2query_deserializeOpDocumentAssociateSecurityGroupVpcOutput(v **AssociateSecurityGroupVpcOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *AssociateSecurityGroupVpcOutput + if *v == nil { + sv = &AssociateSecurityGroupVpcOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("state", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.State = types.SecurityGroupVpcAssociationState(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeOpDocumentAssociateSubnetCidrBlockOutput(v **AssociateSubnetCidrBlockOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -150104,6 +150891,19 @@ func awsEc2query_deserializeOpDocumentCreateSecurityGroupOutput(v **CreateSecuri sv.GroupId = ptr.String(xtv) } + case strings.EqualFold("securityGroupArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SecurityGroupArn = ptr.String(xtv) + } + case strings.EqualFold("tagSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { @@ -158392,13 +159192,123 @@ func awsEc2query_deserializeOpDocumentDescribeIpamResourceDiscoveriesOutput(v ** return nil } -func awsEc2query_deserializeOpDocumentDescribeIpamResourceDiscoveryAssociationsOutput(v **DescribeIpamResourceDiscoveryAssociationsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeIpamResourceDiscoveryAssociationsOutput(v **DescribeIpamResourceDiscoveryAssociationsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DescribeIpamResourceDiscoveryAssociationsOutput + if *v == nil { + sv = &DescribeIpamResourceDiscoveryAssociationsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ipamResourceDiscoveryAssociationSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentIpamResourceDiscoveryAssociationSet(&sv.IpamResourceDiscoveryAssociations, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("nextToken", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextToken = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeOpDocumentDescribeIpamScopesOutput(v **DescribeIpamScopesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DescribeIpamScopesOutput + if *v == nil { + sv = &DescribeIpamScopesOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ipamScopeSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentIpamScopeSet(&sv.IpamScopes, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("nextToken", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextToken = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeOpDocumentDescribeIpamsOutput(v **DescribeIpamsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeIpamResourceDiscoveryAssociationsOutput + var sv *DescribeIpamsOutput if *v == nil { - sv = &DescribeIpamResourceDiscoveryAssociationsOutput{} + sv = &DescribeIpamsOutput{} } else { sv = *v } @@ -158414,9 +159324,9 @@ func awsEc2query_deserializeOpDocumentDescribeIpamResourceDiscoveryAssociationsO originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("ipamResourceDiscoveryAssociationSet", t.Name.Local): + case strings.EqualFold("ipamSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamResourceDiscoveryAssociationSet(&sv.IpamResourceDiscoveryAssociations, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentIpamSet(&sv.Ipams, nodeDecoder); err != nil { return err } @@ -158447,13 +159357,13 @@ func awsEc2query_deserializeOpDocumentDescribeIpamResourceDiscoveryAssociationsO return nil } -func awsEc2query_deserializeOpDocumentDescribeIpamScopesOutput(v **DescribeIpamScopesOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeIpv6PoolsOutput(v **DescribeIpv6PoolsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeIpamScopesOutput + var sv *DescribeIpv6PoolsOutput if *v == nil { - sv = &DescribeIpamScopesOutput{} + sv = &DescribeIpv6PoolsOutput{} } else { sv = *v } @@ -158469,9 +159379,9 @@ func awsEc2query_deserializeOpDocumentDescribeIpamScopesOutput(v **DescribeIpamS originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("ipamScopeSet", t.Name.Local): + case strings.EqualFold("ipv6PoolSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamScopeSet(&sv.IpamScopes, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentIpv6PoolSet(&sv.Ipv6Pools, nodeDecoder); err != nil { return err } @@ -158502,13 +159412,13 @@ func awsEc2query_deserializeOpDocumentDescribeIpamScopesOutput(v **DescribeIpamS return nil } -func awsEc2query_deserializeOpDocumentDescribeIpamsOutput(v **DescribeIpamsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeKeyPairsOutput(v **DescribeKeyPairsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeIpamsOutput + var sv *DescribeKeyPairsOutput if *v == nil { - sv = &DescribeIpamsOutput{} + sv = &DescribeKeyPairsOutput{} } else { sv = *v } @@ -158524,9 +159434,51 @@ func awsEc2query_deserializeOpDocumentDescribeIpamsOutput(v **DescribeIpamsOutpu originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("ipamSet", t.Name.Local): + case strings.EqualFold("keySet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamSet(&sv.Ipams, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentKeyPairList(&sv.KeyPairs, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeOpDocumentDescribeLaunchTemplatesOutput(v **DescribeLaunchTemplatesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DescribeLaunchTemplatesOutput + if *v == nil { + sv = &DescribeLaunchTemplatesOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("launchTemplates", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentLaunchTemplateSet(&sv.LaunchTemplates, nodeDecoder); err != nil { return err } @@ -158557,13 +159509,13 @@ func awsEc2query_deserializeOpDocumentDescribeIpamsOutput(v **DescribeIpamsOutpu return nil } -func awsEc2query_deserializeOpDocumentDescribeIpv6PoolsOutput(v **DescribeIpv6PoolsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeLaunchTemplateVersionsOutput(v **DescribeLaunchTemplateVersionsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeIpv6PoolsOutput + var sv *DescribeLaunchTemplateVersionsOutput if *v == nil { - sv = &DescribeIpv6PoolsOutput{} + sv = &DescribeLaunchTemplateVersionsOutput{} } else { sv = *v } @@ -158579,9 +159531,9 @@ func awsEc2query_deserializeOpDocumentDescribeIpv6PoolsOutput(v **DescribeIpv6Po originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("ipv6PoolSet", t.Name.Local): + case strings.EqualFold("launchTemplateVersionSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpv6PoolSet(&sv.Ipv6Pools, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentLaunchTemplateVersionSet(&sv.LaunchTemplateVersions, nodeDecoder); err != nil { return err } @@ -158612,13 +159564,13 @@ func awsEc2query_deserializeOpDocumentDescribeIpv6PoolsOutput(v **DescribeIpv6Po return nil } -func awsEc2query_deserializeOpDocumentDescribeKeyPairsOutput(v **DescribeKeyPairsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTablesOutput(v **DescribeLocalGatewayRouteTablesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeKeyPairsOutput + var sv *DescribeLocalGatewayRouteTablesOutput if *v == nil { - sv = &DescribeKeyPairsOutput{} + sv = &DescribeLocalGatewayRouteTablesOutput{} } else { sv = *v } @@ -158634,11 +159586,24 @@ func awsEc2query_deserializeOpDocumentDescribeKeyPairsOutput(v **DescribeKeyPair originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("keySet", t.Name.Local): + case strings.EqualFold("localGatewayRouteTableSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentKeyPairList(&sv.KeyPairs, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableSet(&sv.LocalGatewayRouteTables, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("nextToken", t.Name.Local): + val, err := decoder.Value() + if err != nil { return err } + if val == nil { + break + } + { + xtv := string(val) + sv.NextToken = ptr.String(xtv) + } default: // Do nothing and ignore the unexpected tag element @@ -158654,13 +159619,13 @@ func awsEc2query_deserializeOpDocumentDescribeKeyPairsOutput(v **DescribeKeyPair return nil } -func awsEc2query_deserializeOpDocumentDescribeLaunchTemplatesOutput(v **DescribeLaunchTemplatesOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput(v **DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeLaunchTemplatesOutput + var sv *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput if *v == nil { - sv = &DescribeLaunchTemplatesOutput{} + sv = &DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput{} } else { sv = *v } @@ -158676,9 +159641,9 @@ func awsEc2query_deserializeOpDocumentDescribeLaunchTemplatesOutput(v **Describe originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("launchTemplates", t.Name.Local): + case strings.EqualFold("localGatewayRouteTableVirtualInterfaceGroupAssociationSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateSet(&sv.LaunchTemplates, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociationSet(&sv.LocalGatewayRouteTableVirtualInterfaceGroupAssociations, nodeDecoder); err != nil { return err } @@ -158709,13 +159674,13 @@ func awsEc2query_deserializeOpDocumentDescribeLaunchTemplatesOutput(v **Describe return nil } -func awsEc2query_deserializeOpDocumentDescribeLaunchTemplateVersionsOutput(v **DescribeLaunchTemplateVersionsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTableVpcAssociationsOutput(v **DescribeLocalGatewayRouteTableVpcAssociationsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeLaunchTemplateVersionsOutput + var sv *DescribeLocalGatewayRouteTableVpcAssociationsOutput if *v == nil { - sv = &DescribeLaunchTemplateVersionsOutput{} + sv = &DescribeLocalGatewayRouteTableVpcAssociationsOutput{} } else { sv = *v } @@ -158731,9 +159696,9 @@ func awsEc2query_deserializeOpDocumentDescribeLaunchTemplateVersionsOutput(v **D originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("launchTemplateVersionSet", t.Name.Local): + case strings.EqualFold("localGatewayRouteTableVpcAssociationSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateVersionSet(&sv.LaunchTemplateVersions, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVpcAssociationSet(&sv.LocalGatewayRouteTableVpcAssociations, nodeDecoder); err != nil { return err } @@ -158764,13 +159729,13 @@ func awsEc2query_deserializeOpDocumentDescribeLaunchTemplateVersionsOutput(v **D return nil } -func awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTablesOutput(v **DescribeLocalGatewayRouteTablesOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeLocalGatewaysOutput(v **DescribeLocalGatewaysOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeLocalGatewayRouteTablesOutput + var sv *DescribeLocalGatewaysOutput if *v == nil { - sv = &DescribeLocalGatewayRouteTablesOutput{} + sv = &DescribeLocalGatewaysOutput{} } else { sv = *v } @@ -158786,9 +159751,9 @@ func awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTablesOutput(v ** originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("localGatewayRouteTableSet", t.Name.Local): + case strings.EqualFold("localGatewaySet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableSet(&sv.LocalGatewayRouteTables, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentLocalGatewaySet(&sv.LocalGateways, nodeDecoder); err != nil { return err } @@ -158819,13 +159784,13 @@ func awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTablesOutput(v ** return nil } -func awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput(v **DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeLocalGatewayVirtualInterfaceGroupsOutput(v **DescribeLocalGatewayVirtualInterfaceGroupsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput + var sv *DescribeLocalGatewayVirtualInterfaceGroupsOutput if *v == nil { - sv = &DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput{} + sv = &DescribeLocalGatewayVirtualInterfaceGroupsOutput{} } else { sv = *v } @@ -158841,9 +159806,9 @@ func awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTableVirtualInter originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("localGatewayRouteTableVirtualInterfaceGroupAssociationSet", t.Name.Local): + case strings.EqualFold("localGatewayVirtualInterfaceGroupSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociationSet(&sv.LocalGatewayRouteTableVirtualInterfaceGroupAssociations, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceGroupSet(&sv.LocalGatewayVirtualInterfaceGroups, nodeDecoder); err != nil { return err } @@ -158874,13 +159839,13 @@ func awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTableVirtualInter return nil } -func awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTableVpcAssociationsOutput(v **DescribeLocalGatewayRouteTableVpcAssociationsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeLocalGatewayVirtualInterfacesOutput(v **DescribeLocalGatewayVirtualInterfacesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeLocalGatewayRouteTableVpcAssociationsOutput + var sv *DescribeLocalGatewayVirtualInterfacesOutput if *v == nil { - sv = &DescribeLocalGatewayRouteTableVpcAssociationsOutput{} + sv = &DescribeLocalGatewayVirtualInterfacesOutput{} } else { sv = *v } @@ -158896,9 +159861,9 @@ func awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTableVpcAssociati originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("localGatewayRouteTableVpcAssociationSet", t.Name.Local): + case strings.EqualFold("localGatewayVirtualInterfaceSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVpcAssociationSet(&sv.LocalGatewayRouteTableVpcAssociations, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceSet(&sv.LocalGatewayVirtualInterfaces, nodeDecoder); err != nil { return err } @@ -158929,13 +159894,13 @@ func awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTableVpcAssociati return nil } -func awsEc2query_deserializeOpDocumentDescribeLocalGatewaysOutput(v **DescribeLocalGatewaysOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeLockedSnapshotsOutput(v **DescribeLockedSnapshotsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeLocalGatewaysOutput + var sv *DescribeLockedSnapshotsOutput if *v == nil { - sv = &DescribeLocalGatewaysOutput{} + sv = &DescribeLockedSnapshotsOutput{} } else { sv = *v } @@ -158951,12 +159916,6 @@ func awsEc2query_deserializeOpDocumentDescribeLocalGatewaysOutput(v **DescribeLo originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("localGatewaySet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewaySet(&sv.LocalGateways, nodeDecoder); err != nil { - return err - } - case strings.EqualFold("nextToken", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -158970,6 +159929,12 @@ func awsEc2query_deserializeOpDocumentDescribeLocalGatewaysOutput(v **DescribeLo sv.NextToken = ptr.String(xtv) } + case strings.EqualFold("snapshotSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentLockedSnapshotsInfoList(&sv.Snapshots, nodeDecoder); err != nil { + return err + } + default: // Do nothing and ignore the unexpected tag element err = decoder.Decoder.Skip() @@ -158984,13 +159949,13 @@ func awsEc2query_deserializeOpDocumentDescribeLocalGatewaysOutput(v **DescribeLo return nil } -func awsEc2query_deserializeOpDocumentDescribeLocalGatewayVirtualInterfaceGroupsOutput(v **DescribeLocalGatewayVirtualInterfaceGroupsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeMacHostsOutput(v **DescribeMacHostsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeLocalGatewayVirtualInterfaceGroupsOutput + var sv *DescribeMacHostsOutput if *v == nil { - sv = &DescribeLocalGatewayVirtualInterfaceGroupsOutput{} + sv = &DescribeMacHostsOutput{} } else { sv = *v } @@ -159006,9 +159971,9 @@ func awsEc2query_deserializeOpDocumentDescribeLocalGatewayVirtualInterfaceGroups originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("localGatewayVirtualInterfaceGroupSet", t.Name.Local): + case strings.EqualFold("macHostSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceGroupSet(&sv.LocalGatewayVirtualInterfaceGroups, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentMacHostList(&sv.MacHosts, nodeDecoder); err != nil { return err } @@ -159039,13 +160004,13 @@ func awsEc2query_deserializeOpDocumentDescribeLocalGatewayVirtualInterfaceGroups return nil } -func awsEc2query_deserializeOpDocumentDescribeLocalGatewayVirtualInterfacesOutput(v **DescribeLocalGatewayVirtualInterfacesOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeManagedPrefixListsOutput(v **DescribeManagedPrefixListsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeLocalGatewayVirtualInterfacesOutput + var sv *DescribeManagedPrefixListsOutput if *v == nil { - sv = &DescribeLocalGatewayVirtualInterfacesOutput{} + sv = &DescribeManagedPrefixListsOutput{} } else { sv = *v } @@ -159061,12 +160026,6 @@ func awsEc2query_deserializeOpDocumentDescribeLocalGatewayVirtualInterfacesOutpu originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("localGatewayVirtualInterfaceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceSet(&sv.LocalGatewayVirtualInterfaces, nodeDecoder); err != nil { - return err - } - case strings.EqualFold("nextToken", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -159080,6 +160039,12 @@ func awsEc2query_deserializeOpDocumentDescribeLocalGatewayVirtualInterfacesOutpu sv.NextToken = ptr.String(xtv) } + case strings.EqualFold("prefixListSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentManagedPrefixListSet(&sv.PrefixLists, nodeDecoder); err != nil { + return err + } + default: // Do nothing and ignore the unexpected tag element err = decoder.Decoder.Skip() @@ -159094,13 +160059,13 @@ func awsEc2query_deserializeOpDocumentDescribeLocalGatewayVirtualInterfacesOutpu return nil } -func awsEc2query_deserializeOpDocumentDescribeLockedSnapshotsOutput(v **DescribeLockedSnapshotsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeMovingAddressesOutput(v **DescribeMovingAddressesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeLockedSnapshotsOutput + var sv *DescribeMovingAddressesOutput if *v == nil { - sv = &DescribeLockedSnapshotsOutput{} + sv = &DescribeMovingAddressesOutput{} } else { sv = *v } @@ -159116,6 +160081,12 @@ func awsEc2query_deserializeOpDocumentDescribeLockedSnapshotsOutput(v **Describe originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { + case strings.EqualFold("movingAddressStatusSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentMovingAddressStatusSet(&sv.MovingAddressStatuses, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("nextToken", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -159129,12 +160100,6 @@ func awsEc2query_deserializeOpDocumentDescribeLockedSnapshotsOutput(v **Describe sv.NextToken = ptr.String(xtv) } - case strings.EqualFold("snapshotSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLockedSnapshotsInfoList(&sv.Snapshots, nodeDecoder); err != nil { - return err - } - default: // Do nothing and ignore the unexpected tag element err = decoder.Decoder.Skip() @@ -159149,13 +160114,13 @@ func awsEc2query_deserializeOpDocumentDescribeLockedSnapshotsOutput(v **Describe return nil } -func awsEc2query_deserializeOpDocumentDescribeMacHostsOutput(v **DescribeMacHostsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeNatGatewaysOutput(v **DescribeNatGatewaysOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeMacHostsOutput + var sv *DescribeNatGatewaysOutput if *v == nil { - sv = &DescribeMacHostsOutput{} + sv = &DescribeNatGatewaysOutput{} } else { sv = *v } @@ -159171,9 +160136,9 @@ func awsEc2query_deserializeOpDocumentDescribeMacHostsOutput(v **DescribeMacHost originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("macHostSet", t.Name.Local): + case strings.EqualFold("natGatewaySet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentMacHostList(&sv.MacHosts, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentNatGatewayList(&sv.NatGateways, nodeDecoder); err != nil { return err } @@ -159204,13 +160169,13 @@ func awsEc2query_deserializeOpDocumentDescribeMacHostsOutput(v **DescribeMacHost return nil } -func awsEc2query_deserializeOpDocumentDescribeManagedPrefixListsOutput(v **DescribeManagedPrefixListsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeNetworkAclsOutput(v **DescribeNetworkAclsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeManagedPrefixListsOutput + var sv *DescribeNetworkAclsOutput if *v == nil { - sv = &DescribeManagedPrefixListsOutput{} + sv = &DescribeNetworkAclsOutput{} } else { sv = *v } @@ -159226,6 +160191,12 @@ func awsEc2query_deserializeOpDocumentDescribeManagedPrefixListsOutput(v **Descr originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { + case strings.EqualFold("networkAclSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentNetworkAclList(&sv.NetworkAcls, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("nextToken", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -159239,12 +160210,6 @@ func awsEc2query_deserializeOpDocumentDescribeManagedPrefixListsOutput(v **Descr sv.NextToken = ptr.String(xtv) } - case strings.EqualFold("prefixListSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentManagedPrefixListSet(&sv.PrefixLists, nodeDecoder); err != nil { - return err - } - default: // Do nothing and ignore the unexpected tag element err = decoder.Decoder.Skip() @@ -159259,13 +160224,13 @@ func awsEc2query_deserializeOpDocumentDescribeManagedPrefixListsOutput(v **Descr return nil } -func awsEc2query_deserializeOpDocumentDescribeMovingAddressesOutput(v **DescribeMovingAddressesOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAccessScopeAnalysesOutput(v **DescribeNetworkInsightsAccessScopeAnalysesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeMovingAddressesOutput + var sv *DescribeNetworkInsightsAccessScopeAnalysesOutput if *v == nil { - sv = &DescribeMovingAddressesOutput{} + sv = &DescribeNetworkInsightsAccessScopeAnalysesOutput{} } else { sv = *v } @@ -159281,9 +160246,9 @@ func awsEc2query_deserializeOpDocumentDescribeMovingAddressesOutput(v **Describe originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("movingAddressStatusSet", t.Name.Local): + case strings.EqualFold("networkInsightsAccessScopeAnalysisSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentMovingAddressStatusSet(&sv.MovingAddressStatuses, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentNetworkInsightsAccessScopeAnalysisList(&sv.NetworkInsightsAccessScopeAnalyses, nodeDecoder); err != nil { return err } @@ -159314,13 +160279,13 @@ func awsEc2query_deserializeOpDocumentDescribeMovingAddressesOutput(v **Describe return nil } -func awsEc2query_deserializeOpDocumentDescribeNatGatewaysOutput(v **DescribeNatGatewaysOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAccessScopesOutput(v **DescribeNetworkInsightsAccessScopesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeNatGatewaysOutput + var sv *DescribeNetworkInsightsAccessScopesOutput if *v == nil { - sv = &DescribeNatGatewaysOutput{} + sv = &DescribeNetworkInsightsAccessScopesOutput{} } else { sv = *v } @@ -159336,9 +160301,9 @@ func awsEc2query_deserializeOpDocumentDescribeNatGatewaysOutput(v **DescribeNatG originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("natGatewaySet", t.Name.Local): + case strings.EqualFold("networkInsightsAccessScopeSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNatGatewayList(&sv.NatGateways, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentNetworkInsightsAccessScopeList(&sv.NetworkInsightsAccessScopes, nodeDecoder); err != nil { return err } @@ -159369,13 +160334,13 @@ func awsEc2query_deserializeOpDocumentDescribeNatGatewaysOutput(v **DescribeNatG return nil } -func awsEc2query_deserializeOpDocumentDescribeNetworkAclsOutput(v **DescribeNetworkAclsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAnalysesOutput(v **DescribeNetworkInsightsAnalysesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeNetworkAclsOutput + var sv *DescribeNetworkInsightsAnalysesOutput if *v == nil { - sv = &DescribeNetworkAclsOutput{} + sv = &DescribeNetworkInsightsAnalysesOutput{} } else { sv = *v } @@ -159391,9 +160356,9 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkAclsOutput(v **DescribeNetw originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("networkAclSet", t.Name.Local): + case strings.EqualFold("networkInsightsAnalysisSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkAclList(&sv.NetworkAcls, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentNetworkInsightsAnalysisList(&sv.NetworkInsightsAnalyses, nodeDecoder); err != nil { return err } @@ -159424,13 +160389,13 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkAclsOutput(v **DescribeNetw return nil } -func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAccessScopeAnalysesOutput(v **DescribeNetworkInsightsAccessScopeAnalysesOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsPathsOutput(v **DescribeNetworkInsightsPathsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeNetworkInsightsAccessScopeAnalysesOutput + var sv *DescribeNetworkInsightsPathsOutput if *v == nil { - sv = &DescribeNetworkInsightsAccessScopeAnalysesOutput{} + sv = &DescribeNetworkInsightsPathsOutput{} } else { sv = *v } @@ -159446,9 +160411,9 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAccessScopeAnalyses originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("networkInsightsAccessScopeAnalysisSet", t.Name.Local): + case strings.EqualFold("networkInsightsPathSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInsightsAccessScopeAnalysisList(&sv.NetworkInsightsAccessScopeAnalyses, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentNetworkInsightsPathList(&sv.NetworkInsightsPaths, nodeDecoder); err != nil { return err } @@ -159479,13 +160444,13 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAccessScopeAnalyses return nil } -func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAccessScopesOutput(v **DescribeNetworkInsightsAccessScopesOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeNetworkInterfaceAttributeOutput(v **DescribeNetworkInterfaceAttributeOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeNetworkInsightsAccessScopesOutput + var sv *DescribeNetworkInterfaceAttributeOutput if *v == nil { - sv = &DescribeNetworkInsightsAccessScopesOutput{} + sv = &DescribeNetworkInterfaceAttributeOutput{} } else { sv = *v } @@ -159501,13 +160466,41 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAccessScopesOutput( originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("networkInsightsAccessScopeSet", t.Name.Local): + case strings.EqualFold("associatePublicIpAddress", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.AssociatePublicIpAddress = ptr.Bool(xtv) + } + + case strings.EqualFold("attachment", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInsightsAccessScopeList(&sv.NetworkInsightsAccessScopes, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentNetworkInterfaceAttachment(&sv.Attachment, nodeDecoder); err != nil { return err } - case strings.EqualFold("nextToken", t.Name.Local): + case strings.EqualFold("description", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentAttributeValue(&sv.Description, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("groupSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.Groups, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("networkInterfaceId", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -159517,7 +160510,13 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAccessScopesOutput( } { xtv := string(val) - sv.NextToken = ptr.String(xtv) + sv.NetworkInterfaceId = ptr.String(xtv) + } + + case strings.EqualFold("sourceDestCheck", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.SourceDestCheck, nodeDecoder); err != nil { + return err } default: @@ -159534,13 +160533,13 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAccessScopesOutput( return nil } -func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAnalysesOutput(v **DescribeNetworkInsightsAnalysesOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeNetworkInterfacePermissionsOutput(v **DescribeNetworkInterfacePermissionsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeNetworkInsightsAnalysesOutput + var sv *DescribeNetworkInterfacePermissionsOutput if *v == nil { - sv = &DescribeNetworkInsightsAnalysesOutput{} + sv = &DescribeNetworkInterfacePermissionsOutput{} } else { sv = *v } @@ -159556,9 +160555,9 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAnalysesOutput(v ** originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("networkInsightsAnalysisSet", t.Name.Local): + case strings.EqualFold("networkInterfacePermissions", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInsightsAnalysisList(&sv.NetworkInsightsAnalyses, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentNetworkInterfacePermissionList(&sv.NetworkInterfacePermissions, nodeDecoder); err != nil { return err } @@ -159589,13 +160588,13 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAnalysesOutput(v ** return nil } -func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsPathsOutput(v **DescribeNetworkInsightsPathsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeNetworkInterfacesOutput(v **DescribeNetworkInterfacesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeNetworkInsightsPathsOutput + var sv *DescribeNetworkInterfacesOutput if *v == nil { - sv = &DescribeNetworkInsightsPathsOutput{} + sv = &DescribeNetworkInterfacesOutput{} } else { sv = *v } @@ -159611,9 +160610,9 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsPathsOutput(v **Des originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("networkInsightsPathSet", t.Name.Local): + case strings.EqualFold("networkInterfaceSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInsightsPathList(&sv.NetworkInsightsPaths, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentNetworkInterfaceList(&sv.NetworkInterfaces, nodeDecoder); err != nil { return err } @@ -159644,13 +160643,13 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsPathsOutput(v **Des return nil } -func awsEc2query_deserializeOpDocumentDescribeNetworkInterfaceAttributeOutput(v **DescribeNetworkInterfaceAttributeOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribePlacementGroupsOutput(v **DescribePlacementGroupsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeNetworkInterfaceAttributeOutput + var sv *DescribePlacementGroupsOutput if *v == nil { - sv = &DescribeNetworkInterfaceAttributeOutput{} + sv = &DescribePlacementGroupsOutput{} } else { sv = *v } @@ -159666,41 +160665,49 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkInterfaceAttributeOutput(v originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("associatePublicIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.AssociatePublicIpAddress = ptr.Bool(xtv) - } - - case strings.EqualFold("attachment", t.Name.Local): + case strings.EqualFold("placementGroupSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInterfaceAttachment(&sv.Attachment, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentPlacementGroupList(&sv.PlacementGroups, nodeDecoder); err != nil { return err } - case strings.EqualFold("description", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeValue(&sv.Description, nodeDecoder); err != nil { + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { return err } - case strings.EqualFold("groupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.Groups, nodeDecoder); err != nil { - return err - } + } + decoder = originalDecoder + } + *v = sv + return nil +} - case strings.EqualFold("networkInterfaceId", t.Name.Local): +func awsEc2query_deserializeOpDocumentDescribePrefixListsOutput(v **DescribePrefixListsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DescribePrefixListsOutput + if *v == nil { + sv = &DescribePrefixListsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("nextToken", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -159710,12 +160717,12 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkInterfaceAttributeOutput(v } { xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) + sv.NextToken = ptr.String(xtv) } - case strings.EqualFold("sourceDestCheck", t.Name.Local): + case strings.EqualFold("prefixListSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.SourceDestCheck, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentPrefixListSet(&sv.PrefixLists, nodeDecoder); err != nil { return err } @@ -159733,13 +160740,13 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkInterfaceAttributeOutput(v return nil } -func awsEc2query_deserializeOpDocumentDescribeNetworkInterfacePermissionsOutput(v **DescribeNetworkInterfacePermissionsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribePrincipalIdFormatOutput(v **DescribePrincipalIdFormatOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeNetworkInterfacePermissionsOutput + var sv *DescribePrincipalIdFormatOutput if *v == nil { - sv = &DescribeNetworkInterfacePermissionsOutput{} + sv = &DescribePrincipalIdFormatOutput{} } else { sv = *v } @@ -159755,12 +160762,6 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkInterfacePermissionsOutput( originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("networkInterfacePermissions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInterfacePermissionList(&sv.NetworkInterfacePermissions, nodeDecoder); err != nil { - return err - } - case strings.EqualFold("nextToken", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -159774,6 +160775,12 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkInterfacePermissionsOutput( sv.NextToken = ptr.String(xtv) } + case strings.EqualFold("principalSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentPrincipalIdFormatList(&sv.Principals, nodeDecoder); err != nil { + return err + } + default: // Do nothing and ignore the unexpected tag element err = decoder.Decoder.Skip() @@ -159788,13 +160795,13 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkInterfacePermissionsOutput( return nil } -func awsEc2query_deserializeOpDocumentDescribeNetworkInterfacesOutput(v **DescribeNetworkInterfacesOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribePublicIpv4PoolsOutput(v **DescribePublicIpv4PoolsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeNetworkInterfacesOutput + var sv *DescribePublicIpv4PoolsOutput if *v == nil { - sv = &DescribeNetworkInterfacesOutput{} + sv = &DescribePublicIpv4PoolsOutput{} } else { sv = *v } @@ -159810,12 +160817,6 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkInterfacesOutput(v **Descri originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("networkInterfaceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInterfaceList(&sv.NetworkInterfaces, nodeDecoder); err != nil { - return err - } - case strings.EqualFold("nextToken", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -159829,6 +160830,12 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkInterfacesOutput(v **Descri sv.NextToken = ptr.String(xtv) } + case strings.EqualFold("publicIpv4PoolSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentPublicIpv4PoolSet(&sv.PublicIpv4Pools, nodeDecoder); err != nil { + return err + } + default: // Do nothing and ignore the unexpected tag element err = decoder.Decoder.Skip() @@ -159843,13 +160850,13 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkInterfacesOutput(v **Descri return nil } -func awsEc2query_deserializeOpDocumentDescribePlacementGroupsOutput(v **DescribePlacementGroupsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeRegionsOutput(v **DescribeRegionsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribePlacementGroupsOutput + var sv *DescribeRegionsOutput if *v == nil { - sv = &DescribePlacementGroupsOutput{} + sv = &DescribeRegionsOutput{} } else { sv = *v } @@ -159865,9 +160872,9 @@ func awsEc2query_deserializeOpDocumentDescribePlacementGroupsOutput(v **Describe originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("placementGroupSet", t.Name.Local): + case strings.EqualFold("regionInfo", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPlacementGroupList(&sv.PlacementGroups, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentRegionList(&sv.Regions, nodeDecoder); err != nil { return err } @@ -159885,13 +160892,13 @@ func awsEc2query_deserializeOpDocumentDescribePlacementGroupsOutput(v **Describe return nil } -func awsEc2query_deserializeOpDocumentDescribePrefixListsOutput(v **DescribePrefixListsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeReplaceRootVolumeTasksOutput(v **DescribeReplaceRootVolumeTasksOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribePrefixListsOutput + var sv *DescribeReplaceRootVolumeTasksOutput if *v == nil { - sv = &DescribePrefixListsOutput{} + sv = &DescribeReplaceRootVolumeTasksOutput{} } else { sv = *v } @@ -159920,9 +160927,9 @@ func awsEc2query_deserializeOpDocumentDescribePrefixListsOutput(v **DescribePref sv.NextToken = ptr.String(xtv) } - case strings.EqualFold("prefixListSet", t.Name.Local): + case strings.EqualFold("replaceRootVolumeTaskSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPrefixListSet(&sv.PrefixLists, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentReplaceRootVolumeTasks(&sv.ReplaceRootVolumeTasks, nodeDecoder); err != nil { return err } @@ -159940,13 +160947,13 @@ func awsEc2query_deserializeOpDocumentDescribePrefixListsOutput(v **DescribePref return nil } -func awsEc2query_deserializeOpDocumentDescribePrincipalIdFormatOutput(v **DescribePrincipalIdFormatOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeReservedInstancesListingsOutput(v **DescribeReservedInstancesListingsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribePrincipalIdFormatOutput + var sv *DescribeReservedInstancesListingsOutput if *v == nil { - sv = &DescribePrincipalIdFormatOutput{} + sv = &DescribeReservedInstancesListingsOutput{} } else { sv = *v } @@ -159962,22 +160969,9 @@ func awsEc2query_deserializeOpDocumentDescribePrincipalIdFormatOutput(v **Descri originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("principalSet", t.Name.Local): + case strings.EqualFold("reservedInstancesListingsSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPrincipalIdFormatList(&sv.Principals, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentReservedInstancesListingList(&sv.ReservedInstancesListings, nodeDecoder); err != nil { return err } @@ -159995,13 +160989,13 @@ func awsEc2query_deserializeOpDocumentDescribePrincipalIdFormatOutput(v **Descri return nil } -func awsEc2query_deserializeOpDocumentDescribePublicIpv4PoolsOutput(v **DescribePublicIpv4PoolsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeReservedInstancesModificationsOutput(v **DescribeReservedInstancesModificationsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribePublicIpv4PoolsOutput + var sv *DescribeReservedInstancesModificationsOutput if *v == nil { - sv = &DescribePublicIpv4PoolsOutput{} + sv = &DescribeReservedInstancesModificationsOutput{} } else { sv = *v } @@ -160030,51 +161024,9 @@ func awsEc2query_deserializeOpDocumentDescribePublicIpv4PoolsOutput(v **Describe sv.NextToken = ptr.String(xtv) } - case strings.EqualFold("publicIpv4PoolSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPublicIpv4PoolSet(&sv.PublicIpv4Pools, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeRegionsOutput(v **DescribeRegionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeRegionsOutput - if *v == nil { - sv = &DescribeRegionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("regionInfo", t.Name.Local): + case strings.EqualFold("reservedInstancesModificationsSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentRegionList(&sv.Regions, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentReservedInstancesModificationList(&sv.ReservedInstancesModifications, nodeDecoder); err != nil { return err } @@ -160092,13 +161044,13 @@ func awsEc2query_deserializeOpDocumentDescribeRegionsOutput(v **DescribeRegionsO return nil } -func awsEc2query_deserializeOpDocumentDescribeReplaceRootVolumeTasksOutput(v **DescribeReplaceRootVolumeTasksOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeReservedInstancesOfferingsOutput(v **DescribeReservedInstancesOfferingsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeReplaceRootVolumeTasksOutput + var sv *DescribeReservedInstancesOfferingsOutput if *v == nil { - sv = &DescribeReplaceRootVolumeTasksOutput{} + sv = &DescribeReservedInstancesOfferingsOutput{} } else { sv = *v } @@ -160127,9 +161079,9 @@ func awsEc2query_deserializeOpDocumentDescribeReplaceRootVolumeTasksOutput(v **D sv.NextToken = ptr.String(xtv) } - case strings.EqualFold("replaceRootVolumeTaskSet", t.Name.Local): + case strings.EqualFold("reservedInstancesOfferingsSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReplaceRootVolumeTasks(&sv.ReplaceRootVolumeTasks, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentReservedInstancesOfferingList(&sv.ReservedInstancesOfferings, nodeDecoder); err != nil { return err } @@ -160147,13 +161099,13 @@ func awsEc2query_deserializeOpDocumentDescribeReplaceRootVolumeTasksOutput(v **D return nil } -func awsEc2query_deserializeOpDocumentDescribeReservedInstancesListingsOutput(v **DescribeReservedInstancesListingsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeReservedInstancesOutput(v **DescribeReservedInstancesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeReservedInstancesListingsOutput + var sv *DescribeReservedInstancesOutput if *v == nil { - sv = &DescribeReservedInstancesListingsOutput{} + sv = &DescribeReservedInstancesOutput{} } else { sv = *v } @@ -160169,9 +161121,9 @@ func awsEc2query_deserializeOpDocumentDescribeReservedInstancesListingsOutput(v originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("reservedInstancesListingsSet", t.Name.Local): + case strings.EqualFold("reservedInstancesSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReservedInstancesListingList(&sv.ReservedInstancesListings, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentReservedInstancesList(&sv.ReservedInstances, nodeDecoder); err != nil { return err } @@ -160189,13 +161141,13 @@ func awsEc2query_deserializeOpDocumentDescribeReservedInstancesListingsOutput(v return nil } -func awsEc2query_deserializeOpDocumentDescribeReservedInstancesModificationsOutput(v **DescribeReservedInstancesModificationsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeRouteTablesOutput(v **DescribeRouteTablesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeReservedInstancesModificationsOutput + var sv *DescribeRouteTablesOutput if *v == nil { - sv = &DescribeReservedInstancesModificationsOutput{} + sv = &DescribeRouteTablesOutput{} } else { sv = *v } @@ -160224,9 +161176,9 @@ func awsEc2query_deserializeOpDocumentDescribeReservedInstancesModificationsOutp sv.NextToken = ptr.String(xtv) } - case strings.EqualFold("reservedInstancesModificationsSet", t.Name.Local): + case strings.EqualFold("routeTableSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReservedInstancesModificationList(&sv.ReservedInstancesModifications, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentRouteTableList(&sv.RouteTables, nodeDecoder); err != nil { return err } @@ -160244,13 +161196,13 @@ func awsEc2query_deserializeOpDocumentDescribeReservedInstancesModificationsOutp return nil } -func awsEc2query_deserializeOpDocumentDescribeReservedInstancesOfferingsOutput(v **DescribeReservedInstancesOfferingsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeScheduledInstanceAvailabilityOutput(v **DescribeScheduledInstanceAvailabilityOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeReservedInstancesOfferingsOutput + var sv *DescribeScheduledInstanceAvailabilityOutput if *v == nil { - sv = &DescribeReservedInstancesOfferingsOutput{} + sv = &DescribeScheduledInstanceAvailabilityOutput{} } else { sv = *v } @@ -160279,51 +161231,9 @@ func awsEc2query_deserializeOpDocumentDescribeReservedInstancesOfferingsOutput(v sv.NextToken = ptr.String(xtv) } - case strings.EqualFold("reservedInstancesOfferingsSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReservedInstancesOfferingList(&sv.ReservedInstancesOfferings, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeReservedInstancesOutput(v **DescribeReservedInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeReservedInstancesOutput - if *v == nil { - sv = &DescribeReservedInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("reservedInstancesSet", t.Name.Local): + case strings.EqualFold("scheduledInstanceAvailabilitySet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReservedInstancesList(&sv.ReservedInstances, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentScheduledInstanceAvailabilitySet(&sv.ScheduledInstanceAvailabilitySet, nodeDecoder); err != nil { return err } @@ -160341,13 +161251,13 @@ func awsEc2query_deserializeOpDocumentDescribeReservedInstancesOutput(v **Descri return nil } -func awsEc2query_deserializeOpDocumentDescribeRouteTablesOutput(v **DescribeRouteTablesOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeScheduledInstancesOutput(v **DescribeScheduledInstancesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeRouteTablesOutput + var sv *DescribeScheduledInstancesOutput if *v == nil { - sv = &DescribeRouteTablesOutput{} + sv = &DescribeScheduledInstancesOutput{} } else { sv = *v } @@ -160376,9 +161286,9 @@ func awsEc2query_deserializeOpDocumentDescribeRouteTablesOutput(v **DescribeRout sv.NextToken = ptr.String(xtv) } - case strings.EqualFold("routeTableSet", t.Name.Local): + case strings.EqualFold("scheduledInstanceSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentRouteTableList(&sv.RouteTables, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentScheduledInstanceSet(&sv.ScheduledInstanceSet, nodeDecoder); err != nil { return err } @@ -160396,13 +161306,13 @@ func awsEc2query_deserializeOpDocumentDescribeRouteTablesOutput(v **DescribeRout return nil } -func awsEc2query_deserializeOpDocumentDescribeScheduledInstanceAvailabilityOutput(v **DescribeScheduledInstanceAvailabilityOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeSecurityGroupReferencesOutput(v **DescribeSecurityGroupReferencesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeScheduledInstanceAvailabilityOutput + var sv *DescribeSecurityGroupReferencesOutput if *v == nil { - sv = &DescribeScheduledInstanceAvailabilityOutput{} + sv = &DescribeSecurityGroupReferencesOutput{} } else { sv = *v } @@ -160418,22 +161328,9 @@ func awsEc2query_deserializeOpDocumentDescribeScheduledInstanceAvailabilityOutpu originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("scheduledInstanceAvailabilitySet", t.Name.Local): + case strings.EqualFold("securityGroupReferenceSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentScheduledInstanceAvailabilitySet(&sv.ScheduledInstanceAvailabilitySet, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentSecurityGroupReferences(&sv.SecurityGroupReferenceSet, nodeDecoder); err != nil { return err } @@ -160451,13 +161348,13 @@ func awsEc2query_deserializeOpDocumentDescribeScheduledInstanceAvailabilityOutpu return nil } -func awsEc2query_deserializeOpDocumentDescribeScheduledInstancesOutput(v **DescribeScheduledInstancesOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeSecurityGroupRulesOutput(v **DescribeSecurityGroupRulesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeScheduledInstancesOutput + var sv *DescribeSecurityGroupRulesOutput if *v == nil { - sv = &DescribeScheduledInstancesOutput{} + sv = &DescribeSecurityGroupRulesOutput{} } else { sv = *v } @@ -160486,51 +161383,9 @@ func awsEc2query_deserializeOpDocumentDescribeScheduledInstancesOutput(v **Descr sv.NextToken = ptr.String(xtv) } - case strings.EqualFold("scheduledInstanceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentScheduledInstanceSet(&sv.ScheduledInstanceSet, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeSecurityGroupReferencesOutput(v **DescribeSecurityGroupReferencesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeSecurityGroupReferencesOutput - if *v == nil { - sv = &DescribeSecurityGroupReferencesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("securityGroupReferenceSet", t.Name.Local): + case strings.EqualFold("securityGroupRuleSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSecurityGroupReferences(&sv.SecurityGroupReferenceSet, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentSecurityGroupRuleList(&sv.SecurityGroupRules, nodeDecoder); err != nil { return err } @@ -160548,13 +161403,13 @@ func awsEc2query_deserializeOpDocumentDescribeSecurityGroupReferencesOutput(v ** return nil } -func awsEc2query_deserializeOpDocumentDescribeSecurityGroupRulesOutput(v **DescribeSecurityGroupRulesOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeSecurityGroupsOutput(v **DescribeSecurityGroupsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeSecurityGroupRulesOutput + var sv *DescribeSecurityGroupsOutput if *v == nil { - sv = &DescribeSecurityGroupRulesOutput{} + sv = &DescribeSecurityGroupsOutput{} } else { sv = *v } @@ -160583,9 +161438,9 @@ func awsEc2query_deserializeOpDocumentDescribeSecurityGroupRulesOutput(v **Descr sv.NextToken = ptr.String(xtv) } - case strings.EqualFold("securityGroupRuleSet", t.Name.Local): + case strings.EqualFold("securityGroupInfo", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSecurityGroupRuleList(&sv.SecurityGroupRules, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentSecurityGroupList(&sv.SecurityGroups, nodeDecoder); err != nil { return err } @@ -160603,13 +161458,13 @@ func awsEc2query_deserializeOpDocumentDescribeSecurityGroupRulesOutput(v **Descr return nil } -func awsEc2query_deserializeOpDocumentDescribeSecurityGroupsOutput(v **DescribeSecurityGroupsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeSecurityGroupVpcAssociationsOutput(v **DescribeSecurityGroupVpcAssociationsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeSecurityGroupsOutput + var sv *DescribeSecurityGroupVpcAssociationsOutput if *v == nil { - sv = &DescribeSecurityGroupsOutput{} + sv = &DescribeSecurityGroupVpcAssociationsOutput{} } else { sv = *v } @@ -160638,9 +161493,9 @@ func awsEc2query_deserializeOpDocumentDescribeSecurityGroupsOutput(v **DescribeS sv.NextToken = ptr.String(xtv) } - case strings.EqualFold("securityGroupInfo", t.Name.Local): + case strings.EqualFold("securityGroupVpcAssociationSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSecurityGroupList(&sv.SecurityGroups, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentSecurityGroupVpcAssociationList(&sv.SecurityGroupVpcAssociations, nodeDecoder); err != nil { return err } @@ -164917,6 +165772,55 @@ func awsEc2query_deserializeOpDocumentDisassociateNatGatewayAddressOutput(v **Di return nil } +func awsEc2query_deserializeOpDocumentDisassociateSecurityGroupVpcOutput(v **DisassociateSecurityGroupVpcOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DisassociateSecurityGroupVpcOutput + if *v == nil { + sv = &DisassociateSecurityGroupVpcOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("state", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.State = types.SecurityGroupVpcAssociationState(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeOpDocumentDisassociateSubnetCidrBlockOutput(v **DisassociateSubnetCidrBlockOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -175149,6 +176053,12 @@ func awsEc2query_deserializeOpDocumentRevokeSecurityGroupEgressOutput(v **Revoke sv.Return = ptr.Bool(xtv) } + case strings.EqualFold("revokedSecurityGroupRuleSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentRevokedSecurityGroupRuleList(&sv.RevokedSecurityGroupRules, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("unknownIpPermissionSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsEc2query_deserializeDocumentIpPermissionList(&sv.UnknownIpPermissions, nodeDecoder); err != nil { @@ -175207,6 +176117,12 @@ func awsEc2query_deserializeOpDocumentRevokeSecurityGroupIngressOutput(v **Revok sv.Return = ptr.Bool(xtv) } + case strings.EqualFold("revokedSecurityGroupRuleSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentRevokedSecurityGroupRuleList(&sv.RevokedSecurityGroupRules, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("unknownIpPermissionSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsEc2query_deserializeDocumentIpPermissionList(&sv.UnknownIpPermissions, nodeDecoder); err != nil { diff --git a/service/ec2/generated.json b/service/ec2/generated.json index 7426e57d550..7631a3dd7ef 100644 --- a/service/ec2/generated.json +++ b/service/ec2/generated.json @@ -37,6 +37,7 @@ "api_op_AssociateIpamResourceDiscovery.go", "api_op_AssociateNatGatewayAddress.go", "api_op_AssociateRouteTable.go", + "api_op_AssociateSecurityGroupVpc.go", "api_op_AssociateSubnetCidrBlock.go", "api_op_AssociateTransitGatewayMulticastDomain.go", "api_op_AssociateTransitGatewayPolicyTable.go", @@ -338,6 +339,7 @@ "api_op_DescribeScheduledInstances.go", "api_op_DescribeSecurityGroupReferences.go", "api_op_DescribeSecurityGroupRules.go", + "api_op_DescribeSecurityGroupVpcAssociations.go", "api_op_DescribeSecurityGroups.go", "api_op_DescribeSnapshotAttribute.go", "api_op_DescribeSnapshotTierStatus.go", @@ -421,6 +423,7 @@ "api_op_DisassociateIpamResourceDiscovery.go", "api_op_DisassociateNatGatewayAddress.go", "api_op_DisassociateRouteTable.go", + "api_op_DisassociateSecurityGroupVpc.go", "api_op_DisassociateSubnetCidrBlock.go", "api_op_DisassociateTransitGatewayMulticastDomain.go", "api_op_DisassociateTransitGatewayPolicyTable.go", diff --git a/service/ec2/serializers.go b/service/ec2/serializers.go index d9054698b33..7d889125e17 100644 --- a/service/ec2/serializers.go +++ b/service/ec2/serializers.go @@ -1908,6 +1908,76 @@ func (m *awsEc2query_serializeOpAssociateRouteTable) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } +type awsEc2query_serializeOpAssociateSecurityGroupVpc struct { +} + +func (*awsEc2query_serializeOpAssociateSecurityGroupVpc) ID() string { + return "OperationSerializer" +} + +func (m *awsEc2query_serializeOpAssociateSecurityGroupVpc) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*AssociateSecurityGroupVpcInput) + _ = 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-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("AssociateSecurityGroupVpc") + body.Key("Version").String("2016-11-15") + + if err := awsEc2query_serializeOpDocumentAssociateSecurityGroupVpcInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsEc2query_serializeOpAssociateSubnetCidrBlock struct { } @@ -22978,6 +23048,76 @@ func (m *awsEc2query_serializeOpDescribeSecurityGroups) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } +type awsEc2query_serializeOpDescribeSecurityGroupVpcAssociations struct { +} + +func (*awsEc2query_serializeOpDescribeSecurityGroupVpcAssociations) ID() string { + return "OperationSerializer" +} + +func (m *awsEc2query_serializeOpDescribeSecurityGroupVpcAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DescribeSecurityGroupVpcAssociationsInput) + _ = 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-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("DescribeSecurityGroupVpcAssociations") + body.Key("Version").String("2016-11-15") + + if err := awsEc2query_serializeOpDocumentDescribeSecurityGroupVpcAssociationsInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsEc2query_serializeOpDescribeSnapshotAttribute struct { } @@ -28718,6 +28858,76 @@ func (m *awsEc2query_serializeOpDisassociateRouteTable) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } +type awsEc2query_serializeOpDisassociateSecurityGroupVpc struct { +} + +func (*awsEc2query_serializeOpDisassociateSecurityGroupVpc) ID() string { + return "OperationSerializer" +} + +func (m *awsEc2query_serializeOpDisassociateSecurityGroupVpc) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DisassociateSecurityGroupVpcInput) + _ = 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-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("DisassociateSecurityGroupVpc") + body.Key("Version").String("2016-11-15") + + if err := awsEc2query_serializeOpDocumentDisassociateSecurityGroupVpcInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsEc2query_serializeOpDisassociateSubnetCidrBlock struct { } @@ -55065,6 +55275,28 @@ func awsEc2query_serializeOpDocumentAssociateRouteTableInput(v *AssociateRouteTa return nil } +func awsEc2query_serializeOpDocumentAssociateSecurityGroupVpcInput(v *AssociateSecurityGroupVpcInput, value query.Value) error { + object := value.Object() + _ = object + + if v.DryRun != nil { + objectKey := object.Key("DryRun") + objectKey.Boolean(*v.DryRun) + } + + if v.GroupId != nil { + objectKey := object.Key("GroupId") + objectKey.String(*v.GroupId) + } + + if v.VpcId != nil { + objectKey := object.Key("VpcId") + objectKey.String(*v.VpcId) + } + + return nil +} + func awsEc2query_serializeOpDocumentAssociateSubnetCidrBlockInput(v *AssociateSubnetCidrBlockInput, value query.Value) error { object := value.Object() _ = object @@ -64931,6 +65163,35 @@ func awsEc2query_serializeOpDocumentDescribeSecurityGroupsInput(v *DescribeSecur return nil } +func awsEc2query_serializeOpDocumentDescribeSecurityGroupVpcAssociationsInput(v *DescribeSecurityGroupVpcAssociationsInput, value query.Value) error { + object := value.Object() + _ = object + + if v.DryRun != nil { + objectKey := object.Key("DryRun") + objectKey.Boolean(*v.DryRun) + } + + if v.Filters != nil { + objectKey := object.FlatKey("Filter") + if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { + return err + } + } + + if v.MaxResults != nil { + objectKey := object.Key("MaxResults") + objectKey.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + objectKey := object.Key("NextToken") + objectKey.String(*v.NextToken) + } + + return nil +} + func awsEc2query_serializeOpDocumentDescribeSnapshotAttributeInput(v *DescribeSnapshotAttributeInput, value query.Value) error { object := value.Object() _ = object @@ -67277,6 +67538,28 @@ func awsEc2query_serializeOpDocumentDisassociateRouteTableInput(v *DisassociateR return nil } +func awsEc2query_serializeOpDocumentDisassociateSecurityGroupVpcInput(v *DisassociateSecurityGroupVpcInput, value query.Value) error { + object := value.Object() + _ = object + + if v.DryRun != nil { + objectKey := object.Key("DryRun") + objectKey.Boolean(*v.DryRun) + } + + if v.GroupId != nil { + objectKey := object.Key("GroupId") + objectKey.String(*v.GroupId) + } + + if v.VpcId != nil { + objectKey := object.Key("VpcId") + objectKey.String(*v.VpcId) + } + + return nil +} + func awsEc2query_serializeOpDocumentDisassociateSubnetCidrBlockInput(v *DisassociateSubnetCidrBlockInput, value query.Value) error { object := value.Object() _ = object diff --git a/service/ec2/snapshot/api_op_AssociateSecurityGroupVpc.go.snap b/service/ec2/snapshot/api_op_AssociateSecurityGroupVpc.go.snap new file mode 100644 index 00000000000..c8c851f7ac2 --- /dev/null +++ b/service/ec2/snapshot/api_op_AssociateSecurityGroupVpc.go.snap @@ -0,0 +1,41 @@ +AssociateSecurityGroupVpc + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/ec2/snapshot/api_op_DescribeSecurityGroupVpcAssociations.go.snap b/service/ec2/snapshot/api_op_DescribeSecurityGroupVpcAssociations.go.snap new file mode 100644 index 00000000000..e119de0f33c --- /dev/null +++ b/service/ec2/snapshot/api_op_DescribeSecurityGroupVpcAssociations.go.snap @@ -0,0 +1,40 @@ +DescribeSecurityGroupVpcAssociations + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/ec2/snapshot/api_op_DisassociateSecurityGroupVpc.go.snap b/service/ec2/snapshot/api_op_DisassociateSecurityGroupVpc.go.snap new file mode 100644 index 00000000000..9d4deb41748 --- /dev/null +++ b/service/ec2/snapshot/api_op_DisassociateSecurityGroupVpc.go.snap @@ -0,0 +1,41 @@ +DisassociateSecurityGroupVpc + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/ec2/snapshot_test.go b/service/ec2/snapshot_test.go index 6594d47faa1..db30388b899 100644 --- a/service/ec2/snapshot_test.go +++ b/service/ec2/snapshot_test.go @@ -386,6 +386,18 @@ func TestCheckSnapshot_AssociateRouteTable(t *testing.T) { } } +func TestCheckSnapshot_AssociateSecurityGroupVpc(t *testing.T) { + svc := New(Options{}) + _, err := svc.AssociateSecurityGroupVpc(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "AssociateSecurityGroupVpc") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_AssociateSubnetCidrBlock(t *testing.T) { svc := New(Options{}) _, err := svc.AssociateSubnetCidrBlock(context.Background(), nil, func(o *Options) { @@ -3998,6 +4010,18 @@ func TestCheckSnapshot_DescribeSecurityGroups(t *testing.T) { } } +func TestCheckSnapshot_DescribeSecurityGroupVpcAssociations(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeSecurityGroupVpcAssociations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeSecurityGroupVpcAssociations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribeSnapshotAttribute(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeSnapshotAttribute(context.Background(), nil, func(o *Options) { @@ -4982,6 +5006,18 @@ func TestCheckSnapshot_DisassociateRouteTable(t *testing.T) { } } +func TestCheckSnapshot_DisassociateSecurityGroupVpc(t *testing.T) { + svc := New(Options{}) + _, err := svc.DisassociateSecurityGroupVpc(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DisassociateSecurityGroupVpc") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DisassociateSubnetCidrBlock(t *testing.T) { svc := New(Options{}) _, err := svc.DisassociateSubnetCidrBlock(context.Background(), nil, func(o *Options) { @@ -7993,6 +8029,18 @@ func TestUpdateSnapshot_AssociateRouteTable(t *testing.T) { } } +func TestUpdateSnapshot_AssociateSecurityGroupVpc(t *testing.T) { + svc := New(Options{}) + _, err := svc.AssociateSecurityGroupVpc(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "AssociateSecurityGroupVpc") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_AssociateSubnetCidrBlock(t *testing.T) { svc := New(Options{}) _, err := svc.AssociateSubnetCidrBlock(context.Background(), nil, func(o *Options) { @@ -11605,6 +11653,18 @@ func TestUpdateSnapshot_DescribeSecurityGroups(t *testing.T) { } } +func TestUpdateSnapshot_DescribeSecurityGroupVpcAssociations(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeSecurityGroupVpcAssociations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeSecurityGroupVpcAssociations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribeSnapshotAttribute(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeSnapshotAttribute(context.Background(), nil, func(o *Options) { @@ -12589,6 +12649,18 @@ func TestUpdateSnapshot_DisassociateRouteTable(t *testing.T) { } } +func TestUpdateSnapshot_DisassociateSecurityGroupVpc(t *testing.T) { + svc := New(Options{}) + _, err := svc.DisassociateSecurityGroupVpc(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DisassociateSecurityGroupVpc") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DisassociateSubnetCidrBlock(t *testing.T) { svc := New(Options{}) _, err := svc.DisassociateSubnetCidrBlock(context.Background(), nil, func(o *Options) { diff --git a/service/ec2/types/enums.go b/service/ec2/types/enums.go index 558bf7229af..c267c308b17 100644 --- a/service/ec2/types/enums.go +++ b/service/ec2/types/enums.go @@ -7519,6 +7519,34 @@ func (SecurityGroupReferencingSupportValue) Values() []SecurityGroupReferencingS } } +type SecurityGroupVpcAssociationState string + +// Enum values for SecurityGroupVpcAssociationState +const ( + SecurityGroupVpcAssociationStateAssociating SecurityGroupVpcAssociationState = "associating" + SecurityGroupVpcAssociationStateAssociated SecurityGroupVpcAssociationState = "associated" + SecurityGroupVpcAssociationStateAssociationFailed SecurityGroupVpcAssociationState = "association-failed" + SecurityGroupVpcAssociationStateDisassociating SecurityGroupVpcAssociationState = "disassociating" + SecurityGroupVpcAssociationStateDisassociated SecurityGroupVpcAssociationState = "disassociated" + SecurityGroupVpcAssociationStateDisassociationFailed SecurityGroupVpcAssociationState = "disassociation-failed" +) + +// Values returns all known values for SecurityGroupVpcAssociationState. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SecurityGroupVpcAssociationState) Values() []SecurityGroupVpcAssociationState { + return []SecurityGroupVpcAssociationState{ + "associating", + "associated", + "association-failed", + "disassociating", + "disassociated", + "disassociation-failed", + } +} + type SelfServicePortal string // Enum values for SelfServicePortal diff --git a/service/ec2/types/types.go b/service/ec2/types/types.go index b3af19d8945..d4169cc7168 100644 --- a/service/ec2/types/types.go +++ b/service/ec2/types/types.go @@ -7024,7 +7024,7 @@ type InstanceNetworkInterface struct { // The type of network interface. // - // Valid values: interface | efa | trunk + // Valid values: interface | efa | efa-only | trunk InterfaceType *string // The IPv4 delegated prefixes that are assigned to the network interface. @@ -7177,7 +7177,10 @@ type InstanceNetworkInterfaceSpecification struct { // The type of network interface. // - // Valid values: interface | efa + // If you specify efa-only , do not assign any IP addresses to the network + // interface. EFA-only network interfaces do not support IP addresses. + // + // Valid values: interface | efa | efa-only InterfaceType *string // The number of IPv4 delegated prefixes to be automatically assigned to the @@ -8318,7 +8321,8 @@ type InstanceTypeInfo struct { // The supported root device types. SupportedRootDeviceTypes []RootDeviceType - // Indicates whether the instance type is offered for spot or On-Demand. + // Indicates whether the instance type is offered for spot, On-Demand, or Capacity + // Blocks. SupportedUsageClasses []UsageClassType // The supported virtualization types. @@ -10435,11 +10439,14 @@ type LaunchTemplateInstanceNetworkInterfaceSpecificationRequest struct { Groups []string // The type of network interface. To create an Elastic Fabric Adapter (EFA), - // specify efa . For more information, see [Elastic Fabric Adapter] in the Amazon EC2 User Guide. + // specify efa or efa . For more information, see [Elastic Fabric Adapter] in the Amazon EC2 User Guide. // // If you are not creating an EFA, specify interface or omit this parameter. // - // Valid values: interface | efa + // If you specify efa-only , do not assign any IP addresses to the network + // interface. EFA-only network interfaces do not support IP addresses. + // + // Valid values: interface | efa | efa-only // // [Elastic Fabric Adapter]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html InterfaceType *string @@ -14699,6 +14706,48 @@ type ResponseLaunchTemplateData struct { noSmithyDocumentSerde } +// A security group rule removed with [RevokeSecurityGroupEgress] or [RevokeSecurityGroupIngress]. +// +// [RevokeSecurityGroupIngress]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RevokeSecurityGroupIngress.html +// [RevokeSecurityGroupEgress]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RevokeSecurityGroupEgress.html +type RevokedSecurityGroupRule struct { + + // The IPv4 CIDR of the traffic source. + CidrIpv4 *string + + // The IPv6 CIDR of the traffic source. + CidrIpv6 *string + + // A description of the revoked security group rule. + Description *string + + // The 'from' port number of the security group rule. + FromPort *int32 + + // A security group ID. + GroupId *string + + // The security group rule's protocol. + IpProtocol *string + + // Defines if a security group rule is an outbound rule. + IsEgress *bool + + // The ID of a prefix list that's the traffic source. + PrefixListId *string + + // The ID of a referenced security group. + ReferencedGroupId *string + + // A security group rule ID. + SecurityGroupRuleId *string + + // The 'to' port number of the security group rule. + ToPort *int32 + + noSmithyDocumentSerde +} + // Describes a route in a route table. type Route struct { @@ -15321,6 +15370,9 @@ type SecurityGroup struct { // The Amazon Web Services account ID of the owner of the security group. OwnerId *string + // The ARN of the security group. + SecurityGroupArn *string + // Any tags assigned to the security group. Tags []Tag @@ -15428,6 +15480,9 @@ type SecurityGroupRule struct { // Describes the security group that is referenced in the rule. ReferencedGroupInfo *ReferencedSecurityGroup + // The ARN of the security group rule. + SecurityGroupRuleArn *string + // The ID of the security group rule. SecurityGroupRuleId *string @@ -15527,6 +15582,29 @@ type SecurityGroupRuleUpdate struct { noSmithyDocumentSerde } +// A security group association with a VPC that you made with [AssociateSecurityGroupVpc]. +// +// [AssociateSecurityGroupVpc]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateSecurityGroupVpc.html +type SecurityGroupVpcAssociation struct { + + // The association's security group ID. + GroupId *string + + // The association's state. + State SecurityGroupVpcAssociationState + + // The association's state reason. + StateReason *string + + // The association's VPC ID. + VpcId *string + + // The Amazon Web Services account ID of the owner of the VPC. + VpcOwnerId *string + + noSmithyDocumentSerde +} + // Describes a service configuration for a VPC endpoint service. type ServiceConfiguration struct { diff --git a/service/ec2/validators.go b/service/ec2/validators.go index f9afd138e8c..30ca8697536 100644 --- a/service/ec2/validators.go +++ b/service/ec2/validators.go @@ -490,6 +490,26 @@ func (m *validateOpAssociateRouteTable) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpAssociateSecurityGroupVpc struct { +} + +func (*validateOpAssociateSecurityGroupVpc) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssociateSecurityGroupVpc) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssociateSecurityGroupVpcInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssociateSecurityGroupVpcInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpAssociateSubnetCidrBlock struct { } @@ -4970,6 +4990,26 @@ func (m *validateOpDisassociateRouteTable) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpDisassociateSecurityGroupVpc struct { +} + +func (*validateOpDisassociateSecurityGroupVpc) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDisassociateSecurityGroupVpc) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DisassociateSecurityGroupVpcInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDisassociateSecurityGroupVpcInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDisassociateSubnetCidrBlock struct { } @@ -9046,6 +9086,10 @@ func addOpAssociateRouteTableValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpAssociateRouteTable{}, middleware.After) } +func addOpAssociateSecurityGroupVpcValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateSecurityGroupVpc{}, middleware.After) +} + func addOpAssociateSubnetCidrBlockValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssociateSubnetCidrBlock{}, middleware.After) } @@ -9942,6 +9986,10 @@ func addOpDisassociateRouteTableValidationMiddleware(stack *middleware.Stack) er return stack.Initialize.Add(&validateOpDisassociateRouteTable{}, middleware.After) } +func addOpDisassociateSecurityGroupVpcValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateSecurityGroupVpc{}, middleware.After) +} + func addOpDisassociateSubnetCidrBlockValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDisassociateSubnetCidrBlock{}, middleware.After) } @@ -12028,6 +12076,24 @@ func validateOpAssociateRouteTableInput(v *AssociateRouteTableInput) error { } } +func validateOpAssociateSecurityGroupVpcInput(v *AssociateSecurityGroupVpcInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateSecurityGroupVpcInput"} + if v.GroupId == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupId")) + } + if v.VpcId == nil { + invalidParams.Add(smithy.NewErrParamRequired("VpcId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpAssociateSubnetCidrBlockInput(v *AssociateSubnetCidrBlockInput) error { if v == nil { return nil @@ -15778,6 +15844,24 @@ func validateOpDisassociateRouteTableInput(v *DisassociateRouteTableInput) error } } +func validateOpDisassociateSecurityGroupVpcInput(v *DisassociateSecurityGroupVpcInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DisassociateSecurityGroupVpcInput"} + if v.GroupId == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupId")) + } + if v.VpcId == nil { + invalidParams.Add(smithy.NewErrParamRequired("VpcId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDisassociateSubnetCidrBlockInput(v *DisassociateSubnetCidrBlockInput) error { if v == nil { return nil diff --git a/service/ecs/api_op_CreateCluster.go b/service/ecs/api_op_CreateCluster.go index f08f5df70a1..36774356637 100644 --- a/service/ecs/api_op_CreateCluster.go +++ b/service/ecs/api_op_CreateCluster.go @@ -15,7 +15,7 @@ import ( // cluster when you launch your first container instance. However, you can create // your own cluster with a unique name. // -// When you call the [CreateCluster] API operation, Amazon ECS attempts to create the Amazon ECS +// When you call the CreateCluster API operation, Amazon ECS attempts to create the Amazon ECS // service-linked role for your account. This is so that it can manage required // resources in other Amazon Web Services services on your behalf. However, if the // user that makes the call doesn't have permissions to create the service-linked @@ -23,7 +23,6 @@ import ( // Container Service Developer Guide. // // [Using service-linked roles for Amazon ECS]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html -// [CreateCluster]: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateCluster.html func (c *Client) CreateCluster(ctx context.Context, params *CreateClusterInput, optFns ...func(*Options)) (*CreateClusterOutput, error) { if params == nil { params = &CreateClusterInput{} diff --git a/service/ecs/api_op_CreateService.go b/service/ecs/api_op_CreateService.go index d4ca8b37a11..09ea936a4b3 100644 --- a/service/ecs/api_op_CreateService.go +++ b/service/ecs/api_op_CreateService.go @@ -14,7 +14,7 @@ import ( // Runs and maintains your desired number of tasks from a specified task // definition. If the number of tasks running in a service drops below the // desiredCount , Amazon ECS runs another copy of the task in the specified -// cluster. To update an existing service, use [UpdateService]. +// cluster. To update an existing service, see the UpdateServiceaction. // // On March 21, 2024, a change was made to resolve the task definition revision // before authorization. When a task definition revision is not specified, @@ -159,7 +159,7 @@ type CreateServiceInput struct { Cluster *string // Optional deployment parameters that control how many tasks run during the - // deployment and the ordering of stopping and starting tasks. + // deployment and the failure detection methods. DeploymentConfiguration *types.DeploymentConfiguration // The deployment controller to use for the service. If no deployment controller diff --git a/service/ecs/api_op_DescribeServiceDeployments.go b/service/ecs/api_op_DescribeServiceDeployments.go new file mode 100644 index 00000000000..b59b32ee4a8 --- /dev/null +++ b/service/ecs/api_op_DescribeServiceDeployments.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ecs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ecs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes one or more of your service deployments. +// +// A service deployment happens when you release a software update for the +// service. For more information, see [Amazon ECS service deployments]. +// +// [Amazon ECS service deployments]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-deployments.html +func (c *Client) DescribeServiceDeployments(ctx context.Context, params *DescribeServiceDeploymentsInput, optFns ...func(*Options)) (*DescribeServiceDeploymentsOutput, error) { + if params == nil { + params = &DescribeServiceDeploymentsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeServiceDeployments", params, optFns, c.addOperationDescribeServiceDeploymentsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeServiceDeploymentsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeServiceDeploymentsInput struct { + + // The ARN of the service deployment. + // + // You can specify a maximum of 20 ARNs. + // + // This member is required. + ServiceDeploymentArns []string + + noSmithyDocumentSerde +} + +type DescribeServiceDeploymentsOutput struct { + + // Any failures associated with the call. + // + // If you decsribe a deployment with a service revision created before October 25, + // 2024, the call fails. The failure includes the service revision ARN and the + // reason set to MISSING . + Failures []types.Failure + + // The list of service deployments described. + ServiceDeployments []types.ServiceDeployment + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeServiceDeploymentsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeServiceDeployments{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeServiceDeployments{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeServiceDeployments"); 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 = addSpanRetryLoop(stack, options); 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 = addOpDescribeServiceDeploymentsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeServiceDeployments(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeServiceDeployments(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeServiceDeployments", + } +} diff --git a/service/ecs/api_op_DescribeServiceRevisions.go b/service/ecs/api_op_DescribeServiceRevisions.go new file mode 100644 index 00000000000..7ec557f221b --- /dev/null +++ b/service/ecs/api_op_DescribeServiceRevisions.go @@ -0,0 +1,175 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ecs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ecs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes one or more service revisions. +// +// A service revision is a version of the service that includes the values for the +// Amazon ECS resources (for example, task definition) and the environment +// resources (for example, load balancers, subnets, and security groups). For more +// information, see [Amazon ECS service revisions]. +// +// You can't describe a service revision that was created before October 25, 2024. +// +// [Amazon ECS service revisions]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-revision.html +func (c *Client) DescribeServiceRevisions(ctx context.Context, params *DescribeServiceRevisionsInput, optFns ...func(*Options)) (*DescribeServiceRevisionsOutput, error) { + if params == nil { + params = &DescribeServiceRevisionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeServiceRevisions", params, optFns, c.addOperationDescribeServiceRevisionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeServiceRevisionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeServiceRevisionsInput struct { + + // The ARN of the service revision. + // + // You can specify a maximum of 20 ARNs. + // + // You can call [ListServiceDeployments] to get the ARNs. + // + // [ListServiceDeployments]: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListServiceDeployments.html + // + // This member is required. + ServiceRevisionArns []string + + noSmithyDocumentSerde +} + +type DescribeServiceRevisionsOutput struct { + + // Any failures associated with the call. + Failures []types.Failure + + // The list of service revisions described. + ServiceRevisions []types.ServiceRevision + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeServiceRevisionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeServiceRevisions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeServiceRevisions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeServiceRevisions"); 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 = addSpanRetryLoop(stack, options); 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 = addOpDescribeServiceRevisionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeServiceRevisions(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeServiceRevisions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeServiceRevisions", + } +} diff --git a/service/ecs/api_op_ListServiceDeployments.go b/service/ecs/api_op_ListServiceDeployments.go new file mode 100644 index 00000000000..89359832769 --- /dev/null +++ b/service/ecs/api_op_ListServiceDeployments.go @@ -0,0 +1,220 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ecs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ecs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This operation lists all the service deployments that meet the specified filter +// criteria. +// +// A service deployment happens when you release a softwre update for the service. +// You route traffic from the running service revisions to the new service revison +// and control the number of running tasks. +// +// This API returns the values that you use for the request parameters in [DescribeServiceRevisions]. +// +// [DescribeServiceRevisions]: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeServiceRevisions.html +func (c *Client) ListServiceDeployments(ctx context.Context, params *ListServiceDeploymentsInput, optFns ...func(*Options)) (*ListServiceDeploymentsOutput, error) { + if params == nil { + params = &ListServiceDeploymentsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListServiceDeployments", params, optFns, c.addOperationListServiceDeploymentsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListServiceDeploymentsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListServiceDeploymentsInput struct { + + // The ARN or name of the service + // + // This member is required. + Service *string + + // The cluster that hosts the service. This can either be the cluster name or ARN. + // Starting April 15, 2023, Amazon Web Services will not onboard new customers to + // Amazon Elastic Inference (EI), and will help current customers migrate their + // workloads to options that offer better price and performanceIf you don't specify + // a cluster, deault is used. + Cluster *string + + // An optional filter you can use to narrow the results by the service creation + // date. If you do not specify a value, the result includes all services created + // before the current time. The format is yyyy-MM-dd HH:mm:ss.SSSSSS. + CreatedAt *types.CreatedAt + + // The maximum number of service deployment results that ListServiceDeployments + // returned in paginated output. When this parameter is used, + // ListServiceDeployments only returns maxResults results in a single page along + // with a nextToken response element. The remaining results of the initial request + // can be seen by sending another ListServiceDeployments request with the returned + // nextToken value. This value can be between 1 and 100. If this parameter isn't + // used, then ListServiceDeployments returns up to 20 results and a nextToken + // value if applicable. + MaxResults *int32 + + // The nextToken value returned from a ListServiceDeployments request indicating + // that more results are available to fulfill the request and further calls are + // needed. If you provided maxResults , it's possible the number of results is + // fewer than maxResults . + NextToken *string + + // An optional filter you can use to narrow the results. If you do not specify a + // status, then all status values are included in the result. + Status []types.ServiceDeploymentStatus + + noSmithyDocumentSerde +} + +type ListServiceDeploymentsOutput struct { + + // The nextToken value to include in a future ListServiceDeployments request. When + // the results of a ListServiceDeployments request exceed maxResults , this value + // can be used to retrieve the next page of results. This value is null when there + // are no more results to return. + NextToken *string + + // An overview of the service deployment, including the following properties: + // + // - The ARN of the service deployment. + // + // - The ARN of the service being deployed. + // + // - The ARN of the cluster that hosts the service in the service deployment. + // + // - The time that the service deployment started. + // + // - The time that the service deployment completed. + // + // - The service deployment status. + // + // - Information about why the service deployment is in the current state. + // + // - The ARN of the service revision that is being deployed. + ServiceDeployments []types.ServiceDeploymentBrief + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListServiceDeploymentsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListServiceDeployments{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListServiceDeployments{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListServiceDeployments"); 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 = addSpanRetryLoop(stack, options); 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 = addOpListServiceDeploymentsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServiceDeployments(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListServiceDeployments(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListServiceDeployments", + } +} diff --git a/service/ecs/api_op_RegisterTaskDefinition.go b/service/ecs/api_op_RegisterTaskDefinition.go index 8cc12ab8203..cdd7bf2554f 100644 --- a/service/ecs/api_op_RegisterTaskDefinition.go +++ b/service/ecs/api_op_RegisterTaskDefinition.go @@ -141,10 +141,11 @@ type RegisterTaskDefinitionInput struct { // resources. If none is specified, then IPC resources within the containers of a // task are private and not shared with other containers in a task or on the // container instance. If no value is specified, then the IPC resource namespace - // sharing depends on the Docker daemon setting on the container instance. + // sharing depends on the Docker daemon setting on the container instance. For more + // information, see [IPC settings]in the Docker run reference. // // If the host IPC mode is used, be aware that there is a heightened risk of - // undesired IPC namespace expose. + // undesired IPC namespace expose. For more information, see [Docker security]. // // If you are setting namespaced kernel parameters using systemControls for the // containers in the task, the following will apply to your IPC resource namespace. @@ -160,6 +161,8 @@ type RegisterTaskDefinitionInput struct { // This parameter is not supported for Windows containers or tasks run on Fargate. // // [System Controls]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html + // [Docker security]: https://docs.docker.com/engine/security/security/ + // [IPC settings]: https://docs.docker.com/engine/reference/run/#ipc-settings---ipc IpcMode types.IpcMode // The amount of memory (in MiB) used by the task. It can be expressed as an @@ -226,15 +229,17 @@ type RegisterTaskDefinitionInput struct { // user (UID 0). It is considered best practice to use a non-root user. // // If the network mode is awsvpc , the task is allocated an elastic network - // interface, and you must specify a [NetworkConfiguration]value when you create a service or run a task + // interface, and you must specify a NetworkConfigurationvalue when you create a service or run a task // with the task definition. For more information, see [Task Networking]in the Amazon Elastic // Container Service Developer Guide. // // If the network mode is host , you cannot run multiple instantiations of the same // task on a single container instance when port mappings are used. // + // For more information, see [Network settings] in the Docker run reference. + // // [Task Networking]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html - // [NetworkConfiguration]: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_NetworkConfiguration.html + // [Network settings]: https://docs.docker.com/engine/reference/run/#network-settings NetworkMode types.NetworkMode // The process namespace to use for the containers in the task. The valid values @@ -249,16 +254,20 @@ type RegisterTaskDefinitionInput struct { // If task is specified, all containers within the specified task share the same // process namespace. // - // If no value is specified, the default is a private namespace for each container. + // If no value is specified, the default is a private namespace for each + // container. For more information, see [PID settings]in the Docker run reference. // // If the host PID mode is used, there's a heightened risk of undesired process - // namespace exposure. + // namespace exposure. For more information, see [Docker security]. // // This parameter is not supported for Windows containers. // // This parameter is only supported for tasks that are hosted on Fargate if the // tasks are using platform version 1.4.0 or later (Linux). This isn't supported // for Windows containers on Fargate. + // + // [PID settings]: https://docs.docker.com/engine/reference/run/#pid-settings---pid + // [Docker security]: https://docs.docker.com/engine/security/security/ PidMode types.PidMode // An array of placement constraint objects to use for the task. You can specify a diff --git a/service/ecs/api_op_UpdateService.go b/service/ecs/api_op_UpdateService.go index 076ff5c3e26..21afed88811 100644 --- a/service/ecs/api_op_UpdateService.go +++ b/service/ecs/api_op_UpdateService.go @@ -195,7 +195,7 @@ type UpdateServiceInput struct { Cluster *string // Optional deployment parameters that control how many tasks run during the - // deployment and the ordering of stopping and starting tasks. + // deployment and the failure detection methods. DeploymentConfiguration *types.DeploymentConfiguration // The number of instantiations of the task to place and keep running in your diff --git a/service/ecs/deserializers.go b/service/ecs/deserializers.go index dc72a469cc0..e776c5736a6 100644 --- a/service/ecs/deserializers.go +++ b/service/ecs/deserializers.go @@ -2001,6 +2001,264 @@ func awsAwsjson11_deserializeOpErrorDescribeContainerInstances(response *smithyh } } +type awsAwsjson11_deserializeOpDescribeServiceDeployments struct { +} + +func (*awsAwsjson11_deserializeOpDescribeServiceDeployments) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeServiceDeployments) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorDescribeServiceDeployments(response, &metadata) + } + output := &DescribeServiceDeploymentsOutput{} + 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_deserializeOpDocumentDescribeServiceDeploymentsOutput(&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_deserializeOpErrorDescribeServiceDeployments(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("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ClientException", errorCode): + return awsAwsjson11_deserializeErrorClientException(response, errorBody) + + case strings.EqualFold("ClusterNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorClusterNotFoundException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsAwsjson11_deserializeErrorServerException(response, errorBody) + + case strings.EqualFold("ServiceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorServiceNotFoundException(response, errorBody) + + case strings.EqualFold("UnsupportedFeatureException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedFeatureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeServiceRevisions struct { +} + +func (*awsAwsjson11_deserializeOpDescribeServiceRevisions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeServiceRevisions) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorDescribeServiceRevisions(response, &metadata) + } + output := &DescribeServiceRevisionsOutput{} + 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_deserializeOpDocumentDescribeServiceRevisionsOutput(&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_deserializeOpErrorDescribeServiceRevisions(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("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ClientException", errorCode): + return awsAwsjson11_deserializeErrorClientException(response, errorBody) + + case strings.EqualFold("ClusterNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorClusterNotFoundException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsAwsjson11_deserializeErrorServerException(response, errorBody) + + case strings.EqualFold("ServiceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorServiceNotFoundException(response, errorBody) + + case strings.EqualFold("UnsupportedFeatureException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedFeatureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpDescribeServices struct { } @@ -3327,14 +3585,14 @@ func awsAwsjson11_deserializeOpErrorListContainerInstances(response *smithyhttp. } } -type awsAwsjson11_deserializeOpListServices struct { +type awsAwsjson11_deserializeOpListServiceDeployments struct { } -func (*awsAwsjson11_deserializeOpListServices) ID() string { +func (*awsAwsjson11_deserializeOpListServiceDeployments) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListServices) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListServiceDeployments) 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) @@ -3352,9 +3610,9 @@ func (m *awsAwsjson11_deserializeOpListServices) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListServices(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListServiceDeployments(response, &metadata) } - output := &ListServicesOutput{} + output := &ListServiceDeploymentsOutput{} out.Result = output var buff [1024]byte @@ -3374,7 +3632,7 @@ func (m *awsAwsjson11_deserializeOpListServices) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListServicesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListServiceDeploymentsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3388,7 +3646,7 @@ func (m *awsAwsjson11_deserializeOpListServices) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListServices(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListServiceDeployments(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)} @@ -3425,11 +3683,137 @@ func awsAwsjson11_deserializeOpErrorListServices(response *smithyhttp.Response, errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ClientException", errorCode): return awsAwsjson11_deserializeErrorClientException(response, errorBody) - case strings.EqualFold("ClusterNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorClusterNotFoundException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsAwsjson11_deserializeErrorServerException(response, errorBody) + + case strings.EqualFold("ServiceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorServiceNotFoundException(response, errorBody) + + case strings.EqualFold("UnsupportedFeatureException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedFeatureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListServices struct { +} + +func (*awsAwsjson11_deserializeOpListServices) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListServices) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorListServices(response, &metadata) + } + output := &ListServicesOutput{} + 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_deserializeOpDocumentListServicesOutput(&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_deserializeOpErrorListServices(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("ClientException", errorCode): + return awsAwsjson11_deserializeErrorClientException(response, errorBody) + + case strings.EqualFold("ClusterNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorClusterNotFoundException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -9733,6 +10117,98 @@ func awsAwsjson11_deserializeDocumentContainerDependency(v **types.ContainerDepe return nil } +func awsAwsjson11_deserializeDocumentContainerImage(v **types.ContainerImage, 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.ContainerImage + if *v == nil { + sv = &types.ContainerImage{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "containerName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ContainerName = ptr.String(jtv) + } + + case "image": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Image = ptr.String(jtv) + } + + case "imageDigest": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ImageDigest = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerImages(v *[]types.ContainerImage, 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.ContainerImage + if *v == nil { + cv = []types.ContainerImage{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ContainerImage + destAddr := &col + if err := awsAwsjson11_deserializeDocumentContainerImage(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentContainerInstance(v **types.ContainerInstance, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -14450,7 +14926,7 @@ func awsAwsjson11_deserializeDocumentResources(v *[]types.Resource, value interf return nil } -func awsAwsjson11_deserializeDocumentRuntimePlatform(v **types.RuntimePlatform, value interface{}) error { +func awsAwsjson11_deserializeDocumentRollback(v **types.Rollback, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14463,31 +14939,47 @@ func awsAwsjson11_deserializeDocumentRuntimePlatform(v **types.RuntimePlatform, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.RuntimePlatform + var sv *types.Rollback if *v == nil { - sv = &types.RuntimePlatform{} + sv = &types.Rollback{} } else { sv = *v } for key, value := range shape { switch key { - case "cpuArchitecture": + case "reason": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CPUArchitecture to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.CpuArchitecture = types.CPUArchitecture(jtv) + sv.Reason = ptr.String(jtv) } - case "operatingSystemFamily": + case "serviceRevisionArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected OSFamily to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ServiceRevisionArn = ptr.String(jtv) + } + + case "startedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } - sv.OperatingSystemFamily = types.OSFamily(jtv) } default: @@ -14499,7 +14991,7 @@ func awsAwsjson11_deserializeDocumentRuntimePlatform(v **types.RuntimePlatform, return nil } -func awsAwsjson11_deserializeDocumentScale(v **types.Scale, value interface{}) error { +func awsAwsjson11_deserializeDocumentRuntimePlatform(v **types.RuntimePlatform, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14512,30 +15004,79 @@ func awsAwsjson11_deserializeDocumentScale(v **types.Scale, value interface{}) e return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Scale + var sv *types.RuntimePlatform if *v == nil { - sv = &types.Scale{} + sv = &types.RuntimePlatform{} } else { sv = *v } for key, value := range shape { switch key { - case "unit": + case "cpuArchitecture": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ScaleUnit to be of type string, got %T instead", value) + return fmt.Errorf("expected CPUArchitecture to be of type string, got %T instead", value) } - sv.Unit = types.ScaleUnit(jtv) + sv.CpuArchitecture = types.CPUArchitecture(jtv) } - case "value": + case "operatingSystemFamily": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OSFamily to be of type string, got %T instead", value) + } + sv.OperatingSystemFamily = types.OSFamily(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentScale(v **types.Scale, 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.Scale + if *v == nil { + sv = &types.Scale{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "unit": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScaleUnit to be of type string, got %T instead", value) + } + sv.Unit = types.ScaleUnit(jtv) + } + + case "value": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { return err } sv.Value = f64 @@ -15415,7 +15956,7 @@ func awsAwsjson11_deserializeDocumentServiceConnectTlsConfiguration(v **types.Se return nil } -func awsAwsjson11_deserializeDocumentServiceEvent(v **types.ServiceEvent, value interface{}) error { +func awsAwsjson11_deserializeDocumentServiceDeployment(v **types.ServiceDeployment, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15428,15 +15969,29 @@ func awsAwsjson11_deserializeDocumentServiceEvent(v **types.ServiceEvent, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ServiceEvent + var sv *types.ServiceDeployment if *v == nil { - sv = &types.ServiceEvent{} + sv = &types.ServiceDeployment{} } else { sv = *v } for key, value := range shape { switch key { + case "alarms": + if err := awsAwsjson11_deserializeDocumentServiceDeploymentAlarms(&sv.Alarms, value); err != nil { + return err + } + + case "clusterArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ClusterArn = ptr.String(jtv) + } + case "createdAt": if value != nil { switch jtv := value.(type) { @@ -15453,22 +16008,129 @@ func awsAwsjson11_deserializeDocumentServiceEvent(v **types.ServiceEvent, value } } - case "id": + case "deploymentCircuitBreaker": + if err := awsAwsjson11_deserializeDocumentServiceDeploymentCircuitBreaker(&sv.DeploymentCircuitBreaker, value); err != nil { + return err + } + + case "deploymentConfiguration": + if err := awsAwsjson11_deserializeDocumentDeploymentConfiguration(&sv.DeploymentConfiguration, value); err != nil { + return err + } + + case "finishedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.FinishedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "rollback": + if err := awsAwsjson11_deserializeDocumentRollback(&sv.Rollback, value); err != nil { + return err + } + + case "serviceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.ServiceArn = ptr.String(jtv) } - case "message": + case "serviceDeploymentArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.ServiceDeploymentArn = ptr.String(jtv) + } + + case "sourceServiceRevisions": + if err := awsAwsjson11_deserializeDocumentServiceRevisionsSummaryList(&sv.SourceServiceRevisions, value); err != nil { + return err + } + + case "startedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceDeploymentStatus to be of type string, got %T instead", value) + } + sv.Status = types.ServiceDeploymentStatus(jtv) + } + + case "statusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + case "stoppedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StoppedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "targetServiceRevision": + if err := awsAwsjson11_deserializeDocumentServiceRevisionSummary(&sv.TargetServiceRevision, value); err != nil { + return err + } + + case "updatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } } default: @@ -15480,7 +16142,7 @@ func awsAwsjson11_deserializeDocumentServiceEvent(v **types.ServiceEvent, value return nil } -func awsAwsjson11_deserializeDocumentServiceEvents(v *[]types.ServiceEvent, value interface{}) error { +func awsAwsjson11_deserializeDocumentServiceDeploymentAlarms(v **types.ServiceDeploymentAlarms, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15488,33 +16150,49 @@ func awsAwsjson11_deserializeDocumentServiceEvents(v *[]types.ServiceEvent, valu return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ServiceEvent + var sv *types.ServiceDeploymentAlarms if *v == nil { - cv = []types.ServiceEvent{} + sv = &types.ServiceDeploymentAlarms{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.ServiceEvent - destAddr := &col - if err := awsAwsjson11_deserializeDocumentServiceEvent(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "alarmNames": + if err := awsAwsjson11_deserializeDocumentStringList(&sv.AlarmNames, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceDeploymentRollbackMonitorsStatus to be of type string, got %T instead", value) + } + sv.Status = types.ServiceDeploymentRollbackMonitorsStatus(jtv) + } + case "triggeredAlarmNames": + if err := awsAwsjson11_deserializeDocumentStringList(&sv.TriggeredAlarmNames, value); err != nil { + return err + } + + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentServiceManagedEBSVolumeConfiguration(v **types.ServiceManagedEBSVolumeConfiguration, value interface{}) error { +func awsAwsjson11_deserializeDocumentServiceDeploymentBrief(v **types.ServiceDeploymentBrief, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15527,151 +16205,825 @@ func awsAwsjson11_deserializeDocumentServiceManagedEBSVolumeConfiguration(v **ty return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ServiceManagedEBSVolumeConfiguration + var sv *types.ServiceDeploymentBrief if *v == nil { - sv = &types.ServiceManagedEBSVolumeConfiguration{} + sv = &types.ServiceDeploymentBrief{} } else { sv = *v } for key, value := range shape { switch key { - case "encrypted": + case "clusterArn": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Encrypted = ptr.Bool(jtv) + sv.ClusterArn = ptr.String(jtv) } - case "filesystemType": + case "createdAt": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TaskFilesystemType to be of type string, got %T instead", value) + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } - sv.FilesystemType = types.TaskFilesystemType(jtv) } - case "iops": + case "finishedAt": if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected BoxedInteger to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.FinishedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } - sv.Iops = ptr.Int32(int32(i64)) + } + + case "serviceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ServiceArn = ptr.String(jtv) + } + + case "serviceDeploymentArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ServiceDeploymentArn = ptr.String(jtv) + } + + case "startedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceDeploymentStatus to be of type string, got %T instead", value) + } + sv.Status = types.ServiceDeploymentStatus(jtv) + } + + case "statusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + case "targetServiceRevisionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TargetServiceRevisionArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentServiceDeploymentCircuitBreaker(v **types.ServiceDeploymentCircuitBreaker, 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.ServiceDeploymentCircuitBreaker + if *v == nil { + sv = &types.ServiceDeploymentCircuitBreaker{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "failureCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FailureCount = int32(i64) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceDeploymentRollbackMonitorsStatus to be of type string, got %T instead", value) + } + sv.Status = types.ServiceDeploymentRollbackMonitorsStatus(jtv) + } + + case "threshold": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Threshold = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentServiceDeployments(v *[]types.ServiceDeployment, 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.ServiceDeployment + if *v == nil { + cv = []types.ServiceDeployment{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ServiceDeployment + destAddr := &col + if err := awsAwsjson11_deserializeDocumentServiceDeployment(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentServiceDeploymentsBrief(v *[]types.ServiceDeploymentBrief, 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.ServiceDeploymentBrief + if *v == nil { + cv = []types.ServiceDeploymentBrief{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ServiceDeploymentBrief + destAddr := &col + if err := awsAwsjson11_deserializeDocumentServiceDeploymentBrief(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentServiceEvent(v **types.ServiceEvent, 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.ServiceEvent + if *v == nil { + sv = &types.ServiceEvent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentServiceEvents(v *[]types.ServiceEvent, 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.ServiceEvent + if *v == nil { + cv = []types.ServiceEvent{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ServiceEvent + destAddr := &col + if err := awsAwsjson11_deserializeDocumentServiceEvent(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentServiceManagedEBSVolumeConfiguration(v **types.ServiceManagedEBSVolumeConfiguration, 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.ServiceManagedEBSVolumeConfiguration + if *v == nil { + sv = &types.ServiceManagedEBSVolumeConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "encrypted": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value) + } + sv.Encrypted = ptr.Bool(jtv) + } + + case "filesystemType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskFilesystemType to be of type string, got %T instead", value) + } + sv.FilesystemType = types.TaskFilesystemType(jtv) + } + + case "iops": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected BoxedInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Iops = ptr.Int32(int32(i64)) } case "kmsKeyId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EBSKMSKeyId to be of type string, got %T instead", value) + return fmt.Errorf("expected EBSKMSKeyId to be of type string, got %T instead", value) + } + sv.KmsKeyId = ptr.String(jtv) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IAMRoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "sizeInGiB": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected BoxedInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.SizeInGiB = ptr.Int32(int32(i64)) + } + + case "snapshotId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EBSSnapshotId to be of type string, got %T instead", value) + } + sv.SnapshotId = ptr.String(jtv) + } + + case "tagSpecifications": + if err := awsAwsjson11_deserializeDocumentEBSTagSpecifications(&sv.TagSpecifications, value); err != nil { + return err + } + + case "throughput": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected BoxedInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Throughput = ptr.Int32(int32(i64)) + } + + case "volumeType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EBSVolumeType to be of type string, got %T instead", value) + } + sv.VolumeType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentServiceNotActiveException(v **types.ServiceNotActiveException, 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.ServiceNotActiveException + if *v == nil { + sv = &types.ServiceNotActiveException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.KmsKeyId = ptr.String(jtv) + sv.Message = ptr.String(jtv) } - case "roleArn": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentServiceNotFoundException(v **types.ServiceNotFoundException, 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.ServiceNotFoundException + if *v == nil { + sv = &types.ServiceNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentServiceRegistries(v *[]types.ServiceRegistry, 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.ServiceRegistry + if *v == nil { + cv = []types.ServiceRegistry{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ServiceRegistry + destAddr := &col + if err := awsAwsjson11_deserializeDocumentServiceRegistry(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentServiceRegistry(v **types.ServiceRegistry, 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.ServiceRegistry + if *v == nil { + sv = &types.ServiceRegistry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "containerName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ContainerName = ptr.String(jtv) + } + + case "containerPort": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected BoxedInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ContainerPort = ptr.Int32(int32(i64)) + } + + case "port": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected BoxedInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Port = ptr.Int32(int32(i64)) + } + + case "registryArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RegistryArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentServiceRevision(v **types.ServiceRevision, 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.ServiceRevision + if *v == nil { + sv = &types.ServiceRevision{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "capacityProviderStrategy": + if err := awsAwsjson11_deserializeDocumentCapacityProviderStrategy(&sv.CapacityProviderStrategy, value); err != nil { + return err + } + + case "clusterArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ClusterArn = ptr.String(jtv) + } + + case "containerImages": + if err := awsAwsjson11_deserializeDocumentContainerImages(&sv.ContainerImages, value); err != nil { + return err + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "fargateEphemeralStorage": + if err := awsAwsjson11_deserializeDocumentDeploymentEphemeralStorage(&sv.FargateEphemeralStorage, value); err != nil { + return err + } + + case "guardDutyEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.GuardDutyEnabled = jtv + } + + case "launchType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LaunchType to be of type string, got %T instead", value) + } + sv.LaunchType = types.LaunchType(jtv) + } + + case "loadBalancers": + if err := awsAwsjson11_deserializeDocumentLoadBalancers(&sv.LoadBalancers, value); err != nil { + return err + } + + case "networkConfiguration": + if err := awsAwsjson11_deserializeDocumentNetworkConfiguration(&sv.NetworkConfiguration, value); err != nil { + return err + } + + case "platformFamily": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected IAMRoleArn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.RoleArn = ptr.String(jtv) + sv.PlatformFamily = ptr.String(jtv) } - case "sizeInGiB": + case "platformVersion": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected BoxedInteger to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.SizeInGiB = ptr.Int32(int32(i64)) + sv.PlatformVersion = ptr.String(jtv) } - case "snapshotId": + case "serviceArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EBSSnapshotId to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.SnapshotId = ptr.String(jtv) + sv.ServiceArn = ptr.String(jtv) } - case "tagSpecifications": - if err := awsAwsjson11_deserializeDocumentEBSTagSpecifications(&sv.TagSpecifications, value); err != nil { + case "serviceConnectConfiguration": + if err := awsAwsjson11_deserializeDocumentServiceConnectConfiguration(&sv.ServiceConnectConfiguration, value); err != nil { return err } - case "throughput": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected BoxedInteger to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Throughput = ptr.Int32(int32(i64)) + case "serviceRegistries": + if err := awsAwsjson11_deserializeDocumentServiceRegistries(&sv.ServiceRegistries, value); err != nil { + return err } - case "volumeType": + case "serviceRevisionArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EBSVolumeType to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.VolumeType = ptr.String(jtv) + sv.ServiceRevisionArn = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentServiceNotActiveException(v **types.ServiceNotActiveException, 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.ServiceNotActiveException - if *v == nil { - sv = &types.ServiceNotActiveException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message": + case "taskDefinition": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.TaskDefinition = ptr.String(jtv) + } + + case "volumeConfigurations": + if err := awsAwsjson11_deserializeDocumentServiceVolumeConfigurations(&sv.VolumeConfigurations, value); err != nil { + return err } default: @@ -15683,7 +17035,7 @@ func awsAwsjson11_deserializeDocumentServiceNotActiveException(v **types.Service return nil } -func awsAwsjson11_deserializeDocumentServiceNotFoundException(v **types.ServiceNotFoundException, value interface{}) error { +func awsAwsjson11_deserializeDocumentServiceRevisions(v *[]types.ServiceRevision, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15691,39 +17043,33 @@ func awsAwsjson11_deserializeDocumentServiceNotFoundException(v **types.ServiceN return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ServiceNotFoundException + var cv []types.ServiceRevision if *v == nil { - sv = &types.ServiceNotFoundException{} + cv = []types.ServiceRevision{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.ServiceRevision + destAddr := &col + if err := awsAwsjson11_deserializeDocumentServiceRevision(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentServiceRegistries(v *[]types.ServiceRegistry, value interface{}) error { +func awsAwsjson11_deserializeDocumentServiceRevisionsSummaryList(v *[]types.ServiceRevisionSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15736,17 +17082,17 @@ func awsAwsjson11_deserializeDocumentServiceRegistries(v *[]types.ServiceRegistr return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ServiceRegistry + var cv []types.ServiceRevisionSummary if *v == nil { - cv = []types.ServiceRegistry{} + cv = []types.ServiceRevisionSummary{} } else { cv = *v } for _, value := range shape { - var col types.ServiceRegistry + var col types.ServiceRevisionSummary destAddr := &col - if err := awsAwsjson11_deserializeDocumentServiceRegistry(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentServiceRevisionSummary(&destAddr, value); err != nil { return err } col = *destAddr @@ -15757,7 +17103,7 @@ func awsAwsjson11_deserializeDocumentServiceRegistries(v *[]types.ServiceRegistr return nil } -func awsAwsjson11_deserializeDocumentServiceRegistry(v **types.ServiceRegistry, value interface{}) error { +func awsAwsjson11_deserializeDocumentServiceRevisionSummary(v **types.ServiceRevisionSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15770,57 +17116,61 @@ func awsAwsjson11_deserializeDocumentServiceRegistry(v **types.ServiceRegistry, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ServiceRegistry + var sv *types.ServiceRevisionSummary if *v == nil { - sv = &types.ServiceRegistry{} + sv = &types.ServiceRevisionSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "containerName": + case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ContainerName = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } - case "containerPort": + case "pendingTaskCount": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected BoxedInteger to be json.Number, got %T instead", value) + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } - sv.ContainerPort = ptr.Int32(int32(i64)) + sv.PendingTaskCount = int32(i64) } - case "port": + case "requestedTaskCount": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected BoxedInteger to be json.Number, got %T instead", value) + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } - sv.Port = ptr.Int32(int32(i64)) + sv.RequestedTaskCount = int32(i64) } - case "registryArn": + case "runningTaskCount": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) } - sv.RegistryArn = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RunningTaskCount = int32(i64) } default: @@ -18872,6 +20222,88 @@ func awsAwsjson11_deserializeOpDocumentDescribeContainerInstancesOutput(v **Desc return nil } +func awsAwsjson11_deserializeOpDocumentDescribeServiceDeploymentsOutput(v **DescribeServiceDeploymentsOutput, 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 *DescribeServiceDeploymentsOutput + if *v == nil { + sv = &DescribeServiceDeploymentsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "failures": + if err := awsAwsjson11_deserializeDocumentFailures(&sv.Failures, value); err != nil { + return err + } + + case "serviceDeployments": + if err := awsAwsjson11_deserializeDocumentServiceDeployments(&sv.ServiceDeployments, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeServiceRevisionsOutput(v **DescribeServiceRevisionsOutput, 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 *DescribeServiceRevisionsOutput + if *v == nil { + sv = &DescribeServiceRevisionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "failures": + if err := awsAwsjson11_deserializeDocumentFailures(&sv.Failures, value); err != nil { + return err + } + + case "serviceRevisions": + if err := awsAwsjson11_deserializeDocumentServiceRevisions(&sv.ServiceRevisions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDescribeServicesOutput(v **DescribeServicesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -19396,6 +20828,51 @@ func awsAwsjson11_deserializeOpDocumentListContainerInstancesOutput(v **ListCont return nil } +func awsAwsjson11_deserializeOpDocumentListServiceDeploymentsOutput(v **ListServiceDeploymentsOutput, 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 *ListServiceDeploymentsOutput + if *v == nil { + sv = &ListServiceDeploymentsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "serviceDeployments": + if err := awsAwsjson11_deserializeDocumentServiceDeploymentsBrief(&sv.ServiceDeployments, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListServicesByNamespaceOutput(v **ListServicesByNamespaceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/ecs/generated.json b/service/ecs/generated.json index bb4c88a1b84..2a0af2dc68d 100644 --- a/service/ecs/generated.json +++ b/service/ecs/generated.json @@ -25,6 +25,8 @@ "api_op_DescribeCapacityProviders.go", "api_op_DescribeClusters.go", "api_op_DescribeContainerInstances.go", + "api_op_DescribeServiceDeployments.go", + "api_op_DescribeServiceRevisions.go", "api_op_DescribeServices.go", "api_op_DescribeTaskDefinition.go", "api_op_DescribeTaskSets.go", @@ -36,6 +38,7 @@ "api_op_ListAttributes.go", "api_op_ListClusters.go", "api_op_ListContainerInstances.go", + "api_op_ListServiceDeployments.go", "api_op_ListServices.go", "api_op_ListServicesByNamespace.go", "api_op_ListTagsForResource.go", diff --git a/service/ecs/serializers.go b/service/ecs/serializers.go index f82fe85547a..864f158fa49 100644 --- a/service/ecs/serializers.go +++ b/service/ecs/serializers.go @@ -994,6 +994,128 @@ func (m *awsAwsjson11_serializeOpDescribeContainerInstances) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDescribeServiceDeployments struct { +} + +func (*awsAwsjson11_serializeOpDescribeServiceDeployments) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeServiceDeployments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DescribeServiceDeploymentsInput) + _ = 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("AmazonEC2ContainerServiceV20141113.DescribeServiceDeployments") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeServiceDeploymentsInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeServiceRevisions struct { +} + +func (*awsAwsjson11_serializeOpDescribeServiceRevisions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeServiceRevisions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DescribeServiceRevisionsInput) + _ = 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("AmazonEC2ContainerServiceV20141113.DescribeServiceRevisions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeServiceRevisionsInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDescribeServices struct { } @@ -1665,6 +1787,67 @@ func (m *awsAwsjson11_serializeOpListContainerInstances) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListServiceDeployments struct { +} + +func (*awsAwsjson11_serializeOpListServiceDeployments) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListServiceDeployments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListServiceDeploymentsInput) + _ = 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("AmazonEC2ContainerServiceV20141113.ListServiceDeployments") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListServiceDeploymentsInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpListServices struct { } @@ -4178,6 +4361,23 @@ func awsAwsjson11_serializeDocumentContainerStateChanges(v []types.ContainerStat return nil } +func awsAwsjson11_serializeDocumentCreatedAt(v *types.CreatedAt, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.After != nil { + ok := object.Key("after") + ok.Double(smithytime.FormatEpochSeconds(*v.After)) + } + + if v.Before != nil { + ok := object.Key("before") + ok.Double(smithytime.FormatEpochSeconds(*v.Before)) + } + + return nil +} + func awsAwsjson11_serializeDocumentDeploymentAlarms(v *types.DeploymentAlarms, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5639,6 +5839,17 @@ func awsAwsjson11_serializeDocumentServiceConnectTlsConfiguration(v *types.Servi return nil } +func awsAwsjson11_serializeDocumentServiceDeploymentStatusList(v []types.ServiceDeploymentStatus, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + func awsAwsjson11_serializeDocumentServiceFieldList(v []types.ServiceField, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -6842,6 +7053,34 @@ func awsAwsjson11_serializeOpDocumentDescribeContainerInstancesInput(v *Describe return nil } +func awsAwsjson11_serializeOpDocumentDescribeServiceDeploymentsInput(v *DescribeServiceDeploymentsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ServiceDeploymentArns != nil { + ok := object.Key("serviceDeploymentArns") + if err := awsAwsjson11_serializeDocumentStringList(v.ServiceDeploymentArns, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeServiceRevisionsInput(v *DescribeServiceRevisionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ServiceRevisionArns != nil { + ok := object.Key("serviceRevisionArns") + if err := awsAwsjson11_serializeDocumentStringList(v.ServiceRevisionArns, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDescribeServicesInput(v *DescribeServicesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -7135,6 +7374,47 @@ func awsAwsjson11_serializeOpDocumentListContainerInstancesInput(v *ListContaine return nil } +func awsAwsjson11_serializeOpDocumentListServiceDeploymentsInput(v *ListServiceDeploymentsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Cluster != nil { + ok := object.Key("cluster") + ok.String(*v.Cluster) + } + + if v.CreatedAt != nil { + ok := object.Key("createdAt") + if err := awsAwsjson11_serializeDocumentCreatedAt(v.CreatedAt, ok); err != nil { + return err + } + } + + 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.Service != nil { + ok := object.Key("service") + ok.String(*v.Service) + } + + if v.Status != nil { + ok := object.Key("status") + if err := awsAwsjson11_serializeDocumentServiceDeploymentStatusList(v.Status, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListServicesByNamespaceInput(v *ListServicesByNamespaceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/ecs/snapshot/api_op_DescribeServiceDeployments.go.snap b/service/ecs/snapshot/api_op_DescribeServiceDeployments.go.snap new file mode 100644 index 00000000000..6a4a6d3f855 --- /dev/null +++ b/service/ecs/snapshot/api_op_DescribeServiceDeployments.go.snap @@ -0,0 +1,41 @@ +DescribeServiceDeployments + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/ecs/snapshot/api_op_DescribeServiceRevisions.go.snap b/service/ecs/snapshot/api_op_DescribeServiceRevisions.go.snap new file mode 100644 index 00000000000..8e4ebb7c101 --- /dev/null +++ b/service/ecs/snapshot/api_op_DescribeServiceRevisions.go.snap @@ -0,0 +1,41 @@ +DescribeServiceRevisions + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/ecs/snapshot/api_op_ListServiceDeployments.go.snap b/service/ecs/snapshot/api_op_ListServiceDeployments.go.snap new file mode 100644 index 00000000000..5c6312f7944 --- /dev/null +++ b/service/ecs/snapshot/api_op_ListServiceDeployments.go.snap @@ -0,0 +1,41 @@ +ListServiceDeployments + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/ecs/snapshot_test.go b/service/ecs/snapshot_test.go index 57681bab17c..450d1ce3938 100644 --- a/service/ecs/snapshot_test.go +++ b/service/ecs/snapshot_test.go @@ -254,6 +254,30 @@ func TestCheckSnapshot_DescribeContainerInstances(t *testing.T) { } } +func TestCheckSnapshot_DescribeServiceDeployments(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeServiceDeployments(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeServiceDeployments") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_DescribeServiceRevisions(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeServiceRevisions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeServiceRevisions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribeServices(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeServices(context.Background(), nil, func(o *Options) { @@ -386,6 +410,18 @@ func TestCheckSnapshot_ListContainerInstances(t *testing.T) { } } +func TestCheckSnapshot_ListServiceDeployments(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListServiceDeployments(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListServiceDeployments") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListServices(t *testing.T) { svc := New(Options{}) _, err := svc.ListServices(context.Background(), nil, func(o *Options) { @@ -925,6 +961,30 @@ func TestUpdateSnapshot_DescribeContainerInstances(t *testing.T) { } } +func TestUpdateSnapshot_DescribeServiceDeployments(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeServiceDeployments(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeServiceDeployments") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_DescribeServiceRevisions(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeServiceRevisions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeServiceRevisions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribeServices(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeServices(context.Background(), nil, func(o *Options) { @@ -1057,6 +1117,18 @@ func TestUpdateSnapshot_ListContainerInstances(t *testing.T) { } } +func TestUpdateSnapshot_ListServiceDeployments(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListServiceDeployments(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListServiceDeployments") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListServices(t *testing.T) { svc := New(Options{}) _, err := svc.ListServices(context.Background(), nil, func(o *Options) { diff --git a/service/ecs/types/enums.go b/service/ecs/types/enums.go index 5af99272dc7..e1fdd3858a5 100644 --- a/service/ecs/types/enums.go +++ b/service/ecs/types/enums.go @@ -948,6 +948,61 @@ func (Scope) Values() []Scope { } } +type ServiceDeploymentRollbackMonitorsStatus string + +// Enum values for ServiceDeploymentRollbackMonitorsStatus +const ( + ServiceDeploymentRollbackMonitorsStatusTriggered ServiceDeploymentRollbackMonitorsStatus = "TRIGGERED" + ServiceDeploymentRollbackMonitorsStatusMonitoring ServiceDeploymentRollbackMonitorsStatus = "MONITORING" + ServiceDeploymentRollbackMonitorsStatusMonitoringComplete ServiceDeploymentRollbackMonitorsStatus = "MONITORING_COMPLETE" + ServiceDeploymentRollbackMonitorsStatusDisabled ServiceDeploymentRollbackMonitorsStatus = "DISABLED" +) + +// Values returns all known values for ServiceDeploymentRollbackMonitorsStatus. +// Note that this can be expanded in the future, and so it is only as up to date as +// the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ServiceDeploymentRollbackMonitorsStatus) Values() []ServiceDeploymentRollbackMonitorsStatus { + return []ServiceDeploymentRollbackMonitorsStatus{ + "TRIGGERED", + "MONITORING", + "MONITORING_COMPLETE", + "DISABLED", + } +} + +type ServiceDeploymentStatus string + +// Enum values for ServiceDeploymentStatus +const ( + ServiceDeploymentStatusPending ServiceDeploymentStatus = "PENDING" + ServiceDeploymentStatusSuccessful ServiceDeploymentStatus = "SUCCESSFUL" + ServiceDeploymentStatusStopped ServiceDeploymentStatus = "STOPPED" + ServiceDeploymentStatusStopRequested ServiceDeploymentStatus = "STOP_REQUESTED" + ServiceDeploymentStatusInProgress ServiceDeploymentStatus = "IN_PROGRESS" + ServiceDeploymentStatusRollbackInProgress ServiceDeploymentStatus = "ROLLBACK_IN_PROGRESS" + ServiceDeploymentStatusRollbackSuccessful ServiceDeploymentStatus = "ROLLBACK_SUCCESSFUL" + ServiceDeploymentStatusRollbackFailed ServiceDeploymentStatus = "ROLLBACK_FAILED" +) + +// Values returns all known values for ServiceDeploymentStatus. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ServiceDeploymentStatus) Values() []ServiceDeploymentStatus { + return []ServiceDeploymentStatus{ + "PENDING", + "SUCCESSFUL", + "STOPPED", + "STOP_REQUESTED", + "IN_PROGRESS", + "ROLLBACK_IN_PROGRESS", + "ROLLBACK_SUCCESSFUL", + "ROLLBACK_FAILED", + } +} + type ServiceField string // Enum values for ServiceField diff --git a/service/ecs/types/types.go b/service/ecs/types/types.go index 0165cef0659..c9c01aaa268 100644 --- a/service/ecs/types/types.go +++ b/service/ecs/types/types.go @@ -1306,6 +1306,33 @@ type ContainerDependency struct { noSmithyDocumentSerde } +// The details about the container image a service revision uses. +// +// To ensure that all tasks in a service use the same container image, Amazon ECS +// resolves container image names and any image tags specified in the task +// definition to container image digests. +// +// After the container image digest has been established, Amazon ECS uses the +// digest to start any other desired tasks, and for any future service and service +// revision updates. This leads to all tasks in a service always running identical +// container images, resulting in version consistency for your software. For more +// information, see [Container image resolution]in the Amazon ECS Developer Guide. +// +// [Container image resolution]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-ecs.html#deployment-container-image-stability +type ContainerImage struct { + + // The name of the container. + ContainerName *string + + // The container image. + Image *string + + // The container image digest. + ImageDigest *string + + noSmithyDocumentSerde +} + // An Amazon EC2 or External instance that's running the Amazon ECS agent and has // been registered with a cluster. type ContainerInstance struct { @@ -1565,6 +1592,23 @@ type ContainerStateChange struct { noSmithyDocumentSerde } +// The optional filter to narrow the ListServiceDeployment results. +// +// If you do not specify a value, service deployments that were created before the +// current time are included in the result. +type CreatedAt struct { + + // Include service deployments in the result that were created after this time. + // The format is yyyy-MM-dd HH:mm:ss.SSSSSS. + After *time.Time + + // Include service deployments in the result that were created before this time. + // The format is yyyy-MM-dd HH:mm:ss.SSSSSS. + Before *time.Time + + noSmithyDocumentSerde +} + // The details of an Amazon ECS service deployment. This is used only when a // service uses the ECS deployment controller type. type Deployment struct { @@ -1760,8 +1804,8 @@ type DeploymentCircuitBreaker struct { noSmithyDocumentSerde } -// Optional deployment parameters that control how many tasks run during a -// deployment and the ordering of stopping and starting tasks. +// Optional deployment parameters that control how many tasks run during the +// deployment and the failure detection methods. type DeploymentConfiguration struct { // Information about the CloudWatch alarms. @@ -1907,8 +1951,8 @@ type DeploymentController struct { // The amount of ephemeral storage to allocate for the deployment. type DeploymentEphemeralStorage struct { - // Specify an Key Management Service key ID to encrypt the ephemeral storage for - // deployment. + // Specify an Amazon Web Services Key Management Service key ID to encrypt the + // ephemeral storage for deployment. KmsKeyId *string noSmithyDocumentSerde @@ -2705,8 +2749,7 @@ type LoadBalancer struct { // mapping. ContainerPort *int32 - // The name of the load balancer to associate with the Amazon ECS service or task - // set. + // The name of the load balancer to associate with the service or task set. // // If you are using an Application Load Balancer or a Network Load Balancer the // load balancer name parameter should be omitted. @@ -3029,8 +3072,7 @@ type ManagedScaling struct { MaximumScalingStepSize *int32 // The minimum number of Amazon EC2 instances that Amazon ECS will scale out at - // one time. The scale in process is not affected by this parameter If this - // parameter is omitted, the default value of 1 is used. + // one time. If this parameter is omitted, the default value of 1 is used. // // When additional capacity is required, Amazon ECS will scale up the minimum // scaling step size even if the actual demand is less than the minimum scaling @@ -3062,7 +3104,8 @@ type ManagedStorageConfiguration struct { // Specify the Key Management Service key ID for the Fargate ephemeral storage. FargateEphemeralStorageKmsKeyId *string - // Specify a Key Management Service key ID to encrypt the managed storage. + // Specify a Amazon Web Services Key Management Service key ID to encrypt the + // managed storage. KmsKeyId *string noSmithyDocumentSerde @@ -3263,13 +3306,14 @@ type PlatformDevice struct { noSmithyDocumentSerde } -// Port mappings allow containers to access ports on the host container instance -// to send or receive traffic. Port mappings are specified as part of the container -// definition. +// Port mappings expose your container's network ports to the outside world. this +// allows clients to access your application. It's also used for inter-container +// communication within the same task. // -// If you use containers in a task with the awsvpc or host network mode, specify -// the exposed ports using containerPort . The hostPort can be left blank or it -// must be the same value as the containerPort . +// For task definitions (both the Fargate and EC2 launch type) that use the awsvpc +// network mode, only specify the containerPort . The hostPort is always ignored, +// and the container port is automatically mapped to a random high-numbered port on +// the host. // // Most fields of this parameter ( containerPort , hostPort , protocol ) maps to // PortBindings in the docker container create command and the --publish option to @@ -3312,14 +3356,17 @@ type PortMapping struct { // The port number on the container that's bound to the user-specified or // automatically assigned host port. // - // If you use containers in a task with the awsvpc or host network mode, specify - // the exposed ports using containerPort . + // For tasks that use the Fargate launch type or EC2 tasks that use the awsvpc + // network mode, you use containerPort to specify the exposed ports. + // + // For Windows containers on Fargate, you can't use port 3150 for the containerPort + // . This is because it's reserved. // - // If you use containers in a task with the bridge network mode and you specify a - // container port and not a host port, your container automatically receives a host - // port in the ephemeral port range. For more information, see hostPort . Port - // mappings that are automatically assigned in this way do not count toward the 100 - // reserved ports limit of a container instance. + // Suppose that you're using containers in a task with the EC2 launch type and you + // specify a container port and not a host port. Then, your container automatically + // receives a host port in the ephemeral port range. For more information, see + // hostPort . Port mappings that are automatically assigned in this way don't count + // toward the 100 reserved ports quota of a container instance. ContainerPort *int32 // The port number range on the container that's bound to the dynamically mapped @@ -3586,6 +3633,32 @@ type ResourceRequirement struct { noSmithyDocumentSerde } +// Information about the service deployment rollback. +type Rollback struct { + + // The reason the rollback happened. For example, the circuit breaker initiated + // the rollback operation. + Reason *string + + // The ARN of the service revision deployed as part of the rollback. + // + // When the type is GPU , the value is the number of physical GPUs the Amazon ECS + // container agent reserves for the container. The number of GPUs that's reserved + // for all containers in a task can't exceed the number of available GPUs on the + // container instance that the task is launched on. + // + // When the type is InferenceAccelerator , the value matches the deviceName for an [InferenceAccelerator] + // specified in a task definition. + // + // [InferenceAccelerator]: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_InferenceAccelerator.html + ServiceRevisionArn *string + + // Time time that the rollback started. The format is yyyy-MM-dd HH:mm:ss.SSSSSS. + StartedAt *time.Time + + noSmithyDocumentSerde +} + // Information about the platform for the Amazon ECS service or task. // // For more information about RuntimePlatform , see [RuntimePlatform] in the Amazon Elastic @@ -3599,9 +3672,13 @@ type RuntimePlatform struct { // You can run your Linux tasks on an ARM-based platform by setting the value to // ARM64 . This option is available for tasks that run on Linux Amazon EC2 instance // or Linux containers on Fargate. + // + // The default is X86_64 . CpuArchitecture CPUArchitecture // The operating system. + // + // The default is Linux . OperatingSystemFamily OSFamily noSmithyDocumentSerde @@ -3665,9 +3742,8 @@ type Secret struct { // Details on a service within a cluster. type Service struct { - // The capacity provider strategy the service uses. When using the - // DescribeServices API, this field is omitted if the service was created using a - // launch type. + // The capacity provider strategy the service uses. When using DescribeServices , + // this field is omitted if the service was created using a launch type. CapacityProviderStrategy []CapacityProviderStrategyItem // The Amazon Resource Name (ARN) of the cluster that hosts the service. @@ -3809,7 +3885,7 @@ type Service struct { Status *string // The metadata that you apply to the service to help you categorize and organize - // them. Each tag consists of a key and an optional value. You define bot the key + // them. Each tag consists of a key and an optional value. You define both the key // and value. // // The following basic restrictions apply to tags: @@ -4099,6 +4175,176 @@ type ServiceConnectTlsConfiguration struct { noSmithyDocumentSerde } +// Information about the service deployment. +// +// Service deployments provide a comprehensive view of your deployments. For +// information about service deployments, see [View service history using Amazon ECS service deployments]in the Amazon Elastic Container +// Service Developer Guide . +// +// [View service history using Amazon ECS service deployments]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-deployment.html +type ServiceDeployment struct { + + // The CloudWatch alarms that determine when a service deployment fails. + Alarms *ServiceDeploymentAlarms + + // The ARN of the cluster that hosts the service. + ClusterArn *string + + // The time the service deployment was created. The format is yyyy-MM-dd + // HH:mm:ss.SSSSSS. + CreatedAt *time.Time + + // The circuit breaker configuration that determines a service deployment failed. + DeploymentCircuitBreaker *ServiceDeploymentCircuitBreaker + + // Optional deployment parameters that control how many tasks run during the + // deployment and the failure detection methods. + DeploymentConfiguration *DeploymentConfiguration + + // The time the service deployment finished. The format is yyyy-MM-dd + // HH:mm:ss.SSSSSS. + FinishedAt *time.Time + + // The rollback options the service deployment uses when the deployment fails. + Rollback *Rollback + + // The ARN of the service for this service deployment. + ServiceArn *string + + // The ARN of the service deployment. + ServiceDeploymentArn *string + + // The currently deployed workload configuration. + SourceServiceRevisions []ServiceRevisionSummary + + // The time the service deployment statred. The format is yyyy-MM-dd + // HH:mm:ss.SSSSSS. + StartedAt *time.Time + + // The service deployment state. + Status ServiceDeploymentStatus + + // Information about why the service deployment is in the current status. For + // example, the circuit breaker detected a failure. + StatusReason *string + + // The time the service deployment stopped. The format is yyyy-MM-dd + // HH:mm:ss.SSSSSS. + // + // The service deployment stops when any of the following actions happen: + // + // - A user manually stops the deployment + // + // - The rollback option is not in use for the failure detection mechanism (the + // circuit breaker or alarm-based) and the service fails. + StoppedAt *time.Time + + // The workload configuration being deployed. + TargetServiceRevision *ServiceRevisionSummary + + // The time that the service deployment was last updated. The format is yyyy-MM-dd + // HH:mm:ss.SSSSSS. + UpdatedAt *time.Time + + noSmithyDocumentSerde +} + +// The CloudWatch alarms used to determine a service deployment failed. +// +// Amazon ECS considers the service deployment as failed when any of the alarms +// move to the ALARM state. For more information, see [How CloudWatch alarms detect Amazon ECS deployment failures] in the Amazon ECS Developer +// Guide. +// +// [How CloudWatch alarms detect Amazon ECS deployment failures]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-alarm-failure.html +type ServiceDeploymentAlarms struct { + + // The name of the CloudWatch alarms that determine when a service deployment + // failed. A "," separates the alarms. + AlarmNames []string + + // The status of the alarms check. Amazon ECS is not using alarms for service + // deployment failures when the status is DISABLED . + Status ServiceDeploymentRollbackMonitorsStatus + + // One or more CloudWatch alarm names that have been triggered during the service + // deployment. A "," separates the alarm names. + TriggeredAlarmNames []string + + noSmithyDocumentSerde +} + +// The service deployment properties that are retured when you call +// ListServiceDeployments . +// +// This provides a high-level overview of the service deployment. +type ServiceDeploymentBrief struct { + + // The ARN of the cluster that hosts the service. + ClusterArn *string + + // The time that the service deployment was created. The format is yyyy-MM-dd + // HH:mm:ss.SSSSSS. + CreatedAt *time.Time + + // The time that the service deployment completed. The format is yyyy-MM-dd + // HH:mm:ss.SSSSSS. + FinishedAt *time.Time + + // The ARN of the service for this service deployment. + ServiceArn *string + + // The ARN of the service deployment. + ServiceDeploymentArn *string + + // The time that the service deployment statred. The format is yyyy-MM-dd + // HH:mm:ss.SSSSSS. + StartedAt *time.Time + + // The status of the service deployment + Status ServiceDeploymentStatus + + // Information about why the service deployment is in the current status. For + // example, the circuit breaker detected a deployment failure. + StatusReason *string + + // The ARN of the service revision being deplyed. + TargetServiceRevisionArn *string + + noSmithyDocumentSerde +} + +// Information about the circuit breaker used to determine when a service +// deployment has failed. +// +// The deployment circuit breaker is the rolling update mechanism that determines +// if the tasks reach a steady state. The deployment circuit breaker has an option +// that will automatically roll back a failed deployment to the last cpompleted +// service revision. For more information, see [How the Amazon ECS deployment circuit breaker detects failures]in the Amazon ECS Developer Guide. +// +// [How the Amazon ECS deployment circuit breaker detects failures]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-circuit-breaker.html +type ServiceDeploymentCircuitBreaker struct { + + // The number of times the circuit breaker detected a service deploymeny failure. + FailureCount int32 + + // The circuit breaker status. Amazon ECS is not using the circuit breaker for + // service deployment failures when the status is DISABLED . + Status ServiceDeploymentRollbackMonitorsStatus + + // The threshhold which determines that the service deployment failed. + // + // The deployment circuit breaker calculates the threshold value, and then uses + // the value to determine when to move the deployment to a FAILED state. The + // deployment circuit breaker has a minimum threshold of 3 and a maximum threshold + // of 200. and uses the values in the following formula to determine the deployment + // failure. + // + // 0.5 * desired task count + Threshold int32 + + noSmithyDocumentSerde +} + // The details for an event that's associated with a service. type ServiceEvent struct { @@ -4301,6 +4547,102 @@ type ServiceRegistry struct { noSmithyDocumentSerde } +// Information about the service revision. +// +// A service revision contains a record of the workload configuration Amazon ECS +// is attempting to deploy. Whenever you create or deploy a service, Amazon ECS +// automatically creates and captures the configuration that you're trying to +// deploy in the service revision. For information about service revisions, see [Amazon ECS service revisions]in +// the Amazon Elastic Container Service Developer Guide . +// +// [Amazon ECS service revisions]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-revision.html +type ServiceRevision struct { + + // The capacity provider strategy the service revision uses. + CapacityProviderStrategy []CapacityProviderStrategyItem + + // The ARN of the cluster that hosts the service. + ClusterArn *string + + // The container images the service revision uses. + ContainerImages []ContainerImage + + // The time that the service revision was created. The format is yyyy-mm-dd + // HH:mm:ss.SSSSS. + CreatedAt *time.Time + + // The amount of ephemeral storage to allocate for the deployment. + FargateEphemeralStorage *DeploymentEphemeralStorage + + // Indicates whether Runtime Monitoring is turned on. + GuardDutyEnabled bool + + // The launch type the service revision uses. + LaunchType LaunchType + + // The load balancers the service revision uses. + LoadBalancers []LoadBalancer + + // The network configuration for a task or service. + NetworkConfiguration *NetworkConfiguration + + // The platform family the service revision uses. + PlatformFamily *string + + // For the Fargate launch type, the platform version the service revision uses. + PlatformVersion *string + + // The ARN of the service for the service revision. + ServiceArn *string + + // The Service Connect configuration of your Amazon ECS service. The configuration + // for this service to discover and connect to services, and be discovered by, and + // connected from, other services within a namespace. + // + // Tasks that run in a namespace can use short names to connect to services in the + // namespace. Tasks can connect to services across all of the clusters in the + // namespace. Tasks connect through a managed proxy container that collects logs + // and metrics for increased visibility. Only the tasks that Amazon ECS services + // create are supported with Service Connect. For more information, see [Service Connect]in the + // Amazon Elastic Container Service Developer Guide. + // + // [Service Connect]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html + ServiceConnectConfiguration *ServiceConnectConfiguration + + // The service registries (for Service Discovery) the service revision uses. + ServiceRegistries []ServiceRegistry + + // The ARN of the service revision. + ServiceRevisionArn *string + + // The task definition the service revision uses. + TaskDefinition *string + + // The volumes that are configured at deployment that the service revision uses. + VolumeConfigurations []ServiceVolumeConfiguration + + noSmithyDocumentSerde +} + +// The information about the number of requested, pending, and running tasks for a +// service revision. +type ServiceRevisionSummary struct { + + // The ARN of the service revision. + Arn *string + + // The number of pending tasks for the service revision. + PendingTaskCount int32 + + // The number of requested tasks for the service revision. + RequestedTaskCount int32 + + // The number of running tasks for the service revision. + RunningTaskCount int32 + + noSmithyDocumentSerde +} + // The configuration for a volume specified in the task definition as a volume // that is configured at launch time. Currently, the only supported volume type is // an Amazon EBS volume. @@ -4802,10 +5144,11 @@ type TaskDefinition struct { // resources. If none is specified, then IPC resources within the containers of a // task are private and not shared with other containers in a task or on the // container instance. If no value is specified, then the IPC resource namespace - // sharing depends on the Docker daemon setting on the container instance. + // sharing depends on the Docker daemon setting on the container instance. For more + // information, see [IPC settings]in the Docker run reference. // // If the host IPC mode is used, be aware that there is a heightened risk of - // undesired IPC namespace expose. + // undesired IPC namespace expose. For more information, see [Docker security]. // // If you are setting namespaced kernel parameters using systemControls for the // containers in the task, the following will apply to your IPC resource namespace. @@ -4821,6 +5164,8 @@ type TaskDefinition struct { // This parameter is not supported for Windows containers or tasks run on Fargate. // // [System Controls]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html + // [Docker security]: https://docs.docker.com/engine/security/security/ + // [IPC settings]: https://docs.docker.com/engine/reference/run/#ipc-settings---ipc IpcMode IpcMode // The amount (in MiB) of memory used by the task. @@ -4884,15 +5229,17 @@ type TaskDefinition struct { // user (UID 0). It is considered best practice to use a non-root user. // // If the network mode is awsvpc , the task is allocated an elastic network - // interface, and you must specify a [NetworkConfiguration]value when you create a service or run a task + // interface, and you must specify a NetworkConfigurationvalue when you create a service or run a task // with the task definition. For more information, see [Task Networking]in the Amazon Elastic // Container Service Developer Guide. // // If the network mode is host , you cannot run multiple instantiations of the same // task on a single container instance when port mappings are used. // + // For more information, see [Network settings] in the Docker run reference. + // // [Task Networking]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html - // [NetworkConfiguration]: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_NetworkConfiguration.html + // [Network settings]: https://docs.docker.com/engine/reference/run/#network-settings NetworkMode NetworkMode // The process namespace to use for the containers in the task. The valid values @@ -4907,16 +5254,20 @@ type TaskDefinition struct { // If task is specified, all containers within the specified task share the same // process namespace. // - // If no value is specified, the default is a private namespace for each container. + // If no value is specified, the default is a private namespace for each + // container. For more information, see [PID settings]in the Docker run reference. // // If the host PID mode is used, there's a heightened risk of undesired process - // namespace exposure. + // namespace exposure. For more information, see [Docker security]. // // This parameter is not supported for Windows containers. // // This parameter is only supported for tasks that are hosted on Fargate if the // tasks are using platform version 1.4.0 or later (Linux). This isn't supported // for Windows containers on Fargate. + // + // [PID settings]: https://docs.docker.com/engine/reference/run/#pid-settings---pid + // [Docker security]: https://docs.docker.com/engine/security/security/ PidMode PidMode // An array of placement constraint objects to use for tasks. @@ -5026,8 +5377,8 @@ type TaskDefinitionPlacementConstraint struct { // The amount of ephemeral storage to allocate for the task. type TaskEphemeralStorage struct { - // Specify an Key Management Service key ID to encrypt the ephemeral storage for - // the task. + // Specify an Amazon Web Services Key Management Service key ID to encrypt the + // ephemeral storage for the task. KmsKeyId *string // The total amount, in GiB, of the ephemeral storage to set for the task. The diff --git a/service/ecs/validators.go b/service/ecs/validators.go index dbe5aa2adda..88baf2b55de 100644 --- a/service/ecs/validators.go +++ b/service/ecs/validators.go @@ -290,6 +290,46 @@ func (m *validateOpDescribeContainerInstances) HandleInitialize(ctx context.Cont return next.HandleInitialize(ctx, in) } +type validateOpDescribeServiceDeployments struct { +} + +func (*validateOpDescribeServiceDeployments) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeServiceDeployments) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeServiceDeploymentsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeServiceDeploymentsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeServiceRevisions struct { +} + +func (*validateOpDescribeServiceRevisions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeServiceRevisions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeServiceRevisionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeServiceRevisionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeServices struct { } @@ -430,6 +470,26 @@ func (m *validateOpListAttributes) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpListServiceDeployments struct { +} + +func (*validateOpListServiceDeployments) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListServiceDeployments) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListServiceDeploymentsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListServiceDeploymentsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListServicesByNamespace struct { } @@ -966,6 +1026,14 @@ func addOpDescribeContainerInstancesValidationMiddleware(stack *middleware.Stack return stack.Initialize.Add(&validateOpDescribeContainerInstances{}, middleware.After) } +func addOpDescribeServiceDeploymentsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeServiceDeployments{}, middleware.After) +} + +func addOpDescribeServiceRevisionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeServiceRevisions{}, middleware.After) +} + func addOpDescribeServicesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeServices{}, middleware.After) } @@ -994,6 +1062,10 @@ func addOpListAttributesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListAttributes{}, middleware.After) } +func addOpListServiceDeploymentsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListServiceDeployments{}, middleware.After) +} + func addOpListServicesByNamespaceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListServicesByNamespace{}, middleware.After) } @@ -2627,6 +2699,36 @@ func validateOpDescribeContainerInstancesInput(v *DescribeContainerInstancesInpu } } +func validateOpDescribeServiceDeploymentsInput(v *DescribeServiceDeploymentsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeServiceDeploymentsInput"} + if v.ServiceDeploymentArns == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceDeploymentArns")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeServiceRevisionsInput(v *DescribeServiceRevisionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeServiceRevisionsInput"} + if v.ServiceRevisionArns == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceRevisionArns")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeServicesInput(v *DescribeServicesInput) error { if v == nil { return nil @@ -2738,6 +2840,21 @@ func validateOpListAttributesInput(v *ListAttributesInput) error { } } +func validateOpListServiceDeploymentsInput(v *ListServiceDeploymentsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListServiceDeploymentsInput"} + if v.Service == nil { + invalidParams.Add(smithy.NewErrParamRequired("Service")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListServicesByNamespaceInput(v *ListServicesByNamespaceInput) error { if v == nil { return nil diff --git a/service/geomaps/LICENSE.txt b/service/geomaps/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/geomaps/LICENSE.txt @@ -0,0 +1,202 @@ + + 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/geomaps/api_client.go b/service/geomaps/api_client.go new file mode 100644 index 00000000000..934633e719d --- /dev/null +++ b/service/geomaps/api_client.go @@ -0,0 +1,913 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geomaps + +import ( + "context" + "errors" + "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/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net" + "net/http" + "sync/atomic" + "time" +) + +const ServiceID = "Geo Maps" +const ServiceAPIVersion = "2020-11-19" + +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/geomaps") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/geomaps") +} + +// Client provides the API client to make operations call for Amazon Location +// Service Maps V2. +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) + + resolveTracerProvider(&options) + + resolveMeterProvider(&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) + ctx = middleware.WithServiceID(ctx, ServiceID) + ctx = middleware.WithOperationName(ctx, opID) + + 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 + } + } + + ctx, err = withOperationMetrics(ctx, options.MeterProvider) + if err != nil { + return nil, metadata, err + } + + tracer := operationTracer(options.TracerProvider) + spanName := fmt.Sprintf("%s.%s", ServiceID, opID) + + ctx = tracing.WithOperationTracer(ctx, tracer) + + ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { + o.Kind = tracing.SpanKindClient + o.Properties.Set("rpc.system", "aws-api") + o.Properties.Set("rpc.method", opID) + o.Properties.Set("rpc.service", ServiceID) + }) + endTimer := startMetricTimer(ctx, "client.call.duration") + defer endTimer() + defer span.End() + + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/geomaps") + }) + decorated := middleware.DecorateHandler(handler, stack) + result, metadata, err = decorated.Handle(ctx, params) + if err != nil { + span.SetProperty("exception.type", fmt.Sprintf("%T", err)) + span.SetProperty("exception.message", err.Error()) + + var aerr smithy.APIError + if errors.As(err, &aerr) { + span.SetProperty("api.error_code", aerr.ErrorCode()) + span.SetProperty("api.error_message", aerr.ErrorMessage()) + span.SetProperty("api.error_fault", aerr.ErrorFault().String()) + } + + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + + span.SetProperty("error", err != nil) + if err == nil { + span.SetStatus(tracing.SpanStatusOK) + } else { + span.SetStatus(tracing.SpanStatusError) + } + + 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{options: options}, "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, + } + 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, "geomaps", 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 addSpanRetryLoop(stack *middleware.Stack, options Options) error { + return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) +} + +type spanRetryLoop struct { + options Options +} + +func (*spanRetryLoop) ID() string { + return "spanRetryLoop" +} + +func (m *spanRetryLoop) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + middleware.FinalizeOutput, middleware.Metadata, error, +) { + tracer := operationTracer(m.options.TracerProvider) + ctx, span := tracer.StartSpan(ctx, "RetryLoop") + defer span.End() + + return next.HandleFinalize(ctx, in) +} +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() + m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/geomaps") + }) + 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 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 resolveTracerProvider(options *Options) { + if options.TracerProvider == nil { + options.TracerProvider = &tracing.NopTracerProvider{} + } +} + +func resolveMeterProvider(options *Options) { + if options.MeterProvider == nil { + options.MeterProvider = metrics.NopMeterProvider{} + } +} + +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) +} + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/service/geomaps/api_client_test.go b/service/geomaps/api_client_test.go new file mode 100644 index 00000000000..216e73705e2 --- /dev/null +++ b/service/geomaps/api_client_test.go @@ -0,0 +1,127 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geomaps + +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/geomaps/api_op_GetGlyphs.go b/service/geomaps/api_op_GetGlyphs.go new file mode 100644 index 00000000000..36fc9f032e9 --- /dev/null +++ b/service/geomaps/api_op_GetGlyphs.go @@ -0,0 +1,338 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geomaps + +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" +) + +// Returns the map's glyphs. +func (c *Client) GetGlyphs(ctx context.Context, params *GetGlyphsInput, optFns ...func(*Options)) (*GetGlyphsOutput, error) { + if params == nil { + params = &GetGlyphsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetGlyphs", params, optFns, c.addOperationGetGlyphsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetGlyphsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetGlyphsInput struct { + + // Name of the FontStack to retrieve. + // + // Example: Amazon Ember Bold,Noto Sans Bold . + // + // The supported font stacks are as follows: + // + // - Amazon Ember Bold + // + // - Amazon Ember Bold Italic + // + // - Amazon Ember Bold,Noto Sans Bold + // + // - Amazon Ember Bold,Noto Sans Bold,Noto Sans Arabic Bold + // + // - Amazon Ember Condensed RC BdItalic + // + // - Amazon Ember Condensed RC Bold + // + // - Amazon Ember Condensed RC Bold Italic + // + // - Amazon Ember Condensed RC Bold,Noto Sans Bold + // + // - Amazon Ember Condensed RC Bold,Noto Sans Bold,Noto Sans Arabic Condensed + // Bold + // + // - Amazon Ember Condensed RC Light + // + // - Amazon Ember Condensed RC Light Italic + // + // - Amazon Ember Condensed RC LtItalic + // + // - Amazon Ember Condensed RC Regular + // + // - Amazon Ember Condensed RC Regular Italic + // + // - Amazon Ember Condensed RC Regular,Noto Sans Regular + // + // - Amazon Ember Condensed RC Regular,Noto Sans Regular,Noto Sans Arabic + // Condensed Regular + // + // - Amazon Ember Condensed RC RgItalic + // + // - Amazon Ember Condensed RC ThItalic + // + // - Amazon Ember Condensed RC Thin + // + // - Amazon Ember Condensed RC Thin Italic + // + // - Amazon Ember Heavy + // + // - Amazon Ember Heavy Italic + // + // - Amazon Ember Light + // + // - Amazon Ember Light Italic + // + // - Amazon Ember Medium + // + // - Amazon Ember Medium Italic + // + // - Amazon Ember Medium,Noto Sans Medium + // + // - Amazon Ember Medium,Noto Sans Medium,Noto Sans Arabic Medium + // + // - Amazon Ember Regular + // + // - Amazon Ember Regular Italic + // + // - Amazon Ember Regular Italic,Noto Sans Italic + // + // - Amazon Ember Regular Italic,Noto Sans Italic,Noto Sans Arabic Regular + // + // - Amazon Ember Regular,Noto Sans Regular + // + // - Amazon Ember Regular,Noto Sans Regular,Noto Sans Arabic Regular + // + // - Amazon Ember Thin + // + // - Amazon Ember Thin Italic + // + // - AmazonEmberCdRC_Bd + // + // - AmazonEmberCdRC_BdIt + // + // - AmazonEmberCdRC_Lt + // + // - AmazonEmberCdRC_LtIt + // + // - AmazonEmberCdRC_Rg + // + // - AmazonEmberCdRC_RgIt + // + // - AmazonEmberCdRC_Th + // + // - AmazonEmberCdRC_ThIt + // + // - AmazonEmber_Bd + // + // - AmazonEmber_BdIt + // + // - AmazonEmber_He + // + // - AmazonEmber_HeIt + // + // - AmazonEmber_Lt + // + // - AmazonEmber_LtIt + // + // - AmazonEmber_Md + // + // - AmazonEmber_MdIt + // + // - AmazonEmber_Rg + // + // - AmazonEmber_RgIt + // + // - AmazonEmber_Th + // + // - AmazonEmber_ThIt + // + // - Noto Sans Black + // + // - Noto Sans Black Italic + // + // - Noto Sans Bold + // + // - Noto Sans Bold Italic + // + // - Noto Sans Extra Bold + // + // - Noto Sans Extra Bold Italic + // + // - Noto Sans Extra Light + // + // - Noto Sans Extra Light Italic + // + // - Noto Sans Italic + // + // - Noto Sans Light + // + // - Noto Sans Light Italic + // + // - Noto Sans Medium + // + // - Noto Sans Medium Italic + // + // - Noto Sans Regular + // + // - Noto Sans Semi Bold + // + // - Noto Sans Semi Bold Italic + // + // - Noto Sans Thin + // + // - Noto Sans Thin Italic + // + // - NotoSans-Bold + // + // - NotoSans-Italic + // + // - NotoSans-Medium + // + // - NotoSans-Regular + // + // - Open Sans Regular,Arial Unicode MS Regular + // + // This member is required. + FontStack *string + + // A Unicode range of characters to download glyphs for. This must be aligned to + // multiples of 256. + // + // Example: 0-255.pdf + // + // This member is required. + FontUnicodeRange *string + + noSmithyDocumentSerde +} + +type GetGlyphsOutput struct { + + // The Glyph, as a binary blob. + Blob []byte + + // Header that instructs caching configuration for the client. + CacheControl *string + + // Header that represents the format of the response. The response returns the + // following as the HTTP body. + ContentType *string + + // The glyph's Etag. + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetGlyphsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetGlyphs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetGlyphs{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetGlyphs"); 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 = addSpanRetryLoop(stack, options); 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 = addOpGetGlyphsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGlyphs(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetGlyphs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetGlyphs", + } +} diff --git a/service/geomaps/api_op_GetSprites.go b/service/geomaps/api_op_GetSprites.go new file mode 100644 index 00000000000..b51767da329 --- /dev/null +++ b/service/geomaps/api_op_GetSprites.go @@ -0,0 +1,198 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geomaps + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/geomaps/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the map's sprites. +func (c *Client) GetSprites(ctx context.Context, params *GetSpritesInput, optFns ...func(*Options)) (*GetSpritesOutput, error) { + if params == nil { + params = &GetSpritesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetSprites", params, optFns, c.addOperationGetSpritesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetSpritesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetSpritesInput struct { + + // Sets color tone for map such as dark and light for specific map styles. It + // applies to only vector map styles such as Standard and Monochrome. + // + // Example: Light + // + // Default value: Light + // + // Valid values for ColorScheme are case sensitive. + // + // This member is required. + ColorScheme types.ColorScheme + + // Sprites API: The name of the sprite file to retrieve, following pattern + // sprites(@2x)?\.(png|json) . + // + // Example: sprites.png + // + // This member is required. + FileName *string + + // Style specifies the desired map style for the Sprites APIs. + // + // This member is required. + Style types.MapStyle + + // Optimizes map styles for specific use case or industry. You can choose allowed + // variant only with Standard map style. + // + // Example: Default + // + // Valid values for Variant are case sensitive. + // + // This member is required. + Variant types.Variant + + noSmithyDocumentSerde +} + +type GetSpritesOutput struct { + + // The body of the sprite sheet or JSON offset file (image/png or + // application/json, depending on input). + Blob []byte + + // Header that instructs caching configuration for the client. + CacheControl *string + + // Header that represents the format of the response. The response returns the + // following as the HTTP body. + ContentType *string + + // The sprite's Etag. + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetSpritesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetSprites{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetSprites{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetSprites"); 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 = addSpanRetryLoop(stack, options); 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 = addOpGetSpritesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSprites(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetSprites(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetSprites", + } +} diff --git a/service/geomaps/api_op_GetStaticMap.go b/service/geomaps/api_op_GetStaticMap.go new file mode 100644 index 00000000000..5fb146f138a --- /dev/null +++ b/service/geomaps/api_op_GetStaticMap.go @@ -0,0 +1,271 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geomaps + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/geomaps/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Provides high-quality static map images with customizable options. You can +// modify the map's appearance and overlay additional information. It's an ideal +// solution for applications requiring tailored static map snapshots. +func (c *Client) GetStaticMap(ctx context.Context, params *GetStaticMapInput, optFns ...func(*Options)) (*GetStaticMapOutput, error) { + if params == nil { + params = &GetStaticMapInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetStaticMap", params, optFns, c.addOperationGetStaticMapMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetStaticMapOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetStaticMapInput struct { + + // The map scaling parameter to size the image, icons, and labels. It follows the + // pattern of ^map(@2x)?$ . + // + // Example: map, map@2x + // + // This member is required. + FileName *string + + // Specifies the height of the map image. + // + // This member is required. + Height *int32 + + // Specifies the width of the map image. + // + // This member is required. + Width *int32 + + // Takes in two or more pair of coordinates, [Lon, Lat], with each coordinate + // separated by a comma. The API will generate an image to encompass all of the + // provided coordinates. + // + // Cannot be used with Zoom and or Radius + // + // Example: 97.170451,78.039098,99.045536,27.176178 + BoundedPositions *string + + // Takes in two pairs of coordinates, [Lon, Lat], denoting south-westerly and + // north-easterly edges of the image. The underlying area becomes the view of the + // image. + // + // Example: -123.17075,49.26959,-123.08125,49.31429 + BoundingBox *string + + // Takes in a pair of coordinates, [Lon, Lat], which becomes the center point of + // the image. This parameter requires that either zoom or radius is set. + // + // Cannot be used with Zoom and or Radius + // + // Example: 49.295,-123.108 + Center *string + + // Takes in a string to draw geometries on the image. The input is a comma + // separated format as follows format: [Lon, Lat] + // + // Example: + // line:-122.407653,37.798557,-122.413291,37.802443;color=%23DD0000;width=7;outline-color=#00DD00;outline-width=5yd|point:-122.40572,37.80004;label=Fog + // Hill Market;size=large;text-color=%23DD0000;color=#EE4B2B + // + // Currently it supports the following geometry types: point, line and polygon. It + // does not support multiPoint , multiLine and multiPolgyon. + CompactOverlay *string + + // Takes in a string to draw geometries on the image. The input is a valid GeoJSON + // collection object. + // + // Example: {"type":"FeatureCollection","features": + // [{"type":"Feature","geometry":{"type":"MultiPoint","coordinates": + // [[-90.076345,51.504107],[-0.074451,51.506892]]},"properties": + // {"color":"#00DD00"}}]} + GeoJsonOverlay *string + + // Optional: The API key to be used for authorization. Either an API key or valid + // SigV4 signature must be provided when making a request. + Key *string + + // Applies additional space (in pixels) around overlay feature to prevent them + // from being cut or obscured. + // + // Value for max and min is determined by: + // + // Min: 1 + // + // Max: min(height, width)/4 + // + // Example: 100 + Padding *int32 + + // Used with center parameter, it specifies the zoom of the image where you can + // control it on a granular level. Takes in any value >= 1 . + // + // Example: 1500 + // + // Cannot be used with Zoom . + // + // Unit: Meters + Radius *int64 + + // Displays a scale on the bottom right of the map image with the unit specified + // in the input. + // + // Example: KilometersMiles, Miles, Kilometers, MilesKilometers + ScaleBarUnit types.ScaleBarUnit + + // Style specifies the desired map style for the Style APIs. + Style types.StaticMapStyle + + // Specifies the zoom level of the map image. + // + // Cannot be used with Radius . + Zoom *float32 + + noSmithyDocumentSerde +} + +type GetStaticMapOutput struct { + + // The pricing bucket for which the request is charged at. + // + // This member is required. + PricingBucket *string + + // The blob represents a map image as a jpeg for the GetStaticMap API. + Blob []byte + + // Header that instructs caching configuration for the client. + CacheControl *string + + // Header that represents the format of the response. The response returns the + // following as the HTTP body. + ContentType *string + + // The static map's Etag. + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetStaticMapMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetStaticMap{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetStaticMap{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetStaticMap"); 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 = addSpanRetryLoop(stack, options); 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 = addOpGetStaticMapValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetStaticMap(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetStaticMap(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetStaticMap", + } +} diff --git a/service/geomaps/api_op_GetStyleDescriptor.go b/service/geomaps/api_op_GetStyleDescriptor.go new file mode 100644 index 00000000000..17971ca8557 --- /dev/null +++ b/service/geomaps/api_op_GetStyleDescriptor.go @@ -0,0 +1,218 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geomaps + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/geomaps/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about the style. +func (c *Client) GetStyleDescriptor(ctx context.Context, params *GetStyleDescriptorInput, optFns ...func(*Options)) (*GetStyleDescriptorOutput, error) { + if params == nil { + params = &GetStyleDescriptorInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetStyleDescriptor", params, optFns, c.addOperationGetStyleDescriptorMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetStyleDescriptorOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetStyleDescriptorInput struct { + + // Style specifies the desired map style. + // + // This member is required. + Style types.MapStyle + + // Sets color tone for map such as dark and light for specific map styles. It + // applies to only vector map styles such as Standard and Monochrome. + // + // Example: Light + // + // Default value: Light + // + // Valid values for ColorScheme are case sensitive. + ColorScheme types.ColorScheme + + // Optional: The API key to be used for authorization. Either an API key or valid + // SigV4 signature must be provided when making a request. + Key *string + + // Specifies the political view using ISO 3166-2 or ISO 3166-3 country code format. + // + // The following political views are currently supported: + // + // - ARG : Argentina's view on the Southern Patagonian Ice Field and Tierra Del + // Fuego, including the Falkland Islands, South Georgia, and South Sandwich Islands + // + // - EGY : Egypt's view on Bir Tawil + // + // - IND : India's view on Gilgit-Baltistan + // + // - KEN : Kenya's view on the Ilemi Triangle + // + // - MAR : Morocco's view on Western Sahara + // + // - PAK : Pakistan's view on Jammu and Kashmir and the Junagadh Area + // + // - RUS : Russia's view on Crimea + // + // - SDN : Sudan's view on the Halaib Triangle + // + // - SRB : Serbia's view on Kosovo, Vukovar, and Sarengrad Islands + // + // - SUR : Suriname's view on the Courantyne Headwaters and Lawa Headwaters + // + // - SYR : Syria's view on the Golan Heights + // + // - TUR : Turkey's view on Cyprus and Northern Cyprus + // + // - TZA : Tanzania's view on Lake Malawi + // + // - URY : Uruguay's view on Rincon de Artigas + // + // - VNM : Vietnam's view on the Paracel Islands and Spratly Islands + PoliticalView *string + + noSmithyDocumentSerde +} + +type GetStyleDescriptorOutput struct { + + // This Blob contains the body of the style descriptor which is in + // application/json format. + Blob []byte + + // Header that instructs caching configuration for the client. + CacheControl *string + + // Header that represents the format of the response. The response returns the + // following as the HTTP body. + ContentType *string + + // The style descriptor's Etag. + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetStyleDescriptorMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetStyleDescriptor{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetStyleDescriptor{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetStyleDescriptor"); 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 = addSpanRetryLoop(stack, options); 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 = addOpGetStyleDescriptorValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetStyleDescriptor(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetStyleDescriptor(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetStyleDescriptor", + } +} diff --git a/service/geomaps/api_op_GetTile.go b/service/geomaps/api_op_GetTile.go new file mode 100644 index 00000000000..6a70d19856d --- /dev/null +++ b/service/geomaps/api_op_GetTile.go @@ -0,0 +1,194 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geomaps + +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" +) + +// Returns a tile. Map tiles are used by clients to render a map. they're +// addressed using a grid arrangement with an X coordinate, Y coordinate, and Z +// (zoom) level. +func (c *Client) GetTile(ctx context.Context, params *GetTileInput, optFns ...func(*Options)) (*GetTileOutput, error) { + if params == nil { + params = &GetTileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetTile", params, optFns, c.addOperationGetTileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetTileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetTileInput struct { + + // Specifies the desired tile set. + // + // Valid Values: raster.satellite | vector.basemap + // + // This member is required. + Tileset *string + + // The X axis value for the map tile. Must be between 0 and 19. + // + // This member is required. + X *string + + // The Y axis value for the map tile. + // + // This member is required. + Y *string + + // The zoom value for the map tile. + // + // This member is required. + Z *string + + // Optional: The API key to be used for authorization. Either an API key or valid + // SigV4 signature must be provided when making a request. + Key *string + + noSmithyDocumentSerde +} + +type GetTileOutput struct { + + // The pricing bucket for which the request is charged at. + // + // This member is required. + PricingBucket *string + + // The blob represents a vector tile in mvt format for the GetTile API. + Blob []byte + + // Header that instructs caching configuration for the client. + CacheControl *string + + // Header that represents the format of the response. The response returns the + // following as the HTTP body. + ContentType *string + + // The pricing bucket for which the request is charged at. + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetTileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetTile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetTile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetTile"); 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 = addSpanRetryLoop(stack, options); 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 = addOpGetTileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTile(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetTile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetTile", + } +} diff --git a/service/geomaps/auth.go b/service/geomaps/auth.go new file mode 100644 index 00000000000..0c459483c64 --- /dev/null +++ b/service/geomaps/auth.go @@ -0,0 +1,313 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geomaps + +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/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + 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, "geo-maps") + 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, +) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + + 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) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() + 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, +) { + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) + 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 := timeOperationMetric(ctx, "client.call.resolve_identity_duration", + func() (smithyauth.Identity, error) { + return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) + }, + func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("get identity: %w", err) + } + + ctx = setIdentity(ctx, identity) + + span.End() + 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 { + options Options +} + +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, +) { + _, span := tracing.StartSpan(ctx, "SignRequest") + defer span.End() + + 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") + } + + _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { + return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) + }, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("sign request: %w", err) + } + + span.End() + return next.HandleFinalize(ctx, in) +} diff --git a/service/geomaps/deserializers.go b/service/geomaps/deserializers.go new file mode 100644 index 00000000000..91167d15c64 --- /dev/null +++ b/service/geomaps/deserializers.go @@ -0,0 +1,1160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geomaps + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/geomaps/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" + "github.com/aws/smithy-go/tracing" + 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 awsRestjson1_deserializeOpGetGlyphs struct { +} + +func (*awsRestjson1_deserializeOpGetGlyphs) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetGlyphs) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetGlyphs(response, &metadata) + } + output := &GetGlyphsOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsGetGlyphsOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + err = awsRestjson1_deserializeOpDocumentGetGlyphsOutput(output, response.Body, response.ContentLength) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetGlyphs(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsGetGlyphsOutput(v *GetGlyphsOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Cache-Control"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.CacheControl = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ContentType = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentGetGlyphsOutput(v *GetGlyphsOutput, body io.ReadCloser, contentLength int64) error { + if v == nil { + return fmt.Errorf("unsupported deserialization of nil %T", v) + } + + var buf bytes.Buffer + if contentLength > 0 { + buf.Grow(int(contentLength)) + } else { + buf.Grow(512) + } + + _, err := buf.ReadFrom(body) + if err != nil { + return err + } + if buf.Len() > 0 { + v.Blob = buf.Bytes() + } + return nil +} + +type awsRestjson1_deserializeOpGetSprites struct { +} + +func (*awsRestjson1_deserializeOpGetSprites) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetSprites) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetSprites(response, &metadata) + } + output := &GetSpritesOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsGetSpritesOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + err = awsRestjson1_deserializeOpDocumentGetSpritesOutput(output, response.Body, response.ContentLength) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetSprites(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsGetSpritesOutput(v *GetSpritesOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Cache-Control"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.CacheControl = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ContentType = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentGetSpritesOutput(v *GetSpritesOutput, body io.ReadCloser, contentLength int64) error { + if v == nil { + return fmt.Errorf("unsupported deserialization of nil %T", v) + } + + var buf bytes.Buffer + if contentLength > 0 { + buf.Grow(int(contentLength)) + } else { + buf.Grow(512) + } + + _, err := buf.ReadFrom(body) + if err != nil { + return err + } + if buf.Len() > 0 { + v.Blob = buf.Bytes() + } + return nil +} + +type awsRestjson1_deserializeOpGetStaticMap struct { +} + +func (*awsRestjson1_deserializeOpGetStaticMap) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetStaticMap) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetStaticMap(response, &metadata) + } + output := &GetStaticMapOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsGetStaticMapOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + err = awsRestjson1_deserializeOpDocumentGetStaticMapOutput(output, response.Body, response.ContentLength) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetStaticMap(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsGetStaticMapOutput(v *GetStaticMapOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Cache-Control"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.CacheControl = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ContentType = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("x-amz-geo-pricing-bucket"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.PricingBucket = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentGetStaticMapOutput(v *GetStaticMapOutput, body io.ReadCloser, contentLength int64) error { + if v == nil { + return fmt.Errorf("unsupported deserialization of nil %T", v) + } + + var buf bytes.Buffer + if contentLength > 0 { + buf.Grow(int(contentLength)) + } else { + buf.Grow(512) + } + + _, err := buf.ReadFrom(body) + if err != nil { + return err + } + if buf.Len() > 0 { + v.Blob = buf.Bytes() + } + return nil +} + +type awsRestjson1_deserializeOpGetStyleDescriptor struct { +} + +func (*awsRestjson1_deserializeOpGetStyleDescriptor) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetStyleDescriptor) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetStyleDescriptor(response, &metadata) + } + output := &GetStyleDescriptorOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsGetStyleDescriptorOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + err = awsRestjson1_deserializeOpDocumentGetStyleDescriptorOutput(output, response.Body, response.ContentLength) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetStyleDescriptor(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsGetStyleDescriptorOutput(v *GetStyleDescriptorOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Cache-Control"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.CacheControl = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ContentType = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentGetStyleDescriptorOutput(v *GetStyleDescriptorOutput, body io.ReadCloser, contentLength int64) error { + if v == nil { + return fmt.Errorf("unsupported deserialization of nil %T", v) + } + + var buf bytes.Buffer + if contentLength > 0 { + buf.Grow(int(contentLength)) + } else { + buf.Grow(512) + } + + _, err := buf.ReadFrom(body) + if err != nil { + return err + } + if buf.Len() > 0 { + v.Blob = buf.Bytes() + } + return nil +} + +type awsRestjson1_deserializeOpGetTile struct { +} + +func (*awsRestjson1_deserializeOpGetTile) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetTile) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetTile(response, &metadata) + } + output := &GetTileOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsGetTileOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + err = awsRestjson1_deserializeOpDocumentGetTileOutput(output, response.Body, response.ContentLength) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetTile(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsGetTileOutput(v *GetTileOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Cache-Control"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.CacheControl = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ContentType = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("x-amz-geo-pricing-bucket"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.PricingBucket = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentGetTileOutput(v *GetTileOutput, body io.ReadCloser, contentLength int64) error { + if v == nil { + return fmt.Errorf("unsupported deserialization of nil %T", v) + } + + var buf bytes.Buffer + if contentLength > 0 { + buf.Grow(int(contentLength)) + } else { + buf.Grow(512) + } + + _, err := buf.ReadFrom(body) + if err != nil { + return err + } + if buf.Len() > 0 { + v.Blob = buf.Bytes() + } + return nil +} + +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, 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.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, 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.ThrottlingException + if *v == nil { + sv = &types.ThrottlingException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_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 "fieldList": + if err := awsRestjson1_deserializeDocumentValidationExceptionFieldList(&sv.FieldList, value); err != nil { + return err + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ValidationExceptionReason to be of type string, got %T instead", value) + } + sv.Reason = types.ValidationExceptionReason(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentValidationExceptionField(v **types.ValidationExceptionField, 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.ValidationExceptionField + if *v == nil { + sv = &types.ValidationExceptionField{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentValidationExceptionFieldList(v *[]types.ValidationExceptionField, 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.ValidationExceptionField + if *v == nil { + cv = []types.ValidationExceptionField{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ValidationExceptionField + destAddr := &col + if err := awsRestjson1_deserializeDocumentValidationExceptionField(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} diff --git a/service/geomaps/doc.go b/service/geomaps/doc.go new file mode 100644 index 00000000000..87dc5c874f1 --- /dev/null +++ b/service/geomaps/doc.go @@ -0,0 +1,28 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package geomaps provides the API client, operations, and parameter types for +// Amazon Location Service Maps V2. +// +// Integrate high-quality base map data into your applications using [MapLibre]. +// +// Capabilities include: +// +// - Access to comprehensive base map data, allowing you to tailor the map +// display to your specific needs. +// +// - Multiple pre-designed map styles suited for various application types, such +// as navigation, logistics, or data visualization. +// +// - Generation of static map images for scenarios where interactive maps aren't +// suitable, such as: +// +// - Embedding in emails or documents +// +// - Displaying in low-bandwidth environments +// +// - Creating printable maps +// +// - Enhancing application performance by reducing client-side rendering +// +// [MapLibre]: https://maplibre.org +package geomaps diff --git a/service/geomaps/endpoints.go b/service/geomaps/endpoints.go new file mode 100644 index 00000000000..2a186454fda --- /dev/null +++ b/service/geomaps/endpoints.go @@ -0,0 +1,741 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geomaps + +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/geomaps/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" + "github.com/aws/smithy-go/tracing" + 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 = "geo-maps" + } + 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_GEO_MAPS") + + if g && !s { + return + } + + value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "Geo Maps", 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 { + // 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 + + // The AWS region used to dispatch the request. + // + // Parameter is + // required. + // + // AWS::Region + Region *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 _PartitionResult.Name == "aws" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := func() string { + var out strings.Builder + out.WriteString("https://maps.geo.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws" { + if _UseFIPS == true { + if _UseDualStack == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://maps.geo-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws" { + if _UseFIPS == true { + if _UseDualStack == false { + uriString := func() string { + var out strings.Builder + out.WriteString("https://maps.geo-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws" { + if _UseFIPS == false { + if _UseDualStack == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://maps.geo.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws-us-gov" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := func() string { + var out strings.Builder + out.WriteString("https://maps.geo.") + out.WriteString(_Region) + out.WriteString(".us-gov.") + out.WriteString(_PartitionResult.DnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws-us-gov" { + if _UseFIPS == true { + if _UseDualStack == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://maps.geo-fips.") + out.WriteString(_Region) + out.WriteString(".us-gov.") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws-us-gov" { + if _UseFIPS == true { + if _UseDualStack == false { + uriString := func() string { + var out strings.Builder + out.WriteString("https://maps.geo-fips.") + out.WriteString(_Region) + out.WriteString(".us-gov.") + out.WriteString(_PartitionResult.DnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws-us-gov" { + if _UseFIPS == false { + if _UseDualStack == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://maps.geo.") + out.WriteString(_Region) + out.WriteString(".us-gov.") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _UseFIPS == true { + if _UseDualStack == true { + if true == _PartitionResult.SupportsFIPS { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://geo-maps-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 _UseDualStack == false { + if _PartitionResult.SupportsFIPS == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://geo-maps-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 _UseFIPS == false { + if _UseDualStack == true { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://geo-maps.") + 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://geo-maps.") + 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.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) + params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) + params.Endpoint = options.BaseEndpoint + params.Region = bindRegion(options.Region) + + 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, +) { + _, span := tracing.StartSpan(ctx, "ResolveEndpoint") + defer span.End() + + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleFinalize(ctx, in) + } + + 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 := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", + func() (smithyendpoints.Endpoint, error) { + return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + }) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) + + 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) + } + + span.End() + return next.HandleFinalize(ctx, in) +} diff --git a/service/geomaps/endpoints_config_test.go b/service/geomaps/endpoints_config_test.go new file mode 100644 index 00000000000..02386df0c37 --- /dev/null +++ b/service/geomaps/endpoints_config_test.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geomaps + +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-geo-maps.dev", + envIgnore: true, + configGlobal: "http://config-global.dev", + configService: "http://config-geo-maps.dev", + expectURL: nil, + }, + "env global": { + envGlobal: "https://env-global.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-geo-maps.dev", + expectURL: aws.String("https://env-global.dev"), + }, + "env service": { + envGlobal: "https://env-global.dev", + envService: "https://env-geo-maps.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-geo-maps.dev", + expectURL: aws.String("https://env-geo-maps.dev"), + }, + "config ignore": { + envGlobal: "https://env-global.dev", + envService: "https://env-geo-maps.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-geo-maps.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-geo-maps.dev", + expectURL: aws.String("http://config-geo-maps.dev"), + }, + "client": { + envGlobal: "https://env-global.dev", + envService: "https://env-geo-maps.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-geo-maps.dev", + clientEndpoint: aws.String("https://client-geo-maps.dev"), + expectURL: aws.String("https://client-geo-maps.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_GEO_MAPS", 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/geomaps/endpoints_test.go b/service/geomaps/endpoints_test.go new file mode 100644 index 00000000000..fadde15e477 --- /dev/null +++ b/service/geomaps/endpoints_test.go @@ -0,0 +1,1006 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geomaps + +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 custom endpoint with region not set and fips disabled +func TestEndpointCase0(t *testing.T) { + var params = EndpointParameters{ + Endpoint: ptr.String("https://example.com"), + UseFIPS: 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://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 +func TestEndpointCase1(t *testing.T) { + var params = EndpointParameters{ + Endpoint: ptr.String("https://example.com"), + UseFIPS: 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 := "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 TestEndpointCase2(t *testing.T) { + var params = EndpointParameters{ + Endpoint: ptr.String("https://example.com"), + 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 := "Invalid Configuration: Dualstack and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase3(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://maps.geo-fips.us-east-1.api.aws/v2") + + 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 TestEndpointCase4(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://maps.geo-fips.us-east-1.amazonaws.com/v2") + + 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 TestEndpointCase5(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://maps.geo.us-east-1.api.aws/v2") + + 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 TestEndpointCase6(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://maps.geo.us-east-1.amazonaws.com/v2") + + 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-northwest-1 with FIPS enabled and DualStack enabled +func TestEndpointCase7(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("cn-northwest-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://geo-maps-fips.cn-northwest-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-northwest-1 with FIPS enabled and DualStack disabled +func TestEndpointCase8(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("cn-northwest-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://geo-maps-fips.cn-northwest-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-northwest-1 with FIPS disabled and DualStack enabled +func TestEndpointCase9(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("cn-northwest-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://geo-maps.cn-northwest-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-northwest-1 with FIPS disabled and DualStack disabled +func TestEndpointCase10(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("cn-northwest-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://geo-maps.cn-northwest-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-west-1 with FIPS enabled and DualStack enabled +func TestEndpointCase11(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-west-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://maps.geo-fips.us-gov-west-1.us-gov.api.aws/v2") + + 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-west-1 with FIPS enabled and DualStack disabled +func TestEndpointCase12(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-west-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://maps.geo-fips.us-gov-west-1.us-gov.amazonaws.com/v2") + + 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-west-1 with FIPS disabled and DualStack enabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-west-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://maps.geo.us-gov-west-1.us-gov.api.aws/v2") + + 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-west-1 with FIPS disabled and DualStack disabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-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://maps.geo.us-gov-west-1.us-gov.amazonaws.com/v2") + + 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 TestEndpointCase15(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 TestEndpointCase16(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://geo-maps-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 TestEndpointCase17(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 TestEndpointCase18(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://geo-maps.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 TestEndpointCase19(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 TestEndpointCase20(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://geo-maps-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 TestEndpointCase21(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 TestEndpointCase22(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://geo-maps.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 eu-isoe-west-1 with FIPS enabled and DualStack enabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-isoe-west-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 eu-isoe-west-1 with FIPS enabled and DualStack disabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-isoe-west-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://geo-maps-fips.eu-isoe-west-1.cloud.adc-e.uk") + + 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-isoe-west-1 with FIPS disabled and DualStack enabled +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-isoe-west-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 eu-isoe-west-1 with FIPS disabled and DualStack disabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-isoe-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://geo-maps.eu-isoe-west-1.cloud.adc-e.uk") + + 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-isof-south-1 with FIPS enabled and DualStack enabled +func TestEndpointCase27(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isof-south-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-isof-south-1 with FIPS enabled and DualStack disabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isof-south-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://geo-maps-fips.us-isof-south-1.csp.hci.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-isof-south-1 with FIPS disabled and DualStack enabled +func TestEndpointCase29(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isof-south-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-isof-south-1 with FIPS disabled and DualStack disabled +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isof-south-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://geo-maps.us-isof-south-1.csp.hci.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) + } +} + +// Missing region +func TestEndpointCase31(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/geomaps/generated.json b/service/geomaps/generated.json new file mode 100644 index 00000000000..09899667530 --- /dev/null +++ b/service/geomaps/generated.json @@ -0,0 +1,37 @@ +{ + "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_GetGlyphs.go", + "api_op_GetSprites.go", + "api_op_GetStaticMap.go", + "api_op_GetStyleDescriptor.go", + "api_op_GetTile.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/enums.go", + "types/errors.go", + "types/types.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/geomaps", + "unstable": false +} diff --git a/service/geomaps/go.mod b/service/geomaps/go.mod new file mode 100644 index 00000000000..e4f7e65b6c1 --- /dev/null +++ b/service/geomaps/go.mod @@ -0,0 +1,16 @@ +module github.com/aws/aws-sdk-go-v2/service/geomaps + +go 1.21 + +require ( + github.com/aws/aws-sdk-go-v2 v1.32.3 + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.22 + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.22 + github.com/aws/smithy-go v1.22.0 +) + +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/geomaps/go.sum b/service/geomaps/go.sum new file mode 100644 index 00000000000..70a20636e37 --- /dev/null +++ b/service/geomaps/go.sum @@ -0,0 +1,2 @@ +github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= +github.com/aws/smithy-go v1.22.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= diff --git a/service/geomaps/go_module_metadata.go b/service/geomaps/go_module_metadata.go new file mode 100644 index 00000000000..e025513811c --- /dev/null +++ b/service/geomaps/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package geomaps + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/geomaps/internal/endpoints/endpoints.go b/service/geomaps/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..c4914bed9fd --- /dev/null +++ b/service/geomaps/internal/endpoints/endpoints.go @@ -0,0 +1,296 @@ +// 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 Geo Maps 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|mx)\\-\\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: "geo-maps.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "geo-maps-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "geo-maps-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-maps.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "geo-maps.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "geo-maps-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "geo-maps-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-maps.{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: "geo-maps-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-maps.{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: "geo-maps-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-maps.{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: "geo-maps-fips.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-maps.{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: "geo-maps-fips.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-maps.{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: "geo-maps.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "geo-maps-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "geo-maps-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-maps.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/geomaps/internal/endpoints/endpoints_test.go b/service/geomaps/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/geomaps/internal/endpoints/endpoints_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "testing" +) + +func TestRegexCompile(t *testing.T) { + _ = defaultPartitions +} diff --git a/service/geomaps/options.go b/service/geomaps/options.go new file mode 100644 index 00000000000..98d42ec9370 --- /dev/null +++ b/service/geomaps/options.go @@ -0,0 +1,232 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geomaps + +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/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + 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 + + // 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 client meter provider. + MeterProvider metrics.MeterProvider + + // 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 client tracer provider. + TracerProvider tracing.TracerProvider + + // 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/geomaps/protocol_test.go b/service/geomaps/protocol_test.go new file mode 100644 index 00000000000..d83e617afce --- /dev/null +++ b/service/geomaps/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geomaps diff --git a/service/geomaps/serializers.go b/service/geomaps/serializers.go new file mode 100644 index 00000000000..1a5fc46dd94 --- /dev/null +++ b/service/geomaps/serializers.go @@ -0,0 +1,499 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geomaps + +import ( + "context" + "fmt" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +type awsRestjson1_serializeOpGetGlyphs struct { +} + +func (*awsRestjson1_serializeOpGetGlyphs) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetGlyphs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetGlyphsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/glyphs/{FontStack}/{FontUnicodeRange}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetGlyphsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetGlyphsInput(v *GetGlyphsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FontStack == nil || len(*v.FontStack) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FontStack must not be empty")} + } + if v.FontStack != nil { + if err := encoder.SetURI("FontStack").String(*v.FontStack); err != nil { + return err + } + } + + if v.FontUnicodeRange == nil || len(*v.FontUnicodeRange) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FontUnicodeRange must not be empty")} + } + if v.FontUnicodeRange != nil { + if err := encoder.SetURI("FontUnicodeRange").String(*v.FontUnicodeRange); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetSprites struct { +} + +func (*awsRestjson1_serializeOpGetSprites) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetSprites) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetSpritesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/styles/{Style}/{ColorScheme}/{Variant}/sprites/{FileName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetSpritesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetSpritesInput(v *GetSpritesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if len(v.ColorScheme) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ColorScheme must not be empty")} + } + if len(v.ColorScheme) > 0 { + if err := encoder.SetURI("ColorScheme").String(string(v.ColorScheme)); err != nil { + return err + } + } + + if v.FileName == nil || len(*v.FileName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FileName must not be empty")} + } + if v.FileName != nil { + if err := encoder.SetURI("FileName").String(*v.FileName); err != nil { + return err + } + } + + if len(v.Style) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Style must not be empty")} + } + if len(v.Style) > 0 { + if err := encoder.SetURI("Style").String(string(v.Style)); err != nil { + return err + } + } + + if len(v.Variant) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Variant must not be empty")} + } + if len(v.Variant) > 0 { + if err := encoder.SetURI("Variant").String(string(v.Variant)); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetStaticMap struct { +} + +func (*awsRestjson1_serializeOpGetStaticMap) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetStaticMap) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetStaticMapInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/static/{FileName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetStaticMapInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetStaticMapInput(v *GetStaticMapInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.BoundedPositions != nil { + encoder.SetQuery("bounded-positions").String(*v.BoundedPositions) + } + + if v.BoundingBox != nil { + encoder.SetQuery("bounding-box").String(*v.BoundingBox) + } + + if v.Center != nil { + encoder.SetQuery("center").String(*v.Center) + } + + if v.CompactOverlay != nil { + encoder.SetQuery("compact-overlay").String(*v.CompactOverlay) + } + + if v.FileName == nil || len(*v.FileName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FileName must not be empty")} + } + if v.FileName != nil { + if err := encoder.SetURI("FileName").String(*v.FileName); err != nil { + return err + } + } + + if v.GeoJsonOverlay != nil { + encoder.SetQuery("geojson-overlay").String(*v.GeoJsonOverlay) + } + + if v.Height != nil { + encoder.SetQuery("height").Integer(*v.Height) + } + + if v.Key != nil { + encoder.SetQuery("key").String(*v.Key) + } + + if v.Padding != nil { + encoder.SetQuery("padding").Integer(*v.Padding) + } + + if v.Radius != nil { + encoder.SetQuery("radius").Long(*v.Radius) + } + + if len(v.ScaleBarUnit) > 0 { + encoder.SetQuery("scale-unit").String(string(v.ScaleBarUnit)) + } + + if len(v.Style) > 0 { + encoder.SetQuery("style").String(string(v.Style)) + } + + if v.Width != nil { + encoder.SetQuery("width").Integer(*v.Width) + } + + if v.Zoom != nil { + encoder.SetQuery("zoom").Float(*v.Zoom) + } + + return nil +} + +type awsRestjson1_serializeOpGetStyleDescriptor struct { +} + +func (*awsRestjson1_serializeOpGetStyleDescriptor) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetStyleDescriptor) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetStyleDescriptorInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/styles/{Style}/descriptor") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetStyleDescriptorInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetStyleDescriptorInput(v *GetStyleDescriptorInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if len(v.ColorScheme) > 0 { + encoder.SetQuery("color-scheme").String(string(v.ColorScheme)) + } + + if v.Key != nil { + encoder.SetQuery("key").String(*v.Key) + } + + if v.PoliticalView != nil { + encoder.SetQuery("political-view").String(*v.PoliticalView) + } + + if len(v.Style) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Style must not be empty")} + } + if len(v.Style) > 0 { + if err := encoder.SetURI("Style").String(string(v.Style)); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetTile struct { +} + +func (*awsRestjson1_serializeOpGetTile) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetTile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetTileInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tiles/{Tileset}/{Z}/{X}/{Y}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetTileInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetTileInput(v *GetTileInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Key != nil { + encoder.SetQuery("key").String(*v.Key) + } + + if v.Tileset == nil || len(*v.Tileset) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Tileset must not be empty")} + } + if v.Tileset != nil { + if err := encoder.SetURI("Tileset").String(*v.Tileset); err != nil { + return err + } + } + + if v.X == nil || len(*v.X) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member X must not be empty")} + } + if v.X != nil { + if err := encoder.SetURI("X").String(*v.X); err != nil { + return err + } + } + + if v.Y == nil || len(*v.Y) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Y must not be empty")} + } + if v.Y != nil { + if err := encoder.SetURI("Y").String(*v.Y); err != nil { + return err + } + } + + if v.Z == nil || len(*v.Z) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Z must not be empty")} + } + if v.Z != nil { + if err := encoder.SetURI("Z").String(*v.Z); err != nil { + return err + } + } + + return nil +} diff --git a/service/geomaps/snapshot/api_op_GetGlyphs.go.snap b/service/geomaps/snapshot/api_op_GetGlyphs.go.snap new file mode 100644 index 00000000000..8e04b0ae63c --- /dev/null +++ b/service/geomaps/snapshot/api_op_GetGlyphs.go.snap @@ -0,0 +1,41 @@ +GetGlyphs + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/geomaps/snapshot/api_op_GetSprites.go.snap b/service/geomaps/snapshot/api_op_GetSprites.go.snap new file mode 100644 index 00000000000..3800127dc18 --- /dev/null +++ b/service/geomaps/snapshot/api_op_GetSprites.go.snap @@ -0,0 +1,41 @@ +GetSprites + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/geomaps/snapshot/api_op_GetStaticMap.go.snap b/service/geomaps/snapshot/api_op_GetStaticMap.go.snap new file mode 100644 index 00000000000..86933331436 --- /dev/null +++ b/service/geomaps/snapshot/api_op_GetStaticMap.go.snap @@ -0,0 +1,41 @@ +GetStaticMap + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/geomaps/snapshot/api_op_GetStyleDescriptor.go.snap b/service/geomaps/snapshot/api_op_GetStyleDescriptor.go.snap new file mode 100644 index 00000000000..e3664f8b7a5 --- /dev/null +++ b/service/geomaps/snapshot/api_op_GetStyleDescriptor.go.snap @@ -0,0 +1,41 @@ +GetStyleDescriptor + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/geomaps/snapshot/api_op_GetTile.go.snap b/service/geomaps/snapshot/api_op_GetTile.go.snap new file mode 100644 index 00000000000..b7ad68930ab --- /dev/null +++ b/service/geomaps/snapshot/api_op_GetTile.go.snap @@ -0,0 +1,41 @@ +GetTile + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/geomaps/snapshot_test.go b/service/geomaps/snapshot_test.go new file mode 100644 index 00000000000..51d3df32dc3 --- /dev/null +++ b/service/geomaps/snapshot_test.go @@ -0,0 +1,182 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +//go:build snapshot + +package geomaps + +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_GetGlyphs(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetGlyphs(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetGlyphs") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetSprites(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetSprites(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetSprites") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetStaticMap(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetStaticMap(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetStaticMap") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetStyleDescriptor(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetStyleDescriptor(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetStyleDescriptor") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetTile(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetTile(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetTile") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} +func TestUpdateSnapshot_GetGlyphs(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetGlyphs(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetGlyphs") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetSprites(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetSprites(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetSprites") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetStaticMap(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetStaticMap(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetStaticMap") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetStyleDescriptor(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetStyleDescriptor(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetStyleDescriptor") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetTile(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetTile(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetTile") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} diff --git a/service/geomaps/types/enums.go b/service/geomaps/types/enums.go new file mode 100644 index 00000000000..403f7cf2de5 --- /dev/null +++ b/service/geomaps/types/enums.go @@ -0,0 +1,137 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type ColorScheme string + +// Enum values for ColorScheme +const ( + ColorSchemeLight ColorScheme = "Light" + ColorSchemeDark ColorScheme = "Dark" +) + +// Values returns all known values for ColorScheme. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ColorScheme) Values() []ColorScheme { + return []ColorScheme{ + "Light", + "Dark", + } +} + +type MapStyle string + +// Enum values for MapStyle +const ( + MapStyleStandard MapStyle = "Standard" + MapStyleMonochrome MapStyle = "Monochrome" + MapStyleHybrid MapStyle = "Hybrid" + MapStyleSatellite MapStyle = "Satellite" +) + +// Values returns all known values for MapStyle. Note that this can be expanded in +// the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (MapStyle) Values() []MapStyle { + return []MapStyle{ + "Standard", + "Monochrome", + "Hybrid", + "Satellite", + } +} + +type ScaleBarUnit string + +// Enum values for ScaleBarUnit +const ( + ScaleBarUnitKilometers ScaleBarUnit = "Kilometers" + ScaleBarUnitKilometersMiles ScaleBarUnit = "KilometersMiles" + ScaleBarUnitMiles ScaleBarUnit = "Miles" + ScaleBarUnitMilesKilometers ScaleBarUnit = "MilesKilometers" +) + +// Values returns all known values for ScaleBarUnit. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ScaleBarUnit) Values() []ScaleBarUnit { + return []ScaleBarUnit{ + "Kilometers", + "KilometersMiles", + "Miles", + "MilesKilometers", + } +} + +type StaticMapStyle string + +// Enum values for StaticMapStyle +const ( + StaticMapStyleSatellite StaticMapStyle = "Satellite" +) + +// Values returns all known values for StaticMapStyle. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (StaticMapStyle) Values() []StaticMapStyle { + return []StaticMapStyle{ + "Satellite", + } +} + +type ValidationExceptionReason string + +// Enum values for ValidationExceptionReason +const ( + // No such operation is supported. + ValidationExceptionReasonUnknownOperation ValidationExceptionReason = "UnknownOperation" + // The required input is missing. + ValidationExceptionReasonMissing ValidationExceptionReason = "Missing" + // The input cannot be parsed. For example a required JSON document, ARN + // identifier, date value, or numeric field cannot be parsed. + ValidationExceptionReasonCannotParse ValidationExceptionReason = "CannotParse" + // The input is present and parsable, but it is otherwise invalid. For example, a + // required numeric argument is outside the allowed range. + ValidationExceptionReasonFieldValidationFailed ValidationExceptionReason = "FieldValidationFailed" + // The input is invalid but no more specific reason is applicable. + ValidationExceptionReasonOther ValidationExceptionReason = "Other" + // No such field is supported. + ValidationExceptionReasonUnknownField ValidationExceptionReason = "UnknownField" +) + +// Values returns all known values for ValidationExceptionReason. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ValidationExceptionReason) Values() []ValidationExceptionReason { + return []ValidationExceptionReason{ + "UnknownOperation", + "Missing", + "CannotParse", + "FieldValidationFailed", + "Other", + "UnknownField", + } +} + +type Variant string + +// Enum values for Variant +const ( + VariantDefault Variant = "Default" +) + +// Values returns all known values for Variant. Note that this can be expanded in +// the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (Variant) Values() []Variant { + return []Variant{ + "Default", + } +} diff --git a/service/geomaps/types/errors.go b/service/geomaps/types/errors.go new file mode 100644 index 00000000000..710446ff71e --- /dev/null +++ b/service/geomaps/types/errors.go @@ -0,0 +1,117 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// The request was denied because of insufficient access or permissions. Check +// with an administrator to verify your permissions. +type AccessDeniedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessDeniedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AccessDeniedException" + } + return *e.ErrorCodeOverride +} +func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request processing has failed because of an unknown error, exception or +// failure. +type InternalServerException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalServerException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalServerException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InternalServerException" + } + return *e.ErrorCodeOverride +} +func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The request was denied due to request throttling. +type ThrottlingException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottlingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottlingException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ThrottlingException" + } + return *e.ErrorCodeOverride +} +func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The input fails to satisfy the constraints specified by an AWS service. +type ValidationException struct { + Message *string + + ErrorCodeOverride *string + + Reason ValidationExceptionReason + FieldList []ValidationExceptionField + + 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/geomaps/types/types.go b/service/geomaps/types/types.go new file mode 100644 index 00000000000..495c8653906 --- /dev/null +++ b/service/geomaps/types/types.go @@ -0,0 +1,26 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" +) + +// The input fails to satisfy the constraints specified by the Amazon Location +// service. +type ValidationExceptionField struct { + + // The error message. + // + // This member is required. + Message *string + + // The name of the resource. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/geomaps/validators.go b/service/geomaps/validators.go new file mode 100644 index 00000000000..9eaec7e0d31 --- /dev/null +++ b/service/geomaps/validators.go @@ -0,0 +1,232 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geomaps + +import ( + "context" + "fmt" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpGetGlyphs struct { +} + +func (*validateOpGetGlyphs) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetGlyphs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetGlyphsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetGlyphsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetSprites struct { +} + +func (*validateOpGetSprites) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetSprites) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetSpritesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetSpritesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetStaticMap struct { +} + +func (*validateOpGetStaticMap) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetStaticMap) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetStaticMapInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetStaticMapInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetStyleDescriptor struct { +} + +func (*validateOpGetStyleDescriptor) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetStyleDescriptor) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetStyleDescriptorInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetStyleDescriptorInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetTile struct { +} + +func (*validateOpGetTile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetTile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetTileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetTileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpGetGlyphsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetGlyphs{}, middleware.After) +} + +func addOpGetSpritesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetSprites{}, middleware.After) +} + +func addOpGetStaticMapValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetStaticMap{}, middleware.After) +} + +func addOpGetStyleDescriptorValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetStyleDescriptor{}, middleware.After) +} + +func addOpGetTileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetTile{}, middleware.After) +} + +func validateOpGetGlyphsInput(v *GetGlyphsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetGlyphsInput"} + if v.FontStack == nil { + invalidParams.Add(smithy.NewErrParamRequired("FontStack")) + } + if v.FontUnicodeRange == nil { + invalidParams.Add(smithy.NewErrParamRequired("FontUnicodeRange")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetSpritesInput(v *GetSpritesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetSpritesInput"} + if v.FileName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileName")) + } + if len(v.Style) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Style")) + } + if len(v.ColorScheme) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ColorScheme")) + } + if len(v.Variant) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Variant")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetStaticMapInput(v *GetStaticMapInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetStaticMapInput"} + if v.Height == nil { + invalidParams.Add(smithy.NewErrParamRequired("Height")) + } + if v.FileName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileName")) + } + if v.Width == nil { + invalidParams.Add(smithy.NewErrParamRequired("Width")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetStyleDescriptorInput(v *GetStyleDescriptorInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetStyleDescriptorInput"} + if len(v.Style) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Style")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetTileInput(v *GetTileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetTileInput"} + if v.Tileset == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tileset")) + } + if v.Z == nil { + invalidParams.Add(smithy.NewErrParamRequired("Z")) + } + if v.X == nil { + invalidParams.Add(smithy.NewErrParamRequired("X")) + } + if v.Y == nil { + invalidParams.Add(smithy.NewErrParamRequired("Y")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/geoplaces/LICENSE.txt b/service/geoplaces/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/geoplaces/LICENSE.txt @@ -0,0 +1,202 @@ + + 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/geoplaces/api_client.go b/service/geoplaces/api_client.go new file mode 100644 index 00000000000..688bca1c9ad --- /dev/null +++ b/service/geoplaces/api_client.go @@ -0,0 +1,913 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geoplaces + +import ( + "context" + "errors" + "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/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net" + "net/http" + "sync/atomic" + "time" +) + +const ServiceID = "Geo Places" +const ServiceAPIVersion = "2020-11-19" + +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/geoplaces") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/geoplaces") +} + +// Client provides the API client to make operations call for Amazon Location +// Service Places V2. +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) + + resolveTracerProvider(&options) + + resolveMeterProvider(&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) + ctx = middleware.WithServiceID(ctx, ServiceID) + ctx = middleware.WithOperationName(ctx, opID) + + 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 + } + } + + ctx, err = withOperationMetrics(ctx, options.MeterProvider) + if err != nil { + return nil, metadata, err + } + + tracer := operationTracer(options.TracerProvider) + spanName := fmt.Sprintf("%s.%s", ServiceID, opID) + + ctx = tracing.WithOperationTracer(ctx, tracer) + + ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { + o.Kind = tracing.SpanKindClient + o.Properties.Set("rpc.system", "aws-api") + o.Properties.Set("rpc.method", opID) + o.Properties.Set("rpc.service", ServiceID) + }) + endTimer := startMetricTimer(ctx, "client.call.duration") + defer endTimer() + defer span.End() + + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/geoplaces") + }) + decorated := middleware.DecorateHandler(handler, stack) + result, metadata, err = decorated.Handle(ctx, params) + if err != nil { + span.SetProperty("exception.type", fmt.Sprintf("%T", err)) + span.SetProperty("exception.message", err.Error()) + + var aerr smithy.APIError + if errors.As(err, &aerr) { + span.SetProperty("api.error_code", aerr.ErrorCode()) + span.SetProperty("api.error_message", aerr.ErrorMessage()) + span.SetProperty("api.error_fault", aerr.ErrorFault().String()) + } + + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + + span.SetProperty("error", err != nil) + if err == nil { + span.SetStatus(tracing.SpanStatusOK) + } else { + span.SetStatus(tracing.SpanStatusError) + } + + 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{options: options}, "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, + } + 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, "geoplaces", 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 addSpanRetryLoop(stack *middleware.Stack, options Options) error { + return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) +} + +type spanRetryLoop struct { + options Options +} + +func (*spanRetryLoop) ID() string { + return "spanRetryLoop" +} + +func (m *spanRetryLoop) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + middleware.FinalizeOutput, middleware.Metadata, error, +) { + tracer := operationTracer(m.options.TracerProvider) + ctx, span := tracer.StartSpan(ctx, "RetryLoop") + defer span.End() + + return next.HandleFinalize(ctx, in) +} +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() + m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/geoplaces") + }) + 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 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 resolveTracerProvider(options *Options) { + if options.TracerProvider == nil { + options.TracerProvider = &tracing.NopTracerProvider{} + } +} + +func resolveMeterProvider(options *Options) { + if options.MeterProvider == nil { + options.MeterProvider = metrics.NopMeterProvider{} + } +} + +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) +} + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/service/geoplaces/api_client_test.go b/service/geoplaces/api_client_test.go new file mode 100644 index 00000000000..9023f8b84ab --- /dev/null +++ b/service/geoplaces/api_client_test.go @@ -0,0 +1,127 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geoplaces + +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/geoplaces/api_op_Autocomplete.go b/service/geoplaces/api_op_Autocomplete.go new file mode 100644 index 00000000000..26c3faa11c5 --- /dev/null +++ b/service/geoplaces/api_op_Autocomplete.go @@ -0,0 +1,215 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geoplaces + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/geoplaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// The autocomplete operation speeds up and increases the accuracy of entering +// addresses by providing a list of address candidates matching a partially entered +// address. Results are sorted from most to least matching. Filtering and biasing +// can be used to increase the relevance of the results if additional search +// context is known +func (c *Client) Autocomplete(ctx context.Context, params *AutocompleteInput, optFns ...func(*Options)) (*AutocompleteOutput, error) { + if params == nil { + params = &AutocompleteInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "Autocomplete", params, optFns, c.addOperationAutocompleteMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AutocompleteOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AutocompleteInput struct { + + // The free-form text query to match addresses against. This is usually a + // partially typed address from an end user in an address box or form. + // + // This member is required. + QueryText *string + + // A list of optional additional parameters that can be requested for each result. + AdditionalFeatures []types.AutocompleteAdditionalFeature + + // The position in longitude and latitude that the results should be close to. + // Typically, place results returned are ranked higher the closer they are to this + // position. Stored in [lng, lat] and in the WSG84 format. + // + // The fields BiasPosition , FilterBoundingBox , and FilterCircle are mutually + // exclusive. + BiasPosition []float64 + + // A structure which contains a set of inclusion/exclusion properties that results + // must posses in order to be returned as a result. + Filter *types.AutocompleteFilter + + // Indicates if the results will be stored. Defaults to SingleUse , if left empty. + IntendedUse types.AutocompleteIntendedUse + + // Optional: The API key to be used for authorization. Either an API key or valid + // SigV4 signature must be provided when making a request. + Key *string + + // A list of [BCP 47] compliant language codes for the results to be rendered in. If there + // is no data for the result in the requested language, data will be returned in + // the default language for the entry. + // + // [BCP 47]: https://en.wikipedia.org/wiki/IETF_language_tag + Language *string + + // An optional limit for the number of results returned in a single call. + MaxResults *int32 + + // The alpha-2 or alpha-3 character code for the political view of a country. The + // political view applies to the results of the request to represent unresolved + // territorial claims through the point of view of the specified country. + PoliticalView *string + + // The PostalCodeMode affects how postal code results are returned. If a postal + // code spans multiple localities and this value is empty, partial district or + // locality information may be returned under a single postal code result entry. If + // it's populated with the value cityLookup , all cities in that postal code are + // returned. + PostalCodeMode types.PostalCodeMode + + noSmithyDocumentSerde +} + +type AutocompleteOutput struct { + + // The pricing bucket for which the query is charged at. + // + // For more inforamtion on pricing, please visit [Amazon Location Service Pricing]. + // + // [Amazon Location Service Pricing]: https://aws.amazon.com/location/pricing/ + // + // This member is required. + PricingBucket *string + + // List of places or results returned for a query. + ResultItems []types.AutocompleteResultItem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAutocompleteMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpAutocomplete{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAutocomplete{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "Autocomplete"); 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 = addSpanRetryLoop(stack, options); 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 = addOpAutocompleteValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAutocomplete(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAutocomplete(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "Autocomplete", + } +} diff --git a/service/geoplaces/api_op_Geocode.go b/service/geoplaces/api_op_Geocode.go new file mode 100644 index 00000000000..1ad06a49aa2 --- /dev/null +++ b/service/geoplaces/api_op_Geocode.go @@ -0,0 +1,205 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geoplaces + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/geoplaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// The Geocode action allows you to obtain coordinates, addresses, and other +// information about places. +func (c *Client) Geocode(ctx context.Context, params *GeocodeInput, optFns ...func(*Options)) (*GeocodeOutput, error) { + if params == nil { + params = &GeocodeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "Geocode", params, optFns, c.addOperationGeocodeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GeocodeOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GeocodeInput struct { + + // A list of optional additional parameters, such as time zone, that can be + // requested for each result. + AdditionalFeatures []types.GeocodeAdditionalFeature + + // The position, in longitude and latitude, that the results should be close to. + // Typically, place results returned are ranked higher the closer they are to this + // position. Stored in [lng, lat] and in the WSG84 format. + // + // The fields BiasPosition , FilterBoundingBox , and FilterCircle are mutually + // exclusive. + BiasPosition []float64 + + // A structure which contains a set of inclusion/exclusion properties that results + // must posses in order to be returned as a result. + Filter *types.GeocodeFilter + + // Indicates if the results will be stored. Defaults to SingleUse , if left empty. + IntendedUse types.GeocodeIntendedUse + + // Optional: The API key to be used for authorization. Either an API key or valid + // SigV4 signature must be provided when making a request. + Key *string + + // A list of [BCP 47] compliant language codes for the results to be rendered in. If there + // is no data for the result in the requested language, data will be returned in + // the default language for the entry. + // + // [BCP 47]: https://en.wikipedia.org/wiki/IETF_language_tag + Language *string + + // An optional limit for the number of results returned in a single call. + MaxResults *int32 + + // The alpha-2 or alpha-3 character code for the political view of a country. The + // political view applies to the results of the request to represent unresolved + // territorial claims through the point of view of the specified country. + PoliticalView *string + + // A structured free text query allows you to search for places by the name or + // text representation of specific properties of the place. + QueryComponents *types.GeocodeQueryComponents + + // The free-form text query to match addresses against. This is usually a + // partially typed address from an end user in an address box or form. + QueryText *string + + noSmithyDocumentSerde +} + +type GeocodeOutput struct { + + // The pricing bucket for which the query is charged at. + // + // For more inforamtion on pricing, please visit [Amazon Location Service Pricing]. + // + // [Amazon Location Service Pricing]: https://aws.amazon.com/location/pricing/ + // + // This member is required. + PricingBucket *string + + // List of places or results returned for a query. + ResultItems []types.GeocodeResultItem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGeocodeMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGeocode{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGeocode{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "Geocode"); 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 = addSpanRetryLoop(stack, options); 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_opGeocode(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGeocode(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "Geocode", + } +} diff --git a/service/geoplaces/api_op_GetPlace.go b/service/geoplaces/api_op_GetPlace.go new file mode 100644 index 00000000000..c7bf27bdeb0 --- /dev/null +++ b/service/geoplaces/api_op_GetPlace.go @@ -0,0 +1,256 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geoplaces + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/geoplaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Finds a place by its unique ID. A PlaceId is returned by other place operations. +func (c *Client) GetPlace(ctx context.Context, params *GetPlaceInput, optFns ...func(*Options)) (*GetPlaceOutput, error) { + if params == nil { + params = &GetPlaceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetPlace", params, optFns, c.addOperationGetPlaceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetPlaceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetPlaceInput struct { + + // The PlaceId of the place you wish to receive the information for. + // + // This member is required. + PlaceId *string + + // A list of optional additional parameters such as time zone that can be + // requested for each result. + AdditionalFeatures []types.GetPlaceAdditionalFeature + + // Indicates if the results will be stored. Defaults to SingleUse , if left empty. + IntendedUse types.GetPlaceIntendedUse + + // Optional: The API key to be used for authorization. Either an API key or valid + // SigV4 signature must be provided when making a request. + Key *string + + // A list of [BCP 47] compliant language codes for the results to be rendered in. If there + // is no data for the result in the requested language, data will be returned in + // the default language for the entry. + // + // [BCP 47]: https://en.wikipedia.org/wiki/IETF_language_tag + Language *string + + // The alpha-2 or alpha-3 character code for the political view of a country. The + // political view applies to the results of the request to represent unresolved + // territorial claims through the point of view of the specified country. + PoliticalView *string + + noSmithyDocumentSerde +} + +type GetPlaceOutput struct { + + // The PlaceId of the place you wish to receive the information for. + // + // This member is required. + PlaceId *string + + // A PlaceType is a category that the result place must belong to. + // + // This member is required. + PlaceType types.PlaceType + + // The pricing bucket for which the query is charged at. + // + // For more inforamtion on pricing, please visit [Amazon Location Service Pricing]. + // + // [Amazon Location Service Pricing]: https://aws.amazon.com/location/pricing/ + // + // This member is required. + PricingBucket *string + + // The localized display name of this result item based on request parameter + // language . + // + // This member is required. + Title *string + + // Position of the access point in (lng,lat) . + AccessPoints []types.AccessPoint + + // Indicates known access restrictions on a vehicle access point. The index + // correlates to an access point and indicates if access through this point has + // some form of restriction. + AccessRestrictions []types.AccessRestriction + + // The place's address. + Address *types.Address + + // Boolean indicating if the address provided has been corrected. + AddressNumberCorrected *bool + + // The Business Chains associated with the place. + BusinessChains []types.BusinessChain + + // Categories of results that results must belong to. + Categories []types.Category + + // List of potential contact methods for the result/place. + Contacts *types.Contacts + + // List of food types offered by this result. + FoodTypes []types.FoodType + + // The bounding box enclosing the geometric shape (area or line) that an + // individual result covers. + // + // The bounding box formed is defined as a set of four coordinates: [{westward + // lng}, {southern lat}, {eastward lng}, {northern lat}] + MapView []float64 + + // List of opening hours objects. + OpeningHours []types.OpeningHours + + // How the various components of the result's address are pronounced in various + // languages. + Phonemes *types.PhonemeDetails + + // The alpha-2 or alpha-3 character code for the political view of a country. The + // political view applies to the results of the request to represent unresolved + // territorial claims through the point of view of the specified country. + PoliticalView *string + + // The position, in longitude and latitude. + Position []float64 + + // Contains details about the postal code of the place/result. + PostalCodeDetails []types.PostalCodeDetails + + // The time zone in which the place is located. + TimeZone *types.TimeZone + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetPlaceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetPlace{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetPlace{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetPlace"); 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 = addSpanRetryLoop(stack, options); 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 = addOpGetPlaceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPlace(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetPlace(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetPlace", + } +} diff --git a/service/geoplaces/api_op_ReverseGeocode.go b/service/geoplaces/api_op_ReverseGeocode.go new file mode 100644 index 00000000000..f0394fed474 --- /dev/null +++ b/service/geoplaces/api_op_ReverseGeocode.go @@ -0,0 +1,204 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geoplaces + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/geoplaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// The ReverseGeocode operation allows you to retrieve addresses and place +// +// information from coordinates. +func (c *Client) ReverseGeocode(ctx context.Context, params *ReverseGeocodeInput, optFns ...func(*Options)) (*ReverseGeocodeOutput, error) { + if params == nil { + params = &ReverseGeocodeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ReverseGeocode", params, optFns, c.addOperationReverseGeocodeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ReverseGeocodeOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ReverseGeocodeInput struct { + + // The position, in [lng, lat] for which you are querying nearby resultsfor. + // Results closer to the position will be ranked higher then results further away + // from the position + // + // This member is required. + QueryPosition []float64 + + // A list of optional additional parameters, such as time zone that can be + // requested for each result. + AdditionalFeatures []types.ReverseGeocodeAdditionalFeature + + // A structure which contains a set of inclusion/exclusion properties that results + // must posses in order to be returned as a result. + Filter *types.ReverseGeocodeFilter + + // Indicates if the results will be stored. Defaults to SingleUse , if left empty. + IntendedUse types.ReverseGeocodeIntendedUse + + // Optional: The API key to be used for authorization. Either an API key or valid + // SigV4 signature must be provided when making a request. + Key *string + + // A list of [BCP 47] compliant language codes for the results to be rendered in. If there + // is no data for the result in the requested language, data will be returned in + // the default language for the entry. + // + // [BCP 47]: https://en.wikipedia.org/wiki/IETF_language_tag + Language *string + + // An optional limit for the number of results returned in a single call. + MaxResults *int32 + + // The alpha-2 or alpha-3 character code for the political view of a country. The + // political view applies to the results of the request to represent unresolved + // territorial claims through the point of view of the specified country. + PoliticalView *string + + // The maximum distance in meters from the QueryPosition from which a result will + // be returned. + QueryRadius *int64 + + noSmithyDocumentSerde +} + +type ReverseGeocodeOutput struct { + + // The pricing bucket for which the query is charged at. + // + // For more inforamtion on pricing, please visit [Amazon Location Service Pricing]. + // + // [Amazon Location Service Pricing]: https://aws.amazon.com/location/pricing/ + // + // This member is required. + PricingBucket *string + + // List of places or results returned for a query. + ResultItems []types.ReverseGeocodeResultItem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationReverseGeocodeMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpReverseGeocode{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpReverseGeocode{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ReverseGeocode"); 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 = addSpanRetryLoop(stack, options); 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 = addOpReverseGeocodeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReverseGeocode(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opReverseGeocode(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ReverseGeocode", + } +} diff --git a/service/geoplaces/api_op_SearchNearby.go b/service/geoplaces/api_op_SearchNearby.go new file mode 100644 index 00000000000..fc94c436d04 --- /dev/null +++ b/service/geoplaces/api_op_SearchNearby.go @@ -0,0 +1,210 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geoplaces + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/geoplaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Search nearby a specified location. +func (c *Client) SearchNearby(ctx context.Context, params *SearchNearbyInput, optFns ...func(*Options)) (*SearchNearbyOutput, error) { + if params == nil { + params = &SearchNearbyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SearchNearby", params, optFns, c.addOperationSearchNearbyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SearchNearbyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SearchNearbyInput struct { + + // The position, in [lng, lat] for which you are querying nearby resultsfor. + // Results closer to the position will be ranked higher then results further away + // from the position + // + // This member is required. + QueryPosition []float64 + + // A list of optional additional parameters, such as time zone, that can be + // requested for each result. + AdditionalFeatures []types.SearchNearbyAdditionalFeature + + // A structure which contains a set of inclusion/exclusion properties that results + // must posses in order to be returned as a result. + Filter *types.SearchNearbyFilter + + // Indicates if the results will be stored. Defaults to SingleUse , if left empty. + IntendedUse types.SearchNearbyIntendedUse + + // Optional: The API key to be used for authorization. Either an API key or valid + // SigV4 signature must be provided when making a request. + Key *string + + // A list of [BCP 47] compliant language codes for the results to be rendered in. If there + // is no data for the result in the requested language, data will be returned in + // the default language for the entry. + // + // [BCP 47]: https://en.wikipedia.org/wiki/IETF_language_tag + Language *string + + // An optional limit for the number of results returned in a single call. + MaxResults *int32 + + // If nextToken is returned, there are more results available. The value of + // nextToken is a unique pagination token for each page. + NextToken *string + + // The alpha-2 or alpha-3 character code for the political view of a country. The + // political view applies to the results of the request to represent unresolved + // territorial claims through the point of view of the specified country. + PoliticalView *string + + // The maximum distance in meters from the QueryPosition from which a result will + // be returned. + QueryRadius *int64 + + noSmithyDocumentSerde +} + +type SearchNearbyOutput struct { + + // The pricing bucket for which the query is charged at. + // + // For more inforamtion on pricing, please visit [Amazon Location Service Pricing]. + // + // [Amazon Location Service Pricing]: https://aws.amazon.com/location/pricing/ + // + // This member is required. + PricingBucket *string + + // If nextToken is returned, there are more results available. The value of + // nextToken is a unique pagination token for each page. + NextToken *string + + // List of places or results returned for a query. + ResultItems []types.SearchNearbyResultItem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSearchNearbyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpSearchNearby{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSearchNearby{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "SearchNearby"); 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 = addSpanRetryLoop(stack, options); 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 = addOpSearchNearbyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchNearby(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opSearchNearby(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "SearchNearby", + } +} diff --git a/service/geoplaces/api_op_SearchText.go b/service/geoplaces/api_op_SearchText.go new file mode 100644 index 00000000000..1ed588f5791 --- /dev/null +++ b/service/geoplaces/api_op_SearchText.go @@ -0,0 +1,216 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geoplaces + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/geoplaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Use the SearchText operation to search for geocode and place information. You +// can then complete a follow-up query suggested from the Suggest API via a query +// id. +func (c *Client) SearchText(ctx context.Context, params *SearchTextInput, optFns ...func(*Options)) (*SearchTextOutput, error) { + if params == nil { + params = &SearchTextInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SearchText", params, optFns, c.addOperationSearchTextMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SearchTextOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SearchTextInput struct { + + // A list of optional additional parameters, such as time zone, that can be + // requested for each result. + AdditionalFeatures []types.SearchTextAdditionalFeature + + // The position, in longitude and latitude, that the results should be close to. + // Typically, place results returned are ranked higher the closer they are to this + // position. Stored in [lng, lat] and in the WSG84 format. + // + // The fields BiasPosition , FilterBoundingBox , and FilterCircle are mutually + // exclusive. + BiasPosition []float64 + + // A structure which contains a set of inclusion/exclusion properties that results + // must posses in order to be returned as a result. + Filter *types.SearchTextFilter + + // Indicates if the results will be stored. Defaults to SingleUse , if left empty. + IntendedUse types.SearchTextIntendedUse + + // Optional: The API key to be used for authorization. Either an API key or valid + // SigV4 signature must be provided when making a request. + Key *string + + // A list of [BCP 47] compliant language codes for the results to be rendered in. If there + // is no data for the result in the requested language, data will be returned in + // the default language for the entry. + // + // [BCP 47]: https://en.wikipedia.org/wiki/IETF_language_tag + Language *string + + // An optional limit for the number of results returned in a single call. + MaxResults *int32 + + // If nextToken is returned, there are more results available. The value of + // nextToken is a unique pagination token for each page. + NextToken *string + + // The alpha-2 or alpha-3 character code for the political view of a country. The + // political view applies to the results of the request to represent unresolved + // territorial claims through the point of view of the specified country. + PoliticalView *string + + // The query Id. + QueryId *string + + // The free-form text query to match addresses against. This is usually a + // partially typed address from an end user in an address box or form. + QueryText *string + + noSmithyDocumentSerde +} + +type SearchTextOutput struct { + + // The pricing bucket for which the query is charged at. + // + // For more inforamtion on pricing, please visit [Amazon Location Service Pricing]. + // + // [Amazon Location Service Pricing]: https://aws.amazon.com/location/pricing/ + // + // This member is required. + PricingBucket *string + + // If nextToken is returned, there are more results available. The value of + // nextToken is a unique pagination token for each page. + NextToken *string + + // List of places or results returned for a query. + ResultItems []types.SearchTextResultItem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSearchTextMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpSearchText{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSearchText{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "SearchText"); 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 = addSpanRetryLoop(stack, options); 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 = addOpSearchTextValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchText(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opSearchText(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "SearchText", + } +} diff --git a/service/geoplaces/api_op_Suggest.go b/service/geoplaces/api_op_Suggest.go new file mode 100644 index 00000000000..e6aeb01213f --- /dev/null +++ b/service/geoplaces/api_op_Suggest.go @@ -0,0 +1,213 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geoplaces + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/geoplaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// The Suggest operation finds addresses or place candidates based on incomplete +// or misspelled queries. You then select the best query to submit based on the +// returned results. +func (c *Client) Suggest(ctx context.Context, params *SuggestInput, optFns ...func(*Options)) (*SuggestOutput, error) { + if params == nil { + params = &SuggestInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "Suggest", params, optFns, c.addOperationSuggestMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SuggestOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SuggestInput struct { + + // The free-form text query to match addresses against. This is usually a + // partially typed address from an end user in an address box or form. + // + // This member is required. + QueryText *string + + // A list of optional additional parameters, such as time zone, that can be + // requested for each result. + AdditionalFeatures []types.SuggestAdditionalFeature + + // The position, in longitude and latitude, that the results should be close to. + // Typically, place results returned are ranked higher the closer they are to this + // position. Stored in [lng, lat] and in the WSG84 format. + // + // The fields BiasPosition , FilterBoundingBox , and FilterCircle are mutually + // exclusive. + BiasPosition []float64 + + // A structure which contains a set of inclusion/exclusion properties that results + // must posses in order to be returned as a result. + Filter *types.SuggestFilter + + // Indicates if the results will be stored. Defaults to SingleUse , if left empty. + IntendedUse types.SuggestIntendedUse + + // Optional: The API key to be used for authorization. Either an API key or valid + // SigV4 signature must be provided when making a request. + Key *string + + // A list of [BCP 47] compliant language codes for the results to be rendered in. If there + // is no data for the result in the requested language, data will be returned in + // the default language for the entry. + // + // [BCP 47]: https://en.wikipedia.org/wiki/IETF_language_tag + Language *string + + // Maximum number of query terms to be returned for use with a search text query. + MaxQueryRefinements *int32 + + // An optional limit for the number of results returned in a single call. + MaxResults *int32 + + // The alpha-2 or alpha-3 character code for the political view of a country. The + // political view applies to the results of the request to represent unresolved + // territorial claims through the point of view of the specified country. + PoliticalView *string + + noSmithyDocumentSerde +} + +type SuggestOutput struct { + + // The pricing bucket for which the query is charged at. + // + // For more inforamtion on pricing, please visit [Amazon Location Service Pricing]. + // + // [Amazon Location Service Pricing]: https://aws.amazon.com/location/pricing/ + // + // This member is required. + PricingBucket *string + + // Maximum number of query terms to be returned for use with a search text query. + QueryRefinements []types.QueryRefinement + + // List of places or results returned for a query. + ResultItems []types.SuggestResultItem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSuggestMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpSuggest{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSuggest{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "Suggest"); 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 = addSpanRetryLoop(stack, options); 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 = addOpSuggestValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSuggest(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opSuggest(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "Suggest", + } +} diff --git a/service/geoplaces/auth.go b/service/geoplaces/auth.go new file mode 100644 index 00000000000..025caea7bc4 --- /dev/null +++ b/service/geoplaces/auth.go @@ -0,0 +1,313 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geoplaces + +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/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + 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, "geo-places") + 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, +) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + + 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) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() + 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, +) { + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) + 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 := timeOperationMetric(ctx, "client.call.resolve_identity_duration", + func() (smithyauth.Identity, error) { + return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) + }, + func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("get identity: %w", err) + } + + ctx = setIdentity(ctx, identity) + + span.End() + 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 { + options Options +} + +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, +) { + _, span := tracing.StartSpan(ctx, "SignRequest") + defer span.End() + + 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") + } + + _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { + return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) + }, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("sign request: %w", err) + } + + span.End() + return next.HandleFinalize(ctx, in) +} diff --git a/service/geoplaces/deserializers.go b/service/geoplaces/deserializers.go new file mode 100644 index 00000000000..8f90988bed6 --- /dev/null +++ b/service/geoplaces/deserializers.go @@ -0,0 +1,5929 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geoplaces + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/geoplaces/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" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "math" + "strings" + "time" +) + +func deserializeS3Expires(v string) (*time.Time, error) { + t, err := smithytime.ParseHTTPDate(v) + if err != nil { + return nil, nil + } + return &t, nil +} + +type awsRestjson1_deserializeOpAutocomplete struct { +} + +func (*awsRestjson1_deserializeOpAutocomplete) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpAutocomplete) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorAutocomplete(response, &metadata) + } + output := &AutocompleteOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsAutocompleteOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentAutocompleteOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorAutocomplete(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsAutocompleteOutput(v *AutocompleteOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-geo-pricing-bucket"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.PricingBucket = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentAutocompleteOutput(v **AutocompleteOutput, 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 *AutocompleteOutput + if *v == nil { + sv = &AutocompleteOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ResultItems": + if err := awsRestjson1_deserializeDocumentAutocompleteResultItemList(&sv.ResultItems, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGeocode struct { +} + +func (*awsRestjson1_deserializeOpGeocode) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGeocode) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGeocode(response, &metadata) + } + output := &GeocodeOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsGeocodeOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGeocodeOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGeocode(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsGeocodeOutput(v *GeocodeOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-geo-pricing-bucket"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.PricingBucket = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentGeocodeOutput(v **GeocodeOutput, 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 *GeocodeOutput + if *v == nil { + sv = &GeocodeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ResultItems": + if err := awsRestjson1_deserializeDocumentGeocodeResultItemList(&sv.ResultItems, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetPlace struct { +} + +func (*awsRestjson1_deserializeOpGetPlace) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetPlace) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetPlace(response, &metadata) + } + output := &GetPlaceOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsGetPlaceOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetPlaceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetPlace(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsGetPlaceOutput(v *GetPlaceOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-geo-pricing-bucket"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.PricingBucket = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentGetPlaceOutput(v **GetPlaceOutput, 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 *GetPlaceOutput + if *v == nil { + sv = &GetPlaceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccessPoints": + if err := awsRestjson1_deserializeDocumentAccessPointList(&sv.AccessPoints, value); err != nil { + return err + } + + case "AccessRestrictions": + if err := awsRestjson1_deserializeDocumentAccessRestrictionList(&sv.AccessRestrictions, value); err != nil { + return err + } + + case "Address": + if err := awsRestjson1_deserializeDocumentAddress(&sv.Address, value); err != nil { + return err + } + + case "AddressNumberCorrected": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.AddressNumberCorrected = ptr.Bool(jtv) + } + + case "BusinessChains": + if err := awsRestjson1_deserializeDocumentBusinessChainList(&sv.BusinessChains, value); err != nil { + return err + } + + case "Categories": + if err := awsRestjson1_deserializeDocumentCategoryList(&sv.Categories, value); err != nil { + return err + } + + case "Contacts": + if err := awsRestjson1_deserializeDocumentContacts(&sv.Contacts, value); err != nil { + return err + } + + case "FoodTypes": + if err := awsRestjson1_deserializeDocumentFoodTypeList(&sv.FoodTypes, value); err != nil { + return err + } + + case "MapView": + if err := awsRestjson1_deserializeDocumentBoundingBox(&sv.MapView, value); err != nil { + return err + } + + case "OpeningHours": + if err := awsRestjson1_deserializeDocumentOpeningHoursList(&sv.OpeningHours, value); err != nil { + return err + } + + case "Phonemes": + if err := awsRestjson1_deserializeDocumentPhonemeDetails(&sv.Phonemes, value); err != nil { + return err + } + + case "PlaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PlaceId = ptr.String(jtv) + } + + case "PlaceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlaceType to be of type string, got %T instead", value) + } + sv.PlaceType = types.PlaceType(jtv) + } + + case "PoliticalView": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode3 to be of type string, got %T instead", value) + } + sv.PoliticalView = ptr.String(jtv) + } + + case "Position": + if err := awsRestjson1_deserializeDocumentPosition(&sv.Position, value); err != nil { + return err + } + + case "PostalCodeDetails": + if err := awsRestjson1_deserializeDocumentPostalCodeDetailsList(&sv.PostalCodeDetails, value); err != nil { + return err + } + + case "TimeZone": + if err := awsRestjson1_deserializeDocumentTimeZone(&sv.TimeZone, value); err != nil { + return err + } + + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpReverseGeocode struct { +} + +func (*awsRestjson1_deserializeOpReverseGeocode) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpReverseGeocode) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorReverseGeocode(response, &metadata) + } + output := &ReverseGeocodeOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsReverseGeocodeOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentReverseGeocodeOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorReverseGeocode(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsReverseGeocodeOutput(v *ReverseGeocodeOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-geo-pricing-bucket"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.PricingBucket = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentReverseGeocodeOutput(v **ReverseGeocodeOutput, 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 *ReverseGeocodeOutput + if *v == nil { + sv = &ReverseGeocodeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ResultItems": + if err := awsRestjson1_deserializeDocumentReverseGeocodeResultItemList(&sv.ResultItems, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpSearchNearby struct { +} + +func (*awsRestjson1_deserializeOpSearchNearby) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSearchNearby) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorSearchNearby(response, &metadata) + } + output := &SearchNearbyOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsSearchNearbyOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentSearchNearbyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorSearchNearby(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsSearchNearbyOutput(v *SearchNearbyOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-geo-pricing-bucket"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.PricingBucket = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentSearchNearbyOutput(v **SearchNearbyOutput, 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 *SearchNearbyOutput + if *v == nil { + sv = &SearchNearbyOutput{} + } 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 Token to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "ResultItems": + if err := awsRestjson1_deserializeDocumentSearchNearbyResultItemList(&sv.ResultItems, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpSearchText struct { +} + +func (*awsRestjson1_deserializeOpSearchText) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSearchText) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorSearchText(response, &metadata) + } + output := &SearchTextOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsSearchTextOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentSearchTextOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorSearchText(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsSearchTextOutput(v *SearchTextOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-geo-pricing-bucket"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.PricingBucket = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentSearchTextOutput(v **SearchTextOutput, 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 *SearchTextOutput + if *v == nil { + sv = &SearchTextOutput{} + } 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 Token to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "ResultItems": + if err := awsRestjson1_deserializeDocumentSearchTextResultItemList(&sv.ResultItems, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpSuggest struct { +} + +func (*awsRestjson1_deserializeOpSuggest) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSuggest) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorSuggest(response, &metadata) + } + output := &SuggestOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsSuggestOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentSuggestOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorSuggest(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsSuggestOutput(v *SuggestOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-geo-pricing-bucket"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.PricingBucket = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentSuggestOutput(v **SuggestOutput, 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 *SuggestOutput + if *v == nil { + sv = &SuggestOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "QueryRefinements": + if err := awsRestjson1_deserializeDocumentQueryRefinementList(&sv.QueryRefinements, value); err != nil { + return err + } + + case "ResultItems": + if err := awsRestjson1_deserializeDocumentSuggestResultItemList(&sv.ResultItems, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAccessPoint(v **types.AccessPoint, 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.AccessPoint + if *v == nil { + sv = &types.AccessPoint{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Position": + if err := awsRestjson1_deserializeDocumentPosition(&sv.Position, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAccessPointList(v *[]types.AccessPoint, 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.AccessPoint + if *v == nil { + cv = []types.AccessPoint{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AccessPoint + destAddr := &col + if err := awsRestjson1_deserializeDocumentAccessPoint(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAccessRestriction(v **types.AccessRestriction, 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.AccessRestriction + if *v == nil { + sv = &types.AccessRestriction{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Categories": + if err := awsRestjson1_deserializeDocumentCategoryList(&sv.Categories, value); err != nil { + return err + } + + case "Restricted": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Restricted = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAccessRestrictionList(v *[]types.AccessRestriction, 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.AccessRestriction + if *v == nil { + cv = []types.AccessRestriction{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AccessRestriction + destAddr := &col + if err := awsRestjson1_deserializeDocumentAccessRestriction(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAddress(v **types.Address, 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.Address + if *v == nil { + sv = &types.Address{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AddressNumber": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AddressNumber = ptr.String(jtv) + } + + case "Block": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Block = ptr.String(jtv) + } + + case "Building": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Building = ptr.String(jtv) + } + + case "Country": + if err := awsRestjson1_deserializeDocumentCountry(&sv.Country, value); err != nil { + return err + } + + case "District": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.District = ptr.String(jtv) + } + + case "Intersection": + if err := awsRestjson1_deserializeDocumentIntersectionList(&sv.Intersection, value); err != nil { + return err + } + + case "Label": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Label = ptr.String(jtv) + } + + case "Locality": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Locality = ptr.String(jtv) + } + + case "PostalCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PostalCode = ptr.String(jtv) + } + + case "Region": + if err := awsRestjson1_deserializeDocumentRegion(&sv.Region, value); err != nil { + return err + } + + case "Street": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Street = ptr.String(jtv) + } + + case "StreetComponents": + if err := awsRestjson1_deserializeDocumentStreetComponentsList(&sv.StreetComponents, value); err != nil { + return err + } + + case "SubBlock": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SubBlock = ptr.String(jtv) + } + + case "SubDistrict": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SubDistrict = ptr.String(jtv) + } + + case "SubRegion": + if err := awsRestjson1_deserializeDocumentSubRegion(&sv.SubRegion, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAddressComponentMatchScores(v **types.AddressComponentMatchScores, 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.AddressComponentMatchScores + if *v == nil { + sv = &types.AddressComponentMatchScores{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AddressNumber": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.AddressNumber = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.AddressNumber = f64 + + default: + return fmt.Errorf("expected MatchScore to be a JSON Number, got %T instead", value) + + } + } + + case "Block": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Block = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Block = f64 + + default: + return fmt.Errorf("expected MatchScore to be a JSON Number, got %T instead", value) + + } + } + + case "Building": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Building = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Building = f64 + + default: + return fmt.Errorf("expected MatchScore to be a JSON Number, got %T instead", value) + + } + } + + case "Country": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Country = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Country = f64 + + default: + return fmt.Errorf("expected MatchScore to be a JSON Number, got %T instead", value) + + } + } + + case "District": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.District = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.District = f64 + + default: + return fmt.Errorf("expected MatchScore to be a JSON Number, got %T instead", value) + + } + } + + case "Intersection": + if err := awsRestjson1_deserializeDocumentMatchScoreList(&sv.Intersection, value); err != nil { + return err + } + + case "Locality": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Locality = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Locality = f64 + + default: + return fmt.Errorf("expected MatchScore to be a JSON Number, got %T instead", value) + + } + } + + case "PostalCode": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.PostalCode = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.PostalCode = f64 + + default: + return fmt.Errorf("expected MatchScore to be a JSON Number, got %T instead", value) + + } + } + + case "Region": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Region = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Region = f64 + + default: + return fmt.Errorf("expected MatchScore to be a JSON Number, got %T instead", value) + + } + } + + case "SubBlock": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.SubBlock = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.SubBlock = f64 + + default: + return fmt.Errorf("expected MatchScore to be a JSON Number, got %T instead", value) + + } + } + + case "SubDistrict": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.SubDistrict = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.SubDistrict = f64 + + default: + return fmt.Errorf("expected MatchScore to be a JSON Number, got %T instead", value) + + } + } + + case "SubRegion": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.SubRegion = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.SubRegion = f64 + + default: + return fmt.Errorf("expected MatchScore to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAddressComponentPhonemes(v **types.AddressComponentPhonemes, 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.AddressComponentPhonemes + if *v == nil { + sv = &types.AddressComponentPhonemes{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Block": + if err := awsRestjson1_deserializeDocumentPhonemeTranscriptionList(&sv.Block, value); err != nil { + return err + } + + case "Country": + if err := awsRestjson1_deserializeDocumentPhonemeTranscriptionList(&sv.Country, value); err != nil { + return err + } + + case "District": + if err := awsRestjson1_deserializeDocumentPhonemeTranscriptionList(&sv.District, value); err != nil { + return err + } + + case "Locality": + if err := awsRestjson1_deserializeDocumentPhonemeTranscriptionList(&sv.Locality, value); err != nil { + return err + } + + case "Region": + if err := awsRestjson1_deserializeDocumentPhonemeTranscriptionList(&sv.Region, value); err != nil { + return err + } + + case "Street": + if err := awsRestjson1_deserializeDocumentPhonemeTranscriptionList(&sv.Street, value); err != nil { + return err + } + + case "SubBlock": + if err := awsRestjson1_deserializeDocumentPhonemeTranscriptionList(&sv.SubBlock, value); err != nil { + return err + } + + case "SubDistrict": + if err := awsRestjson1_deserializeDocumentPhonemeTranscriptionList(&sv.SubDistrict, value); err != nil { + return err + } + + case "SubRegion": + if err := awsRestjson1_deserializeDocumentPhonemeTranscriptionList(&sv.SubRegion, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAutocompleteAddressHighlights(v **types.AutocompleteAddressHighlights, 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.AutocompleteAddressHighlights + if *v == nil { + sv = &types.AutocompleteAddressHighlights{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AddressNumber": + if err := awsRestjson1_deserializeDocumentHighlightList(&sv.AddressNumber, value); err != nil { + return err + } + + case "Block": + if err := awsRestjson1_deserializeDocumentHighlightList(&sv.Block, value); err != nil { + return err + } + + case "Building": + if err := awsRestjson1_deserializeDocumentHighlightList(&sv.Building, value); err != nil { + return err + } + + case "Country": + if err := awsRestjson1_deserializeDocumentCountryHighlights(&sv.Country, value); err != nil { + return err + } + + case "District": + if err := awsRestjson1_deserializeDocumentHighlightList(&sv.District, value); err != nil { + return err + } + + case "Intersection": + if err := awsRestjson1_deserializeDocumentIntersectionHighlightsList(&sv.Intersection, value); err != nil { + return err + } + + case "Label": + if err := awsRestjson1_deserializeDocumentHighlightList(&sv.Label, value); err != nil { + return err + } + + case "Locality": + if err := awsRestjson1_deserializeDocumentHighlightList(&sv.Locality, value); err != nil { + return err + } + + case "PostalCode": + if err := awsRestjson1_deserializeDocumentHighlightList(&sv.PostalCode, value); err != nil { + return err + } + + case "Region": + if err := awsRestjson1_deserializeDocumentRegionHighlights(&sv.Region, value); err != nil { + return err + } + + case "Street": + if err := awsRestjson1_deserializeDocumentHighlightList(&sv.Street, value); err != nil { + return err + } + + case "SubBlock": + if err := awsRestjson1_deserializeDocumentHighlightList(&sv.SubBlock, value); err != nil { + return err + } + + case "SubDistrict": + if err := awsRestjson1_deserializeDocumentHighlightList(&sv.SubDistrict, value); err != nil { + return err + } + + case "SubRegion": + if err := awsRestjson1_deserializeDocumentSubRegionHighlights(&sv.SubRegion, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAutocompleteHighlights(v **types.AutocompleteHighlights, 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.AutocompleteHighlights + if *v == nil { + sv = &types.AutocompleteHighlights{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Address": + if err := awsRestjson1_deserializeDocumentAutocompleteAddressHighlights(&sv.Address, value); err != nil { + return err + } + + case "Title": + if err := awsRestjson1_deserializeDocumentHighlightList(&sv.Title, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAutocompleteResultItem(v **types.AutocompleteResultItem, 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.AutocompleteResultItem + if *v == nil { + sv = &types.AutocompleteResultItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Address": + if err := awsRestjson1_deserializeDocumentAddress(&sv.Address, value); err != nil { + return err + } + + case "Distance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Distance = i64 + } + + case "Highlights": + if err := awsRestjson1_deserializeDocumentAutocompleteHighlights(&sv.Highlights, value); err != nil { + return err + } + + case "Language": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LanguageTag to be of type string, got %T instead", value) + } + sv.Language = ptr.String(jtv) + } + + case "PlaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PlaceId = ptr.String(jtv) + } + + case "PlaceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlaceType to be of type string, got %T instead", value) + } + sv.PlaceType = types.PlaceType(jtv) + } + + case "PoliticalView": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode3 to be of type string, got %T instead", value) + } + sv.PoliticalView = ptr.String(jtv) + } + + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAutocompleteResultItemList(v *[]types.AutocompleteResultItem, 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.AutocompleteResultItem + if *v == nil { + cv = []types.AutocompleteResultItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AutocompleteResultItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentAutocompleteResultItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentBoundingBox(v *[]float64, 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 []float64 + if *v == nil { + cv = []float64{} + } else { + cv = *v + } + + for _, value := range shape { + var col float64 + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + col = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + col = f64 + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentBusinessChain(v **types.BusinessChain, 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.BusinessChain + if *v == nil { + sv = &types.BusinessChain{} + } 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 String 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 String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBusinessChainList(v *[]types.BusinessChain, 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.BusinessChain + if *v == nil { + cv = []types.BusinessChain{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BusinessChain + destAddr := &col + if err := awsRestjson1_deserializeDocumentBusinessChain(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCategory(v **types.Category, 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.Category + if *v == nil { + sv = &types.Category{} + } 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 String to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "LocalizedName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LocalizedName = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Primary": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Primary = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCategoryList(v *[]types.Category, 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.Category + if *v == nil { + cv = []types.Category{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Category + destAddr := &col + if err := awsRestjson1_deserializeDocumentCategory(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentComponentMatchScores(v **types.ComponentMatchScores, 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.ComponentMatchScores + if *v == nil { + sv = &types.ComponentMatchScores{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Address": + if err := awsRestjson1_deserializeDocumentAddressComponentMatchScores(&sv.Address, value); err != nil { + return err + } + + case "Title": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Title = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Title = f64 + + default: + return fmt.Errorf("expected MatchScore to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentContactDetails(v **types.ContactDetails, 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.ContactDetails + if *v == nil { + sv = &types.ContactDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Categories": + if err := awsRestjson1_deserializeDocumentCategoryList(&sv.Categories, value); err != nil { + return err + } + + case "Label": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Label = ptr.String(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentContactDetailsList(v *[]types.ContactDetails, 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.ContactDetails + if *v == nil { + cv = []types.ContactDetails{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ContactDetails + destAddr := &col + if err := awsRestjson1_deserializeDocumentContactDetails(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentContacts(v **types.Contacts, 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.Contacts + if *v == nil { + sv = &types.Contacts{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Emails": + if err := awsRestjson1_deserializeDocumentContactDetailsList(&sv.Emails, value); err != nil { + return err + } + + case "Faxes": + if err := awsRestjson1_deserializeDocumentContactDetailsList(&sv.Faxes, value); err != nil { + return err + } + + case "Phones": + if err := awsRestjson1_deserializeDocumentContactDetailsList(&sv.Phones, value); err != nil { + return err + } + + case "Websites": + if err := awsRestjson1_deserializeDocumentContactDetailsList(&sv.Websites, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCountry(v **types.Country, 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.Country + if *v == nil { + sv = &types.Country{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code2": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode2 to be of type string, got %T instead", value) + } + sv.Code2 = ptr.String(jtv) + } + + case "Code3": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode3 to be of type string, got %T instead", value) + } + sv.Code3 = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCountryHighlights(v **types.CountryHighlights, 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.CountryHighlights + if *v == nil { + sv = &types.CountryHighlights{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if err := awsRestjson1_deserializeDocumentHighlightList(&sv.Code, value); err != nil { + return err + } + + case "Name": + if err := awsRestjson1_deserializeDocumentHighlightList(&sv.Name, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFoodType(v **types.FoodType, 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.FoodType + if *v == nil { + sv = &types.FoodType{} + } 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 String to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "LocalizedName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LocalizedName = ptr.String(jtv) + } + + case "Primary": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Primary = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFoodTypeList(v *[]types.FoodType, 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.FoodType + if *v == nil { + cv = []types.FoodType{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FoodType + destAddr := &col + if err := awsRestjson1_deserializeDocumentFoodType(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentGeocodeResultItem(v **types.GeocodeResultItem, 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.GeocodeResultItem + if *v == nil { + sv = &types.GeocodeResultItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccessPoints": + if err := awsRestjson1_deserializeDocumentAccessPointList(&sv.AccessPoints, value); err != nil { + return err + } + + case "Address": + if err := awsRestjson1_deserializeDocumentAddress(&sv.Address, value); err != nil { + return err + } + + case "AddressNumberCorrected": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.AddressNumberCorrected = ptr.Bool(jtv) + } + + case "Categories": + if err := awsRestjson1_deserializeDocumentCategoryList(&sv.Categories, value); err != nil { + return err + } + + case "Distance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Distance = i64 + } + + case "FoodTypes": + if err := awsRestjson1_deserializeDocumentFoodTypeList(&sv.FoodTypes, value); err != nil { + return err + } + + case "MapView": + if err := awsRestjson1_deserializeDocumentBoundingBox(&sv.MapView, value); err != nil { + return err + } + + case "MatchScores": + if err := awsRestjson1_deserializeDocumentMatchScoreDetails(&sv.MatchScores, value); err != nil { + return err + } + + case "PlaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PlaceId = ptr.String(jtv) + } + + case "PlaceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlaceType to be of type string, got %T instead", value) + } + sv.PlaceType = types.PlaceType(jtv) + } + + case "PoliticalView": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode3 to be of type string, got %T instead", value) + } + sv.PoliticalView = ptr.String(jtv) + } + + case "Position": + if err := awsRestjson1_deserializeDocumentPosition(&sv.Position, value); err != nil { + return err + } + + case "PostalCodeDetails": + if err := awsRestjson1_deserializeDocumentPostalCodeDetailsList(&sv.PostalCodeDetails, value); err != nil { + return err + } + + case "TimeZone": + if err := awsRestjson1_deserializeDocumentTimeZone(&sv.TimeZone, value); err != nil { + return err + } + + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGeocodeResultItemList(v *[]types.GeocodeResultItem, 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.GeocodeResultItem + if *v == nil { + cv = []types.GeocodeResultItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.GeocodeResultItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentGeocodeResultItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentHighlight(v **types.Highlight, 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.Highlight + if *v == nil { + sv = &types.Highlight{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EndIndex": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.EndIndex = ptr.Int32(int32(i64)) + } + + case "StartIndex": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.StartIndex = ptr.Int32(int32(i64)) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentHighlightList(v *[]types.Highlight, 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.Highlight + if *v == nil { + cv = []types.Highlight{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Highlight + destAddr := &col + if err := awsRestjson1_deserializeDocumentHighlight(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, 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.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIntersectionHighlightsList(v *[][]types.Highlight, 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.Highlight + if *v == nil { + cv = [][]types.Highlight{} + } else { + cv = *v + } + + for _, value := range shape { + var col []types.Highlight + if err := awsRestjson1_deserializeDocumentHighlightList(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentIntersectionList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IntersectionStreet to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentMatchScoreDetails(v **types.MatchScoreDetails, 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.MatchScoreDetails + if *v == nil { + sv = &types.MatchScoreDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Components": + if err := awsRestjson1_deserializeDocumentComponentMatchScores(&sv.Components, value); err != nil { + return err + } + + case "Overall": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Overall = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Overall = f64 + + default: + return fmt.Errorf("expected MatchScore to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMatchScoreList(v *[]float64, 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 []float64 + if *v == nil { + cv = []float64{} + } else { + cv = *v + } + + for _, value := range shape { + var col float64 + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + col = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + col = f64 + + default: + return fmt.Errorf("expected MatchScore to be a JSON Number, got %T instead", value) + + } + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentOpeningHours(v **types.OpeningHours, 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.OpeningHours + if *v == nil { + sv = &types.OpeningHours{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Categories": + if err := awsRestjson1_deserializeDocumentCategoryList(&sv.Categories, value); err != nil { + return err + } + + case "Components": + if err := awsRestjson1_deserializeDocumentOpeningHoursComponentsList(&sv.Components, value); err != nil { + return err + } + + case "Display": + if err := awsRestjson1_deserializeDocumentOpeningHoursDisplayList(&sv.Display, value); err != nil { + return err + } + + case "OpenNow": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.OpenNow = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentOpeningHoursComponents(v **types.OpeningHoursComponents, 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.OpeningHoursComponents + if *v == nil { + sv = &types.OpeningHoursComponents{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OpenDuration": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OpenDuration = ptr.String(jtv) + } + + case "OpenTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OpenTime = ptr.String(jtv) + } + + case "Recurrence": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Recurrence = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentOpeningHoursComponentsList(v *[]types.OpeningHoursComponents, 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.OpeningHoursComponents + if *v == nil { + cv = []types.OpeningHoursComponents{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.OpeningHoursComponents + destAddr := &col + if err := awsRestjson1_deserializeDocumentOpeningHoursComponents(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentOpeningHoursDisplayList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpeningHoursDisplay to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentOpeningHoursList(v *[]types.OpeningHours, 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.OpeningHours + if *v == nil { + cv = []types.OpeningHours{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.OpeningHours + destAddr := &col + if err := awsRestjson1_deserializeDocumentOpeningHours(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentPhonemeDetails(v **types.PhonemeDetails, 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.PhonemeDetails + if *v == nil { + sv = &types.PhonemeDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Address": + if err := awsRestjson1_deserializeDocumentAddressComponentPhonemes(&sv.Address, value); err != nil { + return err + } + + case "Title": + if err := awsRestjson1_deserializeDocumentPhonemeTranscriptionList(&sv.Title, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPhonemeTranscription(v **types.PhonemeTranscription, 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.PhonemeTranscription + if *v == nil { + sv = &types.PhonemeTranscription{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Language": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LanguageTag to be of type string, got %T instead", value) + } + sv.Language = ptr.String(jtv) + } + + case "Preferred": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Preferred = ptr.Bool(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPhonemeTranscriptionList(v *[]types.PhonemeTranscription, 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.PhonemeTranscription + if *v == nil { + cv = []types.PhonemeTranscription{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PhonemeTranscription + destAddr := &col + if err := awsRestjson1_deserializeDocumentPhonemeTranscription(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentPosition(v *[]float64, 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 []float64 + if *v == nil { + cv = []float64{} + } else { + cv = *v + } + + for _, value := range shape { + var col float64 + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + col = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + col = f64 + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentPostalCodeDetails(v **types.PostalCodeDetails, 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.PostalCodeDetails + if *v == nil { + sv = &types.PostalCodeDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PostalAuthority": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PostalAuthority to be of type string, got %T instead", value) + } + sv.PostalAuthority = types.PostalAuthority(jtv) + } + + case "PostalCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PostalCode = ptr.String(jtv) + } + + case "PostalCodeType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PostalCodeType to be of type string, got %T instead", value) + } + sv.PostalCodeType = types.PostalCodeType(jtv) + } + + case "UspsZip": + if err := awsRestjson1_deserializeDocumentUspsZip(&sv.UspsZip, value); err != nil { + return err + } + + case "UspsZipPlus4": + if err := awsRestjson1_deserializeDocumentUspsZipPlus4(&sv.UspsZipPlus4, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPostalCodeDetailsList(v *[]types.PostalCodeDetails, 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.PostalCodeDetails + if *v == nil { + cv = []types.PostalCodeDetails{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PostalCodeDetails + destAddr := &col + if err := awsRestjson1_deserializeDocumentPostalCodeDetails(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentQueryRefinement(v **types.QueryRefinement, 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.QueryRefinement + if *v == nil { + sv = &types.QueryRefinement{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EndIndex": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.EndIndex = ptr.Int32(int32(i64)) + } + + case "OriginalTerm": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OriginalTerm = ptr.String(jtv) + } + + case "RefinedTerm": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RefinedTerm = ptr.String(jtv) + } + + case "StartIndex": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.StartIndex = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentQueryRefinementList(v *[]types.QueryRefinement, 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.QueryRefinement + if *v == nil { + cv = []types.QueryRefinement{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.QueryRefinement + destAddr := &col + if err := awsRestjson1_deserializeDocumentQueryRefinement(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRegion(v **types.Region, 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.Region + if *v == nil { + sv = &types.Region{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Code = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRegionHighlights(v **types.RegionHighlights, 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.RegionHighlights + if *v == nil { + sv = &types.RegionHighlights{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if err := awsRestjson1_deserializeDocumentHighlightList(&sv.Code, value); err != nil { + return err + } + + case "Name": + if err := awsRestjson1_deserializeDocumentHighlightList(&sv.Name, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentReverseGeocodeResultItem(v **types.ReverseGeocodeResultItem, 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.ReverseGeocodeResultItem + if *v == nil { + sv = &types.ReverseGeocodeResultItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccessPoints": + if err := awsRestjson1_deserializeDocumentAccessPointList(&sv.AccessPoints, value); err != nil { + return err + } + + case "Address": + if err := awsRestjson1_deserializeDocumentAddress(&sv.Address, value); err != nil { + return err + } + + case "AddressNumberCorrected": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.AddressNumberCorrected = ptr.Bool(jtv) + } + + case "Categories": + if err := awsRestjson1_deserializeDocumentCategoryList(&sv.Categories, value); err != nil { + return err + } + + case "Distance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Distance = i64 + } + + case "FoodTypes": + if err := awsRestjson1_deserializeDocumentFoodTypeList(&sv.FoodTypes, value); err != nil { + return err + } + + case "MapView": + if err := awsRestjson1_deserializeDocumentBoundingBox(&sv.MapView, value); err != nil { + return err + } + + case "PlaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PlaceId = ptr.String(jtv) + } + + case "PlaceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlaceType to be of type string, got %T instead", value) + } + sv.PlaceType = types.PlaceType(jtv) + } + + case "PoliticalView": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode3 to be of type string, got %T instead", value) + } + sv.PoliticalView = ptr.String(jtv) + } + + case "Position": + if err := awsRestjson1_deserializeDocumentPosition(&sv.Position, value); err != nil { + return err + } + + case "PostalCodeDetails": + if err := awsRestjson1_deserializeDocumentPostalCodeDetailsList(&sv.PostalCodeDetails, value); err != nil { + return err + } + + case "TimeZone": + if err := awsRestjson1_deserializeDocumentTimeZone(&sv.TimeZone, value); err != nil { + return err + } + + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentReverseGeocodeResultItemList(v *[]types.ReverseGeocodeResultItem, 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.ReverseGeocodeResultItem + if *v == nil { + cv = []types.ReverseGeocodeResultItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ReverseGeocodeResultItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentReverseGeocodeResultItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSearchNearbyResultItem(v **types.SearchNearbyResultItem, 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.SearchNearbyResultItem + if *v == nil { + sv = &types.SearchNearbyResultItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccessPoints": + if err := awsRestjson1_deserializeDocumentAccessPointList(&sv.AccessPoints, value); err != nil { + return err + } + + case "AccessRestrictions": + if err := awsRestjson1_deserializeDocumentAccessRestrictionList(&sv.AccessRestrictions, value); err != nil { + return err + } + + case "Address": + if err := awsRestjson1_deserializeDocumentAddress(&sv.Address, value); err != nil { + return err + } + + case "AddressNumberCorrected": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.AddressNumberCorrected = ptr.Bool(jtv) + } + + case "BusinessChains": + if err := awsRestjson1_deserializeDocumentBusinessChainList(&sv.BusinessChains, value); err != nil { + return err + } + + case "Categories": + if err := awsRestjson1_deserializeDocumentCategoryList(&sv.Categories, value); err != nil { + return err + } + + case "Contacts": + if err := awsRestjson1_deserializeDocumentContacts(&sv.Contacts, value); err != nil { + return err + } + + case "Distance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Distance = i64 + } + + case "FoodTypes": + if err := awsRestjson1_deserializeDocumentFoodTypeList(&sv.FoodTypes, value); err != nil { + return err + } + + case "MapView": + if err := awsRestjson1_deserializeDocumentBoundingBox(&sv.MapView, value); err != nil { + return err + } + + case "OpeningHours": + if err := awsRestjson1_deserializeDocumentOpeningHoursList(&sv.OpeningHours, value); err != nil { + return err + } + + case "Phonemes": + if err := awsRestjson1_deserializeDocumentPhonemeDetails(&sv.Phonemes, value); err != nil { + return err + } + + case "PlaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PlaceId = ptr.String(jtv) + } + + case "PlaceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlaceType to be of type string, got %T instead", value) + } + sv.PlaceType = types.PlaceType(jtv) + } + + case "PoliticalView": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode3 to be of type string, got %T instead", value) + } + sv.PoliticalView = ptr.String(jtv) + } + + case "Position": + if err := awsRestjson1_deserializeDocumentPosition(&sv.Position, value); err != nil { + return err + } + + case "TimeZone": + if err := awsRestjson1_deserializeDocumentTimeZone(&sv.TimeZone, value); err != nil { + return err + } + + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSearchNearbyResultItemList(v *[]types.SearchNearbyResultItem, 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.SearchNearbyResultItem + if *v == nil { + cv = []types.SearchNearbyResultItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SearchNearbyResultItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentSearchNearbyResultItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSearchTextResultItem(v **types.SearchTextResultItem, 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.SearchTextResultItem + if *v == nil { + sv = &types.SearchTextResultItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccessPoints": + if err := awsRestjson1_deserializeDocumentAccessPointList(&sv.AccessPoints, value); err != nil { + return err + } + + case "AccessRestrictions": + if err := awsRestjson1_deserializeDocumentAccessRestrictionList(&sv.AccessRestrictions, value); err != nil { + return err + } + + case "Address": + if err := awsRestjson1_deserializeDocumentAddress(&sv.Address, value); err != nil { + return err + } + + case "AddressNumberCorrected": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.AddressNumberCorrected = ptr.Bool(jtv) + } + + case "BusinessChains": + if err := awsRestjson1_deserializeDocumentBusinessChainList(&sv.BusinessChains, value); err != nil { + return err + } + + case "Categories": + if err := awsRestjson1_deserializeDocumentCategoryList(&sv.Categories, value); err != nil { + return err + } + + case "Contacts": + if err := awsRestjson1_deserializeDocumentContacts(&sv.Contacts, value); err != nil { + return err + } + + case "Distance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Distance = i64 + } + + case "FoodTypes": + if err := awsRestjson1_deserializeDocumentFoodTypeList(&sv.FoodTypes, value); err != nil { + return err + } + + case "MapView": + if err := awsRestjson1_deserializeDocumentBoundingBox(&sv.MapView, value); err != nil { + return err + } + + case "OpeningHours": + if err := awsRestjson1_deserializeDocumentOpeningHoursList(&sv.OpeningHours, value); err != nil { + return err + } + + case "Phonemes": + if err := awsRestjson1_deserializeDocumentPhonemeDetails(&sv.Phonemes, value); err != nil { + return err + } + + case "PlaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PlaceId = ptr.String(jtv) + } + + case "PlaceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlaceType to be of type string, got %T instead", value) + } + sv.PlaceType = types.PlaceType(jtv) + } + + case "PoliticalView": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode3 to be of type string, got %T instead", value) + } + sv.PoliticalView = ptr.String(jtv) + } + + case "Position": + if err := awsRestjson1_deserializeDocumentPosition(&sv.Position, value); err != nil { + return err + } + + case "TimeZone": + if err := awsRestjson1_deserializeDocumentTimeZone(&sv.TimeZone, value); err != nil { + return err + } + + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSearchTextResultItemList(v *[]types.SearchTextResultItem, 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.SearchTextResultItem + if *v == nil { + cv = []types.SearchTextResultItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SearchTextResultItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentSearchTextResultItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentStreetComponents(v **types.StreetComponents, 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.StreetComponents + if *v == nil { + sv = &types.StreetComponents{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BaseName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.BaseName = ptr.String(jtv) + } + + case "Direction": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Direction = ptr.String(jtv) + } + + case "Language": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LanguageTag to be of type string, got %T instead", value) + } + sv.Language = ptr.String(jtv) + } + + case "Prefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Prefix = ptr.String(jtv) + } + + case "Suffix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Suffix = ptr.String(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + case "TypePlacement": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TypePlacement to be of type string, got %T instead", value) + } + sv.TypePlacement = types.TypePlacement(jtv) + } + + case "TypeSeparator": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TypeSeparator to be of type string, got %T instead", value) + } + sv.TypeSeparator = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentStreetComponentsList(v *[]types.StreetComponents, 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.StreetComponents + if *v == nil { + cv = []types.StreetComponents{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.StreetComponents + destAddr := &col + if err := awsRestjson1_deserializeDocumentStreetComponents(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSubRegion(v **types.SubRegion, 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.SubRegion + if *v == nil { + sv = &types.SubRegion{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Code = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSubRegionHighlights(v **types.SubRegionHighlights, 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.SubRegionHighlights + if *v == nil { + sv = &types.SubRegionHighlights{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if err := awsRestjson1_deserializeDocumentHighlightList(&sv.Code, value); err != nil { + return err + } + + case "Name": + if err := awsRestjson1_deserializeDocumentHighlightList(&sv.Name, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSuggestAddressHighlights(v **types.SuggestAddressHighlights, 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.SuggestAddressHighlights + if *v == nil { + sv = &types.SuggestAddressHighlights{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Label": + if err := awsRestjson1_deserializeDocumentHighlightList(&sv.Label, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSuggestHighlights(v **types.SuggestHighlights, 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.SuggestHighlights + if *v == nil { + sv = &types.SuggestHighlights{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Address": + if err := awsRestjson1_deserializeDocumentSuggestAddressHighlights(&sv.Address, value); err != nil { + return err + } + + case "Title": + if err := awsRestjson1_deserializeDocumentHighlightList(&sv.Title, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSuggestPlaceResult(v **types.SuggestPlaceResult, 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.SuggestPlaceResult + if *v == nil { + sv = &types.SuggestPlaceResult{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccessPoints": + if err := awsRestjson1_deserializeDocumentAccessPointList(&sv.AccessPoints, value); err != nil { + return err + } + + case "AccessRestrictions": + if err := awsRestjson1_deserializeDocumentAccessRestrictionList(&sv.AccessRestrictions, value); err != nil { + return err + } + + case "Address": + if err := awsRestjson1_deserializeDocumentAddress(&sv.Address, value); err != nil { + return err + } + + case "BusinessChains": + if err := awsRestjson1_deserializeDocumentBusinessChainList(&sv.BusinessChains, value); err != nil { + return err + } + + case "Categories": + if err := awsRestjson1_deserializeDocumentCategoryList(&sv.Categories, value); err != nil { + return err + } + + case "Distance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Distance = i64 + } + + case "FoodTypes": + if err := awsRestjson1_deserializeDocumentFoodTypeList(&sv.FoodTypes, value); err != nil { + return err + } + + case "MapView": + if err := awsRestjson1_deserializeDocumentBoundingBox(&sv.MapView, value); err != nil { + return err + } + + case "Phonemes": + if err := awsRestjson1_deserializeDocumentPhonemeDetails(&sv.Phonemes, value); err != nil { + return err + } + + case "PlaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PlaceId = ptr.String(jtv) + } + + case "PlaceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlaceType to be of type string, got %T instead", value) + } + sv.PlaceType = types.PlaceType(jtv) + } + + case "PoliticalView": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode3 to be of type string, got %T instead", value) + } + sv.PoliticalView = ptr.String(jtv) + } + + case "Position": + if err := awsRestjson1_deserializeDocumentPosition(&sv.Position, value); err != nil { + return err + } + + case "TimeZone": + if err := awsRestjson1_deserializeDocumentTimeZone(&sv.TimeZone, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSuggestQueryResult(v **types.SuggestQueryResult, 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.SuggestQueryResult + if *v == nil { + sv = &types.SuggestQueryResult{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "QueryId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.QueryId = ptr.String(jtv) + } + + case "QueryType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryType to be of type string, got %T instead", value) + } + sv.QueryType = types.QueryType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSuggestResultItem(v **types.SuggestResultItem, 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.SuggestResultItem + if *v == nil { + sv = &types.SuggestResultItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Highlights": + if err := awsRestjson1_deserializeDocumentSuggestHighlights(&sv.Highlights, value); err != nil { + return err + } + + case "Place": + if err := awsRestjson1_deserializeDocumentSuggestPlaceResult(&sv.Place, value); err != nil { + return err + } + + case "Query": + if err := awsRestjson1_deserializeDocumentSuggestQueryResult(&sv.Query, value); err != nil { + return err + } + + case "SuggestResultItemType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SuggestResultItemType to be of type string, got %T instead", value) + } + sv.SuggestResultItemType = types.SuggestResultItemType(jtv) + } + + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSuggestResultItemList(v *[]types.SuggestResultItem, 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.SuggestResultItem + if *v == nil { + cv = []types.SuggestResultItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SuggestResultItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentSuggestResultItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ThrottlingException + if *v == nil { + sv = &types.ThrottlingException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTimeZone(v **types.TimeZone, 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.TimeZone + if *v == nil { + sv = &types.TimeZone{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Offset": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Offset = ptr.String(jtv) + } + + case "OffsetSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.OffsetSeconds = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentUspsZip(v **types.UspsZip, 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.UspsZip + if *v == nil { + sv = &types.UspsZip{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ZipClassificationCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ZipClassificationCode to be of type string, got %T instead", value) + } + sv.ZipClassificationCode = types.ZipClassificationCode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentUspsZipPlus4(v **types.UspsZipPlus4, 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.UspsZipPlus4 + if *v == nil { + sv = &types.UspsZipPlus4{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RecordTypeCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RecordTypeCode to be of type string, got %T instead", value) + } + sv.RecordTypeCode = types.RecordTypeCode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_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 "fieldList": + if err := awsRestjson1_deserializeDocumentValidationExceptionFieldList(&sv.FieldList, value); err != nil { + return err + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ValidationExceptionReason to be of type string, got %T instead", value) + } + sv.Reason = types.ValidationExceptionReason(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentValidationExceptionField(v **types.ValidationExceptionField, 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.ValidationExceptionField + if *v == nil { + sv = &types.ValidationExceptionField{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentValidationExceptionFieldList(v *[]types.ValidationExceptionField, 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.ValidationExceptionField + if *v == nil { + cv = []types.ValidationExceptionField{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ValidationExceptionField + destAddr := &col + if err := awsRestjson1_deserializeDocumentValidationExceptionField(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} diff --git a/service/geoplaces/doc.go b/service/geoplaces/doc.go new file mode 100644 index 00000000000..49c30eb2dd4 --- /dev/null +++ b/service/geoplaces/doc.go @@ -0,0 +1,30 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package geoplaces provides the API client, operations, and parameter types for +// Amazon Location Service Places V2. +// +// The Places API enables powerful location search and geocoding capabilities for +// +// your applications, offering global coverage with rich, detailed information. Key +// features include: +// +// - Forward and reverse geocoding for addresses and coordinates +// +// - Comprehensive place searches with detailed information, including: +// +// - Business names and addresses +// +// - Contact information +// +// - Hours of operation +// +// - POI (Points of Interest) categories +// +// - Food types for restaurants +// +// - Chain affiliation for relevant businesses +// +// - Global data coverage with a wide range of POI categories +// +// - Regular data updates to ensure accuracy and relevance +package geoplaces diff --git a/service/geoplaces/endpoints.go b/service/geoplaces/endpoints.go new file mode 100644 index 00000000000..bb39542fad5 --- /dev/null +++ b/service/geoplaces/endpoints.go @@ -0,0 +1,741 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geoplaces + +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/geoplaces/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" + "github.com/aws/smithy-go/tracing" + 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 = "geo-places" + } + 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_GEO_PLACES") + + if g && !s { + return + } + + value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "Geo Places", 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 { + // 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 + + // The AWS region used to dispatch the request. + // + // Parameter is + // required. + // + // AWS::Region + Region *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 _PartitionResult.Name == "aws" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := func() string { + var out strings.Builder + out.WriteString("https://places.geo.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws" { + if _UseFIPS == true { + if _UseDualStack == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://places.geo-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws" { + if _UseFIPS == true { + if _UseDualStack == false { + uriString := func() string { + var out strings.Builder + out.WriteString("https://places.geo-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws" { + if _UseFIPS == false { + if _UseDualStack == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://places.geo.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws-us-gov" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := func() string { + var out strings.Builder + out.WriteString("https://places.geo.") + out.WriteString(_Region) + out.WriteString(".us-gov.") + out.WriteString(_PartitionResult.DnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws-us-gov" { + if _UseFIPS == true { + if _UseDualStack == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://places.geo-fips.") + out.WriteString(_Region) + out.WriteString(".us-gov.") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws-us-gov" { + if _UseFIPS == true { + if _UseDualStack == false { + uriString := func() string { + var out strings.Builder + out.WriteString("https://places.geo-fips.") + out.WriteString(_Region) + out.WriteString(".us-gov.") + out.WriteString(_PartitionResult.DnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws-us-gov" { + if _UseFIPS == false { + if _UseDualStack == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://places.geo.") + out.WriteString(_Region) + out.WriteString(".us-gov.") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _UseFIPS == true { + if _UseDualStack == true { + if true == _PartitionResult.SupportsFIPS { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://geo-places-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 _UseDualStack == false { + if _PartitionResult.SupportsFIPS == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://geo-places-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 _UseFIPS == false { + if _UseDualStack == true { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://geo-places.") + 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://geo-places.") + 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.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) + params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) + params.Endpoint = options.BaseEndpoint + params.Region = bindRegion(options.Region) + + 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, +) { + _, span := tracing.StartSpan(ctx, "ResolveEndpoint") + defer span.End() + + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleFinalize(ctx, in) + } + + 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 := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", + func() (smithyendpoints.Endpoint, error) { + return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + }) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) + + 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) + } + + span.End() + return next.HandleFinalize(ctx, in) +} diff --git a/service/geoplaces/endpoints_config_test.go b/service/geoplaces/endpoints_config_test.go new file mode 100644 index 00000000000..4c37fd5c576 --- /dev/null +++ b/service/geoplaces/endpoints_config_test.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geoplaces + +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-geo-places.dev", + envIgnore: true, + configGlobal: "http://config-global.dev", + configService: "http://config-geo-places.dev", + expectURL: nil, + }, + "env global": { + envGlobal: "https://env-global.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-geo-places.dev", + expectURL: aws.String("https://env-global.dev"), + }, + "env service": { + envGlobal: "https://env-global.dev", + envService: "https://env-geo-places.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-geo-places.dev", + expectURL: aws.String("https://env-geo-places.dev"), + }, + "config ignore": { + envGlobal: "https://env-global.dev", + envService: "https://env-geo-places.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-geo-places.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-geo-places.dev", + expectURL: aws.String("http://config-geo-places.dev"), + }, + "client": { + envGlobal: "https://env-global.dev", + envService: "https://env-geo-places.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-geo-places.dev", + clientEndpoint: aws.String("https://client-geo-places.dev"), + expectURL: aws.String("https://client-geo-places.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_GEO_PLACES", 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/geoplaces/endpoints_test.go b/service/geoplaces/endpoints_test.go new file mode 100644 index 00000000000..df45ab0d448 --- /dev/null +++ b/service/geoplaces/endpoints_test.go @@ -0,0 +1,1006 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geoplaces + +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 custom endpoint with region not set and fips disabled +func TestEndpointCase0(t *testing.T) { + var params = EndpointParameters{ + Endpoint: ptr.String("https://example.com"), + UseFIPS: 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://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 +func TestEndpointCase1(t *testing.T) { + var params = EndpointParameters{ + Endpoint: ptr.String("https://example.com"), + UseFIPS: 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 := "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 TestEndpointCase2(t *testing.T) { + var params = EndpointParameters{ + Endpoint: ptr.String("https://example.com"), + 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 := "Invalid Configuration: Dualstack and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase3(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://places.geo-fips.us-east-1.api.aws/v2") + + 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 TestEndpointCase4(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://places.geo-fips.us-east-1.amazonaws.com/v2") + + 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 TestEndpointCase5(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://places.geo.us-east-1.api.aws/v2") + + 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 TestEndpointCase6(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://places.geo.us-east-1.amazonaws.com/v2") + + 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-northwest-1 with FIPS enabled and DualStack enabled +func TestEndpointCase7(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("cn-northwest-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://geo-places-fips.cn-northwest-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-northwest-1 with FIPS enabled and DualStack disabled +func TestEndpointCase8(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("cn-northwest-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://geo-places-fips.cn-northwest-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-northwest-1 with FIPS disabled and DualStack enabled +func TestEndpointCase9(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("cn-northwest-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://geo-places.cn-northwest-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-northwest-1 with FIPS disabled and DualStack disabled +func TestEndpointCase10(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("cn-northwest-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://geo-places.cn-northwest-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-west-1 with FIPS enabled and DualStack enabled +func TestEndpointCase11(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-west-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://places.geo-fips.us-gov-west-1.us-gov.api.aws/v2") + + 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-west-1 with FIPS enabled and DualStack disabled +func TestEndpointCase12(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-west-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://places.geo-fips.us-gov-west-1.us-gov.amazonaws.com/v2") + + 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-west-1 with FIPS disabled and DualStack enabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-west-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://places.geo.us-gov-west-1.us-gov.api.aws/v2") + + 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-west-1 with FIPS disabled and DualStack disabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-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://places.geo.us-gov-west-1.us-gov.amazonaws.com/v2") + + 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 TestEndpointCase15(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 TestEndpointCase16(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://geo-places-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 TestEndpointCase17(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 TestEndpointCase18(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://geo-places.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 TestEndpointCase19(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 TestEndpointCase20(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://geo-places-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 TestEndpointCase21(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 TestEndpointCase22(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://geo-places.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 eu-isoe-west-1 with FIPS enabled and DualStack enabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-isoe-west-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 eu-isoe-west-1 with FIPS enabled and DualStack disabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-isoe-west-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://geo-places-fips.eu-isoe-west-1.cloud.adc-e.uk") + + 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-isoe-west-1 with FIPS disabled and DualStack enabled +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-isoe-west-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 eu-isoe-west-1 with FIPS disabled and DualStack disabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-isoe-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://geo-places.eu-isoe-west-1.cloud.adc-e.uk") + + 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-isof-south-1 with FIPS enabled and DualStack enabled +func TestEndpointCase27(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isof-south-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-isof-south-1 with FIPS enabled and DualStack disabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isof-south-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://geo-places-fips.us-isof-south-1.csp.hci.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-isof-south-1 with FIPS disabled and DualStack enabled +func TestEndpointCase29(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isof-south-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-isof-south-1 with FIPS disabled and DualStack disabled +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isof-south-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://geo-places.us-isof-south-1.csp.hci.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) + } +} + +// Missing region +func TestEndpointCase31(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/geoplaces/generated.json b/service/geoplaces/generated.json new file mode 100644 index 00000000000..ab21c38cdd0 --- /dev/null +++ b/service/geoplaces/generated.json @@ -0,0 +1,39 @@ +{ + "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_Autocomplete.go", + "api_op_Geocode.go", + "api_op_GetPlace.go", + "api_op_ReverseGeocode.go", + "api_op_SearchNearby.go", + "api_op_SearchText.go", + "api_op_Suggest.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/enums.go", + "types/errors.go", + "types/types.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/geoplaces", + "unstable": false +} diff --git a/service/geoplaces/go.mod b/service/geoplaces/go.mod new file mode 100644 index 00000000000..611394d2881 --- /dev/null +++ b/service/geoplaces/go.mod @@ -0,0 +1,16 @@ +module github.com/aws/aws-sdk-go-v2/service/geoplaces + +go 1.21 + +require ( + github.com/aws/aws-sdk-go-v2 v1.32.3 + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.22 + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.22 + github.com/aws/smithy-go v1.22.0 +) + +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/geoplaces/go.sum b/service/geoplaces/go.sum new file mode 100644 index 00000000000..70a20636e37 --- /dev/null +++ b/service/geoplaces/go.sum @@ -0,0 +1,2 @@ +github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= +github.com/aws/smithy-go v1.22.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= diff --git a/service/geoplaces/go_module_metadata.go b/service/geoplaces/go_module_metadata.go new file mode 100644 index 00000000000..2c33a86d19d --- /dev/null +++ b/service/geoplaces/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package geoplaces + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/geoplaces/internal/endpoints/endpoints.go b/service/geoplaces/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..48dadd24a0a --- /dev/null +++ b/service/geoplaces/internal/endpoints/endpoints.go @@ -0,0 +1,296 @@ +// 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 Geo Places 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|mx)\\-\\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: "geo-places.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "geo-places-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "geo-places-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-places.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "geo-places.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "geo-places-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "geo-places-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-places.{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: "geo-places-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-places.{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: "geo-places-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-places.{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: "geo-places-fips.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-places.{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: "geo-places-fips.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-places.{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: "geo-places.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "geo-places-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "geo-places-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-places.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/geoplaces/internal/endpoints/endpoints_test.go b/service/geoplaces/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/geoplaces/internal/endpoints/endpoints_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "testing" +) + +func TestRegexCompile(t *testing.T) { + _ = defaultPartitions +} diff --git a/service/geoplaces/options.go b/service/geoplaces/options.go new file mode 100644 index 00000000000..ceed54553b5 --- /dev/null +++ b/service/geoplaces/options.go @@ -0,0 +1,232 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geoplaces + +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/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + 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 + + // 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 client meter provider. + MeterProvider metrics.MeterProvider + + // 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 client tracer provider. + TracerProvider tracing.TracerProvider + + // 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/geoplaces/protocol_test.go b/service/geoplaces/protocol_test.go new file mode 100644 index 00000000000..445edd869e3 --- /dev/null +++ b/service/geoplaces/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geoplaces diff --git a/service/geoplaces/serializers.go b/service/geoplaces/serializers.go new file mode 100644 index 00000000000..23ef6aaadfc --- /dev/null +++ b/service/geoplaces/serializers.go @@ -0,0 +1,1368 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geoplaces + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/geoplaces/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" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "math" +) + +type awsRestjson1_serializeOpAutocomplete struct { +} + +func (*awsRestjson1_serializeOpAutocomplete) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAutocomplete) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*AutocompleteInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/autocomplete") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsAutocompleteInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentAutocompleteInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsAutocompleteInput(v *AutocompleteInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Key != nil { + encoder.SetQuery("key").String(*v.Key) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentAutocompleteInput(v *AutocompleteInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AdditionalFeatures != nil { + ok := object.Key("AdditionalFeatures") + if err := awsRestjson1_serializeDocumentAutocompleteAdditionalFeatureList(v.AdditionalFeatures, ok); err != nil { + return err + } + } + + if v.BiasPosition != nil { + ok := object.Key("BiasPosition") + if err := awsRestjson1_serializeDocumentPosition(v.BiasPosition, ok); err != nil { + return err + } + } + + if v.Filter != nil { + ok := object.Key("Filter") + if err := awsRestjson1_serializeDocumentAutocompleteFilter(v.Filter, ok); err != nil { + return err + } + } + + if len(v.IntendedUse) > 0 { + ok := object.Key("IntendedUse") + ok.String(string(v.IntendedUse)) + } + + if v.Language != nil { + ok := object.Key("Language") + ok.String(*v.Language) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.PoliticalView != nil { + ok := object.Key("PoliticalView") + ok.String(*v.PoliticalView) + } + + if len(v.PostalCodeMode) > 0 { + ok := object.Key("PostalCodeMode") + ok.String(string(v.PostalCodeMode)) + } + + if v.QueryText != nil { + ok := object.Key("QueryText") + ok.String(*v.QueryText) + } + + return nil +} + +type awsRestjson1_serializeOpGeocode struct { +} + +func (*awsRestjson1_serializeOpGeocode) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGeocode) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GeocodeInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/geocode") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGeocodeInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGeocodeInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGeocodeInput(v *GeocodeInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Key != nil { + encoder.SetQuery("key").String(*v.Key) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGeocodeInput(v *GeocodeInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AdditionalFeatures != nil { + ok := object.Key("AdditionalFeatures") + if err := awsRestjson1_serializeDocumentGeocodeAdditionalFeatureList(v.AdditionalFeatures, ok); err != nil { + return err + } + } + + if v.BiasPosition != nil { + ok := object.Key("BiasPosition") + if err := awsRestjson1_serializeDocumentPosition(v.BiasPosition, ok); err != nil { + return err + } + } + + if v.Filter != nil { + ok := object.Key("Filter") + if err := awsRestjson1_serializeDocumentGeocodeFilter(v.Filter, ok); err != nil { + return err + } + } + + if len(v.IntendedUse) > 0 { + ok := object.Key("IntendedUse") + ok.String(string(v.IntendedUse)) + } + + if v.Language != nil { + ok := object.Key("Language") + ok.String(*v.Language) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.PoliticalView != nil { + ok := object.Key("PoliticalView") + ok.String(*v.PoliticalView) + } + + if v.QueryComponents != nil { + ok := object.Key("QueryComponents") + if err := awsRestjson1_serializeDocumentGeocodeQueryComponents(v.QueryComponents, ok); err != nil { + return err + } + } + + if v.QueryText != nil { + ok := object.Key("QueryText") + ok.String(*v.QueryText) + } + + return nil +} + +type awsRestjson1_serializeOpGetPlace struct { +} + +func (*awsRestjson1_serializeOpGetPlace) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetPlace) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetPlaceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/place/{PlaceId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetPlaceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetPlaceInput(v *GetPlaceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AdditionalFeatures != nil { + for i := range v.AdditionalFeatures { + encoder.AddQuery("additional-features").String(string(v.AdditionalFeatures[i])) + } + } + + if len(v.IntendedUse) > 0 { + encoder.SetQuery("intended-use").String(string(v.IntendedUse)) + } + + if v.Key != nil { + encoder.SetQuery("key").String(*v.Key) + } + + if v.Language != nil { + encoder.SetQuery("language").String(*v.Language) + } + + if v.PlaceId == nil || len(*v.PlaceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member PlaceId must not be empty")} + } + if v.PlaceId != nil { + if err := encoder.SetURI("PlaceId").String(*v.PlaceId); err != nil { + return err + } + } + + if v.PoliticalView != nil { + encoder.SetQuery("political-view").String(*v.PoliticalView) + } + + return nil +} + +type awsRestjson1_serializeOpReverseGeocode struct { +} + +func (*awsRestjson1_serializeOpReverseGeocode) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpReverseGeocode) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ReverseGeocodeInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/reverse-geocode") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsReverseGeocodeInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentReverseGeocodeInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsReverseGeocodeInput(v *ReverseGeocodeInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Key != nil { + encoder.SetQuery("key").String(*v.Key) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentReverseGeocodeInput(v *ReverseGeocodeInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AdditionalFeatures != nil { + ok := object.Key("AdditionalFeatures") + if err := awsRestjson1_serializeDocumentReverseGeocodeAdditionalFeatureList(v.AdditionalFeatures, ok); err != nil { + return err + } + } + + if v.Filter != nil { + ok := object.Key("Filter") + if err := awsRestjson1_serializeDocumentReverseGeocodeFilter(v.Filter, ok); err != nil { + return err + } + } + + if len(v.IntendedUse) > 0 { + ok := object.Key("IntendedUse") + ok.String(string(v.IntendedUse)) + } + + if v.Language != nil { + ok := object.Key("Language") + ok.String(*v.Language) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.PoliticalView != nil { + ok := object.Key("PoliticalView") + ok.String(*v.PoliticalView) + } + + if v.QueryPosition != nil { + ok := object.Key("QueryPosition") + if err := awsRestjson1_serializeDocumentPosition(v.QueryPosition, ok); err != nil { + return err + } + } + + if v.QueryRadius != nil { + ok := object.Key("QueryRadius") + ok.Long(*v.QueryRadius) + } + + return nil +} + +type awsRestjson1_serializeOpSearchNearby struct { +} + +func (*awsRestjson1_serializeOpSearchNearby) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSearchNearby) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*SearchNearbyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/search-nearby") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsSearchNearbyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentSearchNearbyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsSearchNearbyInput(v *SearchNearbyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Key != nil { + encoder.SetQuery("key").String(*v.Key) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSearchNearbyInput(v *SearchNearbyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AdditionalFeatures != nil { + ok := object.Key("AdditionalFeatures") + if err := awsRestjson1_serializeDocumentSearchNearbyAdditionalFeatureList(v.AdditionalFeatures, ok); err != nil { + return err + } + } + + if v.Filter != nil { + ok := object.Key("Filter") + if err := awsRestjson1_serializeDocumentSearchNearbyFilter(v.Filter, ok); err != nil { + return err + } + } + + if len(v.IntendedUse) > 0 { + ok := object.Key("IntendedUse") + ok.String(string(v.IntendedUse)) + } + + if v.Language != nil { + ok := object.Key("Language") + ok.String(*v.Language) + } + + 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.PoliticalView != nil { + ok := object.Key("PoliticalView") + ok.String(*v.PoliticalView) + } + + if v.QueryPosition != nil { + ok := object.Key("QueryPosition") + if err := awsRestjson1_serializeDocumentPosition(v.QueryPosition, ok); err != nil { + return err + } + } + + if v.QueryRadius != nil { + ok := object.Key("QueryRadius") + ok.Long(*v.QueryRadius) + } + + return nil +} + +type awsRestjson1_serializeOpSearchText struct { +} + +func (*awsRestjson1_serializeOpSearchText) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSearchText) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*SearchTextInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/search-text") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsSearchTextInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentSearchTextInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsSearchTextInput(v *SearchTextInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Key != nil { + encoder.SetQuery("key").String(*v.Key) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSearchTextInput(v *SearchTextInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AdditionalFeatures != nil { + ok := object.Key("AdditionalFeatures") + if err := awsRestjson1_serializeDocumentSearchTextAdditionalFeatureList(v.AdditionalFeatures, ok); err != nil { + return err + } + } + + if v.BiasPosition != nil { + ok := object.Key("BiasPosition") + if err := awsRestjson1_serializeDocumentPosition(v.BiasPosition, ok); err != nil { + return err + } + } + + if v.Filter != nil { + ok := object.Key("Filter") + if err := awsRestjson1_serializeDocumentSearchTextFilter(v.Filter, ok); err != nil { + return err + } + } + + if len(v.IntendedUse) > 0 { + ok := object.Key("IntendedUse") + ok.String(string(v.IntendedUse)) + } + + if v.Language != nil { + ok := object.Key("Language") + ok.String(*v.Language) + } + + 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.PoliticalView != nil { + ok := object.Key("PoliticalView") + ok.String(*v.PoliticalView) + } + + if v.QueryId != nil { + ok := object.Key("QueryId") + ok.String(*v.QueryId) + } + + if v.QueryText != nil { + ok := object.Key("QueryText") + ok.String(*v.QueryText) + } + + return nil +} + +type awsRestjson1_serializeOpSuggest struct { +} + +func (*awsRestjson1_serializeOpSuggest) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSuggest) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*SuggestInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/suggest") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsSuggestInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentSuggestInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsSuggestInput(v *SuggestInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Key != nil { + encoder.SetQuery("key").String(*v.Key) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSuggestInput(v *SuggestInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AdditionalFeatures != nil { + ok := object.Key("AdditionalFeatures") + if err := awsRestjson1_serializeDocumentSuggestAdditionalFeatureList(v.AdditionalFeatures, ok); err != nil { + return err + } + } + + if v.BiasPosition != nil { + ok := object.Key("BiasPosition") + if err := awsRestjson1_serializeDocumentPosition(v.BiasPosition, ok); err != nil { + return err + } + } + + if v.Filter != nil { + ok := object.Key("Filter") + if err := awsRestjson1_serializeDocumentSuggestFilter(v.Filter, ok); err != nil { + return err + } + } + + if len(v.IntendedUse) > 0 { + ok := object.Key("IntendedUse") + ok.String(string(v.IntendedUse)) + } + + if v.Language != nil { + ok := object.Key("Language") + ok.String(*v.Language) + } + + if v.MaxQueryRefinements != nil { + ok := object.Key("MaxQueryRefinements") + ok.Integer(*v.MaxQueryRefinements) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.PoliticalView != nil { + ok := object.Key("PoliticalView") + ok.String(*v.PoliticalView) + } + + if v.QueryText != nil { + ok := object.Key("QueryText") + ok.String(*v.QueryText) + } + + return nil +} + +func awsRestjson1_serializeDocumentAutocompleteAdditionalFeatureList(v []types.AutocompleteAdditionalFeature, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentAutocompleteFilter(v *types.AutocompleteFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BoundingBox != nil { + ok := object.Key("BoundingBox") + if err := awsRestjson1_serializeDocumentBoundingBox(v.BoundingBox, ok); err != nil { + return err + } + } + + if v.Circle != nil { + ok := object.Key("Circle") + if err := awsRestjson1_serializeDocumentFilterCircle(v.Circle, ok); err != nil { + return err + } + } + + if v.IncludeCountries != nil { + ok := object.Key("IncludeCountries") + if err := awsRestjson1_serializeDocumentCountryCodeList(v.IncludeCountries, ok); err != nil { + return err + } + } + + if v.IncludePlaceTypes != nil { + ok := object.Key("IncludePlaceTypes") + if err := awsRestjson1_serializeDocumentAutocompleteFilterPlaceTypeList(v.IncludePlaceTypes, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentAutocompleteFilterPlaceTypeList(v []types.AutocompleteFilterPlaceType, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentBoundingBox(v []float64, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + switch { + case math.IsNaN(v[i]): + av.String("NaN") + + case math.IsInf(v[i], 1): + av.String("Infinity") + + case math.IsInf(v[i], -1): + av.String("-Infinity") + + default: + av.Double(v[i]) + + } + } + return nil +} + +func awsRestjson1_serializeDocumentCountryCodeList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentFilterBusinessChainList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentFilterCategoryList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentFilterCircle(v *types.FilterCircle, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Center != nil { + ok := object.Key("Center") + if err := awsRestjson1_serializeDocumentPosition(v.Center, ok); err != nil { + return err + } + } + + if v.Radius != nil { + ok := object.Key("Radius") + ok.Long(*v.Radius) + } + + return nil +} + +func awsRestjson1_serializeDocumentFilterFoodTypeList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentGeocodeAdditionalFeatureList(v []types.GeocodeAdditionalFeature, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentGeocodeFilter(v *types.GeocodeFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IncludeCountries != nil { + ok := object.Key("IncludeCountries") + if err := awsRestjson1_serializeDocumentCountryCodeList(v.IncludeCountries, ok); err != nil { + return err + } + } + + if v.IncludePlaceTypes != nil { + ok := object.Key("IncludePlaceTypes") + if err := awsRestjson1_serializeDocumentGeocodeFilterPlaceTypeList(v.IncludePlaceTypes, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentGeocodeFilterPlaceTypeList(v []types.GeocodeFilterPlaceType, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentGeocodeQueryComponents(v *types.GeocodeQueryComponents, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AddressNumber != nil { + ok := object.Key("AddressNumber") + ok.String(*v.AddressNumber) + } + + if v.Country != nil { + ok := object.Key("Country") + ok.String(*v.Country) + } + + if v.District != nil { + ok := object.Key("District") + ok.String(*v.District) + } + + if v.Locality != nil { + ok := object.Key("Locality") + ok.String(*v.Locality) + } + + if v.PostalCode != nil { + ok := object.Key("PostalCode") + ok.String(*v.PostalCode) + } + + if v.Region != nil { + ok := object.Key("Region") + ok.String(*v.Region) + } + + if v.Street != nil { + ok := object.Key("Street") + ok.String(*v.Street) + } + + if v.SubRegion != nil { + ok := object.Key("SubRegion") + ok.String(*v.SubRegion) + } + + return nil +} + +func awsRestjson1_serializeDocumentPosition(v []float64, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + switch { + case math.IsNaN(v[i]): + av.String("NaN") + + case math.IsInf(v[i], 1): + av.String("Infinity") + + case math.IsInf(v[i], -1): + av.String("-Infinity") + + default: + av.Double(v[i]) + + } + } + return nil +} + +func awsRestjson1_serializeDocumentReverseGeocodeAdditionalFeatureList(v []types.ReverseGeocodeAdditionalFeature, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentReverseGeocodeFilter(v *types.ReverseGeocodeFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IncludePlaceTypes != nil { + ok := object.Key("IncludePlaceTypes") + if err := awsRestjson1_serializeDocumentReverseGeocodeFilterPlaceTypeList(v.IncludePlaceTypes, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentReverseGeocodeFilterPlaceTypeList(v []types.ReverseGeocodeFilterPlaceType, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentSearchNearbyAdditionalFeatureList(v []types.SearchNearbyAdditionalFeature, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentSearchNearbyFilter(v *types.SearchNearbyFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BoundingBox != nil { + ok := object.Key("BoundingBox") + if err := awsRestjson1_serializeDocumentBoundingBox(v.BoundingBox, ok); err != nil { + return err + } + } + + if v.ExcludeBusinessChains != nil { + ok := object.Key("ExcludeBusinessChains") + if err := awsRestjson1_serializeDocumentFilterBusinessChainList(v.ExcludeBusinessChains, ok); err != nil { + return err + } + } + + if v.ExcludeCategories != nil { + ok := object.Key("ExcludeCategories") + if err := awsRestjson1_serializeDocumentFilterCategoryList(v.ExcludeCategories, ok); err != nil { + return err + } + } + + if v.ExcludeFoodTypes != nil { + ok := object.Key("ExcludeFoodTypes") + if err := awsRestjson1_serializeDocumentFilterFoodTypeList(v.ExcludeFoodTypes, ok); err != nil { + return err + } + } + + if v.IncludeBusinessChains != nil { + ok := object.Key("IncludeBusinessChains") + if err := awsRestjson1_serializeDocumentFilterBusinessChainList(v.IncludeBusinessChains, ok); err != nil { + return err + } + } + + if v.IncludeCategories != nil { + ok := object.Key("IncludeCategories") + if err := awsRestjson1_serializeDocumentFilterCategoryList(v.IncludeCategories, ok); err != nil { + return err + } + } + + if v.IncludeCountries != nil { + ok := object.Key("IncludeCountries") + if err := awsRestjson1_serializeDocumentCountryCodeList(v.IncludeCountries, ok); err != nil { + return err + } + } + + if v.IncludeFoodTypes != nil { + ok := object.Key("IncludeFoodTypes") + if err := awsRestjson1_serializeDocumentFilterFoodTypeList(v.IncludeFoodTypes, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSearchTextAdditionalFeatureList(v []types.SearchTextAdditionalFeature, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentSearchTextFilter(v *types.SearchTextFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BoundingBox != nil { + ok := object.Key("BoundingBox") + if err := awsRestjson1_serializeDocumentBoundingBox(v.BoundingBox, ok); err != nil { + return err + } + } + + if v.Circle != nil { + ok := object.Key("Circle") + if err := awsRestjson1_serializeDocumentFilterCircle(v.Circle, ok); err != nil { + return err + } + } + + if v.IncludeCountries != nil { + ok := object.Key("IncludeCountries") + if err := awsRestjson1_serializeDocumentCountryCodeList(v.IncludeCountries, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSuggestAdditionalFeatureList(v []types.SuggestAdditionalFeature, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentSuggestFilter(v *types.SuggestFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BoundingBox != nil { + ok := object.Key("BoundingBox") + if err := awsRestjson1_serializeDocumentBoundingBox(v.BoundingBox, ok); err != nil { + return err + } + } + + if v.Circle != nil { + ok := object.Key("Circle") + if err := awsRestjson1_serializeDocumentFilterCircle(v.Circle, ok); err != nil { + return err + } + } + + if v.IncludeCountries != nil { + ok := object.Key("IncludeCountries") + if err := awsRestjson1_serializeDocumentCountryCodeList(v.IncludeCountries, ok); err != nil { + return err + } + } + + return nil +} diff --git a/service/geoplaces/snapshot/api_op_Autocomplete.go.snap b/service/geoplaces/snapshot/api_op_Autocomplete.go.snap new file mode 100644 index 00000000000..b5bd6a871ad --- /dev/null +++ b/service/geoplaces/snapshot/api_op_Autocomplete.go.snap @@ -0,0 +1,41 @@ +Autocomplete + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/geoplaces/snapshot/api_op_Geocode.go.snap b/service/geoplaces/snapshot/api_op_Geocode.go.snap new file mode 100644 index 00000000000..c7852a4d5e8 --- /dev/null +++ b/service/geoplaces/snapshot/api_op_Geocode.go.snap @@ -0,0 +1,40 @@ +Geocode + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/geoplaces/snapshot/api_op_GetPlace.go.snap b/service/geoplaces/snapshot/api_op_GetPlace.go.snap new file mode 100644 index 00000000000..ce0d9955171 --- /dev/null +++ b/service/geoplaces/snapshot/api_op_GetPlace.go.snap @@ -0,0 +1,41 @@ +GetPlace + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/geoplaces/snapshot/api_op_ReverseGeocode.go.snap b/service/geoplaces/snapshot/api_op_ReverseGeocode.go.snap new file mode 100644 index 00000000000..c362e022273 --- /dev/null +++ b/service/geoplaces/snapshot/api_op_ReverseGeocode.go.snap @@ -0,0 +1,41 @@ +ReverseGeocode + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/geoplaces/snapshot/api_op_SearchNearby.go.snap b/service/geoplaces/snapshot/api_op_SearchNearby.go.snap new file mode 100644 index 00000000000..ee244254e3d --- /dev/null +++ b/service/geoplaces/snapshot/api_op_SearchNearby.go.snap @@ -0,0 +1,41 @@ +SearchNearby + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/geoplaces/snapshot/api_op_SearchText.go.snap b/service/geoplaces/snapshot/api_op_SearchText.go.snap new file mode 100644 index 00000000000..4486d150167 --- /dev/null +++ b/service/geoplaces/snapshot/api_op_SearchText.go.snap @@ -0,0 +1,41 @@ +SearchText + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/geoplaces/snapshot/api_op_Suggest.go.snap b/service/geoplaces/snapshot/api_op_Suggest.go.snap new file mode 100644 index 00000000000..d88b1a2be00 --- /dev/null +++ b/service/geoplaces/snapshot/api_op_Suggest.go.snap @@ -0,0 +1,41 @@ +Suggest + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/geoplaces/snapshot_test.go b/service/geoplaces/snapshot_test.go new file mode 100644 index 00000000000..d6be61e3207 --- /dev/null +++ b/service/geoplaces/snapshot_test.go @@ -0,0 +1,230 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +//go:build snapshot + +package geoplaces + +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_Autocomplete(t *testing.T) { + svc := New(Options{}) + _, err := svc.Autocomplete(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "Autocomplete") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_Geocode(t *testing.T) { + svc := New(Options{}) + _, err := svc.Geocode(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "Geocode") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetPlace(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetPlace(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetPlace") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ReverseGeocode(t *testing.T) { + svc := New(Options{}) + _, err := svc.ReverseGeocode(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ReverseGeocode") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_SearchNearby(t *testing.T) { + svc := New(Options{}) + _, err := svc.SearchNearby(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "SearchNearby") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_SearchText(t *testing.T) { + svc := New(Options{}) + _, err := svc.SearchText(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "SearchText") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_Suggest(t *testing.T) { + svc := New(Options{}) + _, err := svc.Suggest(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "Suggest") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} +func TestUpdateSnapshot_Autocomplete(t *testing.T) { + svc := New(Options{}) + _, err := svc.Autocomplete(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "Autocomplete") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_Geocode(t *testing.T) { + svc := New(Options{}) + _, err := svc.Geocode(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "Geocode") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetPlace(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetPlace(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetPlace") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ReverseGeocode(t *testing.T) { + svc := New(Options{}) + _, err := svc.ReverseGeocode(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ReverseGeocode") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_SearchNearby(t *testing.T) { + svc := New(Options{}) + _, err := svc.SearchNearby(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "SearchNearby") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_SearchText(t *testing.T) { + svc := New(Options{}) + _, err := svc.SearchText(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "SearchText") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_Suggest(t *testing.T) { + svc := New(Options{}) + _, err := svc.Suggest(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "Suggest") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} diff --git a/service/geoplaces/types/enums.go b/service/geoplaces/types/enums.go new file mode 100644 index 00000000000..b3618b2ad15 --- /dev/null +++ b/service/geoplaces/types/enums.go @@ -0,0 +1,611 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type AutocompleteAdditionalFeature string + +// Enum values for AutocompleteAdditionalFeature +const ( + AutocompleteAdditionalFeatureCore AutocompleteAdditionalFeature = "Core" +) + +// Values returns all known values for AutocompleteAdditionalFeature. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AutocompleteAdditionalFeature) Values() []AutocompleteAdditionalFeature { + return []AutocompleteAdditionalFeature{ + "Core", + } +} + +type AutocompleteFilterPlaceType string + +// Enum values for AutocompleteFilterPlaceType +const ( + AutocompleteFilterPlaceTypeLocality AutocompleteFilterPlaceType = "Locality" + AutocompleteFilterPlaceTypePostalCode AutocompleteFilterPlaceType = "PostalCode" +) + +// Values returns all known values for AutocompleteFilterPlaceType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AutocompleteFilterPlaceType) Values() []AutocompleteFilterPlaceType { + return []AutocompleteFilterPlaceType{ + "Locality", + "PostalCode", + } +} + +type AutocompleteIntendedUse string + +// Enum values for AutocompleteIntendedUse +const ( + // Indicates that results of the operation are for single use, e.g., displaying + // results on a map or presenting options to users. + AutocompleteIntendedUseSingleUse AutocompleteIntendedUse = "SingleUse" +) + +// Values returns all known values for AutocompleteIntendedUse. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AutocompleteIntendedUse) Values() []AutocompleteIntendedUse { + return []AutocompleteIntendedUse{ + "SingleUse", + } +} + +type GeocodeAdditionalFeature string + +// Enum values for GeocodeAdditionalFeature +const ( + GeocodeAdditionalFeatureTimeZone GeocodeAdditionalFeature = "TimeZone" + GeocodeAdditionalFeatureAccess GeocodeAdditionalFeature = "Access" +) + +// Values returns all known values for GeocodeAdditionalFeature. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (GeocodeAdditionalFeature) Values() []GeocodeAdditionalFeature { + return []GeocodeAdditionalFeature{ + "TimeZone", + "Access", + } +} + +type GeocodeFilterPlaceType string + +// Enum values for GeocodeFilterPlaceType +const ( + GeocodeFilterPlaceTypeLocality GeocodeFilterPlaceType = "Locality" + GeocodeFilterPlaceTypePostalCode GeocodeFilterPlaceType = "PostalCode" + GeocodeFilterPlaceTypeIntersection GeocodeFilterPlaceType = "Intersection" + GeocodeFilterPlaceTypeStreet GeocodeFilterPlaceType = "Street" + GeocodeFilterPlaceTypePointAddress GeocodeFilterPlaceType = "PointAddress" + GeocodeFilterPlaceTypeInterpolatedAddress GeocodeFilterPlaceType = "InterpolatedAddress" +) + +// Values returns all known values for GeocodeFilterPlaceType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (GeocodeFilterPlaceType) Values() []GeocodeFilterPlaceType { + return []GeocodeFilterPlaceType{ + "Locality", + "PostalCode", + "Intersection", + "Street", + "PointAddress", + "InterpolatedAddress", + } +} + +type GeocodeIntendedUse string + +// Enum values for GeocodeIntendedUse +const ( + // Indicates that results of the operation are for single use, e.g., displaying + // results on a map or presenting options to users. + GeocodeIntendedUseSingleUse GeocodeIntendedUse = "SingleUse" + // Indicates that results of the operation may be stored locally. + GeocodeIntendedUseStorage GeocodeIntendedUse = "Storage" +) + +// Values returns all known values for GeocodeIntendedUse. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (GeocodeIntendedUse) Values() []GeocodeIntendedUse { + return []GeocodeIntendedUse{ + "SingleUse", + "Storage", + } +} + +type GetPlaceAdditionalFeature string + +// Enum values for GetPlaceAdditionalFeature +const ( + GetPlaceAdditionalFeatureTimeZone GetPlaceAdditionalFeature = "TimeZone" + GetPlaceAdditionalFeaturePhonemes GetPlaceAdditionalFeature = "Phonemes" + GetPlaceAdditionalFeatureAccess GetPlaceAdditionalFeature = "Access" + GetPlaceAdditionalFeatureContact GetPlaceAdditionalFeature = "Contact" +) + +// Values returns all known values for GetPlaceAdditionalFeature. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (GetPlaceAdditionalFeature) Values() []GetPlaceAdditionalFeature { + return []GetPlaceAdditionalFeature{ + "TimeZone", + "Phonemes", + "Access", + "Contact", + } +} + +type GetPlaceIntendedUse string + +// Enum values for GetPlaceIntendedUse +const ( + // Indicates that results of the operation are for single use, e.g., displaying + // results on a map or presenting options to users. + GetPlaceIntendedUseSingleUse GetPlaceIntendedUse = "SingleUse" + // Indicates that results of the operation may be stored locally. + GetPlaceIntendedUseStorage GetPlaceIntendedUse = "Storage" +) + +// Values returns all known values for GetPlaceIntendedUse. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (GetPlaceIntendedUse) Values() []GetPlaceIntendedUse { + return []GetPlaceIntendedUse{ + "SingleUse", + "Storage", + } +} + +type PlaceType string + +// Enum values for PlaceType +const ( + PlaceTypeCountry PlaceType = "Country" + PlaceTypeRegion PlaceType = "Region" + PlaceTypeSubRegion PlaceType = "SubRegion" + PlaceTypeLocality PlaceType = "Locality" + PlaceTypeDistrict PlaceType = "District" + PlaceTypeSubDistrict PlaceType = "SubDistrict" + PlaceTypePostalCode PlaceType = "PostalCode" + PlaceTypeBlock PlaceType = "Block" + PlaceTypeSubBlock PlaceType = "SubBlock" + PlaceTypeIntersection PlaceType = "Intersection" + PlaceTypeStreet PlaceType = "Street" + PlaceTypePointOfInterest PlaceType = "PointOfInterest" + PlaceTypePointAddress PlaceType = "PointAddress" + PlaceTypeInterpolatedAddress PlaceType = "InterpolatedAddress" +) + +// Values returns all known values for PlaceType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PlaceType) Values() []PlaceType { + return []PlaceType{ + "Country", + "Region", + "SubRegion", + "Locality", + "District", + "SubDistrict", + "PostalCode", + "Block", + "SubBlock", + "Intersection", + "Street", + "PointOfInterest", + "PointAddress", + "InterpolatedAddress", + } +} + +type PostalAuthority string + +// Enum values for PostalAuthority +const ( + PostalAuthorityUsps PostalAuthority = "Usps" +) + +// Values returns all known values for PostalAuthority. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PostalAuthority) Values() []PostalAuthority { + return []PostalAuthority{ + "Usps", + } +} + +type PostalCodeMode string + +// Enum values for PostalCodeMode +const ( + PostalCodeModeMergeAllSpannedLocalities PostalCodeMode = "MergeAllSpannedLocalities" + PostalCodeModeEnumerateSpannedLocalities PostalCodeMode = "EnumerateSpannedLocalities" +) + +// Values returns all known values for PostalCodeMode. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PostalCodeMode) Values() []PostalCodeMode { + return []PostalCodeMode{ + "MergeAllSpannedLocalities", + "EnumerateSpannedLocalities", + } +} + +type PostalCodeType string + +// Enum values for PostalCodeType +const ( + PostalCodeTypeUspsZip PostalCodeType = "UspsZip" + PostalCodeTypeUspsZipPlus4 PostalCodeType = "UspsZipPlus4" +) + +// Values returns all known values for PostalCodeType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PostalCodeType) Values() []PostalCodeType { + return []PostalCodeType{ + "UspsZip", + "UspsZipPlus4", + } +} + +type QueryType string + +// Enum values for QueryType +const ( + QueryTypeCategory QueryType = "Category" + QueryTypeBusinessChain QueryType = "BusinessChain" +) + +// Values returns all known values for QueryType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (QueryType) Values() []QueryType { + return []QueryType{ + "Category", + "BusinessChain", + } +} + +type RecordTypeCode string + +// Enum values for RecordTypeCode +const ( + RecordTypeCodeFirm RecordTypeCode = "Firm" + RecordTypeCodeGeneral RecordTypeCode = "General" + RecordTypeCodeHighRise RecordTypeCode = "HighRise" + RecordTypeCodePostOfficeBox RecordTypeCode = "PostOfficeBox" + RecordTypeCodeRural RecordTypeCode = "Rural" + RecordTypeCodeStreet RecordTypeCode = "Street" +) + +// Values returns all known values for RecordTypeCode. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RecordTypeCode) Values() []RecordTypeCode { + return []RecordTypeCode{ + "Firm", + "General", + "HighRise", + "PostOfficeBox", + "Rural", + "Street", + } +} + +type ReverseGeocodeAdditionalFeature string + +// Enum values for ReverseGeocodeAdditionalFeature +const ( + ReverseGeocodeAdditionalFeatureTimeZone ReverseGeocodeAdditionalFeature = "TimeZone" + ReverseGeocodeAdditionalFeatureAccess ReverseGeocodeAdditionalFeature = "Access" +) + +// Values returns all known values for ReverseGeocodeAdditionalFeature. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ReverseGeocodeAdditionalFeature) Values() []ReverseGeocodeAdditionalFeature { + return []ReverseGeocodeAdditionalFeature{ + "TimeZone", + "Access", + } +} + +type ReverseGeocodeFilterPlaceType string + +// Enum values for ReverseGeocodeFilterPlaceType +const ( + ReverseGeocodeFilterPlaceTypeLocality ReverseGeocodeFilterPlaceType = "Locality" + ReverseGeocodeFilterPlaceTypeIntersection ReverseGeocodeFilterPlaceType = "Intersection" + ReverseGeocodeFilterPlaceTypeStreet ReverseGeocodeFilterPlaceType = "Street" + ReverseGeocodeFilterPlaceTypePointAddress ReverseGeocodeFilterPlaceType = "PointAddress" + ReverseGeocodeFilterPlaceTypeInterpolatedAddress ReverseGeocodeFilterPlaceType = "InterpolatedAddress" +) + +// Values returns all known values for ReverseGeocodeFilterPlaceType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ReverseGeocodeFilterPlaceType) Values() []ReverseGeocodeFilterPlaceType { + return []ReverseGeocodeFilterPlaceType{ + "Locality", + "Intersection", + "Street", + "PointAddress", + "InterpolatedAddress", + } +} + +type ReverseGeocodeIntendedUse string + +// Enum values for ReverseGeocodeIntendedUse +const ( + // Indicates that results of the operation are for single use, e.g., displaying + // results on a map or presenting options to users. + ReverseGeocodeIntendedUseSingleUse ReverseGeocodeIntendedUse = "SingleUse" + // Indicates that results of the operation may be stored locally. + ReverseGeocodeIntendedUseStorage ReverseGeocodeIntendedUse = "Storage" +) + +// Values returns all known values for ReverseGeocodeIntendedUse. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ReverseGeocodeIntendedUse) Values() []ReverseGeocodeIntendedUse { + return []ReverseGeocodeIntendedUse{ + "SingleUse", + "Storage", + } +} + +type SearchNearbyAdditionalFeature string + +// Enum values for SearchNearbyAdditionalFeature +const ( + SearchNearbyAdditionalFeatureTimeZone SearchNearbyAdditionalFeature = "TimeZone" + SearchNearbyAdditionalFeaturePhonemes SearchNearbyAdditionalFeature = "Phonemes" + SearchNearbyAdditionalFeatureAccess SearchNearbyAdditionalFeature = "Access" + SearchNearbyAdditionalFeatureContact SearchNearbyAdditionalFeature = "Contact" +) + +// Values returns all known values for SearchNearbyAdditionalFeature. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SearchNearbyAdditionalFeature) Values() []SearchNearbyAdditionalFeature { + return []SearchNearbyAdditionalFeature{ + "TimeZone", + "Phonemes", + "Access", + "Contact", + } +} + +type SearchNearbyIntendedUse string + +// Enum values for SearchNearbyIntendedUse +const ( + // Indicates that results of the operation are for single use, e.g., displaying + // results on a map or presenting options to users. + SearchNearbyIntendedUseSingleUse SearchNearbyIntendedUse = "SingleUse" + // Indicates that results of the operation may be stored locally. + SearchNearbyIntendedUseStorage SearchNearbyIntendedUse = "Storage" +) + +// Values returns all known values for SearchNearbyIntendedUse. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SearchNearbyIntendedUse) Values() []SearchNearbyIntendedUse { + return []SearchNearbyIntendedUse{ + "SingleUse", + "Storage", + } +} + +type SearchTextAdditionalFeature string + +// Enum values for SearchTextAdditionalFeature +const ( + SearchTextAdditionalFeatureTimeZone SearchTextAdditionalFeature = "TimeZone" + SearchTextAdditionalFeaturePhonemes SearchTextAdditionalFeature = "Phonemes" + SearchTextAdditionalFeatureAccess SearchTextAdditionalFeature = "Access" + SearchTextAdditionalFeatureContact SearchTextAdditionalFeature = "Contact" +) + +// Values returns all known values for SearchTextAdditionalFeature. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SearchTextAdditionalFeature) Values() []SearchTextAdditionalFeature { + return []SearchTextAdditionalFeature{ + "TimeZone", + "Phonemes", + "Access", + "Contact", + } +} + +type SearchTextIntendedUse string + +// Enum values for SearchTextIntendedUse +const ( + // Indicates that results of the operation are for single use, e.g., displaying + // results on a map or presenting options to users. + SearchTextIntendedUseSingleUse SearchTextIntendedUse = "SingleUse" + // Indicates that results of the operation may be stored locally. + SearchTextIntendedUseStorage SearchTextIntendedUse = "Storage" +) + +// Values returns all known values for SearchTextIntendedUse. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SearchTextIntendedUse) Values() []SearchTextIntendedUse { + return []SearchTextIntendedUse{ + "SingleUse", + "Storage", + } +} + +type SuggestAdditionalFeature string + +// Enum values for SuggestAdditionalFeature +const ( + SuggestAdditionalFeatureCore SuggestAdditionalFeature = "Core" + SuggestAdditionalFeatureTimeZone SuggestAdditionalFeature = "TimeZone" + SuggestAdditionalFeaturePhonemes SuggestAdditionalFeature = "Phonemes" + SuggestAdditionalFeatureAccess SuggestAdditionalFeature = "Access" +) + +// Values returns all known values for SuggestAdditionalFeature. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SuggestAdditionalFeature) Values() []SuggestAdditionalFeature { + return []SuggestAdditionalFeature{ + "Core", + "TimeZone", + "Phonemes", + "Access", + } +} + +type SuggestIntendedUse string + +// Enum values for SuggestIntendedUse +const ( + // Indicates that results of the operation are for single use, e.g., displaying + // results on a map or presenting options to users. + SuggestIntendedUseSingleUse SuggestIntendedUse = "SingleUse" +) + +// Values returns all known values for SuggestIntendedUse. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SuggestIntendedUse) Values() []SuggestIntendedUse { + return []SuggestIntendedUse{ + "SingleUse", + } +} + +type SuggestResultItemType string + +// Enum values for SuggestResultItemType +const ( + SuggestResultItemTypePlace SuggestResultItemType = "Place" + SuggestResultItemTypeQuery SuggestResultItemType = "Query" +) + +// Values returns all known values for SuggestResultItemType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SuggestResultItemType) Values() []SuggestResultItemType { + return []SuggestResultItemType{ + "Place", + "Query", + } +} + +type TypePlacement string + +// Enum values for TypePlacement +const ( + TypePlacementBeforeBaseName TypePlacement = "BeforeBaseName" + TypePlacementAfterBaseName TypePlacement = "AfterBaseName" +) + +// Values returns all known values for TypePlacement. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (TypePlacement) Values() []TypePlacement { + return []TypePlacement{ + "BeforeBaseName", + "AfterBaseName", + } +} + +type ValidationExceptionReason string + +// Enum values for ValidationExceptionReason +const ( + // No such operation is supported. + ValidationExceptionReasonUnknownOperation ValidationExceptionReason = "UnknownOperation" + // The required input is missing. + ValidationExceptionReasonMissing ValidationExceptionReason = "Missing" + // The input cannot be parsed. For example a required JSON document, ARN + // identifier, date value, or numeric field cannot be parsed. + ValidationExceptionReasonCannotParse ValidationExceptionReason = "CannotParse" + // The input is present and parsable, but it is otherwise invalid. For example, a + // required numeric argument is outside the allowed range. + ValidationExceptionReasonFieldValidationFailed ValidationExceptionReason = "FieldValidationFailed" + // The input is invalid but no more specific reason is applicable. + ValidationExceptionReasonOther ValidationExceptionReason = "Other" + // No such field is supported. + ValidationExceptionReasonUnknownField ValidationExceptionReason = "UnknownField" +) + +// Values returns all known values for ValidationExceptionReason. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ValidationExceptionReason) Values() []ValidationExceptionReason { + return []ValidationExceptionReason{ + "UnknownOperation", + "Missing", + "CannotParse", + "FieldValidationFailed", + "Other", + "UnknownField", + } +} + +type ZipClassificationCode string + +// Enum values for ZipClassificationCode +const ( + ZipClassificationCodeMilitary ZipClassificationCode = "Military" + ZipClassificationCodePostOfficeBoxes ZipClassificationCode = "PostOfficeBoxes" + ZipClassificationCodeUnique ZipClassificationCode = "Unique" +) + +// Values returns all known values for ZipClassificationCode. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ZipClassificationCode) Values() []ZipClassificationCode { + return []ZipClassificationCode{ + "Military", + "PostOfficeBoxes", + "Unique", + } +} diff --git a/service/geoplaces/types/errors.go b/service/geoplaces/types/errors.go new file mode 100644 index 00000000000..35d3dedb70d --- /dev/null +++ b/service/geoplaces/types/errors.go @@ -0,0 +1,116 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// You don't have sufficient access to perform this action. +type AccessDeniedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessDeniedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AccessDeniedException" + } + return *e.ErrorCodeOverride +} +func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request processing has failed because of an unknown error, exception or +// failure. +type InternalServerException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalServerException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalServerException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InternalServerException" + } + return *e.ErrorCodeOverride +} +func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The request was denied due to request throttling. +type ThrottlingException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottlingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottlingException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ThrottlingException" + } + return *e.ErrorCodeOverride +} +func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The input fails to satisfy the constraints specified by an AWS service. +type ValidationException struct { + Message *string + + ErrorCodeOverride *string + + Reason ValidationExceptionReason + FieldList []ValidationExceptionField + + 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/geoplaces/types/types.go b/service/geoplaces/types/types.go new file mode 100644 index 00000000000..940c2d502fb --- /dev/null +++ b/service/geoplaces/types/types.go @@ -0,0 +1,1335 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" +) + +// Position of the access point represented by longitude and latitude for a +// vehicle. +type AccessPoint struct { + + // The position, in longitude and latitude. + Position []float64 + + noSmithyDocumentSerde +} + +// Indicates if the access location is restricted. Index correlates to that of an +// access point and indicates if access through this point has some form of +// restriction. +type AccessRestriction struct { + + // Categories of results that results must belong too. + Categories []Category + + // The restriction. + Restricted *bool + + noSmithyDocumentSerde +} + +// The place address. +type Address struct { + + // The number that identifies an address within a street. + AddressNumber *string + + // Name of the block. + // + // Example: Sunny Mansion 203 block: 2 Chome + Block *string + + // The name of the building at the address. + Building *string + + // The country component of the address. + Country *Country + + // The district or division of a locality associated with this address. + District *string + + // Name of the streets in the intersection. + // + // Example: ["Friedrichstraße","Unter den Linden"] + Intersection []string + + // Assembled address value built out of the address components, according to the + // regional postal rules. This is the correctly formatted address. + Label *string + + // The locality or city of the address. + // + // Example: Vancouver . + Locality *string + + // An alphanumeric string included in a postal address to facilitate mail sorting, + // such as post code, postcode, or ZIP code, for which the result should posses. + PostalCode *string + + // The region or state results should be present in. + // + // Example: North Rhine-Westphalia . + Region *Region + + // The name of the street results should be present in. + Street *string + + // Components of the street. + // + // Example: Younge from the "Younge street". + StreetComponents []StreetComponents + + // Name of sub-block. + // + // Example: Sunny Mansion 203 sub-block: 4 + SubBlock *string + + // A subdivision of a district. + // + // Example: Minden-Lübbecke . + SubDistrict *string + + // The sub-region or county for which results should be present in. + SubRegion *SubRegion + + noSmithyDocumentSerde +} + +// Indicates how well the entire input matches the returned. It is equal to 1 if +// all input tokens are recognized and matched. +type AddressComponentMatchScores struct { + + // The house number or address results should have. + AddressNumber float64 + + // Name of the block. + // + // Example: Sunny Mansion 203 block: 2 Chome + Block float64 + + // The name of the building at the address. + Building float64 + + // The alpha-2 or alpha-3 character code for the country that the results will be + // present in. + Country float64 + + // The district or division of a city the results should be present in. + District float64 + + // Name of the streets in the intersection. + // + // Example: ["Friedrichstraße","Unter den Linden"] + Intersection []float64 + + // The city or locality results should be present in. + // + // Example: Vancouver . + Locality float64 + + // An alphanumeric string included in a postal address to facilitate mail sorting, + // such as post code, postcode, or ZIP code, for which the result should posses. + PostalCode float64 + + // The region or state results should be to be present in. + // + // Example: North Rhine-Westphalia . + Region float64 + + // Name of sub-block. + // + // Example: Sunny Mansion 203 sub-block: 4 + SubBlock float64 + + // A subdivision of a district. + // + // Example: Minden-Lübbecke + SubDistrict float64 + + // The sub-region or county for which results should be present in. + SubRegion float64 + + noSmithyDocumentSerde +} + +// How to pronounce the various components of the address or place. +type AddressComponentPhonemes struct { + + // How to pronounce the name of the block. + Block []PhonemeTranscription + + // The alpha-2 or alpha-3 character code for the country that the results will be + // present in. + Country []PhonemeTranscription + + // How to pronounce the district or division of a city results should be present + // in. + District []PhonemeTranscription + + // How to pronounce the city or locality results should be present in. + // + // Example: Vancouver . + Locality []PhonemeTranscription + + // How to pronounce the region or state results should be to be present in. + Region []PhonemeTranscription + + // How to pronounce the name of the street results should be present in. + Street []PhonemeTranscription + + // How to pronounce the name of the sub-block. + SubBlock []PhonemeTranscription + + // How to pronounce the sub-district or division of a city results should be + // present in. + SubDistrict []PhonemeTranscription + + // How to pronounce the sub-region or county for which results should be present + // in. + SubRegion []PhonemeTranscription + + noSmithyDocumentSerde +} + +// Describes how the parts of the response element matched the input query by +// returning the sections of the response which matched to input query terms. +type AutocompleteAddressHighlights struct { + + // The house number or address results should have. + AddressNumber []Highlight + + // Name of the block. Example: Sunny Mansion 203 block: 2 Chome + Block []Highlight + + // The name of the building at the address. + Building []Highlight + + // The alpha-2 or alpha-3 character code for the country that the results will be + // present in. + Country *CountryHighlights + + // The district or division of a city the results should be present in. + District []Highlight + + // Name of the streets in the intersection. For example: e.g. + // ["Friedrichstraße","Unter den Linden"] + Intersection [][]Highlight + + // Indicates the starting and ending indexes for result items where they are + // identified to match the input query. This should be used to provide emphasis to + // output display to make selecting the correct result from a list easier for end + // users. + Label []Highlight + + // The city or locality results should be present in. + // + // Example: Vancouver . + Locality []Highlight + + // An alphanumeric string included in a postal address to facilitate mail sorting, + // such as post code, postcode, or ZIP code for which the result should posses. + PostalCode []Highlight + + // The region or state results should be to be present in. + // + // Example: North Rhine-Westphalia . + Region *RegionHighlights + + // The name of the street results should be present in. + Street []Highlight + + // Name of sub-block. Example Sunny Mansion 203 sub-block: 4 + SubBlock []Highlight + + // Indicates the starting and ending index of the title in the text query that + // match the found title. + SubDistrict []Highlight + + // The sub-region or county for which results should be present in. + SubRegion *SubRegionHighlights + + noSmithyDocumentSerde +} + +// Autocomplete structure which contains a set of inclusion/exclusion properties +// that results must posses in order to be returned as a result. +type AutocompleteFilter struct { + + // The bounding box enclosing the geometric shape (area or line) that an + // individual result covers. + // + // The bounding box formed is defined as a set 4 coordinates: [{westward lng}, + // {southern lat}, {eastward lng}, {northern lat}] + BoundingBox []float64 + + // The Circle that all results must be in. + Circle *FilterCircle + + // A list of countries that all results must be in. Countries are represented by + // either their alpha-2 or alpha-3 character codes. + IncludeCountries []string + + // The included place types. + IncludePlaceTypes []AutocompleteFilterPlaceType + + noSmithyDocumentSerde +} + +// Describes how the parts of the response element matched the input query by +// returning the sections of the response which matched to input query terms. +type AutocompleteHighlights struct { + + // Describes how part of the result address match the input query. + Address *AutocompleteAddressHighlights + + // Indicates where the title field in the result matches the input query. + Title []Highlight + + noSmithyDocumentSerde +} + +// A result matching the input query text. +type AutocompleteResultItem struct { + + // The PlaceId of the place associated with this result. This can be used to look + // up additional details about the result via GetPlace. + // + // This member is required. + PlaceId *string + + // PlaceType describes the type of result entry returned. + // + // This member is required. + PlaceType PlaceType + + // A formatted string for display when presenting this result to an end user. + // + // This member is required. + Title *string + + // The address associated with this result. + Address *Address + + // The distance in meters between the center of the search area and this result. + // Useful to evaluate how far away from the original bias position the result is. + Distance int64 + + // Indicates the starting and ending index of the place in the text query that + // match the found title. + Highlights *AutocompleteHighlights + + // A list of [BCP 47] compliant language codes for the results to be rendered in. If there + // is no data for the result in the requested language, data will be returned in + // the default language for the entry. + // + // [BCP 47]: https://en.wikipedia.org/wiki/IETF_language_tag + Language *string + + // The alpha-2 or alpha-3 character code for the political view of a country. The + // political view applies to the results of the request to represent unresolved + // territorial claims through the point of view of the specified country. + PoliticalView *string + + noSmithyDocumentSerde +} + +// A businesschain is a chain of businesses that belong to the same brand. For +// example 7-11 . +type BusinessChain struct { + + // The Business Chain Id. + Id *string + + // The business chain name. + Name *string + + noSmithyDocumentSerde +} + +// Category of the Place returned. +type Category struct { + + // The category ID. + // + // This member is required. + Id *string + + // The category name. + // + // This member is required. + Name *string + + // Localized name of the category type. + LocalizedName *string + + // Boolean which indicates if this category is the primary offered by the place. + Primary *bool + + noSmithyDocumentSerde +} + +// Indicates how well the input matches the returned element. It is equal to 1 if +// all input tokens are recognized and matched to the title in the result. +type ComponentMatchScores struct { + + // The place's address. + Address *AddressComponentMatchScores + + // Indicates the starting and ending index of the title in the text query that + // match the found title. + Title float64 + + noSmithyDocumentSerde +} + +// Details related to contacts. +type ContactDetails struct { + + // Categories of results that results must belong too. + Categories []Category + + // The contact's label. + Label *string + + // The contact's value. + Value *string + + noSmithyDocumentSerde +} + +// A list of potential contact methods for the result/place. +type Contacts struct { + + // List of emails for contacts of the result. + Emails []ContactDetails + + // List of fax addresses for the result contact. + Faxes []ContactDetails + + // List of phone numbers for the results contact. + Phones []ContactDetails + + // List of website URLs that belong to the result. + Websites []ContactDetails + + noSmithyDocumentSerde +} + +// The alpha-2 or alpha-3 character code for the country that the results will be +// present in. +type Country struct { + + // Country, represented by its alpha 2-character code. + Code2 *string + + // Country, represented by its alpha t-character code. + Code3 *string + + // Name of the country. + Name *string + + noSmithyDocumentSerde +} + +// Indicates the starting and ending index of the country in the text query that +// match the found title. +type CountryHighlights struct { + + // Indicates the starting and ending index of the country code in the text query + // that match the found title. + Code []Highlight + + // Indicates the starting and ending index of the country code in the text query + // that match the found title. + Name []Highlight + + noSmithyDocumentSerde +} + +// The Circle that all results must be in. +type FilterCircle struct { + + // The center position, in longitude and latitude, of the FilterCircle . + // + // This member is required. + Center []float64 + + // The radius, in meters, of the FilterCircle . + // + // This member is required. + Radius *int64 + + noSmithyDocumentSerde +} + +// List of Food types offered by this result. +type FoodType struct { + + // Localized name of the food type. + // + // This member is required. + LocalizedName *string + + // The Food Type Id. + Id *string + + // Boolean which indicates if this food type is the primary offered by the place. + // For example, if a location serves fast food, but also dessert, he primary would + // likely be fast food. + Primary *bool + + noSmithyDocumentSerde +} + +// Geocode structure which contains a set of inclusion/exclusion properties that +// results must posses in order to be returned as a result. +type GeocodeFilter struct { + + // A list of countries that all results must be in. Countries are represented by + // either their alpha-2 or alpha-3 character codes. + IncludeCountries []string + + // The included place types. + IncludePlaceTypes []GeocodeFilterPlaceType + + noSmithyDocumentSerde +} + +// A structured free text query allows you to search for places by the name or +// text representation of specific properties of the place. +type GeocodeQueryComponents struct { + + // The house number or address results should have. + AddressNumber *string + + // The alpha-2 or alpha-3 character code for the country that the results will be + // present in. + Country *string + + // The district or division of a city the results should be present in. + District *string + + // City or locality results should be present in. + // + // Example: Vancouver . + Locality *string + + // An alphanumeric string included in a postal address to facilitate mail sorting, + // such as post code, postcode, or ZIP code for which the result should posses. + PostalCode *string + + // The region or state results should be to be present in. + // + // Example: North Rhine-Westphalia . + Region *string + + // The name of the street results should be present in. + Street *string + + // The sub-region or county for which results should be present in. + SubRegion *string + + noSmithyDocumentSerde +} + +// The Geocoded result. +type GeocodeResultItem struct { + + // The PlaceId of the place you wish to receive the information for. + // + // This member is required. + PlaceId *string + + // A PlaceType is a category that the result place must belong to. + // + // This member is required. + PlaceType PlaceType + + // The localized display name of this result item based on request parameter + // language . + // + // This member is required. + Title *string + + // Position of the access point represent by longitude and latitude. + AccessPoints []AccessPoint + + // The place's address. + Address *Address + + // Boolean indicating if the address provided has been corrected. + AddressNumberCorrected *bool + + // Categories of results that results must belong to. + Categories []Category + + // The distance in meters from the QueryPosition. + Distance int64 + + // List of food types offered by this result. + FoodTypes []FoodType + + // The bounding box enclosing the geometric shape (area or line) that an + // individual result covers. + // + // The bounding box formed is defined as a set 4 coordinates: [{westward lng}, + // {southern lat}, {eastward lng}, {northern lat}] + MapView []float64 + + // Indicates how well the entire input matches the returned. It is equal to 1 if + // all input tokens are recognized and matched. + MatchScores *MatchScoreDetails + + // The alpha-2 or alpha-3 character code for the political view of a country. The + // political view applies to the results of the request to represent unresolved + // territorial claims through the point of view of the specified country. + PoliticalView *string + + // The position in longitude and latitude. + Position []float64 + + // Contains details about the postal code of the place/result. + PostalCodeDetails []PostalCodeDetails + + // The time zone in which the place is located. + TimeZone *TimeZone + + noSmithyDocumentSerde +} + +// Describes how parts of the result response match the input query. +type Highlight struct { + + // End index of the highlight. + EndIndex *int32 + + // Start index of the highlight. + StartIndex *int32 + + // The highlight's value. + Value *string + + noSmithyDocumentSerde +} + +// Details related to the match score. +type MatchScoreDetails struct { + + // Indicates how well the component input matches the returned. It is equal to 1 + // if all input tokens are recognized and matched. + Components *ComponentMatchScores + + // Indicates how well the entire input matches the returned. It is equal to 1 if + // all input tokens are recognized and matched. + Overall float64 + + noSmithyDocumentSerde +} + +// List of opening hours objects. +type OpeningHours struct { + + // Categories of results that results must belong too. + Categories []Category + + // Components of the opening hours object. + Components []OpeningHoursComponents + + // List of opening hours in the format they are displayed in. This can vary by + // result and in most cases represents how the result uniquely formats their + // opening hours. + Display []string + + // Boolean which indicates if the result/place is currently open. + OpenNow *bool + + noSmithyDocumentSerde +} + +// Components of the opening hours object. +type OpeningHoursComponents struct { + + // String which represents the duration of the opening period, such as "PT12H00M" . + OpenDuration *string + + // String which represents the opening hours, such as "T070000" . + OpenTime *string + + // Days or periods when the provided opening hours are in affect. + // + // Example: FREQ:DAILY;BYDAY:MO,TU,WE,TH,SU + Recurrence *string + + noSmithyDocumentSerde +} + +// The phoneme details. +type PhonemeDetails struct { + + // How to pronounce the address. + Address *AddressComponentPhonemes + + // List of PhonemeTranscription . See PhonemeTranscription for fields. + Title []PhonemeTranscription + + noSmithyDocumentSerde +} + +// How to pronounce the various components of the address or place. +type PhonemeTranscription struct { + + // A list of [BCP 47] compliant language codes for the results to be rendered in. If there + // is no data for the result in the requested language, data will be returned in + // the default language for the entry. + // + // [BCP 47]: https://en.wikipedia.org/wiki/IETF_language_tag + Language *string + + // Boolean which indicates if it the preferred pronunciation. + Preferred *bool + + // Value which indicates how to pronounce the value. + Value *string + + noSmithyDocumentSerde +} + +// Contains details about the postal code of the place or result. +type PostalCodeDetails struct { + + // The postal authority or entity. This could be a governmental authority, a + // regulatory authority, or a designated postal operator. + PostalAuthority PostalAuthority + + // An alphanumeric string included in a postal address to facilitate mail sorting, + // such as post code, postcode, or ZIP code for which the result should posses. + PostalCode *string + + // The postal code type. + PostalCodeType PostalCodeType + + // The ZIP Classification Code, or in other words what type of postal code is it. + UspsZip *UspsZip + + // The USPS ZIP+4 Record Type Code. + UspsZipPlus4 *UspsZipPlus4 + + noSmithyDocumentSerde +} + +// Suggestions for refining individual query terms. Suggestions are returned as +// objects which note the term, suggested replacement, and its index in the query. +type QueryRefinement struct { + + // End index of the parsed query. + // + // This member is required. + EndIndex *int32 + + // The sub-string of the original query that is replaced by this query term. + // + // This member is required. + OriginalTerm *string + + // The term that will be suggested to the user. + // + // This member is required. + RefinedTerm *string + + // Start index of the parsed component. + // + // This member is required. + StartIndex *int32 + + noSmithyDocumentSerde +} + +// The region or state results should be to be present in. +// +// Example: North Rhine-Westphalia . +type Region struct { + + // Abbreviated code for a the state, province or region of the country. + // + // Example: BC . + Code *string + + // Name for a the state, province, or region of the country. + // + // Example: British Columbia . + Name *string + + noSmithyDocumentSerde +} + +// Indicates the starting and ending index of the region in the text query that +// match the found title. +type RegionHighlights struct { + + // Indicates the starting and ending index of the region in the text query that + // match the found title. + Code []Highlight + + // Indicates the starting and ending index of the region name in the text query + // that match the found title. + Name []Highlight + + noSmithyDocumentSerde +} + +// The included place types. +type ReverseGeocodeFilter struct { + + // The included place types. + IncludePlaceTypes []ReverseGeocodeFilterPlaceType + + noSmithyDocumentSerde +} + +// The returned location from the Reverse Geocode action. +type ReverseGeocodeResultItem struct { + + // The PlaceId of the place you wish to receive the information for. + // + // This member is required. + PlaceId *string + + // A PlaceType is a category that the result place must belong to. + // + // This member is required. + PlaceType PlaceType + + // The localized display name of this result item based on request parameter + // language . + // + // This member is required. + Title *string + + // Position of the access point represent by longitude and latitude. + AccessPoints []AccessPoint + + // The place's address. + Address *Address + + // Boolean indicating if the address provided has been corrected. + AddressNumberCorrected *bool + + // Categories of results that results must belong to. + Categories []Category + + // The distance in meters from the QueryPosition. + Distance int64 + + // List of food types offered by this result. + FoodTypes []FoodType + + // The bounding box enclosing the geometric shape (area or line) that an + // individual result covers. + // + // The bounding box formed is defined as a set 4 coordinates: [{westward lng}, + // {southern lat}, {eastward lng}, {northern lat}] + MapView []float64 + + // The alpha-2 or alpha-3 character code for the political view of a country. The + // political view applies to the results of the request to represent unresolved + // territorial claims through the point of view of the specified country. + PoliticalView *string + + // The position in longitude and latitude. + Position []float64 + + // Contains details about the postal code of the place/result. + PostalCodeDetails []PostalCodeDetails + + // The time zone in which the place is located. + TimeZone *TimeZone + + noSmithyDocumentSerde +} + +// SearchNearby structure which contains a set of inclusion/exclusion properties +// that results must posses in order to be returned as a result. +type SearchNearbyFilter struct { + + // The bounding box enclosing the geometric shape (area or line) that an + // individual result covers. + // + // The bounding box formed is defined as a set 4 coordinates: [{westward lng}, + // {southern lat}, {eastward lng}, {northern lat}] + BoundingBox []float64 + + // The Business Chains associated with the place. + ExcludeBusinessChains []string + + // Categories of results that results are excluded from. + ExcludeCategories []string + + // Food types that results are excluded from. + ExcludeFoodTypes []string + + // The Business Chains associated with the place. + IncludeBusinessChains []string + + // Categories of results that results must belong too. + IncludeCategories []string + + // A list of countries that all results must be in. Countries are represented by + // either their alpha-2 or alpha-3 character codes. + IncludeCountries []string + + // Food types that results are included from. + IncludeFoodTypes []string + + noSmithyDocumentSerde +} + +// The search results of nearby places. +type SearchNearbyResultItem struct { + + // The PlaceId of the place you wish to receive the information for. + // + // This member is required. + PlaceId *string + + // A PlaceType is a category that the result place must belong to. + // + // This member is required. + PlaceType PlaceType + + // The item's title. + // + // This member is required. + Title *string + + // Position of the access point represent by longitude and latitude. + AccessPoints []AccessPoint + + // Indicates known access restrictions on a vehicle access point. The index + // correlates to an access point and indicates if access through this point has + // some form of restriction. + AccessRestrictions []AccessRestriction + + // The place's address. + Address *Address + + // Boolean indicating if the address provided has been corrected. + AddressNumberCorrected *bool + + // The Business Chains associated with the place. + BusinessChains []BusinessChain + + // Categories of results that results must belong to. + Categories []Category + + // List of potential contact methods for the result/place. + Contacts *Contacts + + // The distance in meters from the QueryPosition. + Distance int64 + + // List of food types offered by this result. + FoodTypes []FoodType + + // The bounding box enclosing the geometric shape (area or line) that an + // individual result covers. + // + // The bounding box formed is defined as a set 4 coordinates: [{westward lng}, + // {southern lat}, {eastward lng}, {northern lat}] + MapView []float64 + + // List of opening hours objects. + OpeningHours []OpeningHours + + // How the various components of the result's address are pronounced in various + // languages. + Phonemes *PhonemeDetails + + // The alpha-2 or alpha-3 character code for the political view of a country. The + // political view applies to the results of the request to represent unresolved + // territorial claims through the point of view of the specified country. + PoliticalView *string + + // The position in longitude and latitude. + Position []float64 + + // The time zone in which the place is located. + TimeZone *TimeZone + + noSmithyDocumentSerde +} + +// SearchText structure which contains a set of inclusion/exclusion properties +// that results must posses in order to be returned as a result. +type SearchTextFilter struct { + + // The bounding box enclosing the geometric shape (area or line) that an + // individual result covers. + // + // The bounding box formed is defined as a set 4 coordinates: [{westward lng}, + // {southern lat}, {eastward lng}, {northern lat}] + BoundingBox []float64 + + // The Circle that all results must be in. + Circle *FilterCircle + + // A list of countries that all results must be in. Countries are represented by + // either their alpha-2 or alpha-3 character codes. + IncludeCountries []string + + noSmithyDocumentSerde +} + +// The text search result. +type SearchTextResultItem struct { + + // The PlaceId of the place you wish to receive the information for. + // + // This member is required. + PlaceId *string + + // A PlaceType is a category that the result place must belong to. + // + // This member is required. + PlaceType PlaceType + + // The item's title. + // + // This member is required. + Title *string + + // Position of the access point represent by longitude and latitude. + AccessPoints []AccessPoint + + // Indicates known access restrictions on a vehicle access point. The index + // correlates to an access point and indicates if access through this point has + // some form of restriction. + AccessRestrictions []AccessRestriction + + // The place's address. + Address *Address + + // Boolean indicating if the address provided has been corrected. + AddressNumberCorrected *bool + + // The Business Chains associated with the place. + BusinessChains []BusinessChain + + // Categories of results that results must belong to. + Categories []Category + + // List of potential contact methods for the result/place. + Contacts *Contacts + + // The distance in meters from the QueryPosition. + Distance int64 + + // List of food types offered by this result. + FoodTypes []FoodType + + // The bounding box enclosing the geometric shape (area or line) that an + // individual result covers. + // + // The bounding box formed is defined as a set 4 coordinates: [{westward lng}, + // {southern lat}, {eastward lng}, {northern lat}] + MapView []float64 + + // List of opening hours objects. + OpeningHours []OpeningHours + + // How the various components of the result's address are pronounced in various + // languages. + Phonemes *PhonemeDetails + + // The alpha-2 or alpha-3 character code for the political view of a country. The + // political view applies to the results of the request to represent unresolved + // territorial claims through the point of view of the specified country. + PoliticalView *string + + // The position, in longitude and latitude. + Position []float64 + + // The time zone in which the place is located. + TimeZone *TimeZone + + noSmithyDocumentSerde +} + +// Components of a street. +type StreetComponents struct { + + // Base name part of the street name. + // + // Example: Younge from the “Younge street". + BaseName *string + + // Indicates the official directional identifiers assigned to highways. + Direction *string + + // A [BCP 47] compliant language codes for the results to be rendered in. If there is no + // data for the result in the requested language, data will be returned in the + // default language for the entry. + // + // [BCP 47]: https://en.wikipedia.org/wiki/IETF_language_tag + Language *string + + // A prefix is a directional identifier that precedes, but is not included in, the + // base name of a road. + // + // Example: E for East. + Prefix *string + + // A suffix is a directional identifier that follows, but is not included in, the + // base name of a road. + // + // Example W for West. + Suffix *string + + // Street type part of the street name. + // + // Example: “avenue" . + Type *string + + // Defines if the street type is before or after the base name. + TypePlacement TypePlacement + + // What character(s) separates the string from its type. + TypeSeparator *string + + noSmithyDocumentSerde +} + +// The sub-region. +type SubRegion struct { + + // Abbreviated code for the county or sub-region. + Code *string + + // Name for the county or sub-region. + Name *string + + noSmithyDocumentSerde +} + +// Indicates the starting and ending index of the sub-region in the text query +// that match the found title. +type SubRegionHighlights struct { + + // Indicates the starting and ending index of the sub-region in the text query + // that match the found title. + Code []Highlight + + // Indicates the starting and ending index of the name in the text query that + // match the found title. + Name []Highlight + + noSmithyDocumentSerde +} + +// Describes how the parts of the textQuery matched the input query by returning +// the sections of the response which matched to textQuery terms. +type SuggestAddressHighlights struct { + + // Indicates the starting and ending indexes of the places in the result which + // were identified to match the textQuery. This result is useful for providing + // emphasis to results where the user query directly matched to make selecting the + // correct result from a list easier for an end user. + Label []Highlight + + noSmithyDocumentSerde +} + +// SuggestFilter structure which contains a set of inclusion/exclusion properties +// that results must posses in order to be returned as a result. +type SuggestFilter struct { + + // The bounding box enclosing the geometric shape (area or line) that an + // individual result covers. + // + // The bounding box formed is defined as a set 4 coordinates: [{westward lng}, + // {southern lat}, {eastward lng}, {northern lat}] + BoundingBox []float64 + + // The Circle that all results must be in. + Circle *FilterCircle + + // A list of countries that all results must be in. Countries are represented by + // either their alpha-2 or alpha-3 character codes. + IncludeCountries []string + + noSmithyDocumentSerde +} + +// Describes how the parts of the textQuery matched the input query by returning +// the sections of the response which matched to textQuery terms. +type SuggestHighlights struct { + + // The place's address. + Address *SuggestAddressHighlights + + // Indicates the starting and ending index of the title in the text query that + // match the found title. + Title []Highlight + + noSmithyDocumentSerde +} + +// The suggested place results. +type SuggestPlaceResult struct { + + // Position of the access point represent by longitude and latitude. + AccessPoints []AccessPoint + + // Indicates known access restrictions on a vehicle access point. The index + // correlates to an access point and indicates if access through this point has + // some form of restriction. + AccessRestrictions []AccessRestriction + + // The place's address. + Address *Address + + // The Business Chains associated with the place. + BusinessChains []BusinessChain + + // Categories of results that results must belong to. + Categories []Category + + // The distance in meters from the QueryPosition. + Distance int64 + + // List of food types offered by this result. + FoodTypes []FoodType + + // The bounding box enclosing the geometric shape (area or line) that an + // individual result covers. + // + // The bounding box formed is defined as a set 4 coordinates: [{westward lng}, + // {southern lat}, {eastward lng}, {northern lat}] + MapView []float64 + + // How the various components of the result's address are pronounced in various + // languages. + Phonemes *PhonemeDetails + + // The PlaceId of the place you wish to receive the information for. + PlaceId *string + + // A PlaceType is a category that the result place must belong to. + PlaceType PlaceType + + // The alpha-2 or alpha-3 character code for the political view of a country. The + // political view applies to the results of the request to represent unresolved + // territorial claims through the point of view of the specified country. + PoliticalView *string + + // The position, in longitude and latitude. + Position []float64 + + // The time zone in which the place is located. + TimeZone *TimeZone + + noSmithyDocumentSerde +} + +// The suggested query results. +type SuggestQueryResult struct { + + // QueryId can be used to complete a follow up query through the SearchText API. + // The QueryId retains context from the original Suggest request such as filters, + // political view and language. See the SearchText API documentation for more + // details [SearchText API docs]. + // + // [SearchText API docs]: https://docs.aws.amazon.com/latest/APIReference/API_geoplaces_SearchText.html + QueryId *string + + // The query type. Category qeuries will search for places which have an entry + // matching the given category, for example "doctor office". BusinessChain queries + // will search for instances of a given business. + QueryType QueryType + + noSmithyDocumentSerde +} + +// The resulting item from the suggested query. +type SuggestResultItem struct { + + // The result type. Place results represent the final result for a point of + // interest, Query results represent a follow up query which can be completed + // through the SearchText operation. + // + // This member is required. + SuggestResultItemType SuggestResultItemType + + // The display title that should be used when presenting this option to the end + // user. + // + // This member is required. + Title *string + + // Describes how the parts of the response element matched the input query by + // returning the sections of the response which matched to input query terms. + Highlights *SuggestHighlights + + // The suggested place by its unique ID. + Place *SuggestPlaceResult + + // The suggested query results. + Query *SuggestQueryResult + + noSmithyDocumentSerde +} + +// The time zone in which the place is located. +type TimeZone struct { + + // The time zone name. + // + // This member is required. + Name *string + + // Time zone offset of the timezone from UTC. + Offset *string + + // The offset of the time zone from UTC, in seconds. + OffsetSeconds int64 + + noSmithyDocumentSerde +} + +// The USPS zip code. +type UspsZip struct { + + // The ZIP Classification Code, or in other words what type of postal code is it. + ZipClassificationCode ZipClassificationCode + + noSmithyDocumentSerde +} + +// The USPS zip+4 code. +type UspsZipPlus4 struct { + + // The USPS ZIP+4 Record Type Code. + RecordTypeCode RecordTypeCode + + noSmithyDocumentSerde +} + +// The input fails to satisfy the constraints specified by the Amazon Location +// service. +type ValidationExceptionField struct { + + // The error message. + // + // This member is required. + Message *string + + // The name of the resource. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/geoplaces/validators.go b/service/geoplaces/validators.go new file mode 100644 index 00000000000..e415186fc09 --- /dev/null +++ b/service/geoplaces/validators.go @@ -0,0 +1,326 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package geoplaces + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/geoplaces/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpAutocomplete struct { +} + +func (*validateOpAutocomplete) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAutocomplete) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AutocompleteInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAutocompleteInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetPlace struct { +} + +func (*validateOpGetPlace) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetPlace) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetPlaceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetPlaceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpReverseGeocode struct { +} + +func (*validateOpReverseGeocode) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpReverseGeocode) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ReverseGeocodeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpReverseGeocodeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpSearchNearby struct { +} + +func (*validateOpSearchNearby) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSearchNearby) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SearchNearbyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSearchNearbyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpSearchText struct { +} + +func (*validateOpSearchText) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSearchText) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SearchTextInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSearchTextInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpSuggest struct { +} + +func (*validateOpSuggest) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSuggest) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SuggestInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSuggestInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpAutocompleteValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAutocomplete{}, middleware.After) +} + +func addOpGetPlaceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetPlace{}, middleware.After) +} + +func addOpReverseGeocodeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpReverseGeocode{}, middleware.After) +} + +func addOpSearchNearbyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSearchNearby{}, middleware.After) +} + +func addOpSearchTextValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSearchText{}, middleware.After) +} + +func addOpSuggestValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSuggest{}, middleware.After) +} + +func validateAutocompleteFilter(v *types.AutocompleteFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AutocompleteFilter"} + if v.Circle != nil { + if err := validateFilterCircle(v.Circle); err != nil { + invalidParams.AddNested("Circle", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFilterCircle(v *types.FilterCircle) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FilterCircle"} + if v.Center == nil { + invalidParams.Add(smithy.NewErrParamRequired("Center")) + } + if v.Radius == nil { + invalidParams.Add(smithy.NewErrParamRequired("Radius")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSearchTextFilter(v *types.SearchTextFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchTextFilter"} + if v.Circle != nil { + if err := validateFilterCircle(v.Circle); err != nil { + invalidParams.AddNested("Circle", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSuggestFilter(v *types.SuggestFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SuggestFilter"} + if v.Circle != nil { + if err := validateFilterCircle(v.Circle); err != nil { + invalidParams.AddNested("Circle", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAutocompleteInput(v *AutocompleteInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AutocompleteInput"} + if v.QueryText == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryText")) + } + if v.Filter != nil { + if err := validateAutocompleteFilter(v.Filter); err != nil { + invalidParams.AddNested("Filter", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetPlaceInput(v *GetPlaceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetPlaceInput"} + if v.PlaceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PlaceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpReverseGeocodeInput(v *ReverseGeocodeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ReverseGeocodeInput"} + if v.QueryPosition == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryPosition")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpSearchNearbyInput(v *SearchNearbyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchNearbyInput"} + if v.QueryPosition == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryPosition")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpSearchTextInput(v *SearchTextInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchTextInput"} + if v.Filter != nil { + if err := validateSearchTextFilter(v.Filter); err != nil { + invalidParams.AddNested("Filter", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpSuggestInput(v *SuggestInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SuggestInput"} + if v.QueryText == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryText")) + } + if v.Filter != nil { + if err := validateSuggestFilter(v.Filter); err != nil { + invalidParams.AddNested("Filter", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/georoutes/LICENSE.txt b/service/georoutes/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/georoutes/LICENSE.txt @@ -0,0 +1,202 @@ + + 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/georoutes/api_client.go b/service/georoutes/api_client.go new file mode 100644 index 00000000000..21b72c7af83 --- /dev/null +++ b/service/georoutes/api_client.go @@ -0,0 +1,913 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package georoutes + +import ( + "context" + "errors" + "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/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net" + "net/http" + "sync/atomic" + "time" +) + +const ServiceID = "Geo Routes" +const ServiceAPIVersion = "2020-11-19" + +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/georoutes") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/georoutes") +} + +// Client provides the API client to make operations call for Amazon Location +// Service Routes V2. +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) + + resolveTracerProvider(&options) + + resolveMeterProvider(&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) + ctx = middleware.WithServiceID(ctx, ServiceID) + ctx = middleware.WithOperationName(ctx, opID) + + 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 + } + } + + ctx, err = withOperationMetrics(ctx, options.MeterProvider) + if err != nil { + return nil, metadata, err + } + + tracer := operationTracer(options.TracerProvider) + spanName := fmt.Sprintf("%s.%s", ServiceID, opID) + + ctx = tracing.WithOperationTracer(ctx, tracer) + + ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { + o.Kind = tracing.SpanKindClient + o.Properties.Set("rpc.system", "aws-api") + o.Properties.Set("rpc.method", opID) + o.Properties.Set("rpc.service", ServiceID) + }) + endTimer := startMetricTimer(ctx, "client.call.duration") + defer endTimer() + defer span.End() + + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/georoutes") + }) + decorated := middleware.DecorateHandler(handler, stack) + result, metadata, err = decorated.Handle(ctx, params) + if err != nil { + span.SetProperty("exception.type", fmt.Sprintf("%T", err)) + span.SetProperty("exception.message", err.Error()) + + var aerr smithy.APIError + if errors.As(err, &aerr) { + span.SetProperty("api.error_code", aerr.ErrorCode()) + span.SetProperty("api.error_message", aerr.ErrorMessage()) + span.SetProperty("api.error_fault", aerr.ErrorFault().String()) + } + + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + + span.SetProperty("error", err != nil) + if err == nil { + span.SetStatus(tracing.SpanStatusOK) + } else { + span.SetStatus(tracing.SpanStatusError) + } + + 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{options: options}, "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, + } + 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, "georoutes", 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 addSpanRetryLoop(stack *middleware.Stack, options Options) error { + return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) +} + +type spanRetryLoop struct { + options Options +} + +func (*spanRetryLoop) ID() string { + return "spanRetryLoop" +} + +func (m *spanRetryLoop) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + middleware.FinalizeOutput, middleware.Metadata, error, +) { + tracer := operationTracer(m.options.TracerProvider) + ctx, span := tracer.StartSpan(ctx, "RetryLoop") + defer span.End() + + return next.HandleFinalize(ctx, in) +} +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() + m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/georoutes") + }) + 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 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 resolveTracerProvider(options *Options) { + if options.TracerProvider == nil { + options.TracerProvider = &tracing.NopTracerProvider{} + } +} + +func resolveMeterProvider(options *Options) { + if options.MeterProvider == nil { + options.MeterProvider = metrics.NopMeterProvider{} + } +} + +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) +} + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/service/georoutes/api_client_test.go b/service/georoutes/api_client_test.go new file mode 100644 index 00000000000..c6aef286718 --- /dev/null +++ b/service/georoutes/api_client_test.go @@ -0,0 +1,127 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package georoutes + +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/georoutes/api_op_CalculateIsolines.go b/service/georoutes/api_op_CalculateIsolines.go new file mode 100644 index 00000000000..5f116601816 --- /dev/null +++ b/service/georoutes/api_op_CalculateIsolines.go @@ -0,0 +1,290 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package georoutes + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/georoutes/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Use the CalculateIsolines action to find service areas that can be reached in a +// given threshold of time, distance. +func (c *Client) CalculateIsolines(ctx context.Context, params *CalculateIsolinesInput, optFns ...func(*Options)) (*CalculateIsolinesOutput, error) { + if params == nil { + params = &CalculateIsolinesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CalculateIsolines", params, optFns, c.addOperationCalculateIsolinesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CalculateIsolinesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CalculateIsolinesInput struct { + + // Threshold to be used for the isoline calculation. Up to 3 thresholds per + // provided type can be requested. + // + // This member is required. + Thresholds *types.IsolineThresholds + + // Features that are allowed while calculating. a route + Allow *types.IsolineAllowOptions + + // Time of arrival at the destination. + // + // Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm + // + // Examples: + // + // 2020-04-22T17:57:24Z + // + // 2020-04-22T17:57:24+02:00 + ArrivalTime *string + + // Features that are avoided while calculating a route. Avoidance is on a + // best-case basis. If an avoidance can't be satisfied for a particular case, it + // violates the avoidance and the returned response produces a notice for the + // violation. + Avoid *types.IsolineAvoidanceOptions + + // Uses the current time as the time of departure. + DepartNow *bool + + // Time of departure from thr origin. + // + // Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm + // + // Examples: + // + // 2020-04-22T17:57:24Z + // + // 2020-04-22T17:57:24+02:00 + DepartureTime *string + + // The final position for the route. In the World Geodetic System (WGS 84) format: + // [longitude, latitude] . + Destination []float64 + + // Destination related options. + DestinationOptions *types.IsolineDestinationOptions + + // The format of the returned IsolineGeometry. + // + // Default Value: FlexiblePolyline + IsolineGeometryFormat types.GeometryFormat + + // Defines the granularity of the returned Isoline + IsolineGranularity *types.IsolineGranularityOptions + + // Optional: The API key to be used for authorization. Either an API key or valid + // SigV4 signature must be provided when making a request. + Key *string + + // Specifies the optimization criteria for when calculating an isoline. + // AccurateCalculation generates an isoline of higher granularity that is more + // precise. FastCalculation generates an isoline faster by reducing the + // granularity, and in turn the quality of the isoline. BalancedCalculation + // generates an isoline by balancing between quality and performance. + // + // Default Value: BalancedCalculation + OptimizeIsolineFor types.IsolineOptimizationObjective + + // Specifies the optimization criteria for calculating a route. + // + // Default Value: FastestRoute + OptimizeRoutingFor types.RoutingObjective + + // The start position for the route. + Origin []float64 + + // Origin related options. + OriginOptions *types.IsolineOriginOptions + + // Traffic related options. + Traffic *types.IsolineTrafficOptions + + // Specifies the mode of transport when calculating a route. Used in estimating + // the speed of travel and road compatibility. + // + // The mode Scooter also applies to motorcycles, set to Scooter when wanted to + // calculate options for motorcycles. + // + // Default Value: Car + TravelMode types.IsolineTravelMode + + // Travel mode related options for the provided travel mode. + TravelModeOptions *types.IsolineTravelModeOptions + + noSmithyDocumentSerde +} + +type CalculateIsolinesOutput struct { + + // The format of the returned IsolineGeometry. + // + // Default Value: FlexiblePolyline + // + // This member is required. + IsolineGeometryFormat types.GeometryFormat + + // Calculated isolines and associated properties. + // + // This member is required. + Isolines []types.Isoline + + // The pricing bucket for which the query is charged at. + // + // This member is required. + PricingBucket *string + + // Time of arrival at the destination. This parameter is returned only if the + // Destination parameters was provided in the request. + // + // Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm + // + // Examples: + // + // 2020-04-22T17:57:24Z + // + // 2020-04-22T17:57:24+02:00 + ArrivalTime *string + + // Time of departure from thr origin. + // + // Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm + // + // Examples: + // + // 2020-04-22T17:57:24Z + // + // 2020-04-22T17:57:24+02:00 + DepartureTime *string + + // Snapped destination that was used for the Isoline calculation. + SnappedDestination []float64 + + // Snapped origin that was used for the Isoline calculation. + SnappedOrigin []float64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCalculateIsolinesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCalculateIsolines{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCalculateIsolines{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CalculateIsolines"); 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 = addSpanRetryLoop(stack, options); 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 = addOpCalculateIsolinesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCalculateIsolines(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCalculateIsolines(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CalculateIsolines", + } +} diff --git a/service/georoutes/api_op_CalculateRouteMatrix.go b/service/georoutes/api_op_CalculateRouteMatrix.go new file mode 100644 index 00000000000..a693c65c92e --- /dev/null +++ b/service/georoutes/api_op_CalculateRouteMatrix.go @@ -0,0 +1,246 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package georoutes + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/georoutes/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Calculates route matrix containing the results for all pairs of Origins to +// Destinations. Each row corresponds to one entry in Origins. Each entry in the +// row corresponds to the route from that entry in Origins to an entry in +// Destinations positions. +func (c *Client) CalculateRouteMatrix(ctx context.Context, params *CalculateRouteMatrixInput, optFns ...func(*Options)) (*CalculateRouteMatrixOutput, error) { + if params == nil { + params = &CalculateRouteMatrixInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CalculateRouteMatrix", params, optFns, c.addOperationCalculateRouteMatrixMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CalculateRouteMatrixOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CalculateRouteMatrixInput struct { + + // List of destinations for the route. + // + // This member is required. + Destinations []types.RouteMatrixDestination + + // The position in longitude and latitude for the origin. + // + // This member is required. + Origins []types.RouteMatrixOrigin + + // Boundary within which the matrix is to be calculated. All data, origins and + // destinations outside the boundary are considered invalid. + // + // When request routing boundary was set as AutoCircle, the response routing + // boundary will return Circle derived from the AutoCircle settings. + // + // This member is required. + RoutingBoundary *types.RouteMatrixBoundary + + // Features that are allowed while calculating. a route + Allow *types.RouteMatrixAllowOptions + + // Features that are avoided while calculating a route. Avoidance is on a + // best-case basis. If an avoidance can't be satisfied for a particular case, it + // violates the avoidance and the returned response produces a notice for the + // violation. + Avoid *types.RouteMatrixAvoidanceOptions + + // Uses the current time as the time of departure. + DepartNow *bool + + // Time of departure from thr origin. + // + // Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm + // + // Examples: + // + // 2020-04-22T17:57:24Z + // + // 2020-04-22T17:57:24+02:00 + DepartureTime *string + + // Features to be strictly excluded while calculating the route. + Exclude *types.RouteMatrixExclusionOptions + + // Optional: The API key to be used for authorization. Either an API key or valid + // SigV4 signature must be provided when making a request. + Key *string + + // Specifies the optimization criteria for calculating a route. + // + // Default Value: FastestRoute + OptimizeRoutingFor types.RoutingObjective + + // Traffic related options. + Traffic *types.RouteMatrixTrafficOptions + + // Specifies the mode of transport when calculating a route. Used in estimating + // the speed of travel and road compatibility. + // + // Default Value: Car + TravelMode types.RouteMatrixTravelMode + + // Travel mode related options for the provided travel mode. + TravelModeOptions *types.RouteMatrixTravelModeOptions + + noSmithyDocumentSerde +} + +type CalculateRouteMatrixOutput struct { + + // The count of error results in the route matrix. If this number is 0, all routes + // were calculated successfully. + // + // This member is required. + ErrorCount *int32 + + // The pricing bucket for which the query is charged at. + // + // This member is required. + PricingBucket *string + + // The calculated route matrix containing the results for all pairs of Origins to + // Destination positions. Each row corresponds to one entry in Origins. Each entry + // in the row corresponds to the route from that entry in Origins to an entry in + // Destination positions. + // + // This member is required. + RouteMatrix [][]types.RouteMatrixEntry + + // Boundary within which the matrix is to be calculated. All data, origins and + // destinations outside the boundary are considered invalid. + // + // When request routing boundary was set as AutoCircle, the response routing + // boundary will return Circle derived from the AutoCircle settings. + // + // This member is required. + RoutingBoundary *types.RouteMatrixBoundary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCalculateRouteMatrixMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCalculateRouteMatrix{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCalculateRouteMatrix{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CalculateRouteMatrix"); 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 = addSpanRetryLoop(stack, options); 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 = addOpCalculateRouteMatrixValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCalculateRouteMatrix(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCalculateRouteMatrix(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CalculateRouteMatrix", + } +} diff --git a/service/georoutes/api_op_CalculateRoutes.go b/service/georoutes/api_op_CalculateRoutes.go new file mode 100644 index 00000000000..0a13dd2120c --- /dev/null +++ b/service/georoutes/api_op_CalculateRoutes.go @@ -0,0 +1,314 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package georoutes + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/georoutes/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Calculates a route given the following required parameters: Origin and +// Destination . +func (c *Client) CalculateRoutes(ctx context.Context, params *CalculateRoutesInput, optFns ...func(*Options)) (*CalculateRoutesOutput, error) { + if params == nil { + params = &CalculateRoutesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CalculateRoutes", params, optFns, c.addOperationCalculateRoutesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CalculateRoutesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CalculateRoutesInput struct { + + // The final position for the route. In the World Geodetic System (WGS 84) format: + // [longitude, latitude] . + // + // This member is required. + Destination []float64 + + // The start position for the route. + // + // This member is required. + Origin []float64 + + // Features that are allowed while calculating. a route + Allow *types.RouteAllowOptions + + // Time of arrival at the destination. + // + // Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm + // + // Examples: + // + // 2020-04-22T17:57:24Z + // + // 2020-04-22T17:57:24+02:00 + ArrivalTime *string + + // Features that are avoided while calculating a route. Avoidance is on a + // best-case basis. If an avoidance can't be satisfied for a particular case, it + // violates the avoidance and the returned response produces a notice for the + // violation. + Avoid *types.RouteAvoidanceOptions + + // Uses the current time as the time of departure. + DepartNow *bool + + // Time of departure from thr origin. + // + // Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm + // + // Examples: + // + // 2020-04-22T17:57:24Z + // + // 2020-04-22T17:57:24+02:00 + DepartureTime *string + + // Destination related options. + DestinationOptions *types.RouteDestinationOptions + + // Driver related options. + Driver *types.RouteDriverOptions + + // Features to be strictly excluded while calculating the route. + Exclude *types.RouteExclusionOptions + + // Measurement system to be used for instructions within steps in the response. + InstructionsMeasurementSystem types.MeasurementSystem + + // Optional: The API key to be used for authorization. Either an API key or valid + // SigV4 signature must be provided when making a request. + Key *string + + // List of languages for instructions within steps in the response. + // + // Instructions in the requested language are returned only if they are available. + Languages []string + + // A list of optional additional parameters such as timezone that can be requested + // for each result. + // + // - Elevation : Retrieves the elevation information for each location. + // + // - Incidents : Provides information on traffic incidents along the route. + // + // - PassThroughWaypoints : Indicates waypoints that are passed through without + // stopping. + // + // - Summary : Returns a summary of the route, including distance and duration. + // + // - Tolls : Supplies toll cost information along the route. + // + // - TravelStepInstructions : Provides step-by-step instructions for travel along + // the route. + // + // - TruckRoadTypes : Returns information about road types suitable for trucks. + // + // - TypicalDuration : Gives typical travel duration based on historical data. + // + // - Zones : Specifies the time zone information for each waypoint. + LegAdditionalFeatures []types.RouteLegAdditionalFeature + + // Specifies the format of the geometry returned for each leg of the route. You + // can choose between two different geometry encoding formats. + // + // FlexiblePolyline : A compact and precise encoding format for the leg geometry. + // For more information on the format, see the GitHub repository for [FlexiblePolyline] + // FlexiblePolyline . + // + // Simple : A less compact encoding, which is easier to decode but may be less + // precise and result in larger payloads. + // + // [FlexiblePolyline]: https://github.com/heremaps/flexible-polyline + LegGeometryFormat types.GeometryFormat + + // Maximum number of alternative routes to be provided in the response, if + // available. + MaxAlternatives *int32 + + // Specifies the optimization criteria for calculating a route. + // + // Default Value: FastestRoute + OptimizeRoutingFor types.RoutingObjective + + // Origin related options. + OriginOptions *types.RouteOriginOptions + + // A list of optional features such as SpeedLimit that can be requested for a + // Span. A span is a section of a Leg for which the requested features have the + // same values. + SpanAdditionalFeatures []types.RouteSpanAdditionalFeature + + // Toll related options. + Tolls *types.RouteTollOptions + + // Traffic related options. + Traffic *types.RouteTrafficOptions + + // Specifies the mode of transport when calculating a route. Used in estimating + // the speed of travel and road compatibility. + // + // Default Value: Car + TravelMode types.RouteTravelMode + + // Travel mode related options for the provided travel mode. + TravelModeOptions *types.RouteTravelModeOptions + + // Type of step returned by the response. Default provides basic steps intended + // for web based applications. TurnByTurn provides detailed instructions with more + // granularity intended for a turn based naviagtion system. + TravelStepType types.RouteTravelStepType + + // List of waypoints between the Origin and Destination. + Waypoints []types.RouteWaypoint + + noSmithyDocumentSerde +} + +type CalculateRoutesOutput struct { + + // Specifies the format of the geometry returned for each leg of the route. + // + // This member is required. + LegGeometryFormat types.GeometryFormat + + // Notices are additional information returned that indicate issues that occurred + // during route calculation. + // + // This member is required. + Notices []types.RouteResponseNotice + + // The pricing bucket for which the query is charged at. + // + // This member is required. + PricingBucket *string + + // The path from the origin to the destination. + // + // This member is required. + Routes []types.Route + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCalculateRoutesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCalculateRoutes{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCalculateRoutes{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CalculateRoutes"); 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 = addSpanRetryLoop(stack, options); 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 = addOpCalculateRoutesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCalculateRoutes(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCalculateRoutes(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CalculateRoutes", + } +} diff --git a/service/georoutes/api_op_OptimizeWaypoints.go b/service/georoutes/api_op_OptimizeWaypoints.go new file mode 100644 index 00000000000..68cd9bc8fc0 --- /dev/null +++ b/service/georoutes/api_op_OptimizeWaypoints.go @@ -0,0 +1,251 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package georoutes + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/georoutes/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Calculates the optimal order to travel between a set of waypoints to minimize +// either the travel time or the distance travelled during the journey, based on +// road network restrictions and the traffic pattern data. +func (c *Client) OptimizeWaypoints(ctx context.Context, params *OptimizeWaypointsInput, optFns ...func(*Options)) (*OptimizeWaypointsOutput, error) { + if params == nil { + params = &OptimizeWaypointsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "OptimizeWaypoints", params, optFns, c.addOperationOptimizeWaypointsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*OptimizeWaypointsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type OptimizeWaypointsInput struct { + + // The start position for the route. + // + // This member is required. + Origin []float64 + + // Features that are avoided while calculating a route. Avoidance is on a + // best-case basis. If an avoidance can't be satisfied for a particular case, this + // setting is ignored. + Avoid *types.WaypointOptimizationAvoidanceOptions + + // Departure time from the waypoint. + // + // Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm + // + // Examples: + // + // 2020-04-22T17:57:24Z + // + // 2020-04-22T17:57:24+02:00 + DepartureTime *string + + // The final position for the route in the World Geodetic System (WGS 84) format: + // [longitude, latitude] . + Destination []float64 + + // Destination related options. + DestinationOptions *types.WaypointOptimizationDestinationOptions + + // Driver related options. + Driver *types.WaypointOptimizationDriverOptions + + // Features to be strictly excluded while calculating the route. + Exclude *types.WaypointOptimizationExclusionOptions + + // Optional: The API key to be used for authorization. Either an API key or valid + // SigV4 signature must be provided when making a request. + Key *string + + // Specifies the optimization criteria for the calculated sequence. + // + // Default Value: FastestRoute . + OptimizeSequencingFor types.WaypointOptimizationSequencingObjective + + // Origin related options. + OriginOptions *types.WaypointOptimizationOriginOptions + + // Traffic-related options. + Traffic *types.WaypointOptimizationTrafficOptions + + // Specifies the mode of transport when calculating a route. Used in estimating + // the speed of travel and road compatibility. + // + // Default Value: Car + TravelMode types.WaypointOptimizationTravelMode + + // Travel mode related options for the provided travel mode. + TravelModeOptions *types.WaypointOptimizationTravelModeOptions + + // List of waypoints between the Origin and Destination . + Waypoints []types.WaypointOptimizationWaypoint + + noSmithyDocumentSerde +} + +type OptimizeWaypointsOutput struct { + + // Details about the connection from one waypoint to the next, within the + // optimized sequence. + // + // This member is required. + Connections []types.WaypointOptimizationConnection + + // Overall distance to travel the whole sequence. + // + // This member is required. + Distance int64 + + // Overall duration to travel the whole sequence. + // + // Unit: seconds + // + // This member is required. + Duration int64 + + // Returns waypoints that caused the optimization problem to fail, and the + // constraints that were unsatisfied leading to the failure. + // + // This member is required. + ImpedingWaypoints []types.WaypointOptimizationImpedingWaypoint + + // Waypoints in the order of the optimized sequence. + // + // This member is required. + OptimizedWaypoints []types.WaypointOptimizationOptimizedWaypoint + + // The pricing bucket for which the query is charged at. + // + // This member is required. + PricingBucket *string + + // Time breakdown for the sequence. + // + // This member is required. + TimeBreakdown *types.WaypointOptimizationTimeBreakdown + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationOptimizeWaypointsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpOptimizeWaypoints{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpOptimizeWaypoints{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "OptimizeWaypoints"); 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 = addSpanRetryLoop(stack, options); 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 = addOpOptimizeWaypointsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opOptimizeWaypoints(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opOptimizeWaypoints(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "OptimizeWaypoints", + } +} diff --git a/service/georoutes/api_op_SnapToRoads.go b/service/georoutes/api_op_SnapToRoads.go new file mode 100644 index 00000000000..3c281d024cf --- /dev/null +++ b/service/georoutes/api_op_SnapToRoads.go @@ -0,0 +1,203 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package georoutes + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/georoutes/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// The SnapToRoads action matches GPS trace to roads most likely traveled on. +func (c *Client) SnapToRoads(ctx context.Context, params *SnapToRoadsInput, optFns ...func(*Options)) (*SnapToRoadsOutput, error) { + if params == nil { + params = &SnapToRoadsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SnapToRoads", params, optFns, c.addOperationSnapToRoadsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SnapToRoadsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SnapToRoadsInput struct { + + // List of trace points to be snapped onto the road network. + // + // This member is required. + TracePoints []types.RoadSnapTracePoint + + // Optional: The API key to be used for authorization. Either an API key or valid + // SigV4 signature must be provided when making a request. + Key *string + + // The radius around the provided tracepoint that is considered for snapping. + // + // Unit: meters + // + // Default value: 300 + SnapRadius int64 + + // Chooses what the returned SnappedGeometry format should be. + // + // Default Value: FlexiblePolyline + SnappedGeometryFormat types.GeometryFormat + + // Specifies the mode of transport when calculating a route. Used in estimating + // the speed of travel and road compatibility. + // + // Default Value: Car + TravelMode types.RoadSnapTravelMode + + // Travel mode related options for the provided travel mode. + TravelModeOptions *types.RoadSnapTravelModeOptions + + noSmithyDocumentSerde +} + +type SnapToRoadsOutput struct { + + // Notices are additional information returned that indicate issues that occurred + // during route calculation. + // + // This member is required. + Notices []types.RoadSnapNotice + + // The pricing bucket for which the query is charged at. + // + // This member is required. + PricingBucket *string + + // Specifies the format of the geometry returned for each leg of the route. + // + // This member is required. + SnappedGeometryFormat types.GeometryFormat + + // The trace points snapped onto the road network. + // + // This member is required. + SnappedTracePoints []types.RoadSnapSnappedTracePoint + + // The interpolated geometry for the snapped route onto the road network. + SnappedGeometry *types.RoadSnapSnappedGeometry + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSnapToRoadsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpSnapToRoads{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSnapToRoads{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "SnapToRoads"); 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 = addSpanRetryLoop(stack, options); 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 = addOpSnapToRoadsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSnapToRoads(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opSnapToRoads(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "SnapToRoads", + } +} diff --git a/service/georoutes/auth.go b/service/georoutes/auth.go new file mode 100644 index 00000000000..84aefcd09cf --- /dev/null +++ b/service/georoutes/auth.go @@ -0,0 +1,313 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package georoutes + +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/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + 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, "geo-routes") + 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, +) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + + 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) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() + 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, +) { + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) + 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 := timeOperationMetric(ctx, "client.call.resolve_identity_duration", + func() (smithyauth.Identity, error) { + return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) + }, + func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("get identity: %w", err) + } + + ctx = setIdentity(ctx, identity) + + span.End() + 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 { + options Options +} + +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, +) { + _, span := tracing.StartSpan(ctx, "SignRequest") + defer span.End() + + 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") + } + + _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { + return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) + }, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("sign request: %w", err) + } + + span.End() + return next.HandleFinalize(ctx, in) +} diff --git a/service/georoutes/deserializers.go b/service/georoutes/deserializers.go new file mode 100644 index 00000000000..e569dc75333 --- /dev/null +++ b/service/georoutes/deserializers.go @@ -0,0 +1,9873 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package georoutes + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/georoutes/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" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "math" + "strings" + "time" +) + +func deserializeS3Expires(v string) (*time.Time, error) { + t, err := smithytime.ParseHTTPDate(v) + if err != nil { + return nil, nil + } + return &t, nil +} + +type awsRestjson1_deserializeOpCalculateIsolines struct { +} + +func (*awsRestjson1_deserializeOpCalculateIsolines) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCalculateIsolines) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCalculateIsolines(response, &metadata) + } + output := &CalculateIsolinesOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsCalculateIsolinesOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCalculateIsolinesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCalculateIsolines(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsCalculateIsolinesOutput(v *CalculateIsolinesOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-geo-pricing-bucket"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.PricingBucket = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentCalculateIsolinesOutput(v **CalculateIsolinesOutput, 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 *CalculateIsolinesOutput + if *v == nil { + sv = &CalculateIsolinesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ArrivalTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TimestampWithTimezoneOffset to be of type string, got %T instead", value) + } + sv.ArrivalTime = ptr.String(jtv) + } + + case "DepartureTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TimestampWithTimezoneOffset to be of type string, got %T instead", value) + } + sv.DepartureTime = ptr.String(jtv) + } + + case "IsolineGeometryFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GeometryFormat to be of type string, got %T instead", value) + } + sv.IsolineGeometryFormat = types.GeometryFormat(jtv) + } + + case "Isolines": + if err := awsRestjson1_deserializeDocumentIsolineList(&sv.Isolines, value); err != nil { + return err + } + + case "SnappedDestination": + if err := awsRestjson1_deserializeDocumentPosition(&sv.SnappedDestination, value); err != nil { + return err + } + + case "SnappedOrigin": + if err := awsRestjson1_deserializeDocumentPosition(&sv.SnappedOrigin, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCalculateRouteMatrix struct { +} + +func (*awsRestjson1_deserializeOpCalculateRouteMatrix) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCalculateRouteMatrix) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCalculateRouteMatrix(response, &metadata) + } + output := &CalculateRouteMatrixOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsCalculateRouteMatrixOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCalculateRouteMatrixOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCalculateRouteMatrix(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsCalculateRouteMatrixOutput(v *CalculateRouteMatrixOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-geo-pricing-bucket"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.PricingBucket = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentCalculateRouteMatrixOutput(v **CalculateRouteMatrixOutput, 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 *CalculateRouteMatrixOutput + if *v == nil { + sv = &CalculateRouteMatrixOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ErrorCount = ptr.Int32(int32(i64)) + } + + case "RouteMatrix": + if err := awsRestjson1_deserializeDocumentRouteMatrix(&sv.RouteMatrix, value); err != nil { + return err + } + + case "RoutingBoundary": + if err := awsRestjson1_deserializeDocumentRouteMatrixBoundary(&sv.RoutingBoundary, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCalculateRoutes struct { +} + +func (*awsRestjson1_deserializeOpCalculateRoutes) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCalculateRoutes) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCalculateRoutes(response, &metadata) + } + output := &CalculateRoutesOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsCalculateRoutesOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCalculateRoutesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCalculateRoutes(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsCalculateRoutesOutput(v *CalculateRoutesOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-geo-pricing-bucket"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.PricingBucket = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentCalculateRoutesOutput(v **CalculateRoutesOutput, 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 *CalculateRoutesOutput + if *v == nil { + sv = &CalculateRoutesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LegGeometryFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GeometryFormat to be of type string, got %T instead", value) + } + sv.LegGeometryFormat = types.GeometryFormat(jtv) + } + + case "Notices": + if err := awsRestjson1_deserializeDocumentRouteResponseNoticeList(&sv.Notices, value); err != nil { + return err + } + + case "Routes": + if err := awsRestjson1_deserializeDocumentRouteList(&sv.Routes, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpOptimizeWaypoints struct { +} + +func (*awsRestjson1_deserializeOpOptimizeWaypoints) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpOptimizeWaypoints) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorOptimizeWaypoints(response, &metadata) + } + output := &OptimizeWaypointsOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsOptimizeWaypointsOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentOptimizeWaypointsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorOptimizeWaypoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsOptimizeWaypointsOutput(v *OptimizeWaypointsOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-geo-pricing-bucket"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.PricingBucket = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentOptimizeWaypointsOutput(v **OptimizeWaypointsOutput, 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 *OptimizeWaypointsOutput + if *v == nil { + sv = &OptimizeWaypointsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Connections": + if err := awsRestjson1_deserializeDocumentWaypointOptimizationConnectionList(&sv.Connections, value); err != nil { + return err + } + + case "Distance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Distance = i64 + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = i64 + } + + case "ImpedingWaypoints": + if err := awsRestjson1_deserializeDocumentWaypointOptimizationImpedingWaypointList(&sv.ImpedingWaypoints, value); err != nil { + return err + } + + case "OptimizedWaypoints": + if err := awsRestjson1_deserializeDocumentWaypointOptimizationOptimizedWaypointList(&sv.OptimizedWaypoints, value); err != nil { + return err + } + + case "TimeBreakdown": + if err := awsRestjson1_deserializeDocumentWaypointOptimizationTimeBreakdown(&sv.TimeBreakdown, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpSnapToRoads struct { +} + +func (*awsRestjson1_deserializeOpSnapToRoads) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSnapToRoads) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorSnapToRoads(response, &metadata) + } + output := &SnapToRoadsOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsSnapToRoadsOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentSnapToRoadsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorSnapToRoads(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsSnapToRoadsOutput(v *SnapToRoadsOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-geo-pricing-bucket"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.PricingBucket = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentSnapToRoadsOutput(v **SnapToRoadsOutput, 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 *SnapToRoadsOutput + if *v == nil { + sv = &SnapToRoadsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Notices": + if err := awsRestjson1_deserializeDocumentRoadSnapNoticeList(&sv.Notices, value); err != nil { + return err + } + + case "SnappedGeometry": + if err := awsRestjson1_deserializeDocumentRoadSnapSnappedGeometry(&sv.SnappedGeometry, value); err != nil { + return err + } + + case "SnappedGeometryFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GeometryFormat to be of type string, got %T instead", value) + } + sv.SnappedGeometryFormat = types.GeometryFormat(jtv) + } + + case "SnappedTracePoints": + if err := awsRestjson1_deserializeDocumentRoadSnapSnappedTracePointList(&sv.SnappedTracePoints, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBoundingBox(v *[]float64, 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 []float64 + if *v == nil { + cv = []float64{} + } else { + cv = *v + } + + for _, value := range shape { + var col float64 + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + col = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + col = f64 + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCircle(v **types.Circle, 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.Circle + if *v == nil { + sv = &types.Circle{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Center": + if err := awsRestjson1_deserializeDocumentPosition(&sv.Center, value); err != nil { + return err + } + + case "Radius": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Radius = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Radius = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIndexList(v *[]int32, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []int32 + if *v == nil { + cv = []int32{} + } else { + cv = *v + } + + for _, value := range shape { + var col int32 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + col = int32(i64) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, 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.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIsoline(v **types.Isoline, 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.Isoline + if *v == nil { + sv = &types.Isoline{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Connections": + if err := awsRestjson1_deserializeDocumentIsolineConnectionList(&sv.Connections, value); err != nil { + return err + } + + case "DistanceThreshold": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DistanceThreshold = i64 + } + + case "Geometries": + if err := awsRestjson1_deserializeDocumentIsolineShapeGeometryList(&sv.Geometries, value); err != nil { + return err + } + + case "TimeThreshold": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TimeThreshold = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIsolineConnection(v **types.IsolineConnection, 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.IsolineConnection + if *v == nil { + sv = &types.IsolineConnection{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FromPolygonIndex": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FromPolygonIndex = ptr.Int32(int32(i64)) + } + + case "Geometry": + if err := awsRestjson1_deserializeDocumentIsolineConnectionGeometry(&sv.Geometry, value); err != nil { + return err + } + + case "ToPolygonIndex": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ToPolygonIndex = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIsolineConnectionGeometry(v **types.IsolineConnectionGeometry, 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.IsolineConnectionGeometry + if *v == nil { + sv = &types.IsolineConnectionGeometry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LineString": + if err := awsRestjson1_deserializeDocumentLineString(&sv.LineString, value); err != nil { + return err + } + + case "Polyline": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Polyline to be of type string, got %T instead", value) + } + sv.Polyline = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIsolineConnectionList(v *[]types.IsolineConnection, 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.IsolineConnection + if *v == nil { + cv = []types.IsolineConnection{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.IsolineConnection + destAddr := &col + if err := awsRestjson1_deserializeDocumentIsolineConnection(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentIsolineList(v *[]types.Isoline, 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.Isoline + if *v == nil { + cv = []types.Isoline{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Isoline + destAddr := &col + if err := awsRestjson1_deserializeDocumentIsoline(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentIsolineShapeGeometry(v **types.IsolineShapeGeometry, 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.IsolineShapeGeometry + if *v == nil { + sv = &types.IsolineShapeGeometry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Polygon": + if err := awsRestjson1_deserializeDocumentLinearRings(&sv.Polygon, value); err != nil { + return err + } + + case "PolylinePolygon": + if err := awsRestjson1_deserializeDocumentPolylineRingList(&sv.PolylinePolygon, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIsolineShapeGeometryList(v *[]types.IsolineShapeGeometry, 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.IsolineShapeGeometry + if *v == nil { + cv = []types.IsolineShapeGeometry{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.IsolineShapeGeometry + destAddr := &col + if err := awsRestjson1_deserializeDocumentIsolineShapeGeometry(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLinearRing(v *[][]float64, 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 [][]float64 + if *v == nil { + cv = [][]float64{} + } else { + cv = *v + } + + for _, value := range shape { + var col []float64 + if err := awsRestjson1_deserializeDocumentPosition(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLinearRings(v *[][][]float64, 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 [][][]float64 + if *v == nil { + cv = [][][]float64{} + } else { + cv = *v + } + + for _, value := range shape { + var col [][]float64 + if err := awsRestjson1_deserializeDocumentLinearRing(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLineString(v *[][]float64, 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 [][]float64 + if *v == nil { + cv = [][]float64{} + } else { + cv = *v + } + + for _, value := range shape { + var col []float64 + if err := awsRestjson1_deserializeDocumentPosition(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLocalizedString(v **types.LocalizedString, 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.LocalizedString + if *v == nil { + sv = &types.LocalizedString{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Language": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LanguageTag to be of type string, got %T instead", value) + } + sv.Language = ptr.String(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLocalizedStringList(v *[]types.LocalizedString, 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.LocalizedString + if *v == nil { + cv = []types.LocalizedString{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LocalizedString + destAddr := &col + if err := awsRestjson1_deserializeDocumentLocalizedString(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentPolylineRingList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolylineRing to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentPosition(v *[]float64, 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 []float64 + if *v == nil { + cv = []float64{} + } else { + cv = *v + } + + for _, value := range shape { + var col float64 + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + col = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + col = f64 + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentPosition23(v *[]float64, 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 []float64 + if *v == nil { + cv = []float64{} + } else { + cv = *v + } + + for _, value := range shape { + var col float64 + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + col = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + col = f64 + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRoadSnapNotice(v **types.RoadSnapNotice, 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.RoadSnapNotice + if *v == nil { + sv = &types.RoadSnapNotice{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoadSnapNoticeCode to be of type string, got %T instead", value) + } + sv.Code = types.RoadSnapNoticeCode(jtv) + } + + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + case "TracePointIndexes": + if err := awsRestjson1_deserializeDocumentRoadSnapTracePointIndexList(&sv.TracePointIndexes, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRoadSnapNoticeList(v *[]types.RoadSnapNotice, 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.RoadSnapNotice + if *v == nil { + cv = []types.RoadSnapNotice{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RoadSnapNotice + destAddr := &col + if err := awsRestjson1_deserializeDocumentRoadSnapNotice(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRoadSnapSnappedGeometry(v **types.RoadSnapSnappedGeometry, 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.RoadSnapSnappedGeometry + if *v == nil { + sv = &types.RoadSnapSnappedGeometry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LineString": + if err := awsRestjson1_deserializeDocumentLineString(&sv.LineString, value); err != nil { + return err + } + + case "Polyline": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Polyline to be of type string, got %T instead", value) + } + sv.Polyline = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRoadSnapSnappedTracePoint(v **types.RoadSnapSnappedTracePoint, 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.RoadSnapSnappedTracePoint + if *v == nil { + sv = &types.RoadSnapSnappedTracePoint{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Confidence": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Confidence = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Confidence = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "OriginalPosition": + if err := awsRestjson1_deserializeDocumentPosition(&sv.OriginalPosition, value); err != nil { + return err + } + + case "SnappedPosition": + if err := awsRestjson1_deserializeDocumentPosition(&sv.SnappedPosition, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRoadSnapSnappedTracePointList(v *[]types.RoadSnapSnappedTracePoint, 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.RoadSnapSnappedTracePoint + if *v == nil { + cv = []types.RoadSnapSnappedTracePoint{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RoadSnapSnappedTracePoint + destAddr := &col + if err := awsRestjson1_deserializeDocumentRoadSnapSnappedTracePoint(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRoadSnapTracePointIndexList(v *[]int32, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []int32 + if *v == nil { + cv = []int32{} + } else { + cv = *v + } + + for _, value := range shape { + var col int32 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + col = int32(i64) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRoute(v **types.Route, 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.Route + if *v == nil { + sv = &types.Route{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Legs": + if err := awsRestjson1_deserializeDocumentRouteLegList(&sv.Legs, value); err != nil { + return err + } + + case "MajorRoadLabels": + if err := awsRestjson1_deserializeDocumentRouteMajorRoadLabelList(&sv.MajorRoadLabels, value); err != nil { + return err + } + + case "Summary": + if err := awsRestjson1_deserializeDocumentRouteSummary(&sv.Summary, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteContinueHighwayStepDetails(v **types.RouteContinueHighwayStepDetails, 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.RouteContinueHighwayStepDetails + if *v == nil { + sv = &types.RouteContinueHighwayStepDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Intersection": + if err := awsRestjson1_deserializeDocumentLocalizedStringList(&sv.Intersection, value); err != nil { + return err + } + + case "SteeringDirection": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteSteeringDirection to be of type string, got %T instead", value) + } + sv.SteeringDirection = types.RouteSteeringDirection(jtv) + } + + case "TurnAngle": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TurnAngle = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.TurnAngle = f64 + + default: + return fmt.Errorf("expected TurnAngle to be a JSON Number, got %T instead", value) + + } + } + + case "TurnIntensity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteTurnIntensity to be of type string, got %T instead", value) + } + sv.TurnIntensity = types.RouteTurnIntensity(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteContinueStepDetails(v **types.RouteContinueStepDetails, 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.RouteContinueStepDetails + if *v == nil { + sv = &types.RouteContinueStepDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Intersection": + if err := awsRestjson1_deserializeDocumentLocalizedStringList(&sv.Intersection, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteEnterHighwayStepDetails(v **types.RouteEnterHighwayStepDetails, 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.RouteEnterHighwayStepDetails + if *v == nil { + sv = &types.RouteEnterHighwayStepDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Intersection": + if err := awsRestjson1_deserializeDocumentLocalizedStringList(&sv.Intersection, value); err != nil { + return err + } + + case "SteeringDirection": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteSteeringDirection to be of type string, got %T instead", value) + } + sv.SteeringDirection = types.RouteSteeringDirection(jtv) + } + + case "TurnAngle": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TurnAngle = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.TurnAngle = f64 + + default: + return fmt.Errorf("expected TurnAngle to be a JSON Number, got %T instead", value) + + } + } + + case "TurnIntensity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteTurnIntensity to be of type string, got %T instead", value) + } + sv.TurnIntensity = types.RouteTurnIntensity(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteExitStepDetails(v **types.RouteExitStepDetails, 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.RouteExitStepDetails + if *v == nil { + sv = &types.RouteExitStepDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Intersection": + if err := awsRestjson1_deserializeDocumentLocalizedStringList(&sv.Intersection, value); err != nil { + return err + } + + case "RelativeExit": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RelativeExit = ptr.Int32(int32(i64)) + } + + case "SteeringDirection": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteSteeringDirection to be of type string, got %T instead", value) + } + sv.SteeringDirection = types.RouteSteeringDirection(jtv) + } + + case "TurnAngle": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TurnAngle = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.TurnAngle = f64 + + default: + return fmt.Errorf("expected TurnAngle to be a JSON Number, got %T instead", value) + + } + } + + case "TurnIntensity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteTurnIntensity to be of type string, got %T instead", value) + } + sv.TurnIntensity = types.RouteTurnIntensity(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteFerryAfterTravelStep(v **types.RouteFerryAfterTravelStep, 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.RouteFerryAfterTravelStep + if *v == nil { + sv = &types.RouteFerryAfterTravelStep{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = i64 + } + + case "Instruction": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Instruction = ptr.String(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteFerryAfterTravelStepType to be of type string, got %T instead", value) + } + sv.Type = types.RouteFerryAfterTravelStepType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteFerryAfterTravelStepList(v *[]types.RouteFerryAfterTravelStep, 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.RouteFerryAfterTravelStep + if *v == nil { + cv = []types.RouteFerryAfterTravelStep{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteFerryAfterTravelStep + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteFerryAfterTravelStep(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteFerryArrival(v **types.RouteFerryArrival, 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.RouteFerryArrival + if *v == nil { + sv = &types.RouteFerryArrival{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Place": + if err := awsRestjson1_deserializeDocumentRouteFerryPlace(&sv.Place, value); err != nil { + return err + } + + case "Time": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TimestampWithTimezoneOffset to be of type string, got %T instead", value) + } + sv.Time = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteFerryBeforeTravelStep(v **types.RouteFerryBeforeTravelStep, 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.RouteFerryBeforeTravelStep + if *v == nil { + sv = &types.RouteFerryBeforeTravelStep{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = i64 + } + + case "Instruction": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Instruction = ptr.String(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteFerryBeforeTravelStepType to be of type string, got %T instead", value) + } + sv.Type = types.RouteFerryBeforeTravelStepType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteFerryBeforeTravelStepList(v *[]types.RouteFerryBeforeTravelStep, 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.RouteFerryBeforeTravelStep + if *v == nil { + cv = []types.RouteFerryBeforeTravelStep{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteFerryBeforeTravelStep + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteFerryBeforeTravelStep(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteFerryDeparture(v **types.RouteFerryDeparture, 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.RouteFerryDeparture + if *v == nil { + sv = &types.RouteFerryDeparture{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Place": + if err := awsRestjson1_deserializeDocumentRouteFerryPlace(&sv.Place, value); err != nil { + return err + } + + case "Time": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TimestampWithTimezoneOffset to be of type string, got %T instead", value) + } + sv.Time = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteFerryLegDetails(v **types.RouteFerryLegDetails, 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.RouteFerryLegDetails + if *v == nil { + sv = &types.RouteFerryLegDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AfterTravelSteps": + if err := awsRestjson1_deserializeDocumentRouteFerryAfterTravelStepList(&sv.AfterTravelSteps, value); err != nil { + return err + } + + case "Arrival": + if err := awsRestjson1_deserializeDocumentRouteFerryArrival(&sv.Arrival, value); err != nil { + return err + } + + case "BeforeTravelSteps": + if err := awsRestjson1_deserializeDocumentRouteFerryBeforeTravelStepList(&sv.BeforeTravelSteps, value); err != nil { + return err + } + + case "Departure": + if err := awsRestjson1_deserializeDocumentRouteFerryDeparture(&sv.Departure, value); err != nil { + return err + } + + case "Notices": + if err := awsRestjson1_deserializeDocumentRouteFerryNoticeList(&sv.Notices, value); err != nil { + return err + } + + case "PassThroughWaypoints": + if err := awsRestjson1_deserializeDocumentRoutePassThroughWaypointList(&sv.PassThroughWaypoints, value); err != nil { + return err + } + + case "RouteName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RouteName = ptr.String(jtv) + } + + case "Spans": + if err := awsRestjson1_deserializeDocumentRouteFerrySpanList(&sv.Spans, value); err != nil { + return err + } + + case "Summary": + if err := awsRestjson1_deserializeDocumentRouteFerrySummary(&sv.Summary, value); err != nil { + return err + } + + case "TravelSteps": + if err := awsRestjson1_deserializeDocumentRouteFerryTravelStepList(&sv.TravelSteps, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteFerryNotice(v **types.RouteFerryNotice, 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.RouteFerryNotice + if *v == nil { + sv = &types.RouteFerryNotice{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteFerryNoticeCode to be of type string, got %T instead", value) + } + sv.Code = types.RouteFerryNoticeCode(jtv) + } + + case "Impact": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteNoticeImpact to be of type string, got %T instead", value) + } + sv.Impact = types.RouteNoticeImpact(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteFerryNoticeList(v *[]types.RouteFerryNotice, 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.RouteFerryNotice + if *v == nil { + cv = []types.RouteFerryNotice{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteFerryNotice + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteFerryNotice(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteFerryOverviewSummary(v **types.RouteFerryOverviewSummary, 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.RouteFerryOverviewSummary + if *v == nil { + sv = &types.RouteFerryOverviewSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Distance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Distance = i64 + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteFerryPlace(v **types.RouteFerryPlace, 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.RouteFerryPlace + if *v == nil { + sv = &types.RouteFerryPlace{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OriginalPosition": + if err := awsRestjson1_deserializeDocumentPosition23(&sv.OriginalPosition, value); err != nil { + return err + } + + case "Position": + if err := awsRestjson1_deserializeDocumentPosition23(&sv.Position, value); err != nil { + return err + } + + case "WaypointIndex": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.WaypointIndex = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteFerrySpan(v **types.RouteFerrySpan, 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.RouteFerrySpan + if *v == nil { + sv = &types.RouteFerrySpan{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Country": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode3 to be of type string, got %T instead", value) + } + sv.Country = ptr.String(jtv) + } + + case "Distance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Distance = i64 + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = i64 + } + + case "GeometryOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.GeometryOffset = ptr.Int32(int32(i64)) + } + + case "Names": + if err := awsRestjson1_deserializeDocumentLocalizedStringList(&sv.Names, value); err != nil { + return err + } + + case "Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteFerrySpanList(v *[]types.RouteFerrySpan, 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.RouteFerrySpan + if *v == nil { + cv = []types.RouteFerrySpan{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteFerrySpan + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteFerrySpan(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteFerrySummary(v **types.RouteFerrySummary, 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.RouteFerrySummary + if *v == nil { + sv = &types.RouteFerrySummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Overview": + if err := awsRestjson1_deserializeDocumentRouteFerryOverviewSummary(&sv.Overview, value); err != nil { + return err + } + + case "TravelOnly": + if err := awsRestjson1_deserializeDocumentRouteFerryTravelOnlySummary(&sv.TravelOnly, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteFerryTravelOnlySummary(v **types.RouteFerryTravelOnlySummary, 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.RouteFerryTravelOnlySummary + if *v == nil { + sv = &types.RouteFerryTravelOnlySummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteFerryTravelStep(v **types.RouteFerryTravelStep, 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.RouteFerryTravelStep + if *v == nil { + sv = &types.RouteFerryTravelStep{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Distance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Distance = i64 + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = i64 + } + + case "GeometryOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.GeometryOffset = ptr.Int32(int32(i64)) + } + + case "Instruction": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Instruction = ptr.String(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteFerryTravelStepType to be of type string, got %T instead", value) + } + sv.Type = types.RouteFerryTravelStepType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteFerryTravelStepList(v *[]types.RouteFerryTravelStep, 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.RouteFerryTravelStep + if *v == nil { + cv = []types.RouteFerryTravelStep{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteFerryTravelStep + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteFerryTravelStep(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteHazardousCargoTypeList(v *[]types.RouteHazardousCargoType, 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.RouteHazardousCargoType + if *v == nil { + cv = []types.RouteHazardousCargoType{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteHazardousCargoType + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteHazardousCargoType to be of type string, got %T instead", value) + } + col = types.RouteHazardousCargoType(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteKeepStepDetails(v **types.RouteKeepStepDetails, 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.RouteKeepStepDetails + if *v == nil { + sv = &types.RouteKeepStepDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Intersection": + if err := awsRestjson1_deserializeDocumentLocalizedStringList(&sv.Intersection, value); err != nil { + return err + } + + case "SteeringDirection": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteSteeringDirection to be of type string, got %T instead", value) + } + sv.SteeringDirection = types.RouteSteeringDirection(jtv) + } + + case "TurnAngle": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TurnAngle = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.TurnAngle = f64 + + default: + return fmt.Errorf("expected TurnAngle to be a JSON Number, got %T instead", value) + + } + } + + case "TurnIntensity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteTurnIntensity to be of type string, got %T instead", value) + } + sv.TurnIntensity = types.RouteTurnIntensity(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteLeg(v **types.RouteLeg, 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.RouteLeg + if *v == nil { + sv = &types.RouteLeg{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FerryLegDetails": + if err := awsRestjson1_deserializeDocumentRouteFerryLegDetails(&sv.FerryLegDetails, value); err != nil { + return err + } + + case "Geometry": + if err := awsRestjson1_deserializeDocumentRouteLegGeometry(&sv.Geometry, value); err != nil { + return err + } + + case "Language": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LanguageTag to be of type string, got %T instead", value) + } + sv.Language = ptr.String(jtv) + } + + case "PedestrianLegDetails": + if err := awsRestjson1_deserializeDocumentRoutePedestrianLegDetails(&sv.PedestrianLegDetails, value); err != nil { + return err + } + + case "TravelMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteLegTravelMode to be of type string, got %T instead", value) + } + sv.TravelMode = types.RouteLegTravelMode(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteLegType to be of type string, got %T instead", value) + } + sv.Type = types.RouteLegType(jtv) + } + + case "VehicleLegDetails": + if err := awsRestjson1_deserializeDocumentRouteVehicleLegDetails(&sv.VehicleLegDetails, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteLegGeometry(v **types.RouteLegGeometry, 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.RouteLegGeometry + if *v == nil { + sv = &types.RouteLegGeometry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LineString": + if err := awsRestjson1_deserializeDocumentLineString(&sv.LineString, value); err != nil { + return err + } + + case "Polyline": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Polyline to be of type string, got %T instead", value) + } + sv.Polyline = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteLegList(v *[]types.RouteLeg, 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.RouteLeg + if *v == nil { + cv = []types.RouteLeg{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteLeg + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteLeg(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteList(v *[]types.Route, 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.Route + if *v == nil { + cv = []types.Route{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Route + destAddr := &col + if err := awsRestjson1_deserializeDocumentRoute(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteMajorRoadLabel(v **types.RouteMajorRoadLabel, 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.RouteMajorRoadLabel + if *v == nil { + sv = &types.RouteMajorRoadLabel{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RoadName": + if err := awsRestjson1_deserializeDocumentLocalizedString(&sv.RoadName, value); err != nil { + return err + } + + case "RouteNumber": + if err := awsRestjson1_deserializeDocumentRouteNumber(&sv.RouteNumber, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteMajorRoadLabelList(v *[]types.RouteMajorRoadLabel, 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.RouteMajorRoadLabel + if *v == nil { + cv = []types.RouteMajorRoadLabel{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteMajorRoadLabel + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteMajorRoadLabel(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteMatrix(v *[][]types.RouteMatrixEntry, 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.RouteMatrixEntry + if *v == nil { + cv = [][]types.RouteMatrixEntry{} + } else { + cv = *v + } + + for _, value := range shape { + var col []types.RouteMatrixEntry + if err := awsRestjson1_deserializeDocumentRouteMatrixRow(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteMatrixAutoCircle(v **types.RouteMatrixAutoCircle, 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.RouteMatrixAutoCircle + if *v == nil { + sv = &types.RouteMatrixAutoCircle{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Margin": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Margin = i64 + } + + case "MaxRadius": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxRadius = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteMatrixBoundary(v **types.RouteMatrixBoundary, 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.RouteMatrixBoundary + if *v == nil { + sv = &types.RouteMatrixBoundary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Geometry": + if err := awsRestjson1_deserializeDocumentRouteMatrixBoundaryGeometry(&sv.Geometry, value); err != nil { + return err + } + + case "Unbounded": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Unbounded = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteMatrixBoundaryGeometry(v **types.RouteMatrixBoundaryGeometry, 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.RouteMatrixBoundaryGeometry + if *v == nil { + sv = &types.RouteMatrixBoundaryGeometry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AutoCircle": + if err := awsRestjson1_deserializeDocumentRouteMatrixAutoCircle(&sv.AutoCircle, value); err != nil { + return err + } + + case "BoundingBox": + if err := awsRestjson1_deserializeDocumentBoundingBox(&sv.BoundingBox, value); err != nil { + return err + } + + case "Circle": + if err := awsRestjson1_deserializeDocumentCircle(&sv.Circle, value); err != nil { + return err + } + + case "Polygon": + if err := awsRestjson1_deserializeDocumentLinearRings(&sv.Polygon, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteMatrixEntry(v **types.RouteMatrixEntry, 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.RouteMatrixEntry + if *v == nil { + sv = &types.RouteMatrixEntry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Distance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Distance = i64 + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = i64 + } + + case "Error": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteMatrixErrorCode to be of type string, got %T instead", value) + } + sv.Error = types.RouteMatrixErrorCode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteMatrixRow(v *[]types.RouteMatrixEntry, 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.RouteMatrixEntry + if *v == nil { + cv = []types.RouteMatrixEntry{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteMatrixEntry + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteMatrixEntry(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteNoticeDetailRange(v **types.RouteNoticeDetailRange, 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.RouteNoticeDetailRange + if *v == nil { + sv = &types.RouteNoticeDetailRange{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Max": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Max = ptr.Int32(int32(i64)) + } + + case "Min": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Min = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteNumber(v **types.RouteNumber, 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.RouteNumber + if *v == nil { + sv = &types.RouteNumber{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Direction": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteDirection to be of type string, got %T instead", value) + } + sv.Direction = types.RouteDirection(jtv) + } + + case "Language": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LanguageTag to be of type string, got %T instead", value) + } + sv.Language = ptr.String(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteNumberList(v *[]types.RouteNumber, 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.RouteNumber + if *v == nil { + cv = []types.RouteNumber{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteNumber + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteNumber(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRoutePassThroughPlace(v **types.RoutePassThroughPlace, 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.RoutePassThroughPlace + if *v == nil { + sv = &types.RoutePassThroughPlace{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OriginalPosition": + if err := awsRestjson1_deserializeDocumentPosition23(&sv.OriginalPosition, value); err != nil { + return err + } + + case "Position": + if err := awsRestjson1_deserializeDocumentPosition23(&sv.Position, value); err != nil { + return err + } + + case "WaypointIndex": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.WaypointIndex = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRoutePassThroughWaypoint(v **types.RoutePassThroughWaypoint, 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.RoutePassThroughWaypoint + if *v == nil { + sv = &types.RoutePassThroughWaypoint{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "GeometryOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.GeometryOffset = ptr.Int32(int32(i64)) + } + + case "Place": + if err := awsRestjson1_deserializeDocumentRoutePassThroughPlace(&sv.Place, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRoutePassThroughWaypointList(v *[]types.RoutePassThroughWaypoint, 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.RoutePassThroughWaypoint + if *v == nil { + cv = []types.RoutePassThroughWaypoint{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RoutePassThroughWaypoint + destAddr := &col + if err := awsRestjson1_deserializeDocumentRoutePassThroughWaypoint(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRoutePedestrianArrival(v **types.RoutePedestrianArrival, 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.RoutePedestrianArrival + if *v == nil { + sv = &types.RoutePedestrianArrival{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Place": + if err := awsRestjson1_deserializeDocumentRoutePedestrianPlace(&sv.Place, value); err != nil { + return err + } + + case "Time": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TimestampWithTimezoneOffset to be of type string, got %T instead", value) + } + sv.Time = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRoutePedestrianDeparture(v **types.RoutePedestrianDeparture, 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.RoutePedestrianDeparture + if *v == nil { + sv = &types.RoutePedestrianDeparture{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Place": + if err := awsRestjson1_deserializeDocumentRoutePedestrianPlace(&sv.Place, value); err != nil { + return err + } + + case "Time": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TimestampWithTimezoneOffset to be of type string, got %T instead", value) + } + sv.Time = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRoutePedestrianLegDetails(v **types.RoutePedestrianLegDetails, 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.RoutePedestrianLegDetails + if *v == nil { + sv = &types.RoutePedestrianLegDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arrival": + if err := awsRestjson1_deserializeDocumentRoutePedestrianArrival(&sv.Arrival, value); err != nil { + return err + } + + case "Departure": + if err := awsRestjson1_deserializeDocumentRoutePedestrianDeparture(&sv.Departure, value); err != nil { + return err + } + + case "Notices": + if err := awsRestjson1_deserializeDocumentRoutePedestrianNoticeList(&sv.Notices, value); err != nil { + return err + } + + case "PassThroughWaypoints": + if err := awsRestjson1_deserializeDocumentRoutePassThroughWaypointList(&sv.PassThroughWaypoints, value); err != nil { + return err + } + + case "Spans": + if err := awsRestjson1_deserializeDocumentRoutePedestrianSpanList(&sv.Spans, value); err != nil { + return err + } + + case "Summary": + if err := awsRestjson1_deserializeDocumentRoutePedestrianSummary(&sv.Summary, value); err != nil { + return err + } + + case "TravelSteps": + if err := awsRestjson1_deserializeDocumentRoutePedestrianTravelStepList(&sv.TravelSteps, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRoutePedestrianNotice(v **types.RoutePedestrianNotice, 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.RoutePedestrianNotice + if *v == nil { + sv = &types.RoutePedestrianNotice{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoutePedestrianNoticeCode to be of type string, got %T instead", value) + } + sv.Code = types.RoutePedestrianNoticeCode(jtv) + } + + case "Impact": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteNoticeImpact to be of type string, got %T instead", value) + } + sv.Impact = types.RouteNoticeImpact(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRoutePedestrianNoticeList(v *[]types.RoutePedestrianNotice, 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.RoutePedestrianNotice + if *v == nil { + cv = []types.RoutePedestrianNotice{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RoutePedestrianNotice + destAddr := &col + if err := awsRestjson1_deserializeDocumentRoutePedestrianNotice(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRoutePedestrianOverviewSummary(v **types.RoutePedestrianOverviewSummary, 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.RoutePedestrianOverviewSummary + if *v == nil { + sv = &types.RoutePedestrianOverviewSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Distance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Distance = i64 + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRoutePedestrianPlace(v **types.RoutePedestrianPlace, 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.RoutePedestrianPlace + if *v == nil { + sv = &types.RoutePedestrianPlace{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OriginalPosition": + if err := awsRestjson1_deserializeDocumentPosition23(&sv.OriginalPosition, value); err != nil { + return err + } + + case "Position": + if err := awsRestjson1_deserializeDocumentPosition23(&sv.Position, value); err != nil { + return err + } + + case "SideOfStreet": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteSideOfStreet to be of type string, got %T instead", value) + } + sv.SideOfStreet = types.RouteSideOfStreet(jtv) + } + + case "WaypointIndex": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.WaypointIndex = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRoutePedestrianSpan(v **types.RoutePedestrianSpan, 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.RoutePedestrianSpan + if *v == nil { + sv = &types.RoutePedestrianSpan{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BestCaseDuration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BestCaseDuration = i64 + } + + case "Country": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode3 to be of type string, got %T instead", value) + } + sv.Country = ptr.String(jtv) + } + + case "Distance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Distance = i64 + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = i64 + } + + case "DynamicSpeed": + if err := awsRestjson1_deserializeDocumentRouteSpanDynamicSpeedDetails(&sv.DynamicSpeed, value); err != nil { + return err + } + + case "FunctionalClassification": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FunctionalClassification = ptr.Int32(int32(i64)) + } + + case "GeometryOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.GeometryOffset = ptr.Int32(int32(i64)) + } + + case "Incidents": + if err := awsRestjson1_deserializeDocumentIndexList(&sv.Incidents, value); err != nil { + return err + } + + case "Names": + if err := awsRestjson1_deserializeDocumentLocalizedStringList(&sv.Names, value); err != nil { + return err + } + + case "PedestrianAccess": + if err := awsRestjson1_deserializeDocumentRouteSpanPedestrianAccessAttributeList(&sv.PedestrianAccess, value); err != nil { + return err + } + + case "Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "RoadAttributes": + if err := awsRestjson1_deserializeDocumentRouteSpanRoadAttributeList(&sv.RoadAttributes, value); err != nil { + return err + } + + case "RouteNumbers": + if err := awsRestjson1_deserializeDocumentRouteNumberList(&sv.RouteNumbers, value); err != nil { + return err + } + + case "SpeedLimit": + if err := awsRestjson1_deserializeDocumentRouteSpanSpeedLimitDetails(&sv.SpeedLimit, value); err != nil { + return err + } + + case "TypicalDuration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TypicalDuration = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRoutePedestrianSpanList(v *[]types.RoutePedestrianSpan, 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.RoutePedestrianSpan + if *v == nil { + cv = []types.RoutePedestrianSpan{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RoutePedestrianSpan + destAddr := &col + if err := awsRestjson1_deserializeDocumentRoutePedestrianSpan(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRoutePedestrianSummary(v **types.RoutePedestrianSummary, 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.RoutePedestrianSummary + if *v == nil { + sv = &types.RoutePedestrianSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Overview": + if err := awsRestjson1_deserializeDocumentRoutePedestrianOverviewSummary(&sv.Overview, value); err != nil { + return err + } + + case "TravelOnly": + if err := awsRestjson1_deserializeDocumentRoutePedestrianTravelOnlySummary(&sv.TravelOnly, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRoutePedestrianTravelOnlySummary(v **types.RoutePedestrianTravelOnlySummary, 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.RoutePedestrianTravelOnlySummary + if *v == nil { + sv = &types.RoutePedestrianTravelOnlySummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRoutePedestrianTravelStep(v **types.RoutePedestrianTravelStep, 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.RoutePedestrianTravelStep + if *v == nil { + sv = &types.RoutePedestrianTravelStep{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContinueStepDetails": + if err := awsRestjson1_deserializeDocumentRouteContinueStepDetails(&sv.ContinueStepDetails, value); err != nil { + return err + } + + case "CurrentRoad": + if err := awsRestjson1_deserializeDocumentRouteRoad(&sv.CurrentRoad, value); err != nil { + return err + } + + case "Distance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Distance = i64 + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = i64 + } + + case "ExitNumber": + if err := awsRestjson1_deserializeDocumentLocalizedStringList(&sv.ExitNumber, value); err != nil { + return err + } + + case "GeometryOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.GeometryOffset = ptr.Int32(int32(i64)) + } + + case "Instruction": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Instruction = ptr.String(jtv) + } + + case "KeepStepDetails": + if err := awsRestjson1_deserializeDocumentRouteKeepStepDetails(&sv.KeepStepDetails, value); err != nil { + return err + } + + case "NextRoad": + if err := awsRestjson1_deserializeDocumentRouteRoad(&sv.NextRoad, value); err != nil { + return err + } + + case "RoundaboutEnterStepDetails": + if err := awsRestjson1_deserializeDocumentRouteRoundaboutEnterStepDetails(&sv.RoundaboutEnterStepDetails, value); err != nil { + return err + } + + case "RoundaboutExitStepDetails": + if err := awsRestjson1_deserializeDocumentRouteRoundaboutExitStepDetails(&sv.RoundaboutExitStepDetails, value); err != nil { + return err + } + + case "RoundaboutPassStepDetails": + if err := awsRestjson1_deserializeDocumentRouteRoundaboutPassStepDetails(&sv.RoundaboutPassStepDetails, value); err != nil { + return err + } + + case "Signpost": + if err := awsRestjson1_deserializeDocumentRouteSignpost(&sv.Signpost, value); err != nil { + return err + } + + case "TurnStepDetails": + if err := awsRestjson1_deserializeDocumentRouteTurnStepDetails(&sv.TurnStepDetails, value); err != nil { + return err + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoutePedestrianTravelStepType to be of type string, got %T instead", value) + } + sv.Type = types.RoutePedestrianTravelStepType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRoutePedestrianTravelStepList(v *[]types.RoutePedestrianTravelStep, 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.RoutePedestrianTravelStep + if *v == nil { + cv = []types.RoutePedestrianTravelStep{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RoutePedestrianTravelStep + destAddr := &col + if err := awsRestjson1_deserializeDocumentRoutePedestrianTravelStep(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteRampStepDetails(v **types.RouteRampStepDetails, 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.RouteRampStepDetails + if *v == nil { + sv = &types.RouteRampStepDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Intersection": + if err := awsRestjson1_deserializeDocumentLocalizedStringList(&sv.Intersection, value); err != nil { + return err + } + + case "SteeringDirection": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteSteeringDirection to be of type string, got %T instead", value) + } + sv.SteeringDirection = types.RouteSteeringDirection(jtv) + } + + case "TurnAngle": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TurnAngle = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.TurnAngle = f64 + + default: + return fmt.Errorf("expected TurnAngle to be a JSON Number, got %T instead", value) + + } + } + + case "TurnIntensity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteTurnIntensity to be of type string, got %T instead", value) + } + sv.TurnIntensity = types.RouteTurnIntensity(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteResponseNotice(v **types.RouteResponseNotice, 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.RouteResponseNotice + if *v == nil { + sv = &types.RouteResponseNotice{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteResponseNoticeCode to be of type string, got %T instead", value) + } + sv.Code = types.RouteResponseNoticeCode(jtv) + } + + case "Impact": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteNoticeImpact to be of type string, got %T instead", value) + } + sv.Impact = types.RouteNoticeImpact(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteResponseNoticeList(v *[]types.RouteResponseNotice, 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.RouteResponseNotice + if *v == nil { + cv = []types.RouteResponseNotice{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteResponseNotice + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteResponseNotice(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteRoad(v **types.RouteRoad, 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.RouteRoad + if *v == nil { + sv = &types.RouteRoad{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RoadName": + if err := awsRestjson1_deserializeDocumentLocalizedStringList(&sv.RoadName, value); err != nil { + return err + } + + case "RouteNumber": + if err := awsRestjson1_deserializeDocumentRouteNumberList(&sv.RouteNumber, value); err != nil { + return err + } + + case "Towards": + if err := awsRestjson1_deserializeDocumentLocalizedStringList(&sv.Towards, value); err != nil { + return err + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteRoadType to be of type string, got %T instead", value) + } + sv.Type = types.RouteRoadType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteRoundaboutEnterStepDetails(v **types.RouteRoundaboutEnterStepDetails, 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.RouteRoundaboutEnterStepDetails + if *v == nil { + sv = &types.RouteRoundaboutEnterStepDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Intersection": + if err := awsRestjson1_deserializeDocumentLocalizedStringList(&sv.Intersection, value); err != nil { + return err + } + + case "SteeringDirection": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteSteeringDirection to be of type string, got %T instead", value) + } + sv.SteeringDirection = types.RouteSteeringDirection(jtv) + } + + case "TurnAngle": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TurnAngle = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.TurnAngle = f64 + + default: + return fmt.Errorf("expected TurnAngle to be a JSON Number, got %T instead", value) + + } + } + + case "TurnIntensity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteTurnIntensity to be of type string, got %T instead", value) + } + sv.TurnIntensity = types.RouteTurnIntensity(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteRoundaboutExitStepDetails(v **types.RouteRoundaboutExitStepDetails, 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.RouteRoundaboutExitStepDetails + if *v == nil { + sv = &types.RouteRoundaboutExitStepDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Intersection": + if err := awsRestjson1_deserializeDocumentLocalizedStringList(&sv.Intersection, value); err != nil { + return err + } + + case "RelativeExit": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RelativeExit = ptr.Int32(int32(i64)) + } + + case "RoundaboutAngle": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RoundaboutAngle = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.RoundaboutAngle = f64 + + default: + return fmt.Errorf("expected RoundaboutAngle to be a JSON Number, got %T instead", value) + + } + } + + case "SteeringDirection": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteSteeringDirection to be of type string, got %T instead", value) + } + sv.SteeringDirection = types.RouteSteeringDirection(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteRoundaboutPassStepDetails(v **types.RouteRoundaboutPassStepDetails, 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.RouteRoundaboutPassStepDetails + if *v == nil { + sv = &types.RouteRoundaboutPassStepDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Intersection": + if err := awsRestjson1_deserializeDocumentLocalizedStringList(&sv.Intersection, value); err != nil { + return err + } + + case "SteeringDirection": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteSteeringDirection to be of type string, got %T instead", value) + } + sv.SteeringDirection = types.RouteSteeringDirection(jtv) + } + + case "TurnAngle": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TurnAngle = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.TurnAngle = f64 + + default: + return fmt.Errorf("expected TurnAngle to be a JSON Number, got %T instead", value) + + } + } + + case "TurnIntensity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteTurnIntensity to be of type string, got %T instead", value) + } + sv.TurnIntensity = types.RouteTurnIntensity(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteSignpost(v **types.RouteSignpost, 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.RouteSignpost + if *v == nil { + sv = &types.RouteSignpost{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Labels": + if err := awsRestjson1_deserializeDocumentRouteSignpostLabelList(&sv.Labels, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteSignpostLabel(v **types.RouteSignpostLabel, 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.RouteSignpostLabel + if *v == nil { + sv = &types.RouteSignpostLabel{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RouteNumber": + if err := awsRestjson1_deserializeDocumentRouteNumber(&sv.RouteNumber, value); err != nil { + return err + } + + case "Text": + if err := awsRestjson1_deserializeDocumentLocalizedString(&sv.Text, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteSignpostLabelList(v *[]types.RouteSignpostLabel, 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.RouteSignpostLabel + if *v == nil { + cv = []types.RouteSignpostLabel{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteSignpostLabel + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteSignpostLabel(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteSpanCarAccessAttributeList(v *[]types.RouteSpanCarAccessAttribute, 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.RouteSpanCarAccessAttribute + if *v == nil { + cv = []types.RouteSpanCarAccessAttribute{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteSpanCarAccessAttribute + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteSpanCarAccessAttribute to be of type string, got %T instead", value) + } + col = types.RouteSpanCarAccessAttribute(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteSpanDynamicSpeedDetails(v **types.RouteSpanDynamicSpeedDetails, 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.RouteSpanDynamicSpeedDetails + if *v == nil { + sv = &types.RouteSpanDynamicSpeedDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BestCaseSpeed": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.BestCaseSpeed = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.BestCaseSpeed = f64 + + default: + return fmt.Errorf("expected SpeedKilometersPerHour to be a JSON Number, got %T instead", value) + + } + } + + case "TurnDuration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TurnDuration = i64 + } + + case "TypicalSpeed": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TypicalSpeed = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.TypicalSpeed = f64 + + default: + return fmt.Errorf("expected SpeedKilometersPerHour to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteSpanPedestrianAccessAttributeList(v *[]types.RouteSpanPedestrianAccessAttribute, 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.RouteSpanPedestrianAccessAttribute + if *v == nil { + cv = []types.RouteSpanPedestrianAccessAttribute{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteSpanPedestrianAccessAttribute + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteSpanPedestrianAccessAttribute to be of type string, got %T instead", value) + } + col = types.RouteSpanPedestrianAccessAttribute(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteSpanRoadAttributeList(v *[]types.RouteSpanRoadAttribute, 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.RouteSpanRoadAttribute + if *v == nil { + cv = []types.RouteSpanRoadAttribute{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteSpanRoadAttribute + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteSpanRoadAttribute to be of type string, got %T instead", value) + } + col = types.RouteSpanRoadAttribute(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteSpanScooterAccessAttributeList(v *[]types.RouteSpanScooterAccessAttribute, 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.RouteSpanScooterAccessAttribute + if *v == nil { + cv = []types.RouteSpanScooterAccessAttribute{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteSpanScooterAccessAttribute + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteSpanScooterAccessAttribute to be of type string, got %T instead", value) + } + col = types.RouteSpanScooterAccessAttribute(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteSpanSpeedLimitDetails(v **types.RouteSpanSpeedLimitDetails, 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.RouteSpanSpeedLimitDetails + if *v == nil { + sv = &types.RouteSpanSpeedLimitDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MaxSpeed": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.MaxSpeed = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.MaxSpeed = f64 + + default: + return fmt.Errorf("expected SpeedKilometersPerHour to be a JSON Number, got %T instead", value) + + } + } + + case "Unlimited": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Unlimited = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteSpanTruckAccessAttributeList(v *[]types.RouteSpanTruckAccessAttribute, 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.RouteSpanTruckAccessAttribute + if *v == nil { + cv = []types.RouteSpanTruckAccessAttribute{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteSpanTruckAccessAttribute + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteSpanTruckAccessAttribute to be of type string, got %T instead", value) + } + col = types.RouteSpanTruckAccessAttribute(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteSummary(v **types.RouteSummary, 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.RouteSummary + if *v == nil { + sv = &types.RouteSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Distance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Distance = i64 + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = i64 + } + + case "Tolls": + if err := awsRestjson1_deserializeDocumentRouteTollSummary(&sv.Tolls, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteToll(v **types.RouteToll, 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.RouteToll + if *v == nil { + sv = &types.RouteToll{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Country": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode3 to be of type string, got %T instead", value) + } + sv.Country = ptr.String(jtv) + } + + case "PaymentSites": + if err := awsRestjson1_deserializeDocumentRouteTollPaymentSiteList(&sv.PaymentSites, value); err != nil { + return err + } + + case "Rates": + if err := awsRestjson1_deserializeDocumentRouteTollRateList(&sv.Rates, value); err != nil { + return err + } + + case "Systems": + if err := awsRestjson1_deserializeDocumentIndexList(&sv.Systems, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteTollList(v *[]types.RouteToll, 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.RouteToll + if *v == nil { + cv = []types.RouteToll{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteToll + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteToll(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteTollPass(v **types.RouteTollPass, 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.RouteTollPass + if *v == nil { + sv = &types.RouteTollPass{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "IncludesReturnTrip": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludesReturnTrip = ptr.Bool(jtv) + } + + case "SeniorPass": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.SeniorPass = ptr.Bool(jtv) + } + + case "TransferCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TransferCount = ptr.Int32(int32(i64)) + } + + case "TripCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TripCount = ptr.Int32(int32(i64)) + } + + case "ValidityPeriod": + if err := awsRestjson1_deserializeDocumentRouteTollPassValidityPeriod(&sv.ValidityPeriod, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteTollPassValidityPeriod(v **types.RouteTollPassValidityPeriod, 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.RouteTollPassValidityPeriod + if *v == nil { + sv = &types.RouteTollPassValidityPeriod{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Period": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteTollPassValidityPeriodType to be of type string, got %T instead", value) + } + sv.Period = types.RouteTollPassValidityPeriodType(jtv) + } + + case "PeriodCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PeriodCount = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteTollPaymentMethodList(v *[]types.RouteTollPaymentMethod, 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.RouteTollPaymentMethod + if *v == nil { + cv = []types.RouteTollPaymentMethod{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteTollPaymentMethod + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteTollPaymentMethod to be of type string, got %T instead", value) + } + col = types.RouteTollPaymentMethod(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteTollPaymentSite(v **types.RouteTollPaymentSite, 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.RouteTollPaymentSite + if *v == nil { + sv = &types.RouteTollPaymentSite{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Position": + if err := awsRestjson1_deserializeDocumentPosition23(&sv.Position, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteTollPaymentSiteList(v *[]types.RouteTollPaymentSite, 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.RouteTollPaymentSite + if *v == nil { + cv = []types.RouteTollPaymentSite{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteTollPaymentSite + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteTollPaymentSite(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteTollPrice(v **types.RouteTollPrice, 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.RouteTollPrice + if *v == nil { + sv = &types.RouteTollPrice{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Currency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CurrencyCode to be of type string, got %T instead", value) + } + sv.Currency = ptr.String(jtv) + } + + case "Estimate": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Estimate = ptr.Bool(jtv) + } + + case "PerDuration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PerDuration = i64 + } + + case "Range": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Range = ptr.Bool(jtv) + } + + case "RangeValue": + if err := awsRestjson1_deserializeDocumentRouteTollPriceValueRange(&sv.RangeValue, value); err != nil { + return err + } + + case "Value": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Value = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Value = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteTollPriceSummary(v **types.RouteTollPriceSummary, 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.RouteTollPriceSummary + if *v == nil { + sv = &types.RouteTollPriceSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Currency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CurrencyCode to be of type string, got %T instead", value) + } + sv.Currency = ptr.String(jtv) + } + + case "Estimate": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Estimate = ptr.Bool(jtv) + } + + case "Range": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Range = ptr.Bool(jtv) + } + + case "RangeValue": + if err := awsRestjson1_deserializeDocumentRouteTollPriceValueRange(&sv.RangeValue, value); err != nil { + return err + } + + case "Value": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Value = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Value = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteTollPriceValueRange(v **types.RouteTollPriceValueRange, 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.RouteTollPriceValueRange + if *v == nil { + sv = &types.RouteTollPriceValueRange{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Max": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Max = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Max = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "Min": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Min = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Min = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteTollRate(v **types.RouteTollRate, 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.RouteTollRate + if *v == nil { + sv = &types.RouteTollRate{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicableTimes": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ApplicableTimes = ptr.String(jtv) + } + + case "ConvertedPrice": + if err := awsRestjson1_deserializeDocumentRouteTollPrice(&sv.ConvertedPrice, value); err != nil { + return err + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "LocalPrice": + if err := awsRestjson1_deserializeDocumentRouteTollPrice(&sv.LocalPrice, value); err != nil { + return err + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Pass": + if err := awsRestjson1_deserializeDocumentRouteTollPass(&sv.Pass, value); err != nil { + return err + } + + case "PaymentMethods": + if err := awsRestjson1_deserializeDocumentRouteTollPaymentMethodList(&sv.PaymentMethods, value); err != nil { + return err + } + + case "Transponders": + if err := awsRestjson1_deserializeDocumentRouteTransponderList(&sv.Transponders, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteTollRateList(v *[]types.RouteTollRate, 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.RouteTollRate + if *v == nil { + cv = []types.RouteTollRate{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteTollRate + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteTollRate(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteTollSummary(v **types.RouteTollSummary, 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.RouteTollSummary + if *v == nil { + sv = &types.RouteTollSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Total": + if err := awsRestjson1_deserializeDocumentRouteTollPriceSummary(&sv.Total, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteTollSystem(v **types.RouteTollSystem, 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.RouteTollSystem + if *v == nil { + sv = &types.RouteTollSystem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteTollSystemList(v *[]types.RouteTollSystem, 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.RouteTollSystem + if *v == nil { + cv = []types.RouteTollSystem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteTollSystem + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteTollSystem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteTransponder(v **types.RouteTransponder, 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.RouteTransponder + if *v == nil { + sv = &types.RouteTransponder{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SystemName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SystemName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteTransponderList(v *[]types.RouteTransponder, 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.RouteTransponder + if *v == nil { + cv = []types.RouteTransponder{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteTransponder + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteTransponder(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteTurnStepDetails(v **types.RouteTurnStepDetails, 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.RouteTurnStepDetails + if *v == nil { + sv = &types.RouteTurnStepDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Intersection": + if err := awsRestjson1_deserializeDocumentLocalizedStringList(&sv.Intersection, value); err != nil { + return err + } + + case "SteeringDirection": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteSteeringDirection to be of type string, got %T instead", value) + } + sv.SteeringDirection = types.RouteSteeringDirection(jtv) + } + + case "TurnAngle": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TurnAngle = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.TurnAngle = f64 + + default: + return fmt.Errorf("expected TurnAngle to be a JSON Number, got %T instead", value) + + } + } + + case "TurnIntensity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteTurnIntensity to be of type string, got %T instead", value) + } + sv.TurnIntensity = types.RouteTurnIntensity(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteUTurnStepDetails(v **types.RouteUTurnStepDetails, 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.RouteUTurnStepDetails + if *v == nil { + sv = &types.RouteUTurnStepDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Intersection": + if err := awsRestjson1_deserializeDocumentLocalizedStringList(&sv.Intersection, value); err != nil { + return err + } + + case "SteeringDirection": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteSteeringDirection to be of type string, got %T instead", value) + } + sv.SteeringDirection = types.RouteSteeringDirection(jtv) + } + + case "TurnAngle": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TurnAngle = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.TurnAngle = f64 + + default: + return fmt.Errorf("expected TurnAngle to be a JSON Number, got %T instead", value) + + } + } + + case "TurnIntensity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteTurnIntensity to be of type string, got %T instead", value) + } + sv.TurnIntensity = types.RouteTurnIntensity(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteVehicleArrival(v **types.RouteVehicleArrival, 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.RouteVehicleArrival + if *v == nil { + sv = &types.RouteVehicleArrival{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Place": + if err := awsRestjson1_deserializeDocumentRouteVehiclePlace(&sv.Place, value); err != nil { + return err + } + + case "Time": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TimestampWithTimezoneOffset to be of type string, got %T instead", value) + } + sv.Time = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteVehicleDeparture(v **types.RouteVehicleDeparture, 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.RouteVehicleDeparture + if *v == nil { + sv = &types.RouteVehicleDeparture{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Place": + if err := awsRestjson1_deserializeDocumentRouteVehiclePlace(&sv.Place, value); err != nil { + return err + } + + case "Time": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TimestampWithTimezoneOffset to be of type string, got %T instead", value) + } + sv.Time = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteVehicleIncident(v **types.RouteVehicleIncident, 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.RouteVehicleIncident + if *v == nil { + sv = &types.RouteVehicleIncident{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "EndTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TimestampWithTimezoneOffset to be of type string, got %T instead", value) + } + sv.EndTime = ptr.String(jtv) + } + + case "Severity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteVehicleIncidentSeverity to be of type string, got %T instead", value) + } + sv.Severity = types.RouteVehicleIncidentSeverity(jtv) + } + + case "StartTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TimestampWithTimezoneOffset to be of type string, got %T instead", value) + } + sv.StartTime = ptr.String(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteVehicleIncidentType to be of type string, got %T instead", value) + } + sv.Type = types.RouteVehicleIncidentType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteVehicleIncidentList(v *[]types.RouteVehicleIncident, 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.RouteVehicleIncident + if *v == nil { + cv = []types.RouteVehicleIncident{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteVehicleIncident + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteVehicleIncident(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteVehicleLegDetails(v **types.RouteVehicleLegDetails, 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.RouteVehicleLegDetails + if *v == nil { + sv = &types.RouteVehicleLegDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arrival": + if err := awsRestjson1_deserializeDocumentRouteVehicleArrival(&sv.Arrival, value); err != nil { + return err + } + + case "Departure": + if err := awsRestjson1_deserializeDocumentRouteVehicleDeparture(&sv.Departure, value); err != nil { + return err + } + + case "Incidents": + if err := awsRestjson1_deserializeDocumentRouteVehicleIncidentList(&sv.Incidents, value); err != nil { + return err + } + + case "Notices": + if err := awsRestjson1_deserializeDocumentRouteVehicleNoticeList(&sv.Notices, value); err != nil { + return err + } + + case "PassThroughWaypoints": + if err := awsRestjson1_deserializeDocumentRoutePassThroughWaypointList(&sv.PassThroughWaypoints, value); err != nil { + return err + } + + case "Spans": + if err := awsRestjson1_deserializeDocumentRouteVehicleSpanList(&sv.Spans, value); err != nil { + return err + } + + case "Summary": + if err := awsRestjson1_deserializeDocumentRouteVehicleSummary(&sv.Summary, value); err != nil { + return err + } + + case "Tolls": + if err := awsRestjson1_deserializeDocumentRouteTollList(&sv.Tolls, value); err != nil { + return err + } + + case "TollSystems": + if err := awsRestjson1_deserializeDocumentRouteTollSystemList(&sv.TollSystems, value); err != nil { + return err + } + + case "TravelSteps": + if err := awsRestjson1_deserializeDocumentRouteVehicleTravelStepList(&sv.TravelSteps, value); err != nil { + return err + } + + case "TruckRoadTypes": + if err := awsRestjson1_deserializeDocumentTruckRoadTypeList(&sv.TruckRoadTypes, value); err != nil { + return err + } + + case "Zones": + if err := awsRestjson1_deserializeDocumentRouteZoneList(&sv.Zones, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteVehicleNotice(v **types.RouteVehicleNotice, 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.RouteVehicleNotice + if *v == nil { + sv = &types.RouteVehicleNotice{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteVehicleNoticeCode to be of type string, got %T instead", value) + } + sv.Code = types.RouteVehicleNoticeCode(jtv) + } + + case "Details": + if err := awsRestjson1_deserializeDocumentRouteVehicleNoticeDetailList(&sv.Details, value); err != nil { + return err + } + + case "Impact": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteNoticeImpact to be of type string, got %T instead", value) + } + sv.Impact = types.RouteNoticeImpact(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteVehicleNoticeDetail(v **types.RouteVehicleNoticeDetail, 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.RouteVehicleNoticeDetail + if *v == nil { + sv = &types.RouteVehicleNoticeDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + case "ViolatedConstraints": + if err := awsRestjson1_deserializeDocumentRouteViolatedConstraints(&sv.ViolatedConstraints, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteVehicleNoticeDetailList(v *[]types.RouteVehicleNoticeDetail, 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.RouteVehicleNoticeDetail + if *v == nil { + cv = []types.RouteVehicleNoticeDetail{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteVehicleNoticeDetail + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteVehicleNoticeDetail(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteVehicleNoticeList(v *[]types.RouteVehicleNotice, 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.RouteVehicleNotice + if *v == nil { + cv = []types.RouteVehicleNotice{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteVehicleNotice + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteVehicleNotice(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteVehicleOverviewSummary(v **types.RouteVehicleOverviewSummary, 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.RouteVehicleOverviewSummary + if *v == nil { + sv = &types.RouteVehicleOverviewSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BestCaseDuration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BestCaseDuration = i64 + } + + case "Distance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Distance = i64 + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = i64 + } + + case "TypicalDuration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TypicalDuration = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteVehiclePlace(v **types.RouteVehiclePlace, 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.RouteVehiclePlace + if *v == nil { + sv = &types.RouteVehiclePlace{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OriginalPosition": + if err := awsRestjson1_deserializeDocumentPosition23(&sv.OriginalPosition, value); err != nil { + return err + } + + case "Position": + if err := awsRestjson1_deserializeDocumentPosition23(&sv.Position, value); err != nil { + return err + } + + case "SideOfStreet": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteSideOfStreet to be of type string, got %T instead", value) + } + sv.SideOfStreet = types.RouteSideOfStreet(jtv) + } + + case "WaypointIndex": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.WaypointIndex = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteVehicleSpan(v **types.RouteVehicleSpan, 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.RouteVehicleSpan + if *v == nil { + sv = &types.RouteVehicleSpan{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BestCaseDuration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BestCaseDuration = i64 + } + + case "CarAccess": + if err := awsRestjson1_deserializeDocumentRouteSpanCarAccessAttributeList(&sv.CarAccess, value); err != nil { + return err + } + + case "Country": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode3 to be of type string, got %T instead", value) + } + sv.Country = ptr.String(jtv) + } + + case "Distance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Distance = i64 + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = i64 + } + + case "DynamicSpeed": + if err := awsRestjson1_deserializeDocumentRouteSpanDynamicSpeedDetails(&sv.DynamicSpeed, value); err != nil { + return err + } + + case "FunctionalClassification": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FunctionalClassification = ptr.Int32(int32(i64)) + } + + case "Gate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteSpanGateAttribute to be of type string, got %T instead", value) + } + sv.Gate = types.RouteSpanGateAttribute(jtv) + } + + case "GeometryOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.GeometryOffset = ptr.Int32(int32(i64)) + } + + case "Incidents": + if err := awsRestjson1_deserializeDocumentIndexList(&sv.Incidents, value); err != nil { + return err + } + + case "Names": + if err := awsRestjson1_deserializeDocumentLocalizedStringList(&sv.Names, value); err != nil { + return err + } + + case "Notices": + if err := awsRestjson1_deserializeDocumentIndexList(&sv.Notices, value); err != nil { + return err + } + + case "RailwayCrossing": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteSpanRailwayCrossingAttribute to be of type string, got %T instead", value) + } + sv.RailwayCrossing = types.RouteSpanRailwayCrossingAttribute(jtv) + } + + case "Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "RoadAttributes": + if err := awsRestjson1_deserializeDocumentRouteSpanRoadAttributeList(&sv.RoadAttributes, value); err != nil { + return err + } + + case "RouteNumbers": + if err := awsRestjson1_deserializeDocumentRouteNumberList(&sv.RouteNumbers, value); err != nil { + return err + } + + case "ScooterAccess": + if err := awsRestjson1_deserializeDocumentRouteSpanScooterAccessAttributeList(&sv.ScooterAccess, value); err != nil { + return err + } + + case "SpeedLimit": + if err := awsRestjson1_deserializeDocumentRouteSpanSpeedLimitDetails(&sv.SpeedLimit, value); err != nil { + return err + } + + case "TollSystems": + if err := awsRestjson1_deserializeDocumentIndexList(&sv.TollSystems, value); err != nil { + return err + } + + case "TruckAccess": + if err := awsRestjson1_deserializeDocumentRouteSpanTruckAccessAttributeList(&sv.TruckAccess, value); err != nil { + return err + } + + case "TruckRoadTypes": + if err := awsRestjson1_deserializeDocumentIndexList(&sv.TruckRoadTypes, value); err != nil { + return err + } + + case "TypicalDuration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TypicalDuration = i64 + } + + case "Zones": + if err := awsRestjson1_deserializeDocumentIndexList(&sv.Zones, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteVehicleSpanList(v *[]types.RouteVehicleSpan, 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.RouteVehicleSpan + if *v == nil { + cv = []types.RouteVehicleSpan{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteVehicleSpan + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteVehicleSpan(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteVehicleSummary(v **types.RouteVehicleSummary, 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.RouteVehicleSummary + if *v == nil { + sv = &types.RouteVehicleSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Overview": + if err := awsRestjson1_deserializeDocumentRouteVehicleOverviewSummary(&sv.Overview, value); err != nil { + return err + } + + case "TravelOnly": + if err := awsRestjson1_deserializeDocumentRouteVehicleTravelOnlySummary(&sv.TravelOnly, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteVehicleTravelOnlySummary(v **types.RouteVehicleTravelOnlySummary, 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.RouteVehicleTravelOnlySummary + if *v == nil { + sv = &types.RouteVehicleTravelOnlySummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BestCaseDuration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BestCaseDuration = i64 + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = i64 + } + + case "TypicalDuration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TypicalDuration = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteVehicleTravelStep(v **types.RouteVehicleTravelStep, 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.RouteVehicleTravelStep + if *v == nil { + sv = &types.RouteVehicleTravelStep{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContinueHighwayStepDetails": + if err := awsRestjson1_deserializeDocumentRouteContinueHighwayStepDetails(&sv.ContinueHighwayStepDetails, value); err != nil { + return err + } + + case "ContinueStepDetails": + if err := awsRestjson1_deserializeDocumentRouteContinueStepDetails(&sv.ContinueStepDetails, value); err != nil { + return err + } + + case "CurrentRoad": + if err := awsRestjson1_deserializeDocumentRouteRoad(&sv.CurrentRoad, value); err != nil { + return err + } + + case "Distance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Distance = i64 + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = i64 + } + + case "EnterHighwayStepDetails": + if err := awsRestjson1_deserializeDocumentRouteEnterHighwayStepDetails(&sv.EnterHighwayStepDetails, value); err != nil { + return err + } + + case "ExitNumber": + if err := awsRestjson1_deserializeDocumentLocalizedStringList(&sv.ExitNumber, value); err != nil { + return err + } + + case "ExitStepDetails": + if err := awsRestjson1_deserializeDocumentRouteExitStepDetails(&sv.ExitStepDetails, value); err != nil { + return err + } + + case "GeometryOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.GeometryOffset = ptr.Int32(int32(i64)) + } + + case "Instruction": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Instruction = ptr.String(jtv) + } + + case "KeepStepDetails": + if err := awsRestjson1_deserializeDocumentRouteKeepStepDetails(&sv.KeepStepDetails, value); err != nil { + return err + } + + case "NextRoad": + if err := awsRestjson1_deserializeDocumentRouteRoad(&sv.NextRoad, value); err != nil { + return err + } + + case "RampStepDetails": + if err := awsRestjson1_deserializeDocumentRouteRampStepDetails(&sv.RampStepDetails, value); err != nil { + return err + } + + case "RoundaboutEnterStepDetails": + if err := awsRestjson1_deserializeDocumentRouteRoundaboutEnterStepDetails(&sv.RoundaboutEnterStepDetails, value); err != nil { + return err + } + + case "RoundaboutExitStepDetails": + if err := awsRestjson1_deserializeDocumentRouteRoundaboutExitStepDetails(&sv.RoundaboutExitStepDetails, value); err != nil { + return err + } + + case "RoundaboutPassStepDetails": + if err := awsRestjson1_deserializeDocumentRouteRoundaboutPassStepDetails(&sv.RoundaboutPassStepDetails, value); err != nil { + return err + } + + case "Signpost": + if err := awsRestjson1_deserializeDocumentRouteSignpost(&sv.Signpost, value); err != nil { + return err + } + + case "TurnStepDetails": + if err := awsRestjson1_deserializeDocumentRouteTurnStepDetails(&sv.TurnStepDetails, value); err != nil { + return err + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteVehicleTravelStepType to be of type string, got %T instead", value) + } + sv.Type = types.RouteVehicleTravelStepType(jtv) + } + + case "UTurnStepDetails": + if err := awsRestjson1_deserializeDocumentRouteUTurnStepDetails(&sv.UTurnStepDetails, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteVehicleTravelStepList(v *[]types.RouteVehicleTravelStep, 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.RouteVehicleTravelStep + if *v == nil { + cv = []types.RouteVehicleTravelStep{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteVehicleTravelStep + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteVehicleTravelStep(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteViolatedConstraints(v **types.RouteViolatedConstraints, 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.RouteViolatedConstraints + if *v == nil { + sv = &types.RouteViolatedConstraints{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AllHazardsRestricted": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.AllHazardsRestricted = ptr.Bool(jtv) + } + + case "AxleCount": + if err := awsRestjson1_deserializeDocumentRouteNoticeDetailRange(&sv.AxleCount, value); err != nil { + return err + } + + case "HazardousCargos": + if err := awsRestjson1_deserializeDocumentRouteHazardousCargoTypeList(&sv.HazardousCargos, value); err != nil { + return err + } + + case "MaxHeight": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DimensionCentimeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxHeight = i64 + } + + case "MaxKpraLength": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DimensionCentimeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxKpraLength = i64 + } + + case "MaxLength": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DimensionCentimeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxLength = i64 + } + + case "MaxPayloadCapacity": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WeightKilograms to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxPayloadCapacity = i64 + } + + case "MaxWeight": + if err := awsRestjson1_deserializeDocumentRouteWeightConstraint(&sv.MaxWeight, value); err != nil { + return err + } + + case "MaxWeightPerAxle": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WeightKilograms to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxWeightPerAxle = i64 + } + + case "MaxWeightPerAxleGroup": + if err := awsRestjson1_deserializeDocumentWeightPerAxleGroup(&sv.MaxWeightPerAxleGroup, value); err != nil { + return err + } + + case "MaxWidth": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DimensionCentimeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxWidth = i64 + } + + case "Occupancy": + if err := awsRestjson1_deserializeDocumentRouteNoticeDetailRange(&sv.Occupancy, value); err != nil { + return err + } + + case "RestrictedTimes": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RestrictedTimes = ptr.String(jtv) + } + + case "TimeDependent": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.TimeDependent = ptr.Bool(jtv) + } + + case "TrailerCount": + if err := awsRestjson1_deserializeDocumentRouteNoticeDetailRange(&sv.TrailerCount, value); err != nil { + return err + } + + case "TravelMode": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.TravelMode = ptr.Bool(jtv) + } + + case "TruckRoadType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TruckRoadType = ptr.String(jtv) + } + + case "TruckType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteTruckType to be of type string, got %T instead", value) + } + sv.TruckType = types.RouteTruckType(jtv) + } + + case "TunnelRestrictionCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TunnelRestrictionCode to be of type string, got %T instead", value) + } + sv.TunnelRestrictionCode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteWeightConstraint(v **types.RouteWeightConstraint, 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.RouteWeightConstraint + if *v == nil { + sv = &types.RouteWeightConstraint{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteWeightConstraintType to be of type string, got %T instead", value) + } + sv.Type = types.RouteWeightConstraintType(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WeightKilograms to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Value = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteZone(v **types.RouteZone, 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.RouteZone + if *v == nil { + sv = &types.RouteZone{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Category": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteZoneCategory to be of type string, got %T instead", value) + } + sv.Category = types.RouteZoneCategory(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteZoneList(v *[]types.RouteZone, 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.RouteZone + if *v == nil { + cv = []types.RouteZone{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteZone + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteZone(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ThrottlingException + if *v == nil { + sv = &types.ThrottlingException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTruckRoadTypeList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TruckRoadType to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_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 "fieldList": + if err := awsRestjson1_deserializeDocumentValidationExceptionFieldList(&sv.FieldList, value); err != nil { + return err + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ValidationExceptionReason to be of type string, got %T instead", value) + } + sv.Reason = types.ValidationExceptionReason(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentValidationExceptionField(v **types.ValidationExceptionField, 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.ValidationExceptionField + if *v == nil { + sv = &types.ValidationExceptionField{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentValidationExceptionFieldList(v *[]types.ValidationExceptionField, 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.ValidationExceptionField + if *v == nil { + cv = []types.ValidationExceptionField{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ValidationExceptionField + destAddr := &col + if err := awsRestjson1_deserializeDocumentValidationExceptionField(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentWaypointOptimizationConnection(v **types.WaypointOptimizationConnection, 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.WaypointOptimizationConnection + if *v == nil { + sv = &types.WaypointOptimizationConnection{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Distance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DistanceMeters to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Distance = i64 + } + + case "From": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WaypointId to be of type string, got %T instead", value) + } + sv.From = ptr.String(jtv) + } + + case "RestDuration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RestDuration = i64 + } + + case "To": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WaypointId to be of type string, got %T instead", value) + } + sv.To = ptr.String(jtv) + } + + case "TravelDuration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TravelDuration = i64 + } + + case "WaitDuration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.WaitDuration = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentWaypointOptimizationConnectionList(v *[]types.WaypointOptimizationConnection, 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.WaypointOptimizationConnection + if *v == nil { + cv = []types.WaypointOptimizationConnection{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.WaypointOptimizationConnection + destAddr := &col + if err := awsRestjson1_deserializeDocumentWaypointOptimizationConnection(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentWaypointOptimizationFailedConstraint(v **types.WaypointOptimizationFailedConstraint, 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.WaypointOptimizationFailedConstraint + if *v == nil { + sv = &types.WaypointOptimizationFailedConstraint{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Constraint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WaypointOptimizationConstraint to be of type string, got %T instead", value) + } + sv.Constraint = types.WaypointOptimizationConstraint(jtv) + } + + case "Reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Reason = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentWaypointOptimizationFailedConstraintList(v *[]types.WaypointOptimizationFailedConstraint, 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.WaypointOptimizationFailedConstraint + if *v == nil { + cv = []types.WaypointOptimizationFailedConstraint{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.WaypointOptimizationFailedConstraint + destAddr := &col + if err := awsRestjson1_deserializeDocumentWaypointOptimizationFailedConstraint(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentWaypointOptimizationImpedingWaypoint(v **types.WaypointOptimizationImpedingWaypoint, 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.WaypointOptimizationImpedingWaypoint + if *v == nil { + sv = &types.WaypointOptimizationImpedingWaypoint{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FailedConstraints": + if err := awsRestjson1_deserializeDocumentWaypointOptimizationFailedConstraintList(&sv.FailedConstraints, value); err != nil { + return err + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WaypointId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "Position": + if err := awsRestjson1_deserializeDocumentPosition(&sv.Position, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentWaypointOptimizationImpedingWaypointList(v *[]types.WaypointOptimizationImpedingWaypoint, 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.WaypointOptimizationImpedingWaypoint + if *v == nil { + cv = []types.WaypointOptimizationImpedingWaypoint{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.WaypointOptimizationImpedingWaypoint + destAddr := &col + if err := awsRestjson1_deserializeDocumentWaypointOptimizationImpedingWaypoint(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentWaypointOptimizationOptimizedWaypoint(v **types.WaypointOptimizationOptimizedWaypoint, 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.WaypointOptimizationOptimizedWaypoint + if *v == nil { + sv = &types.WaypointOptimizationOptimizedWaypoint{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ArrivalTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TimestampWithTimezoneOffset to be of type string, got %T instead", value) + } + sv.ArrivalTime = ptr.String(jtv) + } + + case "DepartureTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TimestampWithTimezoneOffset to be of type string, got %T instead", value) + } + sv.DepartureTime = ptr.String(jtv) + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WaypointId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "Position": + if err := awsRestjson1_deserializeDocumentPosition(&sv.Position, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentWaypointOptimizationOptimizedWaypointList(v *[]types.WaypointOptimizationOptimizedWaypoint, 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.WaypointOptimizationOptimizedWaypoint + if *v == nil { + cv = []types.WaypointOptimizationOptimizedWaypoint{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.WaypointOptimizationOptimizedWaypoint + destAddr := &col + if err := awsRestjson1_deserializeDocumentWaypointOptimizationOptimizedWaypoint(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentWaypointOptimizationTimeBreakdown(v **types.WaypointOptimizationTimeBreakdown, 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.WaypointOptimizationTimeBreakdown + if *v == nil { + sv = &types.WaypointOptimizationTimeBreakdown{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RestDuration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RestDuration = i64 + } + + case "ServiceDuration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ServiceDuration = i64 + } + + case "TravelDuration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TravelDuration = i64 + } + + case "WaitDuration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.WaitDuration = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentWeightPerAxleGroup(v **types.WeightPerAxleGroup, 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.WeightPerAxleGroup + if *v == nil { + sv = &types.WeightPerAxleGroup{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Quad": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WeightKilograms to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Quad = i64 + } + + case "Quint": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WeightKilograms to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Quint = i64 + } + + case "Single": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WeightKilograms to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Single = i64 + } + + case "Tandem": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WeightKilograms to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Tandem = i64 + } + + case "Triple": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WeightKilograms to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Triple = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} diff --git a/service/georoutes/doc.go b/service/georoutes/doc.go new file mode 100644 index 00000000000..83a39df64d5 --- /dev/null +++ b/service/georoutes/doc.go @@ -0,0 +1,23 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package georoutes provides the API client, operations, and parameter types for +// Amazon Location Service Routes V2. +// +// With the Amazon Location Routes API you can calculate routes and estimate +// travel time based on up-to-date road network and live traffic information. +// +// Calculate optimal travel routes and estimate travel times using up-to-date road +// network and traffic data. Key features include: +// +// - Point-to-point routing with estimated travel time, distance, and +// turn-by-turn directions +// +// - Multi-point route optimization to minimize travel time or distance +// +// - Route matrices for efficient multi-destination planning +// +// - Isoline calculations to determine reachable areas within specified time or +// distance thresholds +// +// - Map-matching to align GPS traces with the road network +package georoutes diff --git a/service/georoutes/endpoints.go b/service/georoutes/endpoints.go new file mode 100644 index 00000000000..92df51e8e9b --- /dev/null +++ b/service/georoutes/endpoints.go @@ -0,0 +1,741 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package georoutes + +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/georoutes/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" + "github.com/aws/smithy-go/tracing" + 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 = "geo-routes" + } + 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_GEO_ROUTES") + + if g && !s { + return + } + + value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "Geo Routes", 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 { + // 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 + + // The AWS region used to dispatch the request. + // + // Parameter is + // required. + // + // AWS::Region + Region *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 _PartitionResult.Name == "aws" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := func() string { + var out strings.Builder + out.WriteString("https://routes.geo.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws" { + if _UseFIPS == true { + if _UseDualStack == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://routes.geo-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws" { + if _UseFIPS == true { + if _UseDualStack == false { + uriString := func() string { + var out strings.Builder + out.WriteString("https://routes.geo-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws" { + if _UseFIPS == false { + if _UseDualStack == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://routes.geo.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws-us-gov" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := func() string { + var out strings.Builder + out.WriteString("https://routes.geo.") + out.WriteString(_Region) + out.WriteString(".us-gov.") + out.WriteString(_PartitionResult.DnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws-us-gov" { + if _UseFIPS == true { + if _UseDualStack == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://routes.geo-fips.") + out.WriteString(_Region) + out.WriteString(".us-gov.") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws-us-gov" { + if _UseFIPS == true { + if _UseDualStack == false { + uriString := func() string { + var out strings.Builder + out.WriteString("https://routes.geo-fips.") + out.WriteString(_Region) + out.WriteString(".us-gov.") + out.WriteString(_PartitionResult.DnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _PartitionResult.Name == "aws-us-gov" { + if _UseFIPS == false { + if _UseDualStack == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://routes.geo.") + out.WriteString(_Region) + out.WriteString(".us-gov.") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + out.WriteString("/v2") + 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 + } + } + } + if _UseFIPS == true { + if _UseDualStack == true { + if true == _PartitionResult.SupportsFIPS { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://geo-routes-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 _UseDualStack == false { + if _PartitionResult.SupportsFIPS == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://geo-routes-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 _UseFIPS == false { + if _UseDualStack == true { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://geo-routes.") + 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://geo-routes.") + 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.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) + params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) + params.Endpoint = options.BaseEndpoint + params.Region = bindRegion(options.Region) + + 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, +) { + _, span := tracing.StartSpan(ctx, "ResolveEndpoint") + defer span.End() + + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleFinalize(ctx, in) + } + + 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 := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", + func() (smithyendpoints.Endpoint, error) { + return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + }) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) + + 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) + } + + span.End() + return next.HandleFinalize(ctx, in) +} diff --git a/service/georoutes/endpoints_config_test.go b/service/georoutes/endpoints_config_test.go new file mode 100644 index 00000000000..92ce305280e --- /dev/null +++ b/service/georoutes/endpoints_config_test.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package georoutes + +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-geo-routes.dev", + envIgnore: true, + configGlobal: "http://config-global.dev", + configService: "http://config-geo-routes.dev", + expectURL: nil, + }, + "env global": { + envGlobal: "https://env-global.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-geo-routes.dev", + expectURL: aws.String("https://env-global.dev"), + }, + "env service": { + envGlobal: "https://env-global.dev", + envService: "https://env-geo-routes.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-geo-routes.dev", + expectURL: aws.String("https://env-geo-routes.dev"), + }, + "config ignore": { + envGlobal: "https://env-global.dev", + envService: "https://env-geo-routes.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-geo-routes.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-geo-routes.dev", + expectURL: aws.String("http://config-geo-routes.dev"), + }, + "client": { + envGlobal: "https://env-global.dev", + envService: "https://env-geo-routes.dev", + configGlobal: "http://config-global.dev", + configService: "http://config-geo-routes.dev", + clientEndpoint: aws.String("https://client-geo-routes.dev"), + expectURL: aws.String("https://client-geo-routes.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_GEO_ROUTES", 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/georoutes/endpoints_test.go b/service/georoutes/endpoints_test.go new file mode 100644 index 00000000000..5943a7745d0 --- /dev/null +++ b/service/georoutes/endpoints_test.go @@ -0,0 +1,1006 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package georoutes + +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 custom endpoint with region not set and fips disabled +func TestEndpointCase0(t *testing.T) { + var params = EndpointParameters{ + Endpoint: ptr.String("https://example.com"), + UseFIPS: 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://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 +func TestEndpointCase1(t *testing.T) { + var params = EndpointParameters{ + Endpoint: ptr.String("https://example.com"), + UseFIPS: 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 := "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 TestEndpointCase2(t *testing.T) { + var params = EndpointParameters{ + Endpoint: ptr.String("https://example.com"), + 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 := "Invalid Configuration: Dualstack and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase3(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://routes.geo-fips.us-east-1.api.aws/v2") + + 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 TestEndpointCase4(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://routes.geo-fips.us-east-1.amazonaws.com/v2") + + 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 TestEndpointCase5(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://routes.geo.us-east-1.api.aws/v2") + + 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 TestEndpointCase6(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://routes.geo.us-east-1.amazonaws.com/v2") + + 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-northwest-1 with FIPS enabled and DualStack enabled +func TestEndpointCase7(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("cn-northwest-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://geo-routes-fips.cn-northwest-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-northwest-1 with FIPS enabled and DualStack disabled +func TestEndpointCase8(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("cn-northwest-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://geo-routes-fips.cn-northwest-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-northwest-1 with FIPS disabled and DualStack enabled +func TestEndpointCase9(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("cn-northwest-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://geo-routes.cn-northwest-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-northwest-1 with FIPS disabled and DualStack disabled +func TestEndpointCase10(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("cn-northwest-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://geo-routes.cn-northwest-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-west-1 with FIPS enabled and DualStack enabled +func TestEndpointCase11(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-west-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://routes.geo-fips.us-gov-west-1.us-gov.api.aws/v2") + + 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-west-1 with FIPS enabled and DualStack disabled +func TestEndpointCase12(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-west-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://routes.geo-fips.us-gov-west-1.us-gov.amazonaws.com/v2") + + 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-west-1 with FIPS disabled and DualStack enabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-west-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://routes.geo.us-gov-west-1.us-gov.api.aws/v2") + + 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-west-1 with FIPS disabled and DualStack disabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-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://routes.geo.us-gov-west-1.us-gov.amazonaws.com/v2") + + 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 TestEndpointCase15(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 TestEndpointCase16(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://geo-routes-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 TestEndpointCase17(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 TestEndpointCase18(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://geo-routes.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 TestEndpointCase19(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 TestEndpointCase20(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://geo-routes-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 TestEndpointCase21(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 TestEndpointCase22(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://geo-routes.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 eu-isoe-west-1 with FIPS enabled and DualStack enabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-isoe-west-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 eu-isoe-west-1 with FIPS enabled and DualStack disabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-isoe-west-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://geo-routes-fips.eu-isoe-west-1.cloud.adc-e.uk") + + 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-isoe-west-1 with FIPS disabled and DualStack enabled +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-isoe-west-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 eu-isoe-west-1 with FIPS disabled and DualStack disabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-isoe-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://geo-routes.eu-isoe-west-1.cloud.adc-e.uk") + + 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-isof-south-1 with FIPS enabled and DualStack enabled +func TestEndpointCase27(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isof-south-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-isof-south-1 with FIPS enabled and DualStack disabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isof-south-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://geo-routes-fips.us-isof-south-1.csp.hci.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-isof-south-1 with FIPS disabled and DualStack enabled +func TestEndpointCase29(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isof-south-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-isof-south-1 with FIPS disabled and DualStack disabled +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isof-south-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://geo-routes.us-isof-south-1.csp.hci.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) + } +} + +// Missing region +func TestEndpointCase31(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/georoutes/generated.json b/service/georoutes/generated.json new file mode 100644 index 00000000000..447c43abae0 --- /dev/null +++ b/service/georoutes/generated.json @@ -0,0 +1,37 @@ +{ + "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_CalculateIsolines.go", + "api_op_CalculateRouteMatrix.go", + "api_op_CalculateRoutes.go", + "api_op_OptimizeWaypoints.go", + "api_op_SnapToRoads.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/enums.go", + "types/errors.go", + "types/types.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/georoutes", + "unstable": false +} diff --git a/service/georoutes/go.mod b/service/georoutes/go.mod new file mode 100644 index 00000000000..e9d2dc3fcdb --- /dev/null +++ b/service/georoutes/go.mod @@ -0,0 +1,16 @@ +module github.com/aws/aws-sdk-go-v2/service/georoutes + +go 1.21 + +require ( + github.com/aws/aws-sdk-go-v2 v1.32.3 + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.22 + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.22 + github.com/aws/smithy-go v1.22.0 +) + +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/georoutes/go.sum b/service/georoutes/go.sum new file mode 100644 index 00000000000..70a20636e37 --- /dev/null +++ b/service/georoutes/go.sum @@ -0,0 +1,2 @@ +github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= +github.com/aws/smithy-go v1.22.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= diff --git a/service/georoutes/go_module_metadata.go b/service/georoutes/go_module_metadata.go new file mode 100644 index 00000000000..301cd59a6c3 --- /dev/null +++ b/service/georoutes/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package georoutes + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/georoutes/internal/endpoints/endpoints.go b/service/georoutes/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..cf7fc0a157c --- /dev/null +++ b/service/georoutes/internal/endpoints/endpoints.go @@ -0,0 +1,296 @@ +// 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 Geo Routes 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|mx)\\-\\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: "geo-routes.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "geo-routes-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "geo-routes-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-routes.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "geo-routes.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "geo-routes-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "geo-routes-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-routes.{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: "geo-routes-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-routes.{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: "geo-routes-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-routes.{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: "geo-routes-fips.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-routes.{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: "geo-routes-fips.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-routes.{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: "geo-routes.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "geo-routes-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "geo-routes-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "geo-routes.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/georoutes/internal/endpoints/endpoints_test.go b/service/georoutes/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/georoutes/internal/endpoints/endpoints_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "testing" +) + +func TestRegexCompile(t *testing.T) { + _ = defaultPartitions +} diff --git a/service/georoutes/options.go b/service/georoutes/options.go new file mode 100644 index 00000000000..53c1b306080 --- /dev/null +++ b/service/georoutes/options.go @@ -0,0 +1,232 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package georoutes + +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/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + 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 + + // 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 client meter provider. + MeterProvider metrics.MeterProvider + + // 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 client tracer provider. + TracerProvider tracing.TracerProvider + + // 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/georoutes/protocol_test.go b/service/georoutes/protocol_test.go new file mode 100644 index 00000000000..15e45a9420a --- /dev/null +++ b/service/georoutes/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package georoutes diff --git a/service/georoutes/serializers.go b/service/georoutes/serializers.go new file mode 100644 index 00000000000..af23940db9c --- /dev/null +++ b/service/georoutes/serializers.go @@ -0,0 +1,4096 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package georoutes + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/georoutes/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" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "math" +) + +type awsRestjson1_serializeOpCalculateIsolines struct { +} + +func (*awsRestjson1_serializeOpCalculateIsolines) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCalculateIsolines) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CalculateIsolinesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/isolines") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCalculateIsolinesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCalculateIsolinesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCalculateIsolinesInput(v *CalculateIsolinesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Key != nil { + encoder.SetQuery("key").String(*v.Key) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCalculateIsolinesInput(v *CalculateIsolinesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Allow != nil { + ok := object.Key("Allow") + if err := awsRestjson1_serializeDocumentIsolineAllowOptions(v.Allow, ok); err != nil { + return err + } + } + + if v.ArrivalTime != nil { + ok := object.Key("ArrivalTime") + ok.String(*v.ArrivalTime) + } + + if v.Avoid != nil { + ok := object.Key("Avoid") + if err := awsRestjson1_serializeDocumentIsolineAvoidanceOptions(v.Avoid, ok); err != nil { + return err + } + } + + if v.DepartNow != nil { + ok := object.Key("DepartNow") + ok.Boolean(*v.DepartNow) + } + + if v.DepartureTime != nil { + ok := object.Key("DepartureTime") + ok.String(*v.DepartureTime) + } + + if v.Destination != nil { + ok := object.Key("Destination") + if err := awsRestjson1_serializeDocumentPosition(v.Destination, ok); err != nil { + return err + } + } + + if v.DestinationOptions != nil { + ok := object.Key("DestinationOptions") + if err := awsRestjson1_serializeDocumentIsolineDestinationOptions(v.DestinationOptions, ok); err != nil { + return err + } + } + + if len(v.IsolineGeometryFormat) > 0 { + ok := object.Key("IsolineGeometryFormat") + ok.String(string(v.IsolineGeometryFormat)) + } + + if v.IsolineGranularity != nil { + ok := object.Key("IsolineGranularity") + if err := awsRestjson1_serializeDocumentIsolineGranularityOptions(v.IsolineGranularity, ok); err != nil { + return err + } + } + + if len(v.OptimizeIsolineFor) > 0 { + ok := object.Key("OptimizeIsolineFor") + ok.String(string(v.OptimizeIsolineFor)) + } + + if len(v.OptimizeRoutingFor) > 0 { + ok := object.Key("OptimizeRoutingFor") + ok.String(string(v.OptimizeRoutingFor)) + } + + if v.Origin != nil { + ok := object.Key("Origin") + if err := awsRestjson1_serializeDocumentPosition(v.Origin, ok); err != nil { + return err + } + } + + if v.OriginOptions != nil { + ok := object.Key("OriginOptions") + if err := awsRestjson1_serializeDocumentIsolineOriginOptions(v.OriginOptions, ok); err != nil { + return err + } + } + + if v.Thresholds != nil { + ok := object.Key("Thresholds") + if err := awsRestjson1_serializeDocumentIsolineThresholds(v.Thresholds, ok); err != nil { + return err + } + } + + if v.Traffic != nil { + ok := object.Key("Traffic") + if err := awsRestjson1_serializeDocumentIsolineTrafficOptions(v.Traffic, ok); err != nil { + return err + } + } + + if len(v.TravelMode) > 0 { + ok := object.Key("TravelMode") + ok.String(string(v.TravelMode)) + } + + if v.TravelModeOptions != nil { + ok := object.Key("TravelModeOptions") + if err := awsRestjson1_serializeDocumentIsolineTravelModeOptions(v.TravelModeOptions, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCalculateRouteMatrix struct { +} + +func (*awsRestjson1_serializeOpCalculateRouteMatrix) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCalculateRouteMatrix) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CalculateRouteMatrixInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/route-matrix") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCalculateRouteMatrixInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCalculateRouteMatrixInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCalculateRouteMatrixInput(v *CalculateRouteMatrixInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Key != nil { + encoder.SetQuery("key").String(*v.Key) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCalculateRouteMatrixInput(v *CalculateRouteMatrixInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Allow != nil { + ok := object.Key("Allow") + if err := awsRestjson1_serializeDocumentRouteMatrixAllowOptions(v.Allow, ok); err != nil { + return err + } + } + + if v.Avoid != nil { + ok := object.Key("Avoid") + if err := awsRestjson1_serializeDocumentRouteMatrixAvoidanceOptions(v.Avoid, ok); err != nil { + return err + } + } + + if v.DepartNow != nil { + ok := object.Key("DepartNow") + ok.Boolean(*v.DepartNow) + } + + if v.DepartureTime != nil { + ok := object.Key("DepartureTime") + ok.String(*v.DepartureTime) + } + + if v.Destinations != nil { + ok := object.Key("Destinations") + if err := awsRestjson1_serializeDocumentRouteMatrixDestinationList(v.Destinations, ok); err != nil { + return err + } + } + + if v.Exclude != nil { + ok := object.Key("Exclude") + if err := awsRestjson1_serializeDocumentRouteMatrixExclusionOptions(v.Exclude, ok); err != nil { + return err + } + } + + if len(v.OptimizeRoutingFor) > 0 { + ok := object.Key("OptimizeRoutingFor") + ok.String(string(v.OptimizeRoutingFor)) + } + + if v.Origins != nil { + ok := object.Key("Origins") + if err := awsRestjson1_serializeDocumentRouteMatrixOriginList(v.Origins, ok); err != nil { + return err + } + } + + if v.RoutingBoundary != nil { + ok := object.Key("RoutingBoundary") + if err := awsRestjson1_serializeDocumentRouteMatrixBoundary(v.RoutingBoundary, ok); err != nil { + return err + } + } + + if v.Traffic != nil { + ok := object.Key("Traffic") + if err := awsRestjson1_serializeDocumentRouteMatrixTrafficOptions(v.Traffic, ok); err != nil { + return err + } + } + + if len(v.TravelMode) > 0 { + ok := object.Key("TravelMode") + ok.String(string(v.TravelMode)) + } + + if v.TravelModeOptions != nil { + ok := object.Key("TravelModeOptions") + if err := awsRestjson1_serializeDocumentRouteMatrixTravelModeOptions(v.TravelModeOptions, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCalculateRoutes struct { +} + +func (*awsRestjson1_serializeOpCalculateRoutes) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCalculateRoutes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CalculateRoutesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/routes") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCalculateRoutesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCalculateRoutesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCalculateRoutesInput(v *CalculateRoutesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Key != nil { + encoder.SetQuery("key").String(*v.Key) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCalculateRoutesInput(v *CalculateRoutesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Allow != nil { + ok := object.Key("Allow") + if err := awsRestjson1_serializeDocumentRouteAllowOptions(v.Allow, ok); err != nil { + return err + } + } + + if v.ArrivalTime != nil { + ok := object.Key("ArrivalTime") + ok.String(*v.ArrivalTime) + } + + if v.Avoid != nil { + ok := object.Key("Avoid") + if err := awsRestjson1_serializeDocumentRouteAvoidanceOptions(v.Avoid, ok); err != nil { + return err + } + } + + if v.DepartNow != nil { + ok := object.Key("DepartNow") + ok.Boolean(*v.DepartNow) + } + + if v.DepartureTime != nil { + ok := object.Key("DepartureTime") + ok.String(*v.DepartureTime) + } + + if v.Destination != nil { + ok := object.Key("Destination") + if err := awsRestjson1_serializeDocumentPosition(v.Destination, ok); err != nil { + return err + } + } + + if v.DestinationOptions != nil { + ok := object.Key("DestinationOptions") + if err := awsRestjson1_serializeDocumentRouteDestinationOptions(v.DestinationOptions, ok); err != nil { + return err + } + } + + if v.Driver != nil { + ok := object.Key("Driver") + if err := awsRestjson1_serializeDocumentRouteDriverOptions(v.Driver, ok); err != nil { + return err + } + } + + if v.Exclude != nil { + ok := object.Key("Exclude") + if err := awsRestjson1_serializeDocumentRouteExclusionOptions(v.Exclude, ok); err != nil { + return err + } + } + + if len(v.InstructionsMeasurementSystem) > 0 { + ok := object.Key("InstructionsMeasurementSystem") + ok.String(string(v.InstructionsMeasurementSystem)) + } + + if v.Languages != nil { + ok := object.Key("Languages") + if err := awsRestjson1_serializeDocumentLanguageTagList(v.Languages, ok); err != nil { + return err + } + } + + if v.LegAdditionalFeatures != nil { + ok := object.Key("LegAdditionalFeatures") + if err := awsRestjson1_serializeDocumentRouteLegAdditionalFeatureList(v.LegAdditionalFeatures, ok); err != nil { + return err + } + } + + if len(v.LegGeometryFormat) > 0 { + ok := object.Key("LegGeometryFormat") + ok.String(string(v.LegGeometryFormat)) + } + + if v.MaxAlternatives != nil { + ok := object.Key("MaxAlternatives") + ok.Integer(*v.MaxAlternatives) + } + + if len(v.OptimizeRoutingFor) > 0 { + ok := object.Key("OptimizeRoutingFor") + ok.String(string(v.OptimizeRoutingFor)) + } + + if v.Origin != nil { + ok := object.Key("Origin") + if err := awsRestjson1_serializeDocumentPosition(v.Origin, ok); err != nil { + return err + } + } + + if v.OriginOptions != nil { + ok := object.Key("OriginOptions") + if err := awsRestjson1_serializeDocumentRouteOriginOptions(v.OriginOptions, ok); err != nil { + return err + } + } + + if v.SpanAdditionalFeatures != nil { + ok := object.Key("SpanAdditionalFeatures") + if err := awsRestjson1_serializeDocumentRouteSpanAdditionalFeatureList(v.SpanAdditionalFeatures, ok); err != nil { + return err + } + } + + if v.Tolls != nil { + ok := object.Key("Tolls") + if err := awsRestjson1_serializeDocumentRouteTollOptions(v.Tolls, ok); err != nil { + return err + } + } + + if v.Traffic != nil { + ok := object.Key("Traffic") + if err := awsRestjson1_serializeDocumentRouteTrafficOptions(v.Traffic, ok); err != nil { + return err + } + } + + if len(v.TravelMode) > 0 { + ok := object.Key("TravelMode") + ok.String(string(v.TravelMode)) + } + + if v.TravelModeOptions != nil { + ok := object.Key("TravelModeOptions") + if err := awsRestjson1_serializeDocumentRouteTravelModeOptions(v.TravelModeOptions, ok); err != nil { + return err + } + } + + if len(v.TravelStepType) > 0 { + ok := object.Key("TravelStepType") + ok.String(string(v.TravelStepType)) + } + + if v.Waypoints != nil { + ok := object.Key("Waypoints") + if err := awsRestjson1_serializeDocumentRouteWaypointList(v.Waypoints, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpOptimizeWaypoints struct { +} + +func (*awsRestjson1_serializeOpOptimizeWaypoints) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpOptimizeWaypoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*OptimizeWaypointsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/optimize-waypoints") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsOptimizeWaypointsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentOptimizeWaypointsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsOptimizeWaypointsInput(v *OptimizeWaypointsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Key != nil { + encoder.SetQuery("key").String(*v.Key) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentOptimizeWaypointsInput(v *OptimizeWaypointsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Avoid != nil { + ok := object.Key("Avoid") + if err := awsRestjson1_serializeDocumentWaypointOptimizationAvoidanceOptions(v.Avoid, ok); err != nil { + return err + } + } + + if v.DepartureTime != nil { + ok := object.Key("DepartureTime") + ok.String(*v.DepartureTime) + } + + if v.Destination != nil { + ok := object.Key("Destination") + if err := awsRestjson1_serializeDocumentPosition(v.Destination, ok); err != nil { + return err + } + } + + if v.DestinationOptions != nil { + ok := object.Key("DestinationOptions") + if err := awsRestjson1_serializeDocumentWaypointOptimizationDestinationOptions(v.DestinationOptions, ok); err != nil { + return err + } + } + + if v.Driver != nil { + ok := object.Key("Driver") + if err := awsRestjson1_serializeDocumentWaypointOptimizationDriverOptions(v.Driver, ok); err != nil { + return err + } + } + + if v.Exclude != nil { + ok := object.Key("Exclude") + if err := awsRestjson1_serializeDocumentWaypointOptimizationExclusionOptions(v.Exclude, ok); err != nil { + return err + } + } + + if len(v.OptimizeSequencingFor) > 0 { + ok := object.Key("OptimizeSequencingFor") + ok.String(string(v.OptimizeSequencingFor)) + } + + if v.Origin != nil { + ok := object.Key("Origin") + if err := awsRestjson1_serializeDocumentPosition(v.Origin, ok); err != nil { + return err + } + } + + if v.OriginOptions != nil { + ok := object.Key("OriginOptions") + if err := awsRestjson1_serializeDocumentWaypointOptimizationOriginOptions(v.OriginOptions, ok); err != nil { + return err + } + } + + if v.Traffic != nil { + ok := object.Key("Traffic") + if err := awsRestjson1_serializeDocumentWaypointOptimizationTrafficOptions(v.Traffic, ok); err != nil { + return err + } + } + + if len(v.TravelMode) > 0 { + ok := object.Key("TravelMode") + ok.String(string(v.TravelMode)) + } + + if v.TravelModeOptions != nil { + ok := object.Key("TravelModeOptions") + if err := awsRestjson1_serializeDocumentWaypointOptimizationTravelModeOptions(v.TravelModeOptions, ok); err != nil { + return err + } + } + + if v.Waypoints != nil { + ok := object.Key("Waypoints") + if err := awsRestjson1_serializeDocumentWaypointOptimizationWaypointList(v.Waypoints, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpSnapToRoads struct { +} + +func (*awsRestjson1_serializeOpSnapToRoads) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSnapToRoads) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*SnapToRoadsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/snap-to-roads") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsSnapToRoadsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentSnapToRoadsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsSnapToRoadsInput(v *SnapToRoadsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Key != nil { + encoder.SetQuery("key").String(*v.Key) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSnapToRoadsInput(v *SnapToRoadsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.SnappedGeometryFormat) > 0 { + ok := object.Key("SnappedGeometryFormat") + ok.String(string(v.SnappedGeometryFormat)) + } + + if v.SnapRadius != 0 { + ok := object.Key("SnapRadius") + ok.Long(v.SnapRadius) + } + + if v.TracePoints != nil { + ok := object.Key("TracePoints") + if err := awsRestjson1_serializeDocumentRoadSnapTracePointList(v.TracePoints, ok); err != nil { + return err + } + } + + if len(v.TravelMode) > 0 { + ok := object.Key("TravelMode") + ok.String(string(v.TravelMode)) + } + + if v.TravelModeOptions != nil { + ok := object.Key("TravelModeOptions") + if err := awsRestjson1_serializeDocumentRoadSnapTravelModeOptions(v.TravelModeOptions, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentBeforeWaypointsList(v []int32, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.Integer(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentBoundingBox(v []float64, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + switch { + case math.IsNaN(v[i]): + av.String("NaN") + + case math.IsInf(v[i], 1): + av.String("Infinity") + + case math.IsInf(v[i], -1): + av.String("-Infinity") + + default: + av.Double(v[i]) + + } + } + return nil +} + +func awsRestjson1_serializeDocumentCircle(v *types.Circle, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Center != nil { + ok := object.Key("Center") + if err := awsRestjson1_serializeDocumentPosition(v.Center, ok); err != nil { + return err + } + } + + if v.Radius != nil { + ok := object.Key("Radius") + switch { + case math.IsNaN(*v.Radius): + ok.String("NaN") + + case math.IsInf(*v.Radius, 1): + ok.String("Infinity") + + case math.IsInf(*v.Radius, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.Radius) + + } + } + + return nil +} + +func awsRestjson1_serializeDocumentCorridor(v *types.Corridor, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LineString != nil { + ok := object.Key("LineString") + if err := awsRestjson1_serializeDocumentLineString(v.LineString, ok); err != nil { + return err + } + } + + if v.Radius != nil { + ok := object.Key("Radius") + ok.Integer(*v.Radius) + } + + return nil +} + +func awsRestjson1_serializeDocumentCountryCodeList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentDistanceThresholdList(v []int64, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.Long(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentIsolineAllowOptions(v *types.IsolineAllowOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Hot != nil { + ok := object.Key("Hot") + ok.Boolean(*v.Hot) + } + + if v.Hov != nil { + ok := object.Key("Hov") + ok.Boolean(*v.Hov) + } + + return nil +} + +func awsRestjson1_serializeDocumentIsolineAvoidanceArea(v *types.IsolineAvoidanceArea, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Except != nil { + ok := object.Key("Except") + if err := awsRestjson1_serializeDocumentIsolineAvoidanceAreaGeometryList(v.Except, ok); err != nil { + return err + } + } + + if v.Geometry != nil { + ok := object.Key("Geometry") + if err := awsRestjson1_serializeDocumentIsolineAvoidanceAreaGeometry(v.Geometry, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentIsolineAvoidanceAreaGeometry(v *types.IsolineAvoidanceAreaGeometry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BoundingBox != nil { + ok := object.Key("BoundingBox") + if err := awsRestjson1_serializeDocumentBoundingBox(v.BoundingBox, ok); err != nil { + return err + } + } + + if v.Corridor != nil { + ok := object.Key("Corridor") + if err := awsRestjson1_serializeDocumentCorridor(v.Corridor, ok); err != nil { + return err + } + } + + if v.Polygon != nil { + ok := object.Key("Polygon") + if err := awsRestjson1_serializeDocumentLinearRings(v.Polygon, ok); err != nil { + return err + } + } + + if v.PolylineCorridor != nil { + ok := object.Key("PolylineCorridor") + if err := awsRestjson1_serializeDocumentPolylineCorridor(v.PolylineCorridor, ok); err != nil { + return err + } + } + + if v.PolylinePolygon != nil { + ok := object.Key("PolylinePolygon") + if err := awsRestjson1_serializeDocumentPolylineRingList(v.PolylinePolygon, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentIsolineAvoidanceAreaGeometryList(v []types.IsolineAvoidanceAreaGeometry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentIsolineAvoidanceAreaGeometry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentIsolineAvoidanceAreaList(v []types.IsolineAvoidanceArea, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentIsolineAvoidanceArea(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentIsolineAvoidanceOptions(v *types.IsolineAvoidanceOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Areas != nil { + ok := object.Key("Areas") + if err := awsRestjson1_serializeDocumentIsolineAvoidanceAreaList(v.Areas, ok); err != nil { + return err + } + } + + if v.CarShuttleTrains != nil { + ok := object.Key("CarShuttleTrains") + ok.Boolean(*v.CarShuttleTrains) + } + + if v.ControlledAccessHighways != nil { + ok := object.Key("ControlledAccessHighways") + ok.Boolean(*v.ControlledAccessHighways) + } + + if v.DirtRoads != nil { + ok := object.Key("DirtRoads") + ok.Boolean(*v.DirtRoads) + } + + if v.Ferries != nil { + ok := object.Key("Ferries") + ok.Boolean(*v.Ferries) + } + + if v.SeasonalClosure != nil { + ok := object.Key("SeasonalClosure") + ok.Boolean(*v.SeasonalClosure) + } + + if v.TollRoads != nil { + ok := object.Key("TollRoads") + ok.Boolean(*v.TollRoads) + } + + if v.TollTransponders != nil { + ok := object.Key("TollTransponders") + ok.Boolean(*v.TollTransponders) + } + + if v.TruckRoadTypes != nil { + ok := object.Key("TruckRoadTypes") + if err := awsRestjson1_serializeDocumentTruckRoadTypeList(v.TruckRoadTypes, ok); err != nil { + return err + } + } + + if v.Tunnels != nil { + ok := object.Key("Tunnels") + ok.Boolean(*v.Tunnels) + } + + if v.UTurns != nil { + ok := object.Key("UTurns") + ok.Boolean(*v.UTurns) + } + + if v.ZoneCategories != nil { + ok := object.Key("ZoneCategories") + if err := awsRestjson1_serializeDocumentIsolineAvoidanceZoneCategoryList(v.ZoneCategories, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentIsolineAvoidanceZoneCategory(v *types.IsolineAvoidanceZoneCategory, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Category) > 0 { + ok := object.Key("Category") + ok.String(string(v.Category)) + } + + return nil +} + +func awsRestjson1_serializeDocumentIsolineAvoidanceZoneCategoryList(v []types.IsolineAvoidanceZoneCategory, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentIsolineAvoidanceZoneCategory(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentIsolineCarOptions(v *types.IsolineCarOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.EngineType) > 0 { + ok := object.Key("EngineType") + ok.String(string(v.EngineType)) + } + + if v.LicensePlate != nil { + ok := object.Key("LicensePlate") + if err := awsRestjson1_serializeDocumentIsolineVehicleLicensePlate(v.LicensePlate, ok); err != nil { + return err + } + } + + if v.MaxSpeed != nil { + ok := object.Key("MaxSpeed") + switch { + case math.IsNaN(*v.MaxSpeed): + ok.String("NaN") + + case math.IsInf(*v.MaxSpeed, 1): + ok.String("Infinity") + + case math.IsInf(*v.MaxSpeed, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.MaxSpeed) + + } + } + + if v.Occupancy != nil { + ok := object.Key("Occupancy") + ok.Integer(*v.Occupancy) + } + + return nil +} + +func awsRestjson1_serializeDocumentIsolineDestinationOptions(v *types.IsolineDestinationOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AvoidActionsForDistance != 0 { + ok := object.Key("AvoidActionsForDistance") + ok.Long(v.AvoidActionsForDistance) + } + + if v.Heading != 0 { + ok := object.Key("Heading") + switch { + case math.IsNaN(v.Heading): + ok.String("NaN") + + case math.IsInf(v.Heading, 1): + ok.String("Infinity") + + case math.IsInf(v.Heading, -1): + ok.String("-Infinity") + + default: + ok.Double(v.Heading) + + } + } + + if v.Matching != nil { + ok := object.Key("Matching") + if err := awsRestjson1_serializeDocumentIsolineMatchingOptions(v.Matching, ok); err != nil { + return err + } + } + + if v.SideOfStreet != nil { + ok := object.Key("SideOfStreet") + if err := awsRestjson1_serializeDocumentIsolineSideOfStreetOptions(v.SideOfStreet, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentIsolineGranularityOptions(v *types.IsolineGranularityOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxPoints != nil { + ok := object.Key("MaxPoints") + ok.Integer(*v.MaxPoints) + } + + if v.MaxResolution != 0 { + ok := object.Key("MaxResolution") + ok.Long(v.MaxResolution) + } + + return nil +} + +func awsRestjson1_serializeDocumentIsolineHazardousCargoTypeList(v []types.IsolineHazardousCargoType, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentIsolineMatchingOptions(v *types.IsolineMatchingOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NameHint != nil { + ok := object.Key("NameHint") + ok.String(*v.NameHint) + } + + if v.OnRoadThreshold != 0 { + ok := object.Key("OnRoadThreshold") + ok.Long(v.OnRoadThreshold) + } + + if v.Radius != 0 { + ok := object.Key("Radius") + ok.Long(v.Radius) + } + + if len(v.Strategy) > 0 { + ok := object.Key("Strategy") + ok.String(string(v.Strategy)) + } + + return nil +} + +func awsRestjson1_serializeDocumentIsolineOriginOptions(v *types.IsolineOriginOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AvoidActionsForDistance != 0 { + ok := object.Key("AvoidActionsForDistance") + ok.Long(v.AvoidActionsForDistance) + } + + if v.Heading != 0 { + ok := object.Key("Heading") + switch { + case math.IsNaN(v.Heading): + ok.String("NaN") + + case math.IsInf(v.Heading, 1): + ok.String("Infinity") + + case math.IsInf(v.Heading, -1): + ok.String("-Infinity") + + default: + ok.Double(v.Heading) + + } + } + + if v.Matching != nil { + ok := object.Key("Matching") + if err := awsRestjson1_serializeDocumentIsolineMatchingOptions(v.Matching, ok); err != nil { + return err + } + } + + if v.SideOfStreet != nil { + ok := object.Key("SideOfStreet") + if err := awsRestjson1_serializeDocumentIsolineSideOfStreetOptions(v.SideOfStreet, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentIsolineScooterOptions(v *types.IsolineScooterOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.EngineType) > 0 { + ok := object.Key("EngineType") + ok.String(string(v.EngineType)) + } + + if v.LicensePlate != nil { + ok := object.Key("LicensePlate") + if err := awsRestjson1_serializeDocumentIsolineVehicleLicensePlate(v.LicensePlate, ok); err != nil { + return err + } + } + + if v.MaxSpeed != nil { + ok := object.Key("MaxSpeed") + switch { + case math.IsNaN(*v.MaxSpeed): + ok.String("NaN") + + case math.IsInf(*v.MaxSpeed, 1): + ok.String("Infinity") + + case math.IsInf(*v.MaxSpeed, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.MaxSpeed) + + } + } + + if v.Occupancy != nil { + ok := object.Key("Occupancy") + ok.Integer(*v.Occupancy) + } + + return nil +} + +func awsRestjson1_serializeDocumentIsolineSideOfStreetOptions(v *types.IsolineSideOfStreetOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Position != nil { + ok := object.Key("Position") + if err := awsRestjson1_serializeDocumentPosition(v.Position, ok); err != nil { + return err + } + } + + if len(v.UseWith) > 0 { + ok := object.Key("UseWith") + ok.String(string(v.UseWith)) + } + + return nil +} + +func awsRestjson1_serializeDocumentIsolineThresholds(v *types.IsolineThresholds, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Distance != nil { + ok := object.Key("Distance") + if err := awsRestjson1_serializeDocumentDistanceThresholdList(v.Distance, ok); err != nil { + return err + } + } + + if v.Time != nil { + ok := object.Key("Time") + if err := awsRestjson1_serializeDocumentTimeThresholdList(v.Time, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentIsolineTrafficOptions(v *types.IsolineTrafficOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FlowEventThresholdOverride != 0 { + ok := object.Key("FlowEventThresholdOverride") + ok.Long(v.FlowEventThresholdOverride) + } + + if len(v.Usage) > 0 { + ok := object.Key("Usage") + ok.String(string(v.Usage)) + } + + return nil +} + +func awsRestjson1_serializeDocumentIsolineTrailerOptions(v *types.IsolineTrailerOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AxleCount != nil { + ok := object.Key("AxleCount") + ok.Integer(*v.AxleCount) + } + + if v.TrailerCount != nil { + ok := object.Key("TrailerCount") + ok.Integer(*v.TrailerCount) + } + + return nil +} + +func awsRestjson1_serializeDocumentIsolineTravelModeOptions(v *types.IsolineTravelModeOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Car != nil { + ok := object.Key("Car") + if err := awsRestjson1_serializeDocumentIsolineCarOptions(v.Car, ok); err != nil { + return err + } + } + + if v.Scooter != nil { + ok := object.Key("Scooter") + if err := awsRestjson1_serializeDocumentIsolineScooterOptions(v.Scooter, ok); err != nil { + return err + } + } + + if v.Truck != nil { + ok := object.Key("Truck") + if err := awsRestjson1_serializeDocumentIsolineTruckOptions(v.Truck, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentIsolineTruckOptions(v *types.IsolineTruckOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AxleCount != nil { + ok := object.Key("AxleCount") + ok.Integer(*v.AxleCount) + } + + if len(v.EngineType) > 0 { + ok := object.Key("EngineType") + ok.String(string(v.EngineType)) + } + + if v.GrossWeight != 0 { + ok := object.Key("GrossWeight") + ok.Long(v.GrossWeight) + } + + if v.HazardousCargos != nil { + ok := object.Key("HazardousCargos") + if err := awsRestjson1_serializeDocumentIsolineHazardousCargoTypeList(v.HazardousCargos, ok); err != nil { + return err + } + } + + if v.Height != 0 { + ok := object.Key("Height") + ok.Long(v.Height) + } + + if v.HeightAboveFirstAxle != 0 { + ok := object.Key("HeightAboveFirstAxle") + ok.Long(v.HeightAboveFirstAxle) + } + + if v.KpraLength != 0 { + ok := object.Key("KpraLength") + ok.Long(v.KpraLength) + } + + if v.Length != 0 { + ok := object.Key("Length") + ok.Long(v.Length) + } + + if v.LicensePlate != nil { + ok := object.Key("LicensePlate") + if err := awsRestjson1_serializeDocumentIsolineVehicleLicensePlate(v.LicensePlate, ok); err != nil { + return err + } + } + + if v.MaxSpeed != nil { + ok := object.Key("MaxSpeed") + switch { + case math.IsNaN(*v.MaxSpeed): + ok.String("NaN") + + case math.IsInf(*v.MaxSpeed, 1): + ok.String("Infinity") + + case math.IsInf(*v.MaxSpeed, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.MaxSpeed) + + } + } + + if v.Occupancy != nil { + ok := object.Key("Occupancy") + ok.Integer(*v.Occupancy) + } + + if v.PayloadCapacity != 0 { + ok := object.Key("PayloadCapacity") + ok.Long(v.PayloadCapacity) + } + + if v.TireCount != nil { + ok := object.Key("TireCount") + ok.Integer(*v.TireCount) + } + + if v.Trailer != nil { + ok := object.Key("Trailer") + if err := awsRestjson1_serializeDocumentIsolineTrailerOptions(v.Trailer, ok); err != nil { + return err + } + } + + if len(v.TruckType) > 0 { + ok := object.Key("TruckType") + ok.String(string(v.TruckType)) + } + + if v.TunnelRestrictionCode != nil { + ok := object.Key("TunnelRestrictionCode") + ok.String(*v.TunnelRestrictionCode) + } + + if v.WeightPerAxle != 0 { + ok := object.Key("WeightPerAxle") + ok.Long(v.WeightPerAxle) + } + + if v.WeightPerAxleGroup != nil { + ok := object.Key("WeightPerAxleGroup") + if err := awsRestjson1_serializeDocumentWeightPerAxleGroup(v.WeightPerAxleGroup, ok); err != nil { + return err + } + } + + if v.Width != 0 { + ok := object.Key("Width") + ok.Long(v.Width) + } + + return nil +} + +func awsRestjson1_serializeDocumentIsolineVehicleLicensePlate(v *types.IsolineVehicleLicensePlate, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LastCharacter != nil { + ok := object.Key("LastCharacter") + ok.String(*v.LastCharacter) + } + + return nil +} + +func awsRestjson1_serializeDocumentLanguageTagList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentLinearRing(v [][]float64, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if vv := v[i]; vv == nil { + continue + } + if err := awsRestjson1_serializeDocumentPosition(v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentLinearRings(v [][][]float64, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if vv := v[i]; vv == nil { + continue + } + if err := awsRestjson1_serializeDocumentLinearRing(v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentLineString(v [][]float64, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if vv := v[i]; vv == nil { + continue + } + if err := awsRestjson1_serializeDocumentPosition(v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentPolylineCorridor(v *types.PolylineCorridor, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Polyline != nil { + ok := object.Key("Polyline") + ok.String(*v.Polyline) + } + + if v.Radius != nil { + ok := object.Key("Radius") + ok.Integer(*v.Radius) + } + + return nil +} + +func awsRestjson1_serializeDocumentPolylineRingList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentPosition(v []float64, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + switch { + case math.IsNaN(v[i]): + av.String("NaN") + + case math.IsInf(v[i], 1): + av.String("Infinity") + + case math.IsInf(v[i], -1): + av.String("-Infinity") + + default: + av.Double(v[i]) + + } + } + return nil +} + +func awsRestjson1_serializeDocumentRoadSnapHazardousCargoTypeList(v []types.RoadSnapHazardousCargoType, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentRoadSnapTracePoint(v *types.RoadSnapTracePoint, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Heading != 0 { + ok := object.Key("Heading") + switch { + case math.IsNaN(v.Heading): + ok.String("NaN") + + case math.IsInf(v.Heading, 1): + ok.String("Infinity") + + case math.IsInf(v.Heading, -1): + ok.String("-Infinity") + + default: + ok.Double(v.Heading) + + } + } + + if v.Position != nil { + ok := object.Key("Position") + if err := awsRestjson1_serializeDocumentPosition(v.Position, ok); err != nil { + return err + } + } + + if v.Speed != 0 { + ok := object.Key("Speed") + switch { + case math.IsNaN(v.Speed): + ok.String("NaN") + + case math.IsInf(v.Speed, 1): + ok.String("Infinity") + + case math.IsInf(v.Speed, -1): + ok.String("-Infinity") + + default: + ok.Double(v.Speed) + + } + } + + if v.Timestamp != nil { + ok := object.Key("Timestamp") + ok.String(*v.Timestamp) + } + + return nil +} + +func awsRestjson1_serializeDocumentRoadSnapTracePointList(v []types.RoadSnapTracePoint, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentRoadSnapTracePoint(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentRoadSnapTrailerOptions(v *types.RoadSnapTrailerOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TrailerCount != nil { + ok := object.Key("TrailerCount") + ok.Integer(*v.TrailerCount) + } + + return nil +} + +func awsRestjson1_serializeDocumentRoadSnapTravelModeOptions(v *types.RoadSnapTravelModeOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Truck != nil { + ok := object.Key("Truck") + if err := awsRestjson1_serializeDocumentRoadSnapTruckOptions(v.Truck, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRoadSnapTruckOptions(v *types.RoadSnapTruckOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.GrossWeight != 0 { + ok := object.Key("GrossWeight") + ok.Long(v.GrossWeight) + } + + if v.HazardousCargos != nil { + ok := object.Key("HazardousCargos") + if err := awsRestjson1_serializeDocumentRoadSnapHazardousCargoTypeList(v.HazardousCargos, ok); err != nil { + return err + } + } + + if v.Height != 0 { + ok := object.Key("Height") + ok.Long(v.Height) + } + + if v.Length != 0 { + ok := object.Key("Length") + ok.Long(v.Length) + } + + if v.Trailer != nil { + ok := object.Key("Trailer") + if err := awsRestjson1_serializeDocumentRoadSnapTrailerOptions(v.Trailer, ok); err != nil { + return err + } + } + + if v.TunnelRestrictionCode != nil { + ok := object.Key("TunnelRestrictionCode") + ok.String(*v.TunnelRestrictionCode) + } + + if v.Width != 0 { + ok := object.Key("Width") + ok.Long(v.Width) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteAllowOptions(v *types.RouteAllowOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Hot != nil { + ok := object.Key("Hot") + ok.Boolean(*v.Hot) + } + + if v.Hov != nil { + ok := object.Key("Hov") + ok.Boolean(*v.Hov) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteAvoidanceArea(v *types.RouteAvoidanceArea, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Except != nil { + ok := object.Key("Except") + if err := awsRestjson1_serializeDocumentRouteAvoidanceAreaGeometryList(v.Except, ok); err != nil { + return err + } + } + + if v.Geometry != nil { + ok := object.Key("Geometry") + if err := awsRestjson1_serializeDocumentRouteAvoidanceAreaGeometry(v.Geometry, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteAvoidanceAreaGeometry(v *types.RouteAvoidanceAreaGeometry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BoundingBox != nil { + ok := object.Key("BoundingBox") + if err := awsRestjson1_serializeDocumentBoundingBox(v.BoundingBox, ok); err != nil { + return err + } + } + + if v.Corridor != nil { + ok := object.Key("Corridor") + if err := awsRestjson1_serializeDocumentCorridor(v.Corridor, ok); err != nil { + return err + } + } + + if v.Polygon != nil { + ok := object.Key("Polygon") + if err := awsRestjson1_serializeDocumentLinearRings(v.Polygon, ok); err != nil { + return err + } + } + + if v.PolylineCorridor != nil { + ok := object.Key("PolylineCorridor") + if err := awsRestjson1_serializeDocumentPolylineCorridor(v.PolylineCorridor, ok); err != nil { + return err + } + } + + if v.PolylinePolygon != nil { + ok := object.Key("PolylinePolygon") + if err := awsRestjson1_serializeDocumentPolylineRingList(v.PolylinePolygon, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteAvoidanceAreaGeometryList(v []types.RouteAvoidanceAreaGeometry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentRouteAvoidanceAreaGeometry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentRouteAvoidanceAreaList(v []types.RouteAvoidanceArea, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentRouteAvoidanceArea(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentRouteAvoidanceOptions(v *types.RouteAvoidanceOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Areas != nil { + ok := object.Key("Areas") + if err := awsRestjson1_serializeDocumentRouteAvoidanceAreaList(v.Areas, ok); err != nil { + return err + } + } + + if v.CarShuttleTrains != nil { + ok := object.Key("CarShuttleTrains") + ok.Boolean(*v.CarShuttleTrains) + } + + if v.ControlledAccessHighways != nil { + ok := object.Key("ControlledAccessHighways") + ok.Boolean(*v.ControlledAccessHighways) + } + + if v.DirtRoads != nil { + ok := object.Key("DirtRoads") + ok.Boolean(*v.DirtRoads) + } + + if v.Ferries != nil { + ok := object.Key("Ferries") + ok.Boolean(*v.Ferries) + } + + if v.SeasonalClosure != nil { + ok := object.Key("SeasonalClosure") + ok.Boolean(*v.SeasonalClosure) + } + + if v.TollRoads != nil { + ok := object.Key("TollRoads") + ok.Boolean(*v.TollRoads) + } + + if v.TollTransponders != nil { + ok := object.Key("TollTransponders") + ok.Boolean(*v.TollTransponders) + } + + if v.TruckRoadTypes != nil { + ok := object.Key("TruckRoadTypes") + if err := awsRestjson1_serializeDocumentTruckRoadTypeList(v.TruckRoadTypes, ok); err != nil { + return err + } + } + + if v.Tunnels != nil { + ok := object.Key("Tunnels") + ok.Boolean(*v.Tunnels) + } + + if v.UTurns != nil { + ok := object.Key("UTurns") + ok.Boolean(*v.UTurns) + } + + if v.ZoneCategories != nil { + ok := object.Key("ZoneCategories") + if err := awsRestjson1_serializeDocumentRouteAvoidanceZoneCategoryList(v.ZoneCategories, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteAvoidanceZoneCategory(v *types.RouteAvoidanceZoneCategory, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Category) > 0 { + ok := object.Key("Category") + ok.String(string(v.Category)) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteAvoidanceZoneCategoryList(v []types.RouteAvoidanceZoneCategory, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentRouteAvoidanceZoneCategory(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentRouteCarOptions(v *types.RouteCarOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.EngineType) > 0 { + ok := object.Key("EngineType") + ok.String(string(v.EngineType)) + } + + if v.LicensePlate != nil { + ok := object.Key("LicensePlate") + if err := awsRestjson1_serializeDocumentRouteVehicleLicensePlate(v.LicensePlate, ok); err != nil { + return err + } + } + + if v.MaxSpeed != nil { + ok := object.Key("MaxSpeed") + switch { + case math.IsNaN(*v.MaxSpeed): + ok.String("NaN") + + case math.IsInf(*v.MaxSpeed, 1): + ok.String("Infinity") + + case math.IsInf(*v.MaxSpeed, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.MaxSpeed) + + } + } + + if v.Occupancy != nil { + ok := object.Key("Occupancy") + ok.Integer(*v.Occupancy) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteDestinationOptions(v *types.RouteDestinationOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AvoidActionsForDistance != 0 { + ok := object.Key("AvoidActionsForDistance") + ok.Long(v.AvoidActionsForDistance) + } + + if v.AvoidUTurns != nil { + ok := object.Key("AvoidUTurns") + ok.Boolean(*v.AvoidUTurns) + } + + if v.Heading != 0 { + ok := object.Key("Heading") + switch { + case math.IsNaN(v.Heading): + ok.String("NaN") + + case math.IsInf(v.Heading, 1): + ok.String("Infinity") + + case math.IsInf(v.Heading, -1): + ok.String("-Infinity") + + default: + ok.Double(v.Heading) + + } + } + + if v.Matching != nil { + ok := object.Key("Matching") + if err := awsRestjson1_serializeDocumentRouteMatchingOptions(v.Matching, ok); err != nil { + return err + } + } + + if v.SideOfStreet != nil { + ok := object.Key("SideOfStreet") + if err := awsRestjson1_serializeDocumentRouteSideOfStreetOptions(v.SideOfStreet, ok); err != nil { + return err + } + } + + if v.StopDuration != 0 { + ok := object.Key("StopDuration") + ok.Long(v.StopDuration) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteDriverOptions(v *types.RouteDriverOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Schedule != nil { + ok := object.Key("Schedule") + if err := awsRestjson1_serializeDocumentRouteDriverScheduleIntervalList(v.Schedule, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteDriverScheduleInterval(v *types.RouteDriverScheduleInterval, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + { + ok := object.Key("DriveDuration") + ok.Long(v.DriveDuration) + } + + { + ok := object.Key("RestDuration") + ok.Long(v.RestDuration) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteDriverScheduleIntervalList(v []types.RouteDriverScheduleInterval, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentRouteDriverScheduleInterval(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentRouteEmissionType(v *types.RouteEmissionType, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Co2EmissionClass != nil { + ok := object.Key("Co2EmissionClass") + ok.String(*v.Co2EmissionClass) + } + + if v.Type != nil { + ok := object.Key("Type") + ok.String(*v.Type) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteExclusionOptions(v *types.RouteExclusionOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Countries != nil { + ok := object.Key("Countries") + if err := awsRestjson1_serializeDocumentCountryCodeList(v.Countries, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteHazardousCargoTypeList(v []types.RouteHazardousCargoType, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentRouteLegAdditionalFeatureList(v []types.RouteLegAdditionalFeature, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentRouteMatchingOptions(v *types.RouteMatchingOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NameHint != nil { + ok := object.Key("NameHint") + ok.String(*v.NameHint) + } + + if v.OnRoadThreshold != 0 { + ok := object.Key("OnRoadThreshold") + ok.Long(v.OnRoadThreshold) + } + + if v.Radius != 0 { + ok := object.Key("Radius") + ok.Long(v.Radius) + } + + if len(v.Strategy) > 0 { + ok := object.Key("Strategy") + ok.String(string(v.Strategy)) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixAllowOptions(v *types.RouteMatrixAllowOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Hot != nil { + ok := object.Key("Hot") + ok.Boolean(*v.Hot) + } + + if v.Hov != nil { + ok := object.Key("Hov") + ok.Boolean(*v.Hov) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixAutoCircle(v *types.RouteMatrixAutoCircle, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Margin != 0 { + ok := object.Key("Margin") + ok.Long(v.Margin) + } + + if v.MaxRadius != 0 { + ok := object.Key("MaxRadius") + ok.Long(v.MaxRadius) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixAvoidanceArea(v *types.RouteMatrixAvoidanceArea, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Geometry != nil { + ok := object.Key("Geometry") + if err := awsRestjson1_serializeDocumentRouteMatrixAvoidanceAreaGeometry(v.Geometry, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixAvoidanceAreaGeometry(v *types.RouteMatrixAvoidanceAreaGeometry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BoundingBox != nil { + ok := object.Key("BoundingBox") + if err := awsRestjson1_serializeDocumentBoundingBox(v.BoundingBox, ok); err != nil { + return err + } + } + + if v.Polygon != nil { + ok := object.Key("Polygon") + if err := awsRestjson1_serializeDocumentLinearRings(v.Polygon, ok); err != nil { + return err + } + } + + if v.PolylinePolygon != nil { + ok := object.Key("PolylinePolygon") + if err := awsRestjson1_serializeDocumentPolylineRingList(v.PolylinePolygon, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixAvoidanceAreaList(v []types.RouteMatrixAvoidanceArea, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentRouteMatrixAvoidanceArea(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixAvoidanceOptions(v *types.RouteMatrixAvoidanceOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Areas != nil { + ok := object.Key("Areas") + if err := awsRestjson1_serializeDocumentRouteMatrixAvoidanceAreaList(v.Areas, ok); err != nil { + return err + } + } + + if v.CarShuttleTrains != nil { + ok := object.Key("CarShuttleTrains") + ok.Boolean(*v.CarShuttleTrains) + } + + if v.ControlledAccessHighways != nil { + ok := object.Key("ControlledAccessHighways") + ok.Boolean(*v.ControlledAccessHighways) + } + + if v.DirtRoads != nil { + ok := object.Key("DirtRoads") + ok.Boolean(*v.DirtRoads) + } + + if v.Ferries != nil { + ok := object.Key("Ferries") + ok.Boolean(*v.Ferries) + } + + if v.TollRoads != nil { + ok := object.Key("TollRoads") + ok.Boolean(*v.TollRoads) + } + + if v.TollTransponders != nil { + ok := object.Key("TollTransponders") + ok.Boolean(*v.TollTransponders) + } + + if v.TruckRoadTypes != nil { + ok := object.Key("TruckRoadTypes") + if err := awsRestjson1_serializeDocumentTruckRoadTypeList(v.TruckRoadTypes, ok); err != nil { + return err + } + } + + if v.Tunnels != nil { + ok := object.Key("Tunnels") + ok.Boolean(*v.Tunnels) + } + + if v.UTurns != nil { + ok := object.Key("UTurns") + ok.Boolean(*v.UTurns) + } + + if v.ZoneCategories != nil { + ok := object.Key("ZoneCategories") + if err := awsRestjson1_serializeDocumentRouteMatrixAvoidanceZoneCategoryList(v.ZoneCategories, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixAvoidanceZoneCategory(v *types.RouteMatrixAvoidanceZoneCategory, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Category) > 0 { + ok := object.Key("Category") + ok.String(string(v.Category)) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixAvoidanceZoneCategoryList(v []types.RouteMatrixAvoidanceZoneCategory, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentRouteMatrixAvoidanceZoneCategory(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixBoundary(v *types.RouteMatrixBoundary, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Geometry != nil { + ok := object.Key("Geometry") + if err := awsRestjson1_serializeDocumentRouteMatrixBoundaryGeometry(v.Geometry, ok); err != nil { + return err + } + } + + if v.Unbounded != nil { + ok := object.Key("Unbounded") + ok.Boolean(*v.Unbounded) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixBoundaryGeometry(v *types.RouteMatrixBoundaryGeometry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AutoCircle != nil { + ok := object.Key("AutoCircle") + if err := awsRestjson1_serializeDocumentRouteMatrixAutoCircle(v.AutoCircle, ok); err != nil { + return err + } + } + + if v.BoundingBox != nil { + ok := object.Key("BoundingBox") + if err := awsRestjson1_serializeDocumentBoundingBox(v.BoundingBox, ok); err != nil { + return err + } + } + + if v.Circle != nil { + ok := object.Key("Circle") + if err := awsRestjson1_serializeDocumentCircle(v.Circle, ok); err != nil { + return err + } + } + + if v.Polygon != nil { + ok := object.Key("Polygon") + if err := awsRestjson1_serializeDocumentLinearRings(v.Polygon, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixCarOptions(v *types.RouteMatrixCarOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LicensePlate != nil { + ok := object.Key("LicensePlate") + if err := awsRestjson1_serializeDocumentRouteMatrixVehicleLicensePlate(v.LicensePlate, ok); err != nil { + return err + } + } + + if v.MaxSpeed != nil { + ok := object.Key("MaxSpeed") + switch { + case math.IsNaN(*v.MaxSpeed): + ok.String("NaN") + + case math.IsInf(*v.MaxSpeed, 1): + ok.String("Infinity") + + case math.IsInf(*v.MaxSpeed, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.MaxSpeed) + + } + } + + if v.Occupancy != nil { + ok := object.Key("Occupancy") + ok.Integer(*v.Occupancy) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixDestination(v *types.RouteMatrixDestination, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Options != nil { + ok := object.Key("Options") + if err := awsRestjson1_serializeDocumentRouteMatrixDestinationOptions(v.Options, ok); err != nil { + return err + } + } + + if v.Position != nil { + ok := object.Key("Position") + if err := awsRestjson1_serializeDocumentPosition(v.Position, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixDestinationList(v []types.RouteMatrixDestination, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentRouteMatrixDestination(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixDestinationOptions(v *types.RouteMatrixDestinationOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AvoidActionsForDistance != 0 { + ok := object.Key("AvoidActionsForDistance") + ok.Long(v.AvoidActionsForDistance) + } + + if v.Heading != 0 { + ok := object.Key("Heading") + switch { + case math.IsNaN(v.Heading): + ok.String("NaN") + + case math.IsInf(v.Heading, 1): + ok.String("Infinity") + + case math.IsInf(v.Heading, -1): + ok.String("-Infinity") + + default: + ok.Double(v.Heading) + + } + } + + if v.Matching != nil { + ok := object.Key("Matching") + if err := awsRestjson1_serializeDocumentRouteMatrixMatchingOptions(v.Matching, ok); err != nil { + return err + } + } + + if v.SideOfStreet != nil { + ok := object.Key("SideOfStreet") + if err := awsRestjson1_serializeDocumentRouteMatrixSideOfStreetOptions(v.SideOfStreet, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixExclusionOptions(v *types.RouteMatrixExclusionOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Countries != nil { + ok := object.Key("Countries") + if err := awsRestjson1_serializeDocumentCountryCodeList(v.Countries, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixHazardousCargoTypeList(v []types.RouteMatrixHazardousCargoType, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixMatchingOptions(v *types.RouteMatrixMatchingOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NameHint != nil { + ok := object.Key("NameHint") + ok.String(*v.NameHint) + } + + if v.OnRoadThreshold != 0 { + ok := object.Key("OnRoadThreshold") + ok.Long(v.OnRoadThreshold) + } + + if v.Radius != 0 { + ok := object.Key("Radius") + ok.Long(v.Radius) + } + + if len(v.Strategy) > 0 { + ok := object.Key("Strategy") + ok.String(string(v.Strategy)) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixOrigin(v *types.RouteMatrixOrigin, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Options != nil { + ok := object.Key("Options") + if err := awsRestjson1_serializeDocumentRouteMatrixOriginOptions(v.Options, ok); err != nil { + return err + } + } + + if v.Position != nil { + ok := object.Key("Position") + if err := awsRestjson1_serializeDocumentPosition(v.Position, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixOriginList(v []types.RouteMatrixOrigin, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentRouteMatrixOrigin(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixOriginOptions(v *types.RouteMatrixOriginOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AvoidActionsForDistance != 0 { + ok := object.Key("AvoidActionsForDistance") + ok.Long(v.AvoidActionsForDistance) + } + + if v.Heading != 0 { + ok := object.Key("Heading") + switch { + case math.IsNaN(v.Heading): + ok.String("NaN") + + case math.IsInf(v.Heading, 1): + ok.String("Infinity") + + case math.IsInf(v.Heading, -1): + ok.String("-Infinity") + + default: + ok.Double(v.Heading) + + } + } + + if v.Matching != nil { + ok := object.Key("Matching") + if err := awsRestjson1_serializeDocumentRouteMatrixMatchingOptions(v.Matching, ok); err != nil { + return err + } + } + + if v.SideOfStreet != nil { + ok := object.Key("SideOfStreet") + if err := awsRestjson1_serializeDocumentRouteMatrixSideOfStreetOptions(v.SideOfStreet, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixScooterOptions(v *types.RouteMatrixScooterOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LicensePlate != nil { + ok := object.Key("LicensePlate") + if err := awsRestjson1_serializeDocumentRouteMatrixVehicleLicensePlate(v.LicensePlate, ok); err != nil { + return err + } + } + + if v.MaxSpeed != nil { + ok := object.Key("MaxSpeed") + switch { + case math.IsNaN(*v.MaxSpeed): + ok.String("NaN") + + case math.IsInf(*v.MaxSpeed, 1): + ok.String("Infinity") + + case math.IsInf(*v.MaxSpeed, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.MaxSpeed) + + } + } + + if v.Occupancy != nil { + ok := object.Key("Occupancy") + ok.Integer(*v.Occupancy) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixSideOfStreetOptions(v *types.RouteMatrixSideOfStreetOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Position != nil { + ok := object.Key("Position") + if err := awsRestjson1_serializeDocumentPosition(v.Position, ok); err != nil { + return err + } + } + + if len(v.UseWith) > 0 { + ok := object.Key("UseWith") + ok.String(string(v.UseWith)) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixTrafficOptions(v *types.RouteMatrixTrafficOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FlowEventThresholdOverride != 0 { + ok := object.Key("FlowEventThresholdOverride") + ok.Long(v.FlowEventThresholdOverride) + } + + if len(v.Usage) > 0 { + ok := object.Key("Usage") + ok.String(string(v.Usage)) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixTrailerOptions(v *types.RouteMatrixTrailerOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TrailerCount != nil { + ok := object.Key("TrailerCount") + ok.Integer(*v.TrailerCount) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixTravelModeOptions(v *types.RouteMatrixTravelModeOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Car != nil { + ok := object.Key("Car") + if err := awsRestjson1_serializeDocumentRouteMatrixCarOptions(v.Car, ok); err != nil { + return err + } + } + + if v.Scooter != nil { + ok := object.Key("Scooter") + if err := awsRestjson1_serializeDocumentRouteMatrixScooterOptions(v.Scooter, ok); err != nil { + return err + } + } + + if v.Truck != nil { + ok := object.Key("Truck") + if err := awsRestjson1_serializeDocumentRouteMatrixTruckOptions(v.Truck, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixTruckOptions(v *types.RouteMatrixTruckOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AxleCount != nil { + ok := object.Key("AxleCount") + ok.Integer(*v.AxleCount) + } + + if v.GrossWeight != 0 { + ok := object.Key("GrossWeight") + ok.Long(v.GrossWeight) + } + + if v.HazardousCargos != nil { + ok := object.Key("HazardousCargos") + if err := awsRestjson1_serializeDocumentRouteMatrixHazardousCargoTypeList(v.HazardousCargos, ok); err != nil { + return err + } + } + + if v.Height != 0 { + ok := object.Key("Height") + ok.Long(v.Height) + } + + if v.KpraLength != 0 { + ok := object.Key("KpraLength") + ok.Long(v.KpraLength) + } + + if v.Length != 0 { + ok := object.Key("Length") + ok.Long(v.Length) + } + + if v.LicensePlate != nil { + ok := object.Key("LicensePlate") + if err := awsRestjson1_serializeDocumentRouteMatrixVehicleLicensePlate(v.LicensePlate, ok); err != nil { + return err + } + } + + if v.MaxSpeed != nil { + ok := object.Key("MaxSpeed") + switch { + case math.IsNaN(*v.MaxSpeed): + ok.String("NaN") + + case math.IsInf(*v.MaxSpeed, 1): + ok.String("Infinity") + + case math.IsInf(*v.MaxSpeed, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.MaxSpeed) + + } + } + + if v.Occupancy != nil { + ok := object.Key("Occupancy") + ok.Integer(*v.Occupancy) + } + + if v.PayloadCapacity != 0 { + ok := object.Key("PayloadCapacity") + ok.Long(v.PayloadCapacity) + } + + if v.Trailer != nil { + ok := object.Key("Trailer") + if err := awsRestjson1_serializeDocumentRouteMatrixTrailerOptions(v.Trailer, ok); err != nil { + return err + } + } + + if len(v.TruckType) > 0 { + ok := object.Key("TruckType") + ok.String(string(v.TruckType)) + } + + if v.TunnelRestrictionCode != nil { + ok := object.Key("TunnelRestrictionCode") + ok.String(*v.TunnelRestrictionCode) + } + + if v.WeightPerAxle != 0 { + ok := object.Key("WeightPerAxle") + ok.Long(v.WeightPerAxle) + } + + if v.WeightPerAxleGroup != nil { + ok := object.Key("WeightPerAxleGroup") + if err := awsRestjson1_serializeDocumentWeightPerAxleGroup(v.WeightPerAxleGroup, ok); err != nil { + return err + } + } + + if v.Width != 0 { + ok := object.Key("Width") + ok.Long(v.Width) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteMatrixVehicleLicensePlate(v *types.RouteMatrixVehicleLicensePlate, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LastCharacter != nil { + ok := object.Key("LastCharacter") + ok.String(*v.LastCharacter) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteOriginOptions(v *types.RouteOriginOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AvoidActionsForDistance != 0 { + ok := object.Key("AvoidActionsForDistance") + ok.Long(v.AvoidActionsForDistance) + } + + if v.AvoidUTurns != nil { + ok := object.Key("AvoidUTurns") + ok.Boolean(*v.AvoidUTurns) + } + + if v.Heading != 0 { + ok := object.Key("Heading") + switch { + case math.IsNaN(v.Heading): + ok.String("NaN") + + case math.IsInf(v.Heading, 1): + ok.String("Infinity") + + case math.IsInf(v.Heading, -1): + ok.String("-Infinity") + + default: + ok.Double(v.Heading) + + } + } + + if v.Matching != nil { + ok := object.Key("Matching") + if err := awsRestjson1_serializeDocumentRouteMatchingOptions(v.Matching, ok); err != nil { + return err + } + } + + if v.SideOfStreet != nil { + ok := object.Key("SideOfStreet") + if err := awsRestjson1_serializeDocumentRouteSideOfStreetOptions(v.SideOfStreet, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRoutePedestrianOptions(v *types.RoutePedestrianOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Speed != nil { + ok := object.Key("Speed") + switch { + case math.IsNaN(*v.Speed): + ok.String("NaN") + + case math.IsInf(*v.Speed, 1): + ok.String("Infinity") + + case math.IsInf(*v.Speed, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.Speed) + + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteScooterOptions(v *types.RouteScooterOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.EngineType) > 0 { + ok := object.Key("EngineType") + ok.String(string(v.EngineType)) + } + + if v.LicensePlate != nil { + ok := object.Key("LicensePlate") + if err := awsRestjson1_serializeDocumentRouteVehicleLicensePlate(v.LicensePlate, ok); err != nil { + return err + } + } + + if v.MaxSpeed != nil { + ok := object.Key("MaxSpeed") + switch { + case math.IsNaN(*v.MaxSpeed): + ok.String("NaN") + + case math.IsInf(*v.MaxSpeed, 1): + ok.String("Infinity") + + case math.IsInf(*v.MaxSpeed, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.MaxSpeed) + + } + } + + if v.Occupancy != nil { + ok := object.Key("Occupancy") + ok.Integer(*v.Occupancy) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteSideOfStreetOptions(v *types.RouteSideOfStreetOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Position != nil { + ok := object.Key("Position") + if err := awsRestjson1_serializeDocumentPosition(v.Position, ok); err != nil { + return err + } + } + + if len(v.UseWith) > 0 { + ok := object.Key("UseWith") + ok.String(string(v.UseWith)) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteSpanAdditionalFeatureList(v []types.RouteSpanAdditionalFeature, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentRouteTollOptions(v *types.RouteTollOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AllTransponders != nil { + ok := object.Key("AllTransponders") + ok.Boolean(*v.AllTransponders) + } + + if v.AllVignettes != nil { + ok := object.Key("AllVignettes") + ok.Boolean(*v.AllVignettes) + } + + if v.Currency != nil { + ok := object.Key("Currency") + ok.String(*v.Currency) + } + + if v.EmissionType != nil { + ok := object.Key("EmissionType") + if err := awsRestjson1_serializeDocumentRouteEmissionType(v.EmissionType, ok); err != nil { + return err + } + } + + if len(v.VehicleCategory) > 0 { + ok := object.Key("VehicleCategory") + ok.String(string(v.VehicleCategory)) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteTrafficOptions(v *types.RouteTrafficOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FlowEventThresholdOverride != 0 { + ok := object.Key("FlowEventThresholdOverride") + ok.Long(v.FlowEventThresholdOverride) + } + + if len(v.Usage) > 0 { + ok := object.Key("Usage") + ok.String(string(v.Usage)) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteTrailerOptions(v *types.RouteTrailerOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AxleCount != nil { + ok := object.Key("AxleCount") + ok.Integer(*v.AxleCount) + } + + if v.TrailerCount != nil { + ok := object.Key("TrailerCount") + ok.Integer(*v.TrailerCount) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteTravelModeOptions(v *types.RouteTravelModeOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Car != nil { + ok := object.Key("Car") + if err := awsRestjson1_serializeDocumentRouteCarOptions(v.Car, ok); err != nil { + return err + } + } + + if v.Pedestrian != nil { + ok := object.Key("Pedestrian") + if err := awsRestjson1_serializeDocumentRoutePedestrianOptions(v.Pedestrian, ok); err != nil { + return err + } + } + + if v.Scooter != nil { + ok := object.Key("Scooter") + if err := awsRestjson1_serializeDocumentRouteScooterOptions(v.Scooter, ok); err != nil { + return err + } + } + + if v.Truck != nil { + ok := object.Key("Truck") + if err := awsRestjson1_serializeDocumentRouteTruckOptions(v.Truck, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteTruckOptions(v *types.RouteTruckOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AxleCount != nil { + ok := object.Key("AxleCount") + ok.Integer(*v.AxleCount) + } + + if len(v.EngineType) > 0 { + ok := object.Key("EngineType") + ok.String(string(v.EngineType)) + } + + if v.GrossWeight != 0 { + ok := object.Key("GrossWeight") + ok.Long(v.GrossWeight) + } + + if v.HazardousCargos != nil { + ok := object.Key("HazardousCargos") + if err := awsRestjson1_serializeDocumentRouteHazardousCargoTypeList(v.HazardousCargos, ok); err != nil { + return err + } + } + + if v.Height != 0 { + ok := object.Key("Height") + ok.Long(v.Height) + } + + if v.HeightAboveFirstAxle != 0 { + ok := object.Key("HeightAboveFirstAxle") + ok.Long(v.HeightAboveFirstAxle) + } + + if v.KpraLength != 0 { + ok := object.Key("KpraLength") + ok.Long(v.KpraLength) + } + + if v.Length != 0 { + ok := object.Key("Length") + ok.Long(v.Length) + } + + if v.LicensePlate != nil { + ok := object.Key("LicensePlate") + if err := awsRestjson1_serializeDocumentRouteVehicleLicensePlate(v.LicensePlate, ok); err != nil { + return err + } + } + + if v.MaxSpeed != nil { + ok := object.Key("MaxSpeed") + switch { + case math.IsNaN(*v.MaxSpeed): + ok.String("NaN") + + case math.IsInf(*v.MaxSpeed, 1): + ok.String("Infinity") + + case math.IsInf(*v.MaxSpeed, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.MaxSpeed) + + } + } + + if v.Occupancy != nil { + ok := object.Key("Occupancy") + ok.Integer(*v.Occupancy) + } + + if v.PayloadCapacity != 0 { + ok := object.Key("PayloadCapacity") + ok.Long(v.PayloadCapacity) + } + + if v.TireCount != nil { + ok := object.Key("TireCount") + ok.Integer(*v.TireCount) + } + + if v.Trailer != nil { + ok := object.Key("Trailer") + if err := awsRestjson1_serializeDocumentRouteTrailerOptions(v.Trailer, ok); err != nil { + return err + } + } + + if len(v.TruckType) > 0 { + ok := object.Key("TruckType") + ok.String(string(v.TruckType)) + } + + if v.TunnelRestrictionCode != nil { + ok := object.Key("TunnelRestrictionCode") + ok.String(*v.TunnelRestrictionCode) + } + + if v.WeightPerAxle != 0 { + ok := object.Key("WeightPerAxle") + ok.Long(v.WeightPerAxle) + } + + if v.WeightPerAxleGroup != nil { + ok := object.Key("WeightPerAxleGroup") + if err := awsRestjson1_serializeDocumentWeightPerAxleGroup(v.WeightPerAxleGroup, ok); err != nil { + return err + } + } + + if v.Width != 0 { + ok := object.Key("Width") + ok.Long(v.Width) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteVehicleLicensePlate(v *types.RouteVehicleLicensePlate, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LastCharacter != nil { + ok := object.Key("LastCharacter") + ok.String(*v.LastCharacter) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteWaypoint(v *types.RouteWaypoint, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AvoidActionsForDistance != 0 { + ok := object.Key("AvoidActionsForDistance") + ok.Long(v.AvoidActionsForDistance) + } + + if v.AvoidUTurns != nil { + ok := object.Key("AvoidUTurns") + ok.Boolean(*v.AvoidUTurns) + } + + if v.Heading != 0 { + ok := object.Key("Heading") + switch { + case math.IsNaN(v.Heading): + ok.String("NaN") + + case math.IsInf(v.Heading, 1): + ok.String("Infinity") + + case math.IsInf(v.Heading, -1): + ok.String("-Infinity") + + default: + ok.Double(v.Heading) + + } + } + + if v.Matching != nil { + ok := object.Key("Matching") + if err := awsRestjson1_serializeDocumentRouteMatchingOptions(v.Matching, ok); err != nil { + return err + } + } + + if v.PassThrough != nil { + ok := object.Key("PassThrough") + ok.Boolean(*v.PassThrough) + } + + if v.Position != nil { + ok := object.Key("Position") + if err := awsRestjson1_serializeDocumentPosition(v.Position, ok); err != nil { + return err + } + } + + if v.SideOfStreet != nil { + ok := object.Key("SideOfStreet") + if err := awsRestjson1_serializeDocumentRouteSideOfStreetOptions(v.SideOfStreet, ok); err != nil { + return err + } + } + + if v.StopDuration != 0 { + ok := object.Key("StopDuration") + ok.Long(v.StopDuration) + } + + return nil +} + +func awsRestjson1_serializeDocumentRouteWaypointList(v []types.RouteWaypoint, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentRouteWaypoint(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentTimeThresholdList(v []int64, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.Long(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentTruckRoadTypeList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationAccessHours(v *types.WaypointOptimizationAccessHours, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.From != nil { + ok := object.Key("From") + if err := awsRestjson1_serializeDocumentWaypointOptimizationAccessHoursEntry(v.From, ok); err != nil { + return err + } + } + + if v.To != nil { + ok := object.Key("To") + if err := awsRestjson1_serializeDocumentWaypointOptimizationAccessHoursEntry(v.To, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationAccessHoursEntry(v *types.WaypointOptimizationAccessHoursEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DayOfWeek) > 0 { + ok := object.Key("DayOfWeek") + ok.String(string(v.DayOfWeek)) + } + + if v.TimeOfDay != nil { + ok := object.Key("TimeOfDay") + ok.String(*v.TimeOfDay) + } + + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationAvoidanceArea(v *types.WaypointOptimizationAvoidanceArea, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Geometry != nil { + ok := object.Key("Geometry") + if err := awsRestjson1_serializeDocumentWaypointOptimizationAvoidanceAreaGeometry(v.Geometry, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationAvoidanceAreaGeometry(v *types.WaypointOptimizationAvoidanceAreaGeometry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BoundingBox != nil { + ok := object.Key("BoundingBox") + if err := awsRestjson1_serializeDocumentBoundingBox(v.BoundingBox, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationAvoidanceAreaList(v []types.WaypointOptimizationAvoidanceArea, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentWaypointOptimizationAvoidanceArea(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationAvoidanceOptions(v *types.WaypointOptimizationAvoidanceOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Areas != nil { + ok := object.Key("Areas") + if err := awsRestjson1_serializeDocumentWaypointOptimizationAvoidanceAreaList(v.Areas, ok); err != nil { + return err + } + } + + if v.CarShuttleTrains != nil { + ok := object.Key("CarShuttleTrains") + ok.Boolean(*v.CarShuttleTrains) + } + + if v.ControlledAccessHighways != nil { + ok := object.Key("ControlledAccessHighways") + ok.Boolean(*v.ControlledAccessHighways) + } + + if v.DirtRoads != nil { + ok := object.Key("DirtRoads") + ok.Boolean(*v.DirtRoads) + } + + if v.Ferries != nil { + ok := object.Key("Ferries") + ok.Boolean(*v.Ferries) + } + + if v.TollRoads != nil { + ok := object.Key("TollRoads") + ok.Boolean(*v.TollRoads) + } + + if v.Tunnels != nil { + ok := object.Key("Tunnels") + ok.Boolean(*v.Tunnels) + } + + if v.UTurns != nil { + ok := object.Key("UTurns") + ok.Boolean(*v.UTurns) + } + + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationDestinationOptions(v *types.WaypointOptimizationDestinationOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccessHours != nil { + ok := object.Key("AccessHours") + if err := awsRestjson1_serializeDocumentWaypointOptimizationAccessHours(v.AccessHours, ok); err != nil { + return err + } + } + + if v.AppointmentTime != nil { + ok := object.Key("AppointmentTime") + ok.String(*v.AppointmentTime) + } + + if v.Heading != 0 { + ok := object.Key("Heading") + switch { + case math.IsNaN(v.Heading): + ok.String("NaN") + + case math.IsInf(v.Heading, 1): + ok.String("Infinity") + + case math.IsInf(v.Heading, -1): + ok.String("-Infinity") + + default: + ok.Double(v.Heading) + + } + } + + if v.Id != nil { + ok := object.Key("Id") + ok.String(*v.Id) + } + + if v.ServiceDuration != 0 { + ok := object.Key("ServiceDuration") + ok.Long(v.ServiceDuration) + } + + if v.SideOfStreet != nil { + ok := object.Key("SideOfStreet") + if err := awsRestjson1_serializeDocumentWaypointOptimizationSideOfStreetOptions(v.SideOfStreet, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationDriverOptions(v *types.WaypointOptimizationDriverOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RestCycles != nil { + ok := object.Key("RestCycles") + if err := awsRestjson1_serializeDocumentWaypointOptimizationRestCycles(v.RestCycles, ok); err != nil { + return err + } + } + + if v.RestProfile != nil { + ok := object.Key("RestProfile") + if err := awsRestjson1_serializeDocumentWaypointOptimizationRestProfile(v.RestProfile, ok); err != nil { + return err + } + } + + if len(v.TreatServiceTimeAs) > 0 { + ok := object.Key("TreatServiceTimeAs") + ok.String(string(v.TreatServiceTimeAs)) + } + + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationExclusionOptions(v *types.WaypointOptimizationExclusionOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Countries != nil { + ok := object.Key("Countries") + if err := awsRestjson1_serializeDocumentCountryCodeList(v.Countries, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationHazardousCargoTypeList(v []types.WaypointOptimizationHazardousCargoType, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationOriginOptions(v *types.WaypointOptimizationOriginOptions, 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 awsRestjson1_serializeDocumentWaypointOptimizationPedestrianOptions(v *types.WaypointOptimizationPedestrianOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Speed != nil { + ok := object.Key("Speed") + switch { + case math.IsNaN(*v.Speed): + ok.String("NaN") + + case math.IsInf(*v.Speed, 1): + ok.String("Infinity") + + case math.IsInf(*v.Speed, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.Speed) + + } + } + + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationRestCycleDurations(v *types.WaypointOptimizationRestCycleDurations, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + { + ok := object.Key("RestDuration") + ok.Long(v.RestDuration) + } + + { + ok := object.Key("WorkDuration") + ok.Long(v.WorkDuration) + } + + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationRestCycles(v *types.WaypointOptimizationRestCycles, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LongCycle != nil { + ok := object.Key("LongCycle") + if err := awsRestjson1_serializeDocumentWaypointOptimizationRestCycleDurations(v.LongCycle, ok); err != nil { + return err + } + } + + if v.ShortCycle != nil { + ok := object.Key("ShortCycle") + if err := awsRestjson1_serializeDocumentWaypointOptimizationRestCycleDurations(v.ShortCycle, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationRestProfile(v *types.WaypointOptimizationRestProfile, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Profile != nil { + ok := object.Key("Profile") + ok.String(*v.Profile) + } + + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationSideOfStreetOptions(v *types.WaypointOptimizationSideOfStreetOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Position != nil { + ok := object.Key("Position") + if err := awsRestjson1_serializeDocumentPosition(v.Position, ok); err != nil { + return err + } + } + + if len(v.UseWith) > 0 { + ok := object.Key("UseWith") + ok.String(string(v.UseWith)) + } + + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationTrafficOptions(v *types.WaypointOptimizationTrafficOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Usage) > 0 { + ok := object.Key("Usage") + ok.String(string(v.Usage)) + } + + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationTrailerOptions(v *types.WaypointOptimizationTrailerOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TrailerCount != nil { + ok := object.Key("TrailerCount") + ok.Integer(*v.TrailerCount) + } + + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationTravelModeOptions(v *types.WaypointOptimizationTravelModeOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Pedestrian != nil { + ok := object.Key("Pedestrian") + if err := awsRestjson1_serializeDocumentWaypointOptimizationPedestrianOptions(v.Pedestrian, ok); err != nil { + return err + } + } + + if v.Truck != nil { + ok := object.Key("Truck") + if err := awsRestjson1_serializeDocumentWaypointOptimizationTruckOptions(v.Truck, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationTruckOptions(v *types.WaypointOptimizationTruckOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.GrossWeight != 0 { + ok := object.Key("GrossWeight") + ok.Long(v.GrossWeight) + } + + if v.HazardousCargos != nil { + ok := object.Key("HazardousCargos") + if err := awsRestjson1_serializeDocumentWaypointOptimizationHazardousCargoTypeList(v.HazardousCargos, ok); err != nil { + return err + } + } + + if v.Height != 0 { + ok := object.Key("Height") + ok.Long(v.Height) + } + + if v.Length != 0 { + ok := object.Key("Length") + ok.Long(v.Length) + } + + if v.Trailer != nil { + ok := object.Key("Trailer") + if err := awsRestjson1_serializeDocumentWaypointOptimizationTrailerOptions(v.Trailer, ok); err != nil { + return err + } + } + + if len(v.TruckType) > 0 { + ok := object.Key("TruckType") + ok.String(string(v.TruckType)) + } + + if v.TunnelRestrictionCode != nil { + ok := object.Key("TunnelRestrictionCode") + ok.String(*v.TunnelRestrictionCode) + } + + if v.WeightPerAxle != 0 { + ok := object.Key("WeightPerAxle") + ok.Long(v.WeightPerAxle) + } + + if v.Width != 0 { + ok := object.Key("Width") + ok.Long(v.Width) + } + + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationWaypoint(v *types.WaypointOptimizationWaypoint, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccessHours != nil { + ok := object.Key("AccessHours") + if err := awsRestjson1_serializeDocumentWaypointOptimizationAccessHours(v.AccessHours, ok); err != nil { + return err + } + } + + if v.AppointmentTime != nil { + ok := object.Key("AppointmentTime") + ok.String(*v.AppointmentTime) + } + + if v.Before != nil { + ok := object.Key("Before") + if err := awsRestjson1_serializeDocumentBeforeWaypointsList(v.Before, ok); err != nil { + return err + } + } + + if v.Heading != 0 { + ok := object.Key("Heading") + switch { + case math.IsNaN(v.Heading): + ok.String("NaN") + + case math.IsInf(v.Heading, 1): + ok.String("Infinity") + + case math.IsInf(v.Heading, -1): + ok.String("-Infinity") + + default: + ok.Double(v.Heading) + + } + } + + if v.Id != nil { + ok := object.Key("Id") + ok.String(*v.Id) + } + + if v.Position != nil { + ok := object.Key("Position") + if err := awsRestjson1_serializeDocumentPosition(v.Position, ok); err != nil { + return err + } + } + + if v.ServiceDuration != 0 { + ok := object.Key("ServiceDuration") + ok.Long(v.ServiceDuration) + } + + if v.SideOfStreet != nil { + ok := object.Key("SideOfStreet") + if err := awsRestjson1_serializeDocumentWaypointOptimizationSideOfStreetOptions(v.SideOfStreet, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentWaypointOptimizationWaypointList(v []types.WaypointOptimizationWaypoint, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentWaypointOptimizationWaypoint(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentWeightPerAxleGroup(v *types.WeightPerAxleGroup, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Quad != 0 { + ok := object.Key("Quad") + ok.Long(v.Quad) + } + + if v.Quint != 0 { + ok := object.Key("Quint") + ok.Long(v.Quint) + } + + if v.Single != 0 { + ok := object.Key("Single") + ok.Long(v.Single) + } + + if v.Tandem != 0 { + ok := object.Key("Tandem") + ok.Long(v.Tandem) + } + + if v.Triple != 0 { + ok := object.Key("Triple") + ok.Long(v.Triple) + } + + return nil +} diff --git a/service/georoutes/snapshot/api_op_CalculateIsolines.go.snap b/service/georoutes/snapshot/api_op_CalculateIsolines.go.snap new file mode 100644 index 00000000000..729526dac35 --- /dev/null +++ b/service/georoutes/snapshot/api_op_CalculateIsolines.go.snap @@ -0,0 +1,41 @@ +CalculateIsolines + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/georoutes/snapshot/api_op_CalculateRouteMatrix.go.snap b/service/georoutes/snapshot/api_op_CalculateRouteMatrix.go.snap new file mode 100644 index 00000000000..9a0d7aff98d --- /dev/null +++ b/service/georoutes/snapshot/api_op_CalculateRouteMatrix.go.snap @@ -0,0 +1,41 @@ +CalculateRouteMatrix + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/georoutes/snapshot/api_op_CalculateRoutes.go.snap b/service/georoutes/snapshot/api_op_CalculateRoutes.go.snap new file mode 100644 index 00000000000..8836bdcb66f --- /dev/null +++ b/service/georoutes/snapshot/api_op_CalculateRoutes.go.snap @@ -0,0 +1,41 @@ +CalculateRoutes + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/georoutes/snapshot/api_op_OptimizeWaypoints.go.snap b/service/georoutes/snapshot/api_op_OptimizeWaypoints.go.snap new file mode 100644 index 00000000000..b8b6e0be54e --- /dev/null +++ b/service/georoutes/snapshot/api_op_OptimizeWaypoints.go.snap @@ -0,0 +1,41 @@ +OptimizeWaypoints + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/georoutes/snapshot/api_op_SnapToRoads.go.snap b/service/georoutes/snapshot/api_op_SnapToRoads.go.snap new file mode 100644 index 00000000000..f03af71469f --- /dev/null +++ b/service/georoutes/snapshot/api_op_SnapToRoads.go.snap @@ -0,0 +1,41 @@ +SnapToRoads + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/georoutes/snapshot_test.go b/service/georoutes/snapshot_test.go new file mode 100644 index 00000000000..897ba9b217d --- /dev/null +++ b/service/georoutes/snapshot_test.go @@ -0,0 +1,182 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +//go:build snapshot + +package georoutes + +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_CalculateIsolines(t *testing.T) { + svc := New(Options{}) + _, err := svc.CalculateIsolines(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CalculateIsolines") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_CalculateRouteMatrix(t *testing.T) { + svc := New(Options{}) + _, err := svc.CalculateRouteMatrix(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CalculateRouteMatrix") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_CalculateRoutes(t *testing.T) { + svc := New(Options{}) + _, err := svc.CalculateRoutes(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CalculateRoutes") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_OptimizeWaypoints(t *testing.T) { + svc := New(Options{}) + _, err := svc.OptimizeWaypoints(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "OptimizeWaypoints") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_SnapToRoads(t *testing.T) { + svc := New(Options{}) + _, err := svc.SnapToRoads(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "SnapToRoads") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} +func TestUpdateSnapshot_CalculateIsolines(t *testing.T) { + svc := New(Options{}) + _, err := svc.CalculateIsolines(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CalculateIsolines") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_CalculateRouteMatrix(t *testing.T) { + svc := New(Options{}) + _, err := svc.CalculateRouteMatrix(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CalculateRouteMatrix") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_CalculateRoutes(t *testing.T) { + svc := New(Options{}) + _, err := svc.CalculateRoutes(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CalculateRoutes") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_OptimizeWaypoints(t *testing.T) { + svc := New(Options{}) + _, err := svc.OptimizeWaypoints(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "OptimizeWaypoints") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_SnapToRoads(t *testing.T) { + svc := New(Options{}) + _, err := svc.SnapToRoads(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "SnapToRoads") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} diff --git a/service/georoutes/types/enums.go b/service/georoutes/types/enums.go new file mode 100644 index 00000000000..db5c36be218 --- /dev/null +++ b/service/georoutes/types/enums.go @@ -0,0 +1,1715 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type DayOfWeek string + +// Enum values for DayOfWeek +const ( + DayOfWeekMonday DayOfWeek = "Monday" + DayOfWeekTuesday DayOfWeek = "Tuesday" + DayOfWeekWednesday DayOfWeek = "Wednesday" + DayOfWeekThursday DayOfWeek = "Thursday" + DayOfWeekFriday DayOfWeek = "Friday" + DayOfWeekSaturday DayOfWeek = "Saturday" + DayOfWeekSunday DayOfWeek = "Sunday" +) + +// Values returns all known values for DayOfWeek. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (DayOfWeek) Values() []DayOfWeek { + return []DayOfWeek{ + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday", + } +} + +type GeometryFormat string + +// Enum values for GeometryFormat +const ( + GeometryFormatFlexiblePolyline GeometryFormat = "FlexiblePolyline" + GeometryFormatSimple GeometryFormat = "Simple" +) + +// Values returns all known values for GeometryFormat. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (GeometryFormat) Values() []GeometryFormat { + return []GeometryFormat{ + "FlexiblePolyline", + "Simple", + } +} + +type IsolineEngineType string + +// Enum values for IsolineEngineType +const ( + IsolineEngineTypeElectric IsolineEngineType = "Electric" + IsolineEngineTypeInternalCombustion IsolineEngineType = "InternalCombustion" + IsolineEngineTypePluginHybrid IsolineEngineType = "PluginHybrid" +) + +// Values returns all known values for IsolineEngineType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (IsolineEngineType) Values() []IsolineEngineType { + return []IsolineEngineType{ + "Electric", + "InternalCombustion", + "PluginHybrid", + } +} + +type IsolineHazardousCargoType string + +// Enum values for IsolineHazardousCargoType +const ( + IsolineHazardousCargoTypeCombustible IsolineHazardousCargoType = "Combustible" + IsolineHazardousCargoTypeCorrosive IsolineHazardousCargoType = "Corrosive" + IsolineHazardousCargoTypeExplosive IsolineHazardousCargoType = "Explosive" + IsolineHazardousCargoTypeFlammable IsolineHazardousCargoType = "Flammable" + IsolineHazardousCargoTypeGas IsolineHazardousCargoType = "Gas" + IsolineHazardousCargoTypeHarmfulToWater IsolineHazardousCargoType = "HarmfulToWater" + IsolineHazardousCargoTypeOrganic IsolineHazardousCargoType = "Organic" + IsolineHazardousCargoTypeOther IsolineHazardousCargoType = "Other" + IsolineHazardousCargoTypePoison IsolineHazardousCargoType = "Poison" + IsolineHazardousCargoTypePoisonousInhalation IsolineHazardousCargoType = "PoisonousInhalation" + IsolineHazardousCargoTypeRadioactive IsolineHazardousCargoType = "Radioactive" +) + +// Values returns all known values for IsolineHazardousCargoType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (IsolineHazardousCargoType) Values() []IsolineHazardousCargoType { + return []IsolineHazardousCargoType{ + "Combustible", + "Corrosive", + "Explosive", + "Flammable", + "Gas", + "HarmfulToWater", + "Organic", + "Other", + "Poison", + "PoisonousInhalation", + "Radioactive", + } +} + +type IsolineOptimizationObjective string + +// Enum values for IsolineOptimizationObjective +const ( + IsolineOptimizationObjectiveAccurateCalculation IsolineOptimizationObjective = "AccurateCalculation" + IsolineOptimizationObjectiveBalancedCalculation IsolineOptimizationObjective = "BalancedCalculation" + IsolineOptimizationObjectiveFastCalculation IsolineOptimizationObjective = "FastCalculation" +) + +// Values returns all known values for IsolineOptimizationObjective. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (IsolineOptimizationObjective) Values() []IsolineOptimizationObjective { + return []IsolineOptimizationObjective{ + "AccurateCalculation", + "BalancedCalculation", + "FastCalculation", + } +} + +type IsolineTravelMode string + +// Enum values for IsolineTravelMode +const ( + IsolineTravelModeCar IsolineTravelMode = "Car" + IsolineTravelModePedestrian IsolineTravelMode = "Pedestrian" + IsolineTravelModeScooter IsolineTravelMode = "Scooter" + IsolineTravelModeTruck IsolineTravelMode = "Truck" +) + +// Values returns all known values for IsolineTravelMode. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (IsolineTravelMode) Values() []IsolineTravelMode { + return []IsolineTravelMode{ + "Car", + "Pedestrian", + "Scooter", + "Truck", + } +} + +type IsolineTruckType string + +// Enum values for IsolineTruckType +const ( + IsolineTruckTypeLightTruck IsolineTruckType = "LightTruck" + IsolineTruckTypeStraightTruck IsolineTruckType = "StraightTruck" + IsolineTruckTypeTractor IsolineTruckType = "Tractor" +) + +// Values returns all known values for IsolineTruckType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (IsolineTruckType) Values() []IsolineTruckType { + return []IsolineTruckType{ + "LightTruck", + "StraightTruck", + "Tractor", + } +} + +type IsolineZoneCategory string + +// Enum values for IsolineZoneCategory +const ( + IsolineZoneCategoryCongestionPricing IsolineZoneCategory = "CongestionPricing" + IsolineZoneCategoryEnvironmental IsolineZoneCategory = "Environmental" + IsolineZoneCategoryVignette IsolineZoneCategory = "Vignette" +) + +// Values returns all known values for IsolineZoneCategory. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (IsolineZoneCategory) Values() []IsolineZoneCategory { + return []IsolineZoneCategory{ + "CongestionPricing", + "Environmental", + "Vignette", + } +} + +type MatchingStrategy string + +// Enum values for MatchingStrategy +const ( + MatchingStrategyMatchAny MatchingStrategy = "MatchAny" + MatchingStrategyMatchMostSignificantRoad MatchingStrategy = "MatchMostSignificantRoad" +) + +// Values returns all known values for MatchingStrategy. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (MatchingStrategy) Values() []MatchingStrategy { + return []MatchingStrategy{ + "MatchAny", + "MatchMostSignificantRoad", + } +} + +type MeasurementSystem string + +// Enum values for MeasurementSystem +const ( + MeasurementSystemMetric MeasurementSystem = "Metric" + MeasurementSystemImperial MeasurementSystem = "Imperial" +) + +// Values returns all known values for MeasurementSystem. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (MeasurementSystem) Values() []MeasurementSystem { + return []MeasurementSystem{ + "Metric", + "Imperial", + } +} + +type RoadSnapHazardousCargoType string + +// Enum values for RoadSnapHazardousCargoType +const ( + RoadSnapHazardousCargoTypeCombustible RoadSnapHazardousCargoType = "Combustible" + RoadSnapHazardousCargoTypeCorrosive RoadSnapHazardousCargoType = "Corrosive" + RoadSnapHazardousCargoTypeExplosive RoadSnapHazardousCargoType = "Explosive" + RoadSnapHazardousCargoTypeFlammable RoadSnapHazardousCargoType = "Flammable" + RoadSnapHazardousCargoTypeGas RoadSnapHazardousCargoType = "Gas" + RoadSnapHazardousCargoTypeHarmfulToWater RoadSnapHazardousCargoType = "HarmfulToWater" + RoadSnapHazardousCargoTypeOrganic RoadSnapHazardousCargoType = "Organic" + RoadSnapHazardousCargoTypeOther RoadSnapHazardousCargoType = "Other" + RoadSnapHazardousCargoTypePoison RoadSnapHazardousCargoType = "Poison" + RoadSnapHazardousCargoTypePoisonousInhalation RoadSnapHazardousCargoType = "PoisonousInhalation" + RoadSnapHazardousCargoTypeRadioactive RoadSnapHazardousCargoType = "Radioactive" +) + +// Values returns all known values for RoadSnapHazardousCargoType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RoadSnapHazardousCargoType) Values() []RoadSnapHazardousCargoType { + return []RoadSnapHazardousCargoType{ + "Combustible", + "Corrosive", + "Explosive", + "Flammable", + "Gas", + "HarmfulToWater", + "Organic", + "Other", + "Poison", + "PoisonousInhalation", + "Radioactive", + } +} + +type RoadSnapNoticeCode string + +// Enum values for RoadSnapNoticeCode +const ( + RoadSnapNoticeCodeTracePointsHeadingIgnored RoadSnapNoticeCode = "TracePointsHeadingIgnored" + RoadSnapNoticeCodeTracePointsIgnored RoadSnapNoticeCode = "TracePointsIgnored" + RoadSnapNoticeCodeTracePointsMovedByLargeDistance RoadSnapNoticeCode = "TracePointsMovedByLargeDistance" + RoadSnapNoticeCodeTracePointsNotMatched RoadSnapNoticeCode = "TracePointsNotMatched" + RoadSnapNoticeCodeTracePointsOutOfSequence RoadSnapNoticeCode = "TracePointsOutOfSequence" + RoadSnapNoticeCodeTracePointsSpeedEstimated RoadSnapNoticeCode = "TracePointsSpeedEstimated" + RoadSnapNoticeCodeTracePointsSpeedIgnored RoadSnapNoticeCode = "TracePointsSpeedIgnored" +) + +// Values returns all known values for RoadSnapNoticeCode. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RoadSnapNoticeCode) Values() []RoadSnapNoticeCode { + return []RoadSnapNoticeCode{ + "TracePointsHeadingIgnored", + "TracePointsIgnored", + "TracePointsMovedByLargeDistance", + "TracePointsNotMatched", + "TracePointsOutOfSequence", + "TracePointsSpeedEstimated", + "TracePointsSpeedIgnored", + } +} + +type RoadSnapTravelMode string + +// Enum values for RoadSnapTravelMode +const ( + RoadSnapTravelModeCar RoadSnapTravelMode = "Car" + RoadSnapTravelModePedestrian RoadSnapTravelMode = "Pedestrian" + RoadSnapTravelModeScooter RoadSnapTravelMode = "Scooter" + RoadSnapTravelModeTruck RoadSnapTravelMode = "Truck" +) + +// Values returns all known values for RoadSnapTravelMode. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RoadSnapTravelMode) Values() []RoadSnapTravelMode { + return []RoadSnapTravelMode{ + "Car", + "Pedestrian", + "Scooter", + "Truck", + } +} + +type RouteDirection string + +// Enum values for RouteDirection +const ( + RouteDirectionEast RouteDirection = "East" + RouteDirectionNorth RouteDirection = "North" + RouteDirectionSouth RouteDirection = "South" + RouteDirectionWest RouteDirection = "West" +) + +// Values returns all known values for RouteDirection. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteDirection) Values() []RouteDirection { + return []RouteDirection{ + "East", + "North", + "South", + "West", + } +} + +type RouteEngineType string + +// Enum values for RouteEngineType +const ( + RouteEngineTypeElectric RouteEngineType = "Electric" + RouteEngineTypeInternalCombustion RouteEngineType = "InternalCombustion" + RouteEngineTypePluginHybrid RouteEngineType = "PluginHybrid" +) + +// Values returns all known values for RouteEngineType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteEngineType) Values() []RouteEngineType { + return []RouteEngineType{ + "Electric", + "InternalCombustion", + "PluginHybrid", + } +} + +type RouteFerryAfterTravelStepType string + +// Enum values for RouteFerryAfterTravelStepType +const ( + RouteFerryAfterTravelStepTypeDeboard RouteFerryAfterTravelStepType = "Deboard" +) + +// Values returns all known values for RouteFerryAfterTravelStepType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteFerryAfterTravelStepType) Values() []RouteFerryAfterTravelStepType { + return []RouteFerryAfterTravelStepType{ + "Deboard", + } +} + +type RouteFerryBeforeTravelStepType string + +// Enum values for RouteFerryBeforeTravelStepType +const ( + RouteFerryBeforeTravelStepTypeBoard RouteFerryBeforeTravelStepType = "Board" +) + +// Values returns all known values for RouteFerryBeforeTravelStepType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteFerryBeforeTravelStepType) Values() []RouteFerryBeforeTravelStepType { + return []RouteFerryBeforeTravelStepType{ + "Board", + } +} + +type RouteFerryNoticeCode string + +// Enum values for RouteFerryNoticeCode +const ( + RouteFerryNoticeCodeAccuratePolylineUnavailable RouteFerryNoticeCode = "AccuratePolylineUnavailable" + RouteFerryNoticeCodeNoSchedule RouteFerryNoticeCode = "NoSchedule" + RouteFerryNoticeCodeOther RouteFerryNoticeCode = "Other" + RouteFerryNoticeCodeViolatedAvoidFerry RouteFerryNoticeCode = "ViolatedAvoidFerry" + RouteFerryNoticeCodeViolatedAvoidRailFerry RouteFerryNoticeCode = "ViolatedAvoidRailFerry" +) + +// Values returns all known values for RouteFerryNoticeCode. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteFerryNoticeCode) Values() []RouteFerryNoticeCode { + return []RouteFerryNoticeCode{ + "AccuratePolylineUnavailable", + "NoSchedule", + "Other", + "ViolatedAvoidFerry", + "ViolatedAvoidRailFerry", + } +} + +type RouteFerryTravelStepType string + +// Enum values for RouteFerryTravelStepType +const ( + RouteFerryTravelStepTypeDepart RouteFerryTravelStepType = "Depart" + RouteFerryTravelStepTypeContinue RouteFerryTravelStepType = "Continue" + RouteFerryTravelStepTypeArrive RouteFerryTravelStepType = "Arrive" +) + +// Values returns all known values for RouteFerryTravelStepType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteFerryTravelStepType) Values() []RouteFerryTravelStepType { + return []RouteFerryTravelStepType{ + "Depart", + "Continue", + "Arrive", + } +} + +type RouteHazardousCargoType string + +// Enum values for RouteHazardousCargoType +const ( + RouteHazardousCargoTypeCombustible RouteHazardousCargoType = "Combustible" + RouteHazardousCargoTypeCorrosive RouteHazardousCargoType = "Corrosive" + RouteHazardousCargoTypeExplosive RouteHazardousCargoType = "Explosive" + RouteHazardousCargoTypeFlammable RouteHazardousCargoType = "Flammable" + RouteHazardousCargoTypeGas RouteHazardousCargoType = "Gas" + RouteHazardousCargoTypeHarmfulToWater RouteHazardousCargoType = "HarmfulToWater" + RouteHazardousCargoTypeOrganic RouteHazardousCargoType = "Organic" + RouteHazardousCargoTypeOther RouteHazardousCargoType = "Other" + RouteHazardousCargoTypePoison RouteHazardousCargoType = "Poison" + RouteHazardousCargoTypePoisonousInhalation RouteHazardousCargoType = "PoisonousInhalation" + RouteHazardousCargoTypeRadioactive RouteHazardousCargoType = "Radioactive" +) + +// Values returns all known values for RouteHazardousCargoType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteHazardousCargoType) Values() []RouteHazardousCargoType { + return []RouteHazardousCargoType{ + "Combustible", + "Corrosive", + "Explosive", + "Flammable", + "Gas", + "HarmfulToWater", + "Organic", + "Other", + "Poison", + "PoisonousInhalation", + "Radioactive", + } +} + +type RouteLegAdditionalFeature string + +// Enum values for RouteLegAdditionalFeature +const ( + RouteLegAdditionalFeatureElevation RouteLegAdditionalFeature = "Elevation" + RouteLegAdditionalFeatureIncidents RouteLegAdditionalFeature = "Incidents" + RouteLegAdditionalFeaturePassThroughWaypoints RouteLegAdditionalFeature = "PassThroughWaypoints" + RouteLegAdditionalFeatureSummary RouteLegAdditionalFeature = "Summary" + RouteLegAdditionalFeatureTolls RouteLegAdditionalFeature = "Tolls" + RouteLegAdditionalFeatureTravelStepInstructions RouteLegAdditionalFeature = "TravelStepInstructions" + RouteLegAdditionalFeatureTruckRoadTypes RouteLegAdditionalFeature = "TruckRoadTypes" + RouteLegAdditionalFeatureTypicalDuration RouteLegAdditionalFeature = "TypicalDuration" + RouteLegAdditionalFeatureZones RouteLegAdditionalFeature = "Zones" +) + +// Values returns all known values for RouteLegAdditionalFeature. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteLegAdditionalFeature) Values() []RouteLegAdditionalFeature { + return []RouteLegAdditionalFeature{ + "Elevation", + "Incidents", + "PassThroughWaypoints", + "Summary", + "Tolls", + "TravelStepInstructions", + "TruckRoadTypes", + "TypicalDuration", + "Zones", + } +} + +type RouteLegTravelMode string + +// Enum values for RouteLegTravelMode +const ( + RouteLegTravelModeCar RouteLegTravelMode = "Car" + RouteLegTravelModeFerry RouteLegTravelMode = "Ferry" + RouteLegTravelModePedestrian RouteLegTravelMode = "Pedestrian" + RouteLegTravelModeScooter RouteLegTravelMode = "Scooter" + RouteLegTravelModeTruck RouteLegTravelMode = "Truck" +) + +// Values returns all known values for RouteLegTravelMode. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteLegTravelMode) Values() []RouteLegTravelMode { + return []RouteLegTravelMode{ + "Car", + "Ferry", + "Pedestrian", + "Scooter", + "Truck", + } +} + +type RouteLegType string + +// Enum values for RouteLegType +const ( + RouteLegTypeFerry RouteLegType = "Ferry" + RouteLegTypePedestrian RouteLegType = "Pedestrian" + RouteLegTypeVehicle RouteLegType = "Vehicle" +) + +// Values returns all known values for RouteLegType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteLegType) Values() []RouteLegType { + return []RouteLegType{ + "Ferry", + "Pedestrian", + "Vehicle", + } +} + +type RouteMatrixErrorCode string + +// Enum values for RouteMatrixErrorCode +const ( + RouteMatrixErrorCodeNoMatch RouteMatrixErrorCode = "NoMatch" + RouteMatrixErrorCodeNoMatchDestination RouteMatrixErrorCode = "NoMatchDestination" + RouteMatrixErrorCodeNoMatchOrigin RouteMatrixErrorCode = "NoMatchOrigin" + RouteMatrixErrorCodeNoRoute RouteMatrixErrorCode = "NoRoute" + RouteMatrixErrorCodeOutOfBounds RouteMatrixErrorCode = "OutOfBounds" + RouteMatrixErrorCodeOutOfBoundsDestination RouteMatrixErrorCode = "OutOfBoundsDestination" + RouteMatrixErrorCodeOutOfBoundsOrigin RouteMatrixErrorCode = "OutOfBoundsOrigin" + RouteMatrixErrorCodeOther RouteMatrixErrorCode = "Other" + RouteMatrixErrorCodeViolation RouteMatrixErrorCode = "Violation" +) + +// Values returns all known values for RouteMatrixErrorCode. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteMatrixErrorCode) Values() []RouteMatrixErrorCode { + return []RouteMatrixErrorCode{ + "NoMatch", + "NoMatchDestination", + "NoMatchOrigin", + "NoRoute", + "OutOfBounds", + "OutOfBoundsDestination", + "OutOfBoundsOrigin", + "Other", + "Violation", + } +} + +type RouteMatrixHazardousCargoType string + +// Enum values for RouteMatrixHazardousCargoType +const ( + RouteMatrixHazardousCargoTypeCombustible RouteMatrixHazardousCargoType = "Combustible" + RouteMatrixHazardousCargoTypeCorrosive RouteMatrixHazardousCargoType = "Corrosive" + RouteMatrixHazardousCargoTypeExplosive RouteMatrixHazardousCargoType = "Explosive" + RouteMatrixHazardousCargoTypeFlammable RouteMatrixHazardousCargoType = "Flammable" + RouteMatrixHazardousCargoTypeGas RouteMatrixHazardousCargoType = "Gas" + RouteMatrixHazardousCargoTypeHarmfulToWater RouteMatrixHazardousCargoType = "HarmfulToWater" + RouteMatrixHazardousCargoTypeOrganic RouteMatrixHazardousCargoType = "Organic" + RouteMatrixHazardousCargoTypeOther RouteMatrixHazardousCargoType = "Other" + RouteMatrixHazardousCargoTypePoison RouteMatrixHazardousCargoType = "Poison" + RouteMatrixHazardousCargoTypePoisonousInhalation RouteMatrixHazardousCargoType = "PoisonousInhalation" + RouteMatrixHazardousCargoTypeRadioactive RouteMatrixHazardousCargoType = "Radioactive" +) + +// Values returns all known values for RouteMatrixHazardousCargoType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteMatrixHazardousCargoType) Values() []RouteMatrixHazardousCargoType { + return []RouteMatrixHazardousCargoType{ + "Combustible", + "Corrosive", + "Explosive", + "Flammable", + "Gas", + "HarmfulToWater", + "Organic", + "Other", + "Poison", + "PoisonousInhalation", + "Radioactive", + } +} + +type RouteMatrixTravelMode string + +// Enum values for RouteMatrixTravelMode +const ( + RouteMatrixTravelModeCar RouteMatrixTravelMode = "Car" + RouteMatrixTravelModePedestrian RouteMatrixTravelMode = "Pedestrian" + RouteMatrixTravelModeScooter RouteMatrixTravelMode = "Scooter" + RouteMatrixTravelModeTruck RouteMatrixTravelMode = "Truck" +) + +// Values returns all known values for RouteMatrixTravelMode. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteMatrixTravelMode) Values() []RouteMatrixTravelMode { + return []RouteMatrixTravelMode{ + "Car", + "Pedestrian", + "Scooter", + "Truck", + } +} + +type RouteMatrixTruckType string + +// Enum values for RouteMatrixTruckType +const ( + RouteMatrixTruckTypeLightTruck RouteMatrixTruckType = "LightTruck" + RouteMatrixTruckTypeStraightTruck RouteMatrixTruckType = "StraightTruck" + RouteMatrixTruckTypeTractor RouteMatrixTruckType = "Tractor" +) + +// Values returns all known values for RouteMatrixTruckType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteMatrixTruckType) Values() []RouteMatrixTruckType { + return []RouteMatrixTruckType{ + "LightTruck", + "StraightTruck", + "Tractor", + } +} + +type RouteMatrixZoneCategory string + +// Enum values for RouteMatrixZoneCategory +const ( + RouteMatrixZoneCategoryCongestionPricing RouteMatrixZoneCategory = "CongestionPricing" + RouteMatrixZoneCategoryEnvironmental RouteMatrixZoneCategory = "Environmental" + RouteMatrixZoneCategoryVignette RouteMatrixZoneCategory = "Vignette" +) + +// Values returns all known values for RouteMatrixZoneCategory. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteMatrixZoneCategory) Values() []RouteMatrixZoneCategory { + return []RouteMatrixZoneCategory{ + "CongestionPricing", + "Environmental", + "Vignette", + } +} + +type RouteNoticeImpact string + +// Enum values for RouteNoticeImpact +const ( + RouteNoticeImpactHigh RouteNoticeImpact = "High" + RouteNoticeImpactLow RouteNoticeImpact = "Low" +) + +// Values returns all known values for RouteNoticeImpact. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteNoticeImpact) Values() []RouteNoticeImpact { + return []RouteNoticeImpact{ + "High", + "Low", + } +} + +type RoutePedestrianNoticeCode string + +// Enum values for RoutePedestrianNoticeCode +const ( + RoutePedestrianNoticeCodeAccuratePolylineUnavailable RoutePedestrianNoticeCode = "AccuratePolylineUnavailable" + RoutePedestrianNoticeCodeOther RoutePedestrianNoticeCode = "Other" + RoutePedestrianNoticeCodeViolatedAvoidDirtRoad RoutePedestrianNoticeCode = "ViolatedAvoidDirtRoad" + RoutePedestrianNoticeCodeViolatedAvoidTunnel RoutePedestrianNoticeCode = "ViolatedAvoidTunnel" + RoutePedestrianNoticeCodeViolatedPedestrianOption RoutePedestrianNoticeCode = "ViolatedPedestrianOption" +) + +// Values returns all known values for RoutePedestrianNoticeCode. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RoutePedestrianNoticeCode) Values() []RoutePedestrianNoticeCode { + return []RoutePedestrianNoticeCode{ + "AccuratePolylineUnavailable", + "Other", + "ViolatedAvoidDirtRoad", + "ViolatedAvoidTunnel", + "ViolatedPedestrianOption", + } +} + +type RoutePedestrianTravelStepType string + +// Enum values for RoutePedestrianTravelStepType +const ( + RoutePedestrianTravelStepTypeArrive RoutePedestrianTravelStepType = "Arrive" + RoutePedestrianTravelStepTypeContinue RoutePedestrianTravelStepType = "Continue" + RoutePedestrianTravelStepTypeDepart RoutePedestrianTravelStepType = "Depart" + RoutePedestrianTravelStepTypeKeep RoutePedestrianTravelStepType = "Keep" + RoutePedestrianTravelStepTypeRoundaboutEnter RoutePedestrianTravelStepType = "RoundaboutEnter" + RoutePedestrianTravelStepTypeRoundaboutExit RoutePedestrianTravelStepType = "RoundaboutExit" + RoutePedestrianTravelStepTypeRoundaboutPass RoutePedestrianTravelStepType = "RoundaboutPass" + RoutePedestrianTravelStepTypeTurn RoutePedestrianTravelStepType = "Turn" + RoutePedestrianTravelStepTypeExit RoutePedestrianTravelStepType = "Exit" + RoutePedestrianTravelStepTypeRamp RoutePedestrianTravelStepType = "Ramp" + RoutePedestrianTravelStepTypeUTurn RoutePedestrianTravelStepType = "UTurn" +) + +// Values returns all known values for RoutePedestrianTravelStepType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RoutePedestrianTravelStepType) Values() []RoutePedestrianTravelStepType { + return []RoutePedestrianTravelStepType{ + "Arrive", + "Continue", + "Depart", + "Keep", + "RoundaboutEnter", + "RoundaboutExit", + "RoundaboutPass", + "Turn", + "Exit", + "Ramp", + "UTurn", + } +} + +type RouteResponseNoticeCode string + +// Enum values for RouteResponseNoticeCode +const ( + RouteResponseNoticeCodeMainLanguageNotFound RouteResponseNoticeCode = "MainLanguageNotFound" + RouteResponseNoticeCodeOther RouteResponseNoticeCode = "Other" + RouteResponseNoticeCodeTravelTimeExceedsDriverWorkHours RouteResponseNoticeCode = "TravelTimeExceedsDriverWorkHours" +) + +// Values returns all known values for RouteResponseNoticeCode. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteResponseNoticeCode) Values() []RouteResponseNoticeCode { + return []RouteResponseNoticeCode{ + "MainLanguageNotFound", + "Other", + "TravelTimeExceedsDriverWorkHours", + } +} + +type RouteRoadType string + +// Enum values for RouteRoadType +const ( + RouteRoadTypeHighway RouteRoadType = "Highway" + RouteRoadTypeRural RouteRoadType = "Rural" + RouteRoadTypeUrban RouteRoadType = "Urban" +) + +// Values returns all known values for RouteRoadType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteRoadType) Values() []RouteRoadType { + return []RouteRoadType{ + "Highway", + "Rural", + "Urban", + } +} + +type RouteSideOfStreet string + +// Enum values for RouteSideOfStreet +const ( + RouteSideOfStreetLeft RouteSideOfStreet = "Left" + RouteSideOfStreetRight RouteSideOfStreet = "Right" +) + +// Values returns all known values for RouteSideOfStreet. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteSideOfStreet) Values() []RouteSideOfStreet { + return []RouteSideOfStreet{ + "Left", + "Right", + } +} + +type RouteSpanAdditionalFeature string + +// Enum values for RouteSpanAdditionalFeature +const ( + RouteSpanAdditionalFeatureBestCaseDuration RouteSpanAdditionalFeature = "BestCaseDuration" + RouteSpanAdditionalFeatureCarAccess RouteSpanAdditionalFeature = "CarAccess" + RouteSpanAdditionalFeatureCountry RouteSpanAdditionalFeature = "Country" + RouteSpanAdditionalFeatureDistance RouteSpanAdditionalFeature = "Distance" + RouteSpanAdditionalFeatureDuration RouteSpanAdditionalFeature = "Duration" + RouteSpanAdditionalFeatureDynamicSpeed RouteSpanAdditionalFeature = "DynamicSpeed" + RouteSpanAdditionalFeatureFunctionalClassification RouteSpanAdditionalFeature = "FunctionalClassification" + RouteSpanAdditionalFeatureGates RouteSpanAdditionalFeature = "Gates" + RouteSpanAdditionalFeatureIncidents RouteSpanAdditionalFeature = "Incidents" + RouteSpanAdditionalFeatureNames RouteSpanAdditionalFeature = "Names" + RouteSpanAdditionalFeatureNotices RouteSpanAdditionalFeature = "Notices" + RouteSpanAdditionalFeaturePedestrianAccess RouteSpanAdditionalFeature = "PedestrianAccess" + RouteSpanAdditionalFeatureRailwayCrossings RouteSpanAdditionalFeature = "RailwayCrossings" + RouteSpanAdditionalFeatureRegion RouteSpanAdditionalFeature = "Region" + RouteSpanAdditionalFeatureRoadAttributes RouteSpanAdditionalFeature = "RoadAttributes" + RouteSpanAdditionalFeatureRouteNumbers RouteSpanAdditionalFeature = "RouteNumbers" + RouteSpanAdditionalFeatureScooterAccess RouteSpanAdditionalFeature = "ScooterAccess" + RouteSpanAdditionalFeatureSpeedLimit RouteSpanAdditionalFeature = "SpeedLimit" + RouteSpanAdditionalFeatureTollSystems RouteSpanAdditionalFeature = "TollSystems" + RouteSpanAdditionalFeatureTruckAccess RouteSpanAdditionalFeature = "TruckAccess" + RouteSpanAdditionalFeatureTruckRoadTypes RouteSpanAdditionalFeature = "TruckRoadTypes" + RouteSpanAdditionalFeatureTypicalDuration RouteSpanAdditionalFeature = "TypicalDuration" + RouteSpanAdditionalFeatureZones RouteSpanAdditionalFeature = "Zones" + RouteSpanAdditionalFeatureConsumption RouteSpanAdditionalFeature = "Consumption" +) + +// Values returns all known values for RouteSpanAdditionalFeature. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteSpanAdditionalFeature) Values() []RouteSpanAdditionalFeature { + return []RouteSpanAdditionalFeature{ + "BestCaseDuration", + "CarAccess", + "Country", + "Distance", + "Duration", + "DynamicSpeed", + "FunctionalClassification", + "Gates", + "Incidents", + "Names", + "Notices", + "PedestrianAccess", + "RailwayCrossings", + "Region", + "RoadAttributes", + "RouteNumbers", + "ScooterAccess", + "SpeedLimit", + "TollSystems", + "TruckAccess", + "TruckRoadTypes", + "TypicalDuration", + "Zones", + "Consumption", + } +} + +type RouteSpanCarAccessAttribute string + +// Enum values for RouteSpanCarAccessAttribute +const ( + RouteSpanCarAccessAttributeAllowed RouteSpanCarAccessAttribute = "Allowed" + RouteSpanCarAccessAttributeNoThroughTraffic RouteSpanCarAccessAttribute = "NoThroughTraffic" + RouteSpanCarAccessAttributeTollRoad RouteSpanCarAccessAttribute = "TollRoad" +) + +// Values returns all known values for RouteSpanCarAccessAttribute. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteSpanCarAccessAttribute) Values() []RouteSpanCarAccessAttribute { + return []RouteSpanCarAccessAttribute{ + "Allowed", + "NoThroughTraffic", + "TollRoad", + } +} + +type RouteSpanGateAttribute string + +// Enum values for RouteSpanGateAttribute +const ( + RouteSpanGateAttributeEmergency RouteSpanGateAttribute = "Emergency" + RouteSpanGateAttributeKeyAccess RouteSpanGateAttribute = "KeyAccess" + RouteSpanGateAttributePermissionRequired RouteSpanGateAttribute = "PermissionRequired" +) + +// Values returns all known values for RouteSpanGateAttribute. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteSpanGateAttribute) Values() []RouteSpanGateAttribute { + return []RouteSpanGateAttribute{ + "Emergency", + "KeyAccess", + "PermissionRequired", + } +} + +type RouteSpanPedestrianAccessAttribute string + +// Enum values for RouteSpanPedestrianAccessAttribute +const ( + RouteSpanPedestrianAccessAttributeAllowed RouteSpanPedestrianAccessAttribute = "Allowed" + RouteSpanPedestrianAccessAttributeIndoors RouteSpanPedestrianAccessAttribute = "Indoors" + RouteSpanPedestrianAccessAttributeNoThroughTraffic RouteSpanPedestrianAccessAttribute = "NoThroughTraffic" + RouteSpanPedestrianAccessAttributePark RouteSpanPedestrianAccessAttribute = "Park" + RouteSpanPedestrianAccessAttributeStairs RouteSpanPedestrianAccessAttribute = "Stairs" + RouteSpanPedestrianAccessAttributeTollRoad RouteSpanPedestrianAccessAttribute = "TollRoad" +) + +// Values returns all known values for RouteSpanPedestrianAccessAttribute. Note +// that this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteSpanPedestrianAccessAttribute) Values() []RouteSpanPedestrianAccessAttribute { + return []RouteSpanPedestrianAccessAttribute{ + "Allowed", + "Indoors", + "NoThroughTraffic", + "Park", + "Stairs", + "TollRoad", + } +} + +type RouteSpanRailwayCrossingAttribute string + +// Enum values for RouteSpanRailwayCrossingAttribute +const ( + RouteSpanRailwayCrossingAttributeProtected RouteSpanRailwayCrossingAttribute = "Protected" + RouteSpanRailwayCrossingAttributeUnprotected RouteSpanRailwayCrossingAttribute = "Unprotected" +) + +// Values returns all known values for RouteSpanRailwayCrossingAttribute. Note +// that this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteSpanRailwayCrossingAttribute) Values() []RouteSpanRailwayCrossingAttribute { + return []RouteSpanRailwayCrossingAttribute{ + "Protected", + "Unprotected", + } +} + +type RouteSpanRoadAttribute string + +// Enum values for RouteSpanRoadAttribute +const ( + RouteSpanRoadAttributeBridge RouteSpanRoadAttribute = "Bridge" + RouteSpanRoadAttributeBuiltUpArea RouteSpanRoadAttribute = "BuiltUpArea" + RouteSpanRoadAttributeControlledAccessHighway RouteSpanRoadAttribute = "ControlledAccessHighway" + RouteSpanRoadAttributeDirtRoad RouteSpanRoadAttribute = "DirtRoad" + RouteSpanRoadAttributeDividedRoad RouteSpanRoadAttribute = "DividedRoad" + RouteSpanRoadAttributeMotorway RouteSpanRoadAttribute = "Motorway" + RouteSpanRoadAttributePrivateRoad RouteSpanRoadAttribute = "PrivateRoad" + RouteSpanRoadAttributeRamp RouteSpanRoadAttribute = "Ramp" + RouteSpanRoadAttributeRightHandTraffic RouteSpanRoadAttribute = "RightHandTraffic" + RouteSpanRoadAttributeRoundabout RouteSpanRoadAttribute = "Roundabout" + RouteSpanRoadAttributeTunnel RouteSpanRoadAttribute = "Tunnel" + RouteSpanRoadAttributeUnderConstruction RouteSpanRoadAttribute = "UnderConstruction" +) + +// Values returns all known values for RouteSpanRoadAttribute. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteSpanRoadAttribute) Values() []RouteSpanRoadAttribute { + return []RouteSpanRoadAttribute{ + "Bridge", + "BuiltUpArea", + "ControlledAccessHighway", + "DirtRoad", + "DividedRoad", + "Motorway", + "PrivateRoad", + "Ramp", + "RightHandTraffic", + "Roundabout", + "Tunnel", + "UnderConstruction", + } +} + +type RouteSpanScooterAccessAttribute string + +// Enum values for RouteSpanScooterAccessAttribute +const ( + RouteSpanScooterAccessAttributeAllowed RouteSpanScooterAccessAttribute = "Allowed" + RouteSpanScooterAccessAttributeNoThroughTraffic RouteSpanScooterAccessAttribute = "NoThroughTraffic" + RouteSpanScooterAccessAttributeTollRoad RouteSpanScooterAccessAttribute = "TollRoad" +) + +// Values returns all known values for RouteSpanScooterAccessAttribute. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteSpanScooterAccessAttribute) Values() []RouteSpanScooterAccessAttribute { + return []RouteSpanScooterAccessAttribute{ + "Allowed", + "NoThroughTraffic", + "TollRoad", + } +} + +type RouteSpanTruckAccessAttribute string + +// Enum values for RouteSpanTruckAccessAttribute +const ( + RouteSpanTruckAccessAttributeAllowed RouteSpanTruckAccessAttribute = "Allowed" + RouteSpanTruckAccessAttributeNoThroughTraffic RouteSpanTruckAccessAttribute = "NoThroughTraffic" + RouteSpanTruckAccessAttributeTollRoad RouteSpanTruckAccessAttribute = "TollRoad" +) + +// Values returns all known values for RouteSpanTruckAccessAttribute. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteSpanTruckAccessAttribute) Values() []RouteSpanTruckAccessAttribute { + return []RouteSpanTruckAccessAttribute{ + "Allowed", + "NoThroughTraffic", + "TollRoad", + } +} + +type RouteSteeringDirection string + +// Enum values for RouteSteeringDirection +const ( + RouteSteeringDirectionLeft RouteSteeringDirection = "Left" + RouteSteeringDirectionRight RouteSteeringDirection = "Right" + RouteSteeringDirectionStraight RouteSteeringDirection = "Straight" +) + +// Values returns all known values for RouteSteeringDirection. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteSteeringDirection) Values() []RouteSteeringDirection { + return []RouteSteeringDirection{ + "Left", + "Right", + "Straight", + } +} + +type RouteTollPassValidityPeriodType string + +// Enum values for RouteTollPassValidityPeriodType +const ( + RouteTollPassValidityPeriodTypeAnnual RouteTollPassValidityPeriodType = "Annual" + RouteTollPassValidityPeriodTypeDays RouteTollPassValidityPeriodType = "Days" + RouteTollPassValidityPeriodTypeExtendedAnnual RouteTollPassValidityPeriodType = "ExtendedAnnual" + RouteTollPassValidityPeriodTypeMinutes RouteTollPassValidityPeriodType = "Minutes" + RouteTollPassValidityPeriodTypeMonths RouteTollPassValidityPeriodType = "Months" +) + +// Values returns all known values for RouteTollPassValidityPeriodType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteTollPassValidityPeriodType) Values() []RouteTollPassValidityPeriodType { + return []RouteTollPassValidityPeriodType{ + "Annual", + "Days", + "ExtendedAnnual", + "Minutes", + "Months", + } +} + +type RouteTollPaymentMethod string + +// Enum values for RouteTollPaymentMethod +const ( + RouteTollPaymentMethodBankCard RouteTollPaymentMethod = "BankCard" + RouteTollPaymentMethodCash RouteTollPaymentMethod = "Cash" + RouteTollPaymentMethodCashExact RouteTollPaymentMethod = "CashExact" + RouteTollPaymentMethodCreditCard RouteTollPaymentMethod = "CreditCard" + RouteTollPaymentMethodPassSubscription RouteTollPaymentMethod = "PassSubscription" + RouteTollPaymentMethodTravelCard RouteTollPaymentMethod = "TravelCard" + RouteTollPaymentMethodTransponder RouteTollPaymentMethod = "Transponder" + RouteTollPaymentMethodVideoToll RouteTollPaymentMethod = "VideoToll" +) + +// Values returns all known values for RouteTollPaymentMethod. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteTollPaymentMethod) Values() []RouteTollPaymentMethod { + return []RouteTollPaymentMethod{ + "BankCard", + "Cash", + "CashExact", + "CreditCard", + "PassSubscription", + "TravelCard", + "Transponder", + "VideoToll", + } +} + +type RouteTollVehicleCategory string + +// Enum values for RouteTollVehicleCategory +const ( + RouteTollVehicleCategoryMinibus RouteTollVehicleCategory = "Minibus" +) + +// Values returns all known values for RouteTollVehicleCategory. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteTollVehicleCategory) Values() []RouteTollVehicleCategory { + return []RouteTollVehicleCategory{ + "Minibus", + } +} + +type RouteTravelMode string + +// Enum values for RouteTravelMode +const ( + RouteTravelModeCar RouteTravelMode = "Car" + RouteTravelModePedestrian RouteTravelMode = "Pedestrian" + RouteTravelModeScooter RouteTravelMode = "Scooter" + RouteTravelModeTruck RouteTravelMode = "Truck" +) + +// Values returns all known values for RouteTravelMode. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteTravelMode) Values() []RouteTravelMode { + return []RouteTravelMode{ + "Car", + "Pedestrian", + "Scooter", + "Truck", + } +} + +type RouteTravelStepType string + +// Enum values for RouteTravelStepType +const ( + RouteTravelStepTypeDefault RouteTravelStepType = "Default" + RouteTravelStepTypeTurnByTurn RouteTravelStepType = "TurnByTurn" +) + +// Values returns all known values for RouteTravelStepType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteTravelStepType) Values() []RouteTravelStepType { + return []RouteTravelStepType{ + "Default", + "TurnByTurn", + } +} + +type RouteTruckType string + +// Enum values for RouteTruckType +const ( + RouteTruckTypeLightTruck RouteTruckType = "LightTruck" + RouteTruckTypeStraightTruck RouteTruckType = "StraightTruck" + RouteTruckTypeTractor RouteTruckType = "Tractor" +) + +// Values returns all known values for RouteTruckType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteTruckType) Values() []RouteTruckType { + return []RouteTruckType{ + "LightTruck", + "StraightTruck", + "Tractor", + } +} + +type RouteTurnIntensity string + +// Enum values for RouteTurnIntensity +const ( + RouteTurnIntensitySharp RouteTurnIntensity = "Sharp" + RouteTurnIntensitySlight RouteTurnIntensity = "Slight" + RouteTurnIntensityTypical RouteTurnIntensity = "Typical" +) + +// Values returns all known values for RouteTurnIntensity. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteTurnIntensity) Values() []RouteTurnIntensity { + return []RouteTurnIntensity{ + "Sharp", + "Slight", + "Typical", + } +} + +type RouteVehicleIncidentSeverity string + +// Enum values for RouteVehicleIncidentSeverity +const ( + RouteVehicleIncidentSeverityCritical RouteVehicleIncidentSeverity = "Critical" + RouteVehicleIncidentSeverityHigh RouteVehicleIncidentSeverity = "High" + RouteVehicleIncidentSeverityMedium RouteVehicleIncidentSeverity = "Medium" + RouteVehicleIncidentSeverityLow RouteVehicleIncidentSeverity = "Low" +) + +// Values returns all known values for RouteVehicleIncidentSeverity. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteVehicleIncidentSeverity) Values() []RouteVehicleIncidentSeverity { + return []RouteVehicleIncidentSeverity{ + "Critical", + "High", + "Medium", + "Low", + } +} + +type RouteVehicleIncidentType string + +// Enum values for RouteVehicleIncidentType +const ( + RouteVehicleIncidentTypeAccident RouteVehicleIncidentType = "Accident" + RouteVehicleIncidentTypeCongestion RouteVehicleIncidentType = "Congestion" + RouteVehicleIncidentTypeConstruction RouteVehicleIncidentType = "Construction" + RouteVehicleIncidentTypeDisabledVehicle RouteVehicleIncidentType = "DisabledVehicle" + RouteVehicleIncidentTypeLaneRestriction RouteVehicleIncidentType = "LaneRestriction" + RouteVehicleIncidentTypeMassTransit RouteVehicleIncidentType = "MassTransit" + RouteVehicleIncidentTypeOther RouteVehicleIncidentType = "Other" + RouteVehicleIncidentTypePlannedEvent RouteVehicleIncidentType = "PlannedEvent" + RouteVehicleIncidentTypeRoadClosure RouteVehicleIncidentType = "RoadClosure" + RouteVehicleIncidentTypeRoadHazard RouteVehicleIncidentType = "RoadHazard" + RouteVehicleIncidentTypeWeather RouteVehicleIncidentType = "Weather" +) + +// Values returns all known values for RouteVehicleIncidentType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteVehicleIncidentType) Values() []RouteVehicleIncidentType { + return []RouteVehicleIncidentType{ + "Accident", + "Congestion", + "Construction", + "DisabledVehicle", + "LaneRestriction", + "MassTransit", + "Other", + "PlannedEvent", + "RoadClosure", + "RoadHazard", + "Weather", + } +} + +type RouteVehicleNoticeCode string + +// Enum values for RouteVehicleNoticeCode +const ( + RouteVehicleNoticeCodeAccuratePolylineUnavailable RouteVehicleNoticeCode = "AccuratePolylineUnavailable" + RouteVehicleNoticeCodeOther RouteVehicleNoticeCode = "Other" + RouteVehicleNoticeCodePotentialViolatedAvoidTollRoadUsage RouteVehicleNoticeCode = "PotentialViolatedAvoidTollRoadUsage" + RouteVehicleNoticeCodePotentialViolatedCarpoolUsage RouteVehicleNoticeCode = "PotentialViolatedCarpoolUsage" + RouteVehicleNoticeCodePotentialViolatedTurnRestrictionUsage RouteVehicleNoticeCode = "PotentialViolatedTurnRestrictionUsage" + RouteVehicleNoticeCodePotentialViolatedVehicleRestrictionUsage RouteVehicleNoticeCode = "PotentialViolatedVehicleRestrictionUsage" + RouteVehicleNoticeCodePotentialViolatedZoneRestrictionUsage RouteVehicleNoticeCode = "PotentialViolatedZoneRestrictionUsage" + RouteVehicleNoticeCodeSeasonalClosure RouteVehicleNoticeCode = "SeasonalClosure" + RouteVehicleNoticeCodeTollsDataTemporarilyUnavailable RouteVehicleNoticeCode = "TollsDataTemporarilyUnavailable" + RouteVehicleNoticeCodeTollsDataUnavailable RouteVehicleNoticeCode = "TollsDataUnavailable" + RouteVehicleNoticeCodeTollTransponder RouteVehicleNoticeCode = "TollTransponder" + RouteVehicleNoticeCodeViolatedAvoidControlledAccessHighway RouteVehicleNoticeCode = "ViolatedAvoidControlledAccessHighway" + RouteVehicleNoticeCodeViolatedAvoidDifficultTurns RouteVehicleNoticeCode = "ViolatedAvoidDifficultTurns" + RouteVehicleNoticeCodeViolatedAvoidDirtRoad RouteVehicleNoticeCode = "ViolatedAvoidDirtRoad" + RouteVehicleNoticeCodeViolatedAvoidSeasonalClosure RouteVehicleNoticeCode = "ViolatedAvoidSeasonalClosure" + RouteVehicleNoticeCodeViolatedAvoidTollRoad RouteVehicleNoticeCode = "ViolatedAvoidTollRoad" + RouteVehicleNoticeCodeViolatedAvoidTollTransponder RouteVehicleNoticeCode = "ViolatedAvoidTollTransponder" + RouteVehicleNoticeCodeViolatedAvoidTruckRoadType RouteVehicleNoticeCode = "ViolatedAvoidTruckRoadType" + RouteVehicleNoticeCodeViolatedAvoidTunnel RouteVehicleNoticeCode = "ViolatedAvoidTunnel" + RouteVehicleNoticeCodeViolatedAvoidUTurns RouteVehicleNoticeCode = "ViolatedAvoidUTurns" + RouteVehicleNoticeCodeViolatedBlockedRoad RouteVehicleNoticeCode = "ViolatedBlockedRoad" + RouteVehicleNoticeCodeViolatedCarpool RouteVehicleNoticeCode = "ViolatedCarpool" + RouteVehicleNoticeCodeViolatedEmergencyGate RouteVehicleNoticeCode = "ViolatedEmergencyGate" + RouteVehicleNoticeCodeViolatedStartDirection RouteVehicleNoticeCode = "ViolatedStartDirection" + RouteVehicleNoticeCodeViolatedTurnRestriction RouteVehicleNoticeCode = "ViolatedTurnRestriction" + RouteVehicleNoticeCodeViolatedVehicleRestriction RouteVehicleNoticeCode = "ViolatedVehicleRestriction" + RouteVehicleNoticeCodeViolatedZoneRestriction RouteVehicleNoticeCode = "ViolatedZoneRestriction" +) + +// Values returns all known values for RouteVehicleNoticeCode. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteVehicleNoticeCode) Values() []RouteVehicleNoticeCode { + return []RouteVehicleNoticeCode{ + "AccuratePolylineUnavailable", + "Other", + "PotentialViolatedAvoidTollRoadUsage", + "PotentialViolatedCarpoolUsage", + "PotentialViolatedTurnRestrictionUsage", + "PotentialViolatedVehicleRestrictionUsage", + "PotentialViolatedZoneRestrictionUsage", + "SeasonalClosure", + "TollsDataTemporarilyUnavailable", + "TollsDataUnavailable", + "TollTransponder", + "ViolatedAvoidControlledAccessHighway", + "ViolatedAvoidDifficultTurns", + "ViolatedAvoidDirtRoad", + "ViolatedAvoidSeasonalClosure", + "ViolatedAvoidTollRoad", + "ViolatedAvoidTollTransponder", + "ViolatedAvoidTruckRoadType", + "ViolatedAvoidTunnel", + "ViolatedAvoidUTurns", + "ViolatedBlockedRoad", + "ViolatedCarpool", + "ViolatedEmergencyGate", + "ViolatedStartDirection", + "ViolatedTurnRestriction", + "ViolatedVehicleRestriction", + "ViolatedZoneRestriction", + } +} + +type RouteVehicleTravelStepType string + +// Enum values for RouteVehicleTravelStepType +const ( + RouteVehicleTravelStepTypeArrive RouteVehicleTravelStepType = "Arrive" + RouteVehicleTravelStepTypeContinue RouteVehicleTravelStepType = "Continue" + RouteVehicleTravelStepTypeContinueHighway RouteVehicleTravelStepType = "ContinueHighway" + RouteVehicleTravelStepTypeDepart RouteVehicleTravelStepType = "Depart" + RouteVehicleTravelStepTypeEnterHighway RouteVehicleTravelStepType = "EnterHighway" + RouteVehicleTravelStepTypeExit RouteVehicleTravelStepType = "Exit" + RouteVehicleTravelStepTypeKeep RouteVehicleTravelStepType = "Keep" + RouteVehicleTravelStepTypeRamp RouteVehicleTravelStepType = "Ramp" + RouteVehicleTravelStepTypeRoundaboutEnter RouteVehicleTravelStepType = "RoundaboutEnter" + RouteVehicleTravelStepTypeRoundaboutExit RouteVehicleTravelStepType = "RoundaboutExit" + RouteVehicleTravelStepTypeRoundaboutPass RouteVehicleTravelStepType = "RoundaboutPass" + RouteVehicleTravelStepTypeTurn RouteVehicleTravelStepType = "Turn" + RouteVehicleTravelStepTypeUTurn RouteVehicleTravelStepType = "UTurn" +) + +// Values returns all known values for RouteVehicleTravelStepType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteVehicleTravelStepType) Values() []RouteVehicleTravelStepType { + return []RouteVehicleTravelStepType{ + "Arrive", + "Continue", + "ContinueHighway", + "Depart", + "EnterHighway", + "Exit", + "Keep", + "Ramp", + "RoundaboutEnter", + "RoundaboutExit", + "RoundaboutPass", + "Turn", + "UTurn", + } +} + +type RouteWeightConstraintType string + +// Enum values for RouteWeightConstraintType +const ( + RouteWeightConstraintTypeCurrent RouteWeightConstraintType = "Current" + RouteWeightConstraintTypeGross RouteWeightConstraintType = "Gross" + RouteWeightConstraintTypeUnknown RouteWeightConstraintType = "Unknown" +) + +// Values returns all known values for RouteWeightConstraintType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteWeightConstraintType) Values() []RouteWeightConstraintType { + return []RouteWeightConstraintType{ + "Current", + "Gross", + "Unknown", + } +} + +type RouteZoneCategory string + +// Enum values for RouteZoneCategory +const ( + RouteZoneCategoryCongestionPricing RouteZoneCategory = "CongestionPricing" + RouteZoneCategoryEnvironmental RouteZoneCategory = "Environmental" + RouteZoneCategoryVignette RouteZoneCategory = "Vignette" +) + +// Values returns all known values for RouteZoneCategory. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RouteZoneCategory) Values() []RouteZoneCategory { + return []RouteZoneCategory{ + "CongestionPricing", + "Environmental", + "Vignette", + } +} + +type RoutingObjective string + +// Enum values for RoutingObjective +const ( + RoutingObjectiveFastestRoute RoutingObjective = "FastestRoute" + RoutingObjectiveShortestRoute RoutingObjective = "ShortestRoute" +) + +// Values returns all known values for RoutingObjective. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RoutingObjective) Values() []RoutingObjective { + return []RoutingObjective{ + "FastestRoute", + "ShortestRoute", + } +} + +type SideOfStreetMatchingStrategy string + +// Enum values for SideOfStreetMatchingStrategy +const ( + SideOfStreetMatchingStrategyAnyStreet SideOfStreetMatchingStrategy = "AnyStreet" + SideOfStreetMatchingStrategyDividedStreetOnly SideOfStreetMatchingStrategy = "DividedStreetOnly" +) + +// Values returns all known values for SideOfStreetMatchingStrategy. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SideOfStreetMatchingStrategy) Values() []SideOfStreetMatchingStrategy { + return []SideOfStreetMatchingStrategy{ + "AnyStreet", + "DividedStreetOnly", + } +} + +type TrafficUsage string + +// Enum values for TrafficUsage +const ( + TrafficUsageIgnoreTrafficData TrafficUsage = "IgnoreTrafficData" + TrafficUsageUseTrafficData TrafficUsage = "UseTrafficData" +) + +// Values returns all known values for TrafficUsage. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (TrafficUsage) Values() []TrafficUsage { + return []TrafficUsage{ + "IgnoreTrafficData", + "UseTrafficData", + } +} + +type ValidationExceptionReason string + +// Enum values for ValidationExceptionReason +const ( + // No such operation is supported. + ValidationExceptionReasonUnknownOperation ValidationExceptionReason = "UnknownOperation" + // The required input is missing. + ValidationExceptionReasonMissing ValidationExceptionReason = "Missing" + // The input cannot be parsed. For example a required JSON document, ARN + // identifier, date value, or numeric field cannot be parsed. + ValidationExceptionReasonCannotParse ValidationExceptionReason = "CannotParse" + // The input is present and parsable, but it is otherwise invalid. For example, a + // required numeric argument is outside the allowed range. + ValidationExceptionReasonFieldValidationFailed ValidationExceptionReason = "FieldValidationFailed" + // The input is invalid but no more specific reason is applicable. + ValidationExceptionReasonOther ValidationExceptionReason = "Other" + // No such field is supported. + ValidationExceptionReasonUnknownField ValidationExceptionReason = "UnknownField" +) + +// Values returns all known values for ValidationExceptionReason. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ValidationExceptionReason) Values() []ValidationExceptionReason { + return []ValidationExceptionReason{ + "UnknownOperation", + "Missing", + "CannotParse", + "FieldValidationFailed", + "Other", + "UnknownField", + } +} + +type WaypointOptimizationConstraint string + +// Enum values for WaypointOptimizationConstraint +const ( + WaypointOptimizationConstraintAccessHours WaypointOptimizationConstraint = "AccessHours" + WaypointOptimizationConstraintAppointmentTime WaypointOptimizationConstraint = "AppointmentTime" + WaypointOptimizationConstraintBefore WaypointOptimizationConstraint = "Before" + WaypointOptimizationConstraintHeading WaypointOptimizationConstraint = "Heading" + WaypointOptimizationConstraintServiceDuration WaypointOptimizationConstraint = "ServiceDuration" + WaypointOptimizationConstraintSideOfStreet WaypointOptimizationConstraint = "SideOfStreet" +) + +// Values returns all known values for WaypointOptimizationConstraint. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (WaypointOptimizationConstraint) Values() []WaypointOptimizationConstraint { + return []WaypointOptimizationConstraint{ + "AccessHours", + "AppointmentTime", + "Before", + "Heading", + "ServiceDuration", + "SideOfStreet", + } +} + +type WaypointOptimizationHazardousCargoType string + +// Enum values for WaypointOptimizationHazardousCargoType +const ( + WaypointOptimizationHazardousCargoTypeCombustible WaypointOptimizationHazardousCargoType = "Combustible" + WaypointOptimizationHazardousCargoTypeCorrosive WaypointOptimizationHazardousCargoType = "Corrosive" + WaypointOptimizationHazardousCargoTypeExplosive WaypointOptimizationHazardousCargoType = "Explosive" + WaypointOptimizationHazardousCargoTypeFlammable WaypointOptimizationHazardousCargoType = "Flammable" + WaypointOptimizationHazardousCargoTypeGas WaypointOptimizationHazardousCargoType = "Gas" + WaypointOptimizationHazardousCargoTypeHarmfulToWater WaypointOptimizationHazardousCargoType = "HarmfulToWater" + WaypointOptimizationHazardousCargoTypeOrganic WaypointOptimizationHazardousCargoType = "Organic" + WaypointOptimizationHazardousCargoTypeOther WaypointOptimizationHazardousCargoType = "Other" + WaypointOptimizationHazardousCargoTypePoison WaypointOptimizationHazardousCargoType = "Poison" + WaypointOptimizationHazardousCargoTypePoisonousInhalation WaypointOptimizationHazardousCargoType = "PoisonousInhalation" + WaypointOptimizationHazardousCargoTypeRadioactive WaypointOptimizationHazardousCargoType = "Radioactive" +) + +// Values returns all known values for WaypointOptimizationHazardousCargoType. +// Note that this can be expanded in the future, and so it is only as up to date as +// the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (WaypointOptimizationHazardousCargoType) Values() []WaypointOptimizationHazardousCargoType { + return []WaypointOptimizationHazardousCargoType{ + "Combustible", + "Corrosive", + "Explosive", + "Flammable", + "Gas", + "HarmfulToWater", + "Organic", + "Other", + "Poison", + "PoisonousInhalation", + "Radioactive", + } +} + +type WaypointOptimizationSequencingObjective string + +// Enum values for WaypointOptimizationSequencingObjective +const ( + WaypointOptimizationSequencingObjectiveFastestRoute WaypointOptimizationSequencingObjective = "FastestRoute" + WaypointOptimizationSequencingObjectiveShortestRoute WaypointOptimizationSequencingObjective = "ShortestRoute" +) + +// Values returns all known values for WaypointOptimizationSequencingObjective. +// Note that this can be expanded in the future, and so it is only as up to date as +// the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (WaypointOptimizationSequencingObjective) Values() []WaypointOptimizationSequencingObjective { + return []WaypointOptimizationSequencingObjective{ + "FastestRoute", + "ShortestRoute", + } +} + +type WaypointOptimizationServiceTimeTreatment string + +// Enum values for WaypointOptimizationServiceTimeTreatment +const ( + WaypointOptimizationServiceTimeTreatmentRest WaypointOptimizationServiceTimeTreatment = "Rest" + WaypointOptimizationServiceTimeTreatmentWork WaypointOptimizationServiceTimeTreatment = "Work" +) + +// Values returns all known values for WaypointOptimizationServiceTimeTreatment. +// Note that this can be expanded in the future, and so it is only as up to date as +// the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (WaypointOptimizationServiceTimeTreatment) Values() []WaypointOptimizationServiceTimeTreatment { + return []WaypointOptimizationServiceTimeTreatment{ + "Rest", + "Work", + } +} + +type WaypointOptimizationTravelMode string + +// Enum values for WaypointOptimizationTravelMode +const ( + WaypointOptimizationTravelModeCar WaypointOptimizationTravelMode = "Car" + WaypointOptimizationTravelModePedestrian WaypointOptimizationTravelMode = "Pedestrian" + WaypointOptimizationTravelModeScooter WaypointOptimizationTravelMode = "Scooter" + WaypointOptimizationTravelModeTruck WaypointOptimizationTravelMode = "Truck" +) + +// Values returns all known values for WaypointOptimizationTravelMode. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (WaypointOptimizationTravelMode) Values() []WaypointOptimizationTravelMode { + return []WaypointOptimizationTravelMode{ + "Car", + "Pedestrian", + "Scooter", + "Truck", + } +} + +type WaypointOptimizationTruckType string + +// Enum values for WaypointOptimizationTruckType +const ( + WaypointOptimizationTruckTypeStraightTruck WaypointOptimizationTruckType = "StraightTruck" + WaypointOptimizationTruckTypeTractor WaypointOptimizationTruckType = "Tractor" +) + +// Values returns all known values for WaypointOptimizationTruckType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (WaypointOptimizationTruckType) Values() []WaypointOptimizationTruckType { + return []WaypointOptimizationTruckType{ + "StraightTruck", + "Tractor", + } +} diff --git a/service/georoutes/types/errors.go b/service/georoutes/types/errors.go new file mode 100644 index 00000000000..35d3dedb70d --- /dev/null +++ b/service/georoutes/types/errors.go @@ -0,0 +1,116 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// You don't have sufficient access to perform this action. +type AccessDeniedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessDeniedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AccessDeniedException" + } + return *e.ErrorCodeOverride +} +func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request processing has failed because of an unknown error, exception or +// failure. +type InternalServerException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalServerException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalServerException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InternalServerException" + } + return *e.ErrorCodeOverride +} +func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The request was denied due to request throttling. +type ThrottlingException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottlingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottlingException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ThrottlingException" + } + return *e.ErrorCodeOverride +} +func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The input fails to satisfy the constraints specified by an AWS service. +type ValidationException struct { + Message *string + + ErrorCodeOverride *string + + Reason ValidationExceptionReason + FieldList []ValidationExceptionField + + 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/georoutes/types/types.go b/service/georoutes/types/types.go new file mode 100644 index 00000000000..f4568a761f9 --- /dev/null +++ b/service/georoutes/types/types.go @@ -0,0 +1,4254 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" +) + +// Geometry defined as a circle. When request routing boundary was set as +// AutoCircle , the response routing boundary will return Circle derived from the +// AutoCircle settings. +type Circle struct { + + // Center of the Circle defined in longitude and latitude coordinates. + // + // Example: [-123.1174, 49.2847] represents the position with longitude -123.1174 + // and latitude 49.2847 . + // + // This member is required. + Center []float64 + + // Radius of the Circle. + // + // Unit: meters + // + // This member is required. + Radius *float64 + + noSmithyDocumentSerde +} + +// Geometry defined as a corridor - a LineString with a radius that defines the +// width of the corridor. +type Corridor struct { + + // An ordered list of positions used to plot a route on a map. + // + // LineString and Polyline are mutually exclusive properties. + // + // This member is required. + LineString [][]float64 + + // Radius that defines the width of the corridor. + // + // This member is required. + Radius *int32 + + noSmithyDocumentSerde +} + +// Calculated isolines and associated properties. +type Isoline struct { + + // Isolines may contain multiple components, if these components are connected by + // ferry links. These components are returned as separate polygons while the ferry + // links are returned as connections. + // + // This member is required. + Connections []IsolineConnection + + // Geometries for the Calculated isolines. + // + // This member is required. + Geometries []IsolineShapeGeometry + + // Distance threshold corresponding to the calculated Isoline. + DistanceThreshold int64 + + // Time threshold corresponding to the calculated isoline. + TimeThreshold int64 + + noSmithyDocumentSerde +} + +// Features that are allowed while calculating. a route +type IsolineAllowOptions struct { + + // Allow Hot (High Occupancy Toll) lanes while calculating the route. + Hot *bool + + // Allow Hov (High Occupancy vehicle) lanes while calculating the route. + Hov *bool + + noSmithyDocumentSerde +} + +// The area to be avoided. +type IsolineAvoidanceArea struct { + + // Geometry of the area to be avoided. + // + // This member is required. + Geometry *IsolineAvoidanceAreaGeometry + + // Exceptions to the provided avoidance geometry, to be included while calculating + // the route. + Except []IsolineAvoidanceAreaGeometry + + noSmithyDocumentSerde +} + +// The avoidance geometry, to be included while calculating the route. +type IsolineAvoidanceAreaGeometry struct { + + // Geometry defined as a bounding box. The first pair represents the X and Y + // coordinates (longitude and latitude,) of the southwest corner of the bounding + // box; the second pair represents the X and Y coordinates (longitude and latitude) + // of the northeast corner. + BoundingBox []float64 + + // Geometry defined as a corridor - a LineString with a radius that defines the + // width of the corridor. + Corridor *Corridor + + // A list of Polygon will be excluded for calculating isolines, the list can only + // contain 1 polygon. + Polygon [][][]float64 + + // Geometry defined as an encoded corridor – a polyline with a radius that defines + // the width of the corridor. For more information on polyline encoding, see [https://github.com/heremaps/flexiblepolyline/blob/master/README.md]. + // + // [https://github.com/heremaps/flexiblepolyline/blob/master/README.md]: https://github.com/heremaps/flexiblepolyline/blob/master/README.md + PolylineCorridor *PolylineCorridor + + // A list of PolylinePolygon's that are excluded for calculating isolines, the + // list can only contain 1 polygon. For more information on polyline encoding, see [https://github.com/heremaps/flexiblepolyline/blob/master/README.md] + // . + // + // [https://github.com/heremaps/flexiblepolyline/blob/master/README.md]: https://github.com/heremaps/flexiblepolyline/blob/master/README.md + PolylinePolygon []string + + noSmithyDocumentSerde +} + +// Features that are avoided while calculating a route. Avoidance is on a +// best-case basis. If an avoidance can't be satisfied for a particular case, it +// violates the avoidance and the returned response produces a notice for the +// violation. +type IsolineAvoidanceOptions struct { + + // Areas to be avoided. + Areas []IsolineAvoidanceArea + + // Avoid car-shuttle-trains while calculating the route. + CarShuttleTrains *bool + + // Avoid controlled access highways while calculating the route. + ControlledAccessHighways *bool + + // Avoid dirt roads while calculating the route. + DirtRoads *bool + + // Avoid ferries while calculating the route. + Ferries *bool + + // Avoid roads that have seasonal closure while calculating the route. + SeasonalClosure *bool + + // Avoids roads where the specified toll transponders are the only mode of payment. + TollRoads *bool + + // Avoids roads where the specified toll transponders are the only mode of payment. + TollTransponders *bool + + // Truck road type identifiers. BK1 through BK4 apply only to Sweden. + // A2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico. + // + // There are currently no other supported values as of 26th April 2024. + TruckRoadTypes []string + + // Avoid tunnels while calculating the route. + Tunnels *bool + + // Avoid U-turns for calculation on highways and motorways. + UTurns *bool + + // Zone categories to be avoided. + ZoneCategories []IsolineAvoidanceZoneCategory + + noSmithyDocumentSerde +} + +// Zone category to be avoided. +type IsolineAvoidanceZoneCategory struct { + + // Zone category to be avoided. + Category IsolineZoneCategory + + noSmithyDocumentSerde +} + +// Options for vehicles. +type IsolineCarOptions struct { + + // Engine type of the vehicle. + EngineType IsolineEngineType + + // The vehicle License Plate. + LicensePlate *IsolineVehicleLicensePlate + + // Maximum speed. + // + // Unit: KilometersPerHour + MaxSpeed *float64 + + // The number of occupants in the vehicle. + // + // Default Value: 1 + Occupancy *int32 + + noSmithyDocumentSerde +} + +// Isolines may contain multiple components, if these components are connected by +// ferry links. These components are returned as separate polygons while the ferry +// links are returned as connections. +type IsolineConnection struct { + + // Index of the polygon corresponding to the "from" component of the connection. + // The polygon is available from Isoline[].Geometries . + // + // This member is required. + FromPolygonIndex *int32 + + // The isoline geometry. + // + // This member is required. + Geometry *IsolineConnectionGeometry + + // Index of the polygon corresponding to the "to" component of the connection. The + // polygon is available from Isoline[].Geometries . + // + // This member is required. + ToPolygonIndex *int32 + + noSmithyDocumentSerde +} + +// Geometry of the connection between different Isoline components. +type IsolineConnectionGeometry struct { + + // An ordered list of positions used to plot a route on a map. + // + // LineString and Polyline are mutually exclusive properties. + LineString [][]float64 + + // An ordered list of positions used to plot a route on a map in a lossy + // compression format. + // + // LineString and Polyline are mutually exclusive properties. + Polyline *string + + noSmithyDocumentSerde +} + +// Destination related options. +type IsolineDestinationOptions struct { + + // Avoids actions for the provided distance. This is typically to consider for + // users in moving vehicles who may not have sufficient time to make an action at + // an origin or a destination. + AvoidActionsForDistance int64 + + // GPS Heading at the position. + Heading float64 + + // Options to configure matching the provided position to the road network. + Matching *IsolineMatchingOptions + + // Options to configure matching the provided position to a side of the street. + SideOfStreet *IsolineSideOfStreetOptions + + noSmithyDocumentSerde +} + +// Isoline granularity related options. +type IsolineGranularityOptions struct { + + // Maximum number of points of returned Isoline. + MaxPoints *int32 + + // Maximum resolution of the returned isoline. + // + // Unit: centimeters + MaxResolution int64 + + noSmithyDocumentSerde +} + +// Isoline matching related options. +type IsolineMatchingOptions struct { + + // Attempts to match the provided position to a road similar to the provided name. + NameHint *string + + // If the distance to a highway/bridge/tunnel/sliproad is within threshold, the + // waypoint will be snapped to the highway/bridge/tunnel/sliproad. + // + // Unit: meters + OnRoadThreshold int64 + + // Considers all roads within the provided radius to match the provided + // destination to. The roads that are considered are determined by the provided + // Strategy. + // + // Unit: Meters + Radius int64 + + // Strategy that defines matching of the position onto the road network. MatchAny + // considers all roads possible, whereas MatchMostSignificantRoad matches to the + // most significant road. + Strategy MatchingStrategy + + noSmithyDocumentSerde +} + +// Options for the property. +type IsolineOriginOptions struct { + + // Avoids actions for the provided distance. This is typically to consider for + // users in moving vehicles who may not have sufficient time to make an action at + // an origin or a destination. + AvoidActionsForDistance int64 + + // GPS Heading at the position. + Heading float64 + + // Options to configure matching the provided position to the road network. + Matching *IsolineMatchingOptions + + // Options to configure matching the provided position to a side of the street. + SideOfStreet *IsolineSideOfStreetOptions + + noSmithyDocumentSerde +} + +// Options for the property. +type IsolineScooterOptions struct { + + // Engine type of the vehicle. + EngineType IsolineEngineType + + // The vehicle License Plate. + LicensePlate *IsolineVehicleLicensePlate + + // Maximum speed specified. + // + // Unit: KilometersPerHour + MaxSpeed *float64 + + // The number of occupants in the vehicle. + // + // Default Value: 1 + Occupancy *int32 + + noSmithyDocumentSerde +} + +// Geometry of the connection between different Isoline components. +type IsolineShapeGeometry struct { + + // A list of Isoline Polygons, for each isoline polygon, it contains polygons of + // the first linear ring (the outer ring) and from 2nd item to the last item (the + // inner rings). + Polygon [][][]float64 + + // A list of Isoline PolylinePolygon, for each isoline PolylinePolygon, it + // contains PolylinePolygon of the first linear ring (the outer ring) and from 2nd + // item to the last item (the inner rings). For more information on polyline + // encoding, see [https://github.com/heremaps/flexiblepolyline/blob/master/README.md]. + // + // [https://github.com/heremaps/flexiblepolyline/blob/master/README.md]: https://github.com/heremaps/flexiblepolyline/blob/master/README.md + PolylinePolygon []string + + noSmithyDocumentSerde +} + +// Options to configure matching the provided position to a side of the street. +type IsolineSideOfStreetOptions struct { + + // Position defined as [longitude, latitude] . + // + // This member is required. + Position []float64 + + // Strategy that defines when the side of street position should be used. + // AnyStreet will always use the provided position. + // + // Default Value: DividedStreetOnly + UseWith SideOfStreetMatchingStrategy + + noSmithyDocumentSerde +} + +// Threshold to be used for the isoline calculation. Up to 3 thresholds per +// provided type can be requested. +type IsolineThresholds struct { + + // Distance to be used for the isoline calculation. + Distance []int64 + + // Time to be used for the isoline calculation. + Time []int64 + + noSmithyDocumentSerde +} + +// Options related to traffic. +type IsolineTrafficOptions struct { + + // Duration for which flow traffic is considered valid. For this period, the flow + // traffic is used over historical traffic data. Flow traffic refers to congestion, + // which changes very quickly. Duration in seconds for which flow traffic event + // would be considered valid. While flow traffic event is valid it will be used + // over the historical traffic data. + // + // Unit: seconds + FlowEventThresholdOverride int64 + + // Determines if traffic should be used or ignored while calculating the route. + // + // Default Value: UseTrafficData + Usage TrafficUsage + + noSmithyDocumentSerde +} + +// Trailer options corresponding to the vehicle. +type IsolineTrailerOptions struct { + + // Total number of axles of the vehicle. + AxleCount *int32 + + // Number of trailers attached to the vehicle. + // + // Default Value: 0 + TrailerCount *int32 + + noSmithyDocumentSerde +} + +// Travel mode related options for the provided travel mode. +type IsolineTravelModeOptions struct { + + // Travel mode options when the provided travel mode is "Car" + Car *IsolineCarOptions + + // Travel mode options when the provided travel mode is "Scooter" + Scooter *IsolineScooterOptions + + // Travel mode options when the provided travel mode is "Truck" + Truck *IsolineTruckOptions + + noSmithyDocumentSerde +} + +// Travel mode options when the provided travel mode is "Truck" +type IsolineTruckOptions struct { + + // Total number of axles of the vehicle. + AxleCount *int32 + + // Engine type of the vehicle. + EngineType IsolineEngineType + + // Gross weight of the vehicle including trailers, and goods at capacity. + // + // Unit: Kilograms + GrossWeight int64 + + // List of Hazardous cargo contained in the vehicle. + HazardousCargos []IsolineHazardousCargoType + + // Height of the vehicle. + // + // Unit: centimeters + Height int64 + + // Height of the vehicle above its first axle. + // + // Unit: centimeters + HeightAboveFirstAxle int64 + + // Kingpin to rear axle length of the vehicle. + // + // Unit: centimeters + KpraLength int64 + + // Length of the vehicle. + // + // Unit: centimeters + Length int64 + + // The vehicle License Plate. + LicensePlate *IsolineVehicleLicensePlate + + // Maximum speed specified. + // + // Unit: KilometersPerHour + MaxSpeed *float64 + + // The number of occupants in the vehicle. + // + // Default Value: 1 + Occupancy *int32 + + // Payload capacity of the vehicle and trailers attached. + // + // Unit: kilograms + PayloadCapacity int64 + + // Number of tires on the vehicle. + TireCount *int32 + + // Trailer options corresponding to the vehicle. + Trailer *IsolineTrailerOptions + + // Type of the truck. + TruckType IsolineTruckType + + // The tunnel restriction code. + // + // Tunnel categories in this list indicate the restrictions which apply to certain + // tunnels in Great Britain. They relate to the types of dangerous goods that can + // be transported through them. + // + // - Tunnel Category B + // + // - Risk Level: Limited risk + // + // - Restrictions: Few restrictions + // + // - Tunnel Category C + // + // - Risk Level: Medium risk + // + // - Restrictions: Some restrictions + // + // - Tunnel Category D + // + // - Risk Level: High risk + // + // - Restrictions: Many restrictions occur + // + // - Tunnel Category E + // + // - Risk Level: Very high risk + // + // - Restrictions: Restricted tunnel + TunnelRestrictionCode *string + + // Heaviest weight per axle irrespective of the axle type or the axle group. Meant + // for usage in countries where the differences in axle types or axle groups are + // not distinguished. + // + // Unit: Kilograms + WeightPerAxle int64 + + // Specifies the total weight for the specified axle group. Meant for usage in + // countries that have different regulations based on the axle group type. + // + // Unit: Kilograms + WeightPerAxleGroup *WeightPerAxleGroup + + // Width of the vehicle. + // + // Unit: centimeters + Width int64 + + noSmithyDocumentSerde +} + +// The vehicle license plate. +type IsolineVehicleLicensePlate struct { + + // The last character of the License Plate. + LastCharacter *string + + noSmithyDocumentSerde +} + +// The localized string. +type LocalizedString struct { + + // The value of the localized string. + // + // This member is required. + Value *string + + // A list of BCP 47 compliant language codes for the results to be rendered in. + // The request uses the regional default as the fallback if the requested language + // can't be provided. + Language *string + + noSmithyDocumentSerde +} + +// Geometry defined as an encoded corridor - an encoded polyline with a radius +// that defines the width of the corridor. +type PolylineCorridor struct { + + // An ordered list of positions used to plot a route on a map in a lossy + // compression format. + // + // LineString and Polyline are mutually exclusive properties. + // + // This member is required. + Polyline *string + + // Considers all roads within the provided radius to match the provided + // destination to. The roads that are considered are determined by the provided + // Strategy. + // + // Unit: Meters + // + // This member is required. + Radius *int32 + + noSmithyDocumentSerde +} + +// Notices provide information around factors that may have influenced snapping in +// a manner atypical to the standard use cases. +type RoadSnapNotice struct { + + // Code corresponding to the issue. + // + // This member is required. + Code RoadSnapNoticeCode + + // The notice title. + // + // This member is required. + Title *string + + // TracePoint indices for which the provided notice code corresponds to. + // + // This member is required. + TracePointIndexes []int32 + + noSmithyDocumentSerde +} + +// Interpolated geometry for the snapped route that is overlay-able onto a map. +type RoadSnapSnappedGeometry struct { + + // An ordered list of positions used to plot a route on a map. + // + // LineString and Polyline are mutually exclusive properties. + LineString [][]float64 + + // An ordered list of positions used to plot a route on a map in a lossy + // compression format. + // + // LineString and Polyline are mutually exclusive properties. + Polyline *string + + noSmithyDocumentSerde +} + +// TracePoints snapped onto the road network. +type RoadSnapSnappedTracePoint struct { + + // Confidence value for the correctness of this point match. + // + // This member is required. + Confidence *float64 + + // Position of the TracePoint provided within the request, at the same index. + // + // This member is required. + OriginalPosition []float64 + + // Snapped position of the TracePoint provided within the request, at the same + // index. + // + // This member is required. + SnappedPosition []float64 + + noSmithyDocumentSerde +} + +// TracePoint indices for which the provided notice code corresponds to. +type RoadSnapTracePoint struct { + + // Position defined as [longitude, latitude] . + // + // This member is required. + Position []float64 + + // GPS Heading at the position. + Heading float64 + + // Speed at the specified trace point . + // + // Unit: KilometersPerHour + Speed float64 + + // Timestamp of the event. + Timestamp *string + + noSmithyDocumentSerde +} + +// Trailer options corresponding to the vehicle. +type RoadSnapTrailerOptions struct { + + // Number of trailers attached to the vehicle. + // + // Default Value: 0 + TrailerCount *int32 + + noSmithyDocumentSerde +} + +// Travel mode related options for the provided travel mode. +type RoadSnapTravelModeOptions struct { + + // Travel mode options when the provided travel mode is "Truck". + Truck *RoadSnapTruckOptions + + noSmithyDocumentSerde +} + +// Travel mode options when the provided travel mode is "Truck". +type RoadSnapTruckOptions struct { + + // Gross weight of the vehicle including trailers, and goods at capacity. + // + // Unit: Kilograms + GrossWeight int64 + + // List of Hazardous cargos contained in the vehicle. + HazardousCargos []RoadSnapHazardousCargoType + + // Height of the vehicle. + // + // Unit: centimeters + Height int64 + + // Length of the vehicle. + // + // Unit: centimeters + Length int64 + + // Trailer options corresponding to the vehicle. + Trailer *RoadSnapTrailerOptions + + // The tunnel restriction code. + // + // Tunnel categories in this list indicate the restrictions which apply to certain + // tunnels in Great Britain. They relate to the types of dangerous goods that can + // be transported through them. + // + // - Tunnel Category B + // + // - Risk Level: Limited risk + // + // - Restrictions: Few restrictions + // + // - Tunnel Category C + // + // - Risk Level: Medium risk + // + // - Restrictions: Some restrictions + // + // - Tunnel Category D + // + // - Risk Level: High risk + // + // - Restrictions: Many restrictions occur + // + // - Tunnel Category E + // + // - Risk Level: Very high risk + // + // - Restrictions: Restricted tunnel + TunnelRestrictionCode *string + + // Width of the vehicle in centimenters. + Width int64 + + noSmithyDocumentSerde +} + +// The route. +type Route struct { + + // A leg is a section of a route from one waypoint to the next. A leg could be of + // type Vehicle, Pedestrian or Ferry. Legs of different types could occur together + // within a single route. For example, a car employing the use of a Ferry will + // contain Vehicle legs corresponding to journey on land, and Ferry legs + // corresponding to the journey via Ferry. + // + // This member is required. + Legs []RouteLeg + + // Important labels including names and route numbers that differentiate the + // current route from the alternatives presented. + // + // This member is required. + MajorRoadLabels []RouteMajorRoadLabel + + // Summarized details of the leg. + Summary *RouteSummary + + noSmithyDocumentSerde +} + +// Features that are allowed while calculating. a route +type RouteAllowOptions struct { + + // Allow Hot (High Occupancy Toll) lanes while calculating the route. + Hot *bool + + // Allow Hov (High Occupancy vehicle) lanes while calculating the route. + Hov *bool + + noSmithyDocumentSerde +} + +// Areas to be avoided. +type RouteAvoidanceArea struct { + + // Geometry of the area to be avoided. + // + // This member is required. + Geometry *RouteAvoidanceAreaGeometry + + // Exceptions to the provided avoidance geometry, to be included while calculating + // the route. + Except []RouteAvoidanceAreaGeometry + + noSmithyDocumentSerde +} + +// Geometry of the area to be avoided. +type RouteAvoidanceAreaGeometry struct { + + // Geometry defined as a bounding box. The first pair represents the X and Y + // coordinates (longitude and latitude,) of the southwest corner of the bounding + // box; the second pair represents the X and Y coordinates (longitude and latitude) + // of the northeast corner. + BoundingBox []float64 + + // Geometry defined as a corridor - a LineString with a radius that defines the + // width of the corridor. + Corridor *Corridor + + // Geometry defined as a polygon with only one linear ring. + Polygon [][][]float64 + + // Geometry defined as an encoded corridor - an encoded polyline with a radius + // that defines the width of the corridor. + PolylineCorridor *PolylineCorridor + + // A list of Isoline PolylinePolygon, for each isoline PolylinePolygon, it + // contains PolylinePolygon of the first linear ring (the outer ring) and from 2nd + // item to the last item (the inner rings). For more information on polyline + // encoding, see [https://github.com/heremaps/flexiblepolyline/blob/master/README.md]. + // + // [https://github.com/heremaps/flexiblepolyline/blob/master/README.md]: https://github.com/heremaps/flexiblepolyline/blob/master/README.md + PolylinePolygon []string + + noSmithyDocumentSerde +} + +// Options related to areas to be avoided. +type RouteAvoidanceOptions struct { + + // Areas to be avoided. + Areas []RouteAvoidanceArea + + // Avoid car-shuttle-trains while calculating the route. + CarShuttleTrains *bool + + // Avoid controlled access highways while calculating the route. + ControlledAccessHighways *bool + + // Avoid dirt roads while calculating the route. + DirtRoads *bool + + // Avoid ferries while calculating the route. + Ferries *bool + + // Avoid roads that have seasonal closure while calculating the route. + SeasonalClosure *bool + + // Avoids roads where the specified toll transponders are the only mode of payment. + TollRoads *bool + + // Avoids roads where the specified toll transponders are the only mode of payment. + TollTransponders *bool + + // Truck road type identifiers. BK1 through BK4 apply only to Sweden. + // A2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico. + // + // There are currently no other supported values as of 26th April 2024. + TruckRoadTypes []string + + // Avoid tunnels while calculating the route. + Tunnels *bool + + // Avoid U-turns for calculation on highways and motorways. + UTurns *bool + + // Zone categories to be avoided. + ZoneCategories []RouteAvoidanceZoneCategory + + noSmithyDocumentSerde +} + +// Zone categories to be avoided. +type RouteAvoidanceZoneCategory struct { + + // Zone category to be avoided. + // + // This member is required. + Category RouteZoneCategory + + noSmithyDocumentSerde +} + +// Travel mode options when the provided travel mode is "Car" +type RouteCarOptions struct { + + // Engine type of the vehicle. + EngineType RouteEngineType + + // The vehicle License Plate. + LicensePlate *RouteVehicleLicensePlate + + // Maximum speed specified. + // + // Unit: KilometersPerHour + MaxSpeed *float64 + + // The number of occupants in the vehicle. + // + // Default Value: 1 + Occupancy *int32 + + noSmithyDocumentSerde +} + +// Details related to the continue highway step. +type RouteContinueHighwayStepDetails struct { + + // Name of the intersection, if applicable to the step. + // + // This member is required. + Intersection []LocalizedString + + // Steering direction for the step. + SteeringDirection RouteSteeringDirection + + // Angle of the turn. + TurnAngle float64 + + // Intensity of the turn. + TurnIntensity RouteTurnIntensity + + noSmithyDocumentSerde +} + +// Details related to the continue step. +type RouteContinueStepDetails struct { + + // Name of the intersection, if applicable to the step. + // + // This member is required. + Intersection []LocalizedString + + noSmithyDocumentSerde +} + +// Options related to the destination. +type RouteDestinationOptions struct { + + // Avoids actions for the provided distance. This is typically to consider for + // users in moving vehicles who may not have sufficient time to make an action at + // an origin or a destination. + AvoidActionsForDistance int64 + + // Avoid U-turns for calculation on highways and motorways. + AvoidUTurns *bool + + // GPS Heading at the position. + Heading float64 + + // Options to configure matching the provided position to the road network. + Matching *RouteMatchingOptions + + // Options to configure matching the provided position to a side of the street. + SideOfStreet *RouteSideOfStreetOptions + + // Duration of the stop. + // + // Unit: seconds + StopDuration int64 + + noSmithyDocumentSerde +} + +// Driver related options. +type RouteDriverOptions struct { + + // Driver work-rest schedule. Stops are added to fulfil the provided rest schedule. + Schedule []RouteDriverScheduleInterval + + noSmithyDocumentSerde +} + +// Interval of the driver work-rest schedule. Stops are added to fulfil the +// provided rest schedule. +type RouteDriverScheduleInterval struct { + + // Maximum allowed driving time before stopping to rest. + // + // Unit: seconds + // + // This member is required. + DriveDuration int64 + + // Resting time before the driver can continue driving. + // + // Unit: seconds + // + // This member is required. + RestDuration int64 + + noSmithyDocumentSerde +} + +// Type of the emission. +// +// Valid values: Euro1, Euro2, Euro3, Euro4, Euro5, Euro6, EuroEev +type RouteEmissionType struct { + + // Type of the emission. + // + // Valid values: Euro1, Euro2, Euro3, Euro4, Euro5, Euro6, EuroEev + // + // This member is required. + Type *string + + // The CO 2 emission classes. + Co2EmissionClass *string + + noSmithyDocumentSerde +} + +// Details related to the enter highway step. +type RouteEnterHighwayStepDetails struct { + + // Name of the intersection, if applicable to the step. + // + // This member is required. + Intersection []LocalizedString + + // Steering direction for the step. + SteeringDirection RouteSteeringDirection + + // Angle of the turn. + TurnAngle float64 + + // Intensity of the turn. + TurnIntensity RouteTurnIntensity + + noSmithyDocumentSerde +} + +// Exclusion options for the route. +type RouteExclusionOptions struct { + + // List of countries to be avoided defined by two-letter or three-letter country + // codes. + // + // This member is required. + Countries []string + + noSmithyDocumentSerde +} + +// Details related to the exit step. +type RouteExitStepDetails struct { + + // Name of the intersection, if applicable to the step. + // + // This member is required. + Intersection []LocalizedString + + // Exit to be taken. + RelativeExit *int32 + + // Steering direction for the step. + SteeringDirection RouteSteeringDirection + + // Angle of the turn. + TurnAngle float64 + + // Intensity of the turn. + TurnIntensity RouteTurnIntensity + + noSmithyDocumentSerde +} + +// Steps of a leg that must be performed after the travel portion of the leg. +type RouteFerryAfterTravelStep struct { + + // Duration of the step. + // + // Unit: seconds + // + // This member is required. + Duration int64 + + // Type of the step. + // + // This member is required. + Type RouteFerryAfterTravelStepType + + // Brief description of the step in the requested language. + // + // Only available when the TravelStepType is Default. + Instruction *string + + noSmithyDocumentSerde +} + +// Details corresponding to the arrival for the leg. +type RouteFerryArrival struct { + + // The place details. + // + // This member is required. + Place *RouteFerryPlace + + // The time. + Time *string + + noSmithyDocumentSerde +} + +// Steps of a leg that must be performed before the travel portion of the leg. +type RouteFerryBeforeTravelStep struct { + + // Duration of the step. + // + // Unit: seconds + // + // This member is required. + Duration int64 + + // Type of the step. + // + // This member is required. + Type RouteFerryBeforeTravelStepType + + // Brief description of the step in the requested language. + // + // Only available when the TravelStepType is Default. + Instruction *string + + noSmithyDocumentSerde +} + +// Details corresponding to the departure for the leg. +type RouteFerryDeparture struct { + + // The place details. + // + // This member is required. + Place *RouteFerryPlace + + // The time. + Time *string + + noSmithyDocumentSerde +} + +// FerryLegDetails is populated when the Leg type is Ferry, and provides +// additional information that is specific +type RouteFerryLegDetails struct { + + // Steps of a leg that must be performed after the travel portion of the leg. + // + // This member is required. + AfterTravelSteps []RouteFerryAfterTravelStep + + // Details corresponding to the arrival for the leg. + // + // This member is required. + Arrival *RouteFerryArrival + + // Steps of a leg that must be performed before the travel portion of the leg. + // + // This member is required. + BeforeTravelSteps []RouteFerryBeforeTravelStep + + // Details corresponding to the departure for the leg. + // + // This member is required. + Departure *RouteFerryDeparture + + // Notices are additional information returned that indicate issues that occurred + // during route calculation. + // + // This member is required. + Notices []RouteFerryNotice + + // Waypoints that were passed through during the leg. This includes the waypoints + // that were configured with the PassThrough option. + // + // This member is required. + PassThroughWaypoints []RoutePassThroughWaypoint + + // Spans that were computed for the requested SpanAdditionalFeatures. + // + // This member is required. + Spans []RouteFerrySpan + + // Steps of a leg that must be performed before the travel portion of the leg. + // + // This member is required. + TravelSteps []RouteFerryTravelStep + + // Route name of the ferry line. + RouteName *string + + // Summarized details of the leg. + Summary *RouteFerrySummary + + noSmithyDocumentSerde +} + +// Notices are additional information returned that indicate issues that occurred +// during route calculation. +type RouteFerryNotice struct { + + // Code corresponding to the issue. + // + // This member is required. + Code RouteFerryNoticeCode + + // Impact corresponding to the issue. While Low impact notices can be safely + // ignored, High impact notices must be evaluated further to determine the impact. + Impact RouteNoticeImpact + + noSmithyDocumentSerde +} + +// Summarized details of the leg. +type RouteFerryOverviewSummary struct { + + // Distance of the step. + // + // This member is required. + Distance int64 + + // Duration of the step. + // + // Unit: seconds + // + // This member is required. + Duration int64 + + noSmithyDocumentSerde +} + +// Position provided in the request. +type RouteFerryPlace struct { + + // Position defined as [longitude, latitude] . + // + // This member is required. + Position []float64 + + // The name of the place. + Name *string + + // Position provided in the request. + OriginalPosition []float64 + + // Index of the waypoint in the request. + WaypointIndex *int32 + + noSmithyDocumentSerde +} + +// Span computed for the requested SpanAdditionalFeatures. +type RouteFerrySpan struct { + + // 3 letter Country code corresponding to the Span. + Country *string + + // Distance of the computed span. This feature doesn't split a span, but is always + // computed on a span split by other properties. + Distance int64 + + // Duration of the computed span. This feature doesn't split a span, but is always + // computed on a span split by other properties. + // + // Unit: seconds + Duration int64 + + // Offset in the leg geometry corresponding to the start of this span. + GeometryOffset *int32 + + // Provides an array of names of the ferry span in available languages. + Names []LocalizedString + + // 2-3 letter Region code corresponding to the Span. This is either a province or + // a state. + Region *string + + noSmithyDocumentSerde +} + +// Summarized details for the leg including travel steps only. The Distance for +// the travel only portion of the journey is the same as the Distance within the +// Overview summary. +type RouteFerrySummary struct { + + // Summarized details for the leg including before travel, travel and after travel + // steps. + Overview *RouteFerryOverviewSummary + + // Summarized details for the leg including travel steps only. The Distance for + // the travel only portion of the journey is in meters + TravelOnly *RouteFerryTravelOnlySummary + + noSmithyDocumentSerde +} + +// Summarized details for the leg including travel steps only. The Distance for +// the travel only portion of the journey is the same as the Distance within the +// Overview summary. +type RouteFerryTravelOnlySummary struct { + + // Total duration in free flowing traffic, which is the best case or shortest + // duration possible to cover the leg. + // + // Unit: seconds + // + // This member is required. + Duration int64 + + noSmithyDocumentSerde +} + +// Steps of a leg that must be performed during the travel portion of the leg. +type RouteFerryTravelStep struct { + + // Duration of the step. + // + // Unit: seconds + // + // This member is required. + Duration int64 + + // Type of the step. + // + // This member is required. + Type RouteFerryTravelStepType + + // Distance of the step. + Distance int64 + + // Offset in the leg geometry corresponding to the start of this step. + GeometryOffset *int32 + + // Brief description of the step in the requested language. + // + // Only available when the TravelStepType is Default. + Instruction *string + + noSmithyDocumentSerde +} + +// Details that are specific to a Keep step. +type RouteKeepStepDetails struct { + + // Name of the intersection, if applicable to the step. + // + // This member is required. + Intersection []LocalizedString + + // Steering direction for the step. + SteeringDirection RouteSteeringDirection + + // Angle of the turn. + TurnAngle float64 + + // Intensity of the turn. + TurnIntensity RouteTurnIntensity + + noSmithyDocumentSerde +} + +// A leg is a section of a route from one waypoint to the next. A leg could be of +// type Vehicle, Pedestrian or Ferry. Legs of different types could occur together +// within a single route. For example, a car employing the use of a Ferry will +// contain Vehicle legs corresponding to journey on land, and Ferry legs +// corresponding to the journey via Ferry. +type RouteLeg struct { + + // Geometry of the area to be avoided. + // + // This member is required. + Geometry *RouteLegGeometry + + // Specifies the mode of transport when calculating a route. Used in estimating + // the speed of travel and road compatibility. + // + // Default Value: Car + // + // This member is required. + TravelMode RouteLegTravelMode + + // Type of the leg. + // + // This member is required. + Type RouteLegType + + // FerryLegDetails is populated when the Leg type is Ferry, and provides + // additional information that is specific + FerryLegDetails *RouteFerryLegDetails + + // List of languages for instructions within steps in the response. + Language *string + + // Details related to the pedestrian leg. + PedestrianLegDetails *RoutePedestrianLegDetails + + // Details related to the vehicle leg. + VehicleLegDetails *RouteVehicleLegDetails + + noSmithyDocumentSerde +} + +// The returned Route leg geometry. +type RouteLegGeometry struct { + + // An ordered list of positions used to plot a route on a map. + // + // LineString and Polyline are mutually exclusive properties. + LineString [][]float64 + + // An ordered list of positions used to plot a route on a map in a lossy + // compression format. + // + // LineString and Polyline are mutually exclusive properties. + Polyline *string + + noSmithyDocumentSerde +} + +// Important labels including names and route numbers that differentiate the +// current route from the alternatives presented. +type RouteMajorRoadLabel struct { + + // Name of the road (localized). + RoadName *LocalizedString + + // Route number of the road. + RouteNumber *RouteNumber + + noSmithyDocumentSerde +} + +// Options related to route matching. +type RouteMatchingOptions struct { + + // Attempts to match the provided position to a road similar to the provided name. + NameHint *string + + // If the distance to a highway/bridge/tunnel/sliproad is within threshold, the + // waypoint will be snapped to the highway/bridge/tunnel/sliproad. + // + // Unit: meters + OnRoadThreshold int64 + + // Considers all roads within the provided radius to match the provided + // destination to. The roads that are considered are determined by the provided + // Strategy. + // + // Unit: Meters + Radius int64 + + // Strategy that defines matching of the position onto the road network. MatchAny + // considers all roads possible, whereas MatchMostSignificantRoad matches to the + // most significant road. + Strategy MatchingStrategy + + noSmithyDocumentSerde +} + +// Allow Options related to the route matrix. +type RouteMatrixAllowOptions struct { + + // Allow Hot (High Occupancy Toll) lanes while calculating the route. + Hot *bool + + // Allow Hov (High Occupancy vehicle) lanes while calculating the route. + Hov *bool + + noSmithyDocumentSerde +} + +// Provides the circle that was used while calculating the route. +type RouteMatrixAutoCircle struct { + + // The margin provided for the calculation. + Margin int64 + + // The maximum size of the radius provided for the calculation. + MaxRadius int64 + + noSmithyDocumentSerde +} + +// Area to be avoided. +type RouteMatrixAvoidanceArea struct { + + // Geometry of the area to be avoided. + // + // This member is required. + Geometry *RouteMatrixAvoidanceAreaGeometry + + noSmithyDocumentSerde +} + +// Geometry of the area to be avoided. +type RouteMatrixAvoidanceAreaGeometry struct { + + // Geometry defined as a bounding box. The first pair represents the X and Y + // coordinates (longitude and latitude,) of the southwest corner of the bounding + // box; the second pair represents the X and Y coordinates (longitude and latitude) + // of the northeast corner. + BoundingBox []float64 + + // Geometry defined as a polygon with only one linear ring. + Polygon [][][]float64 + + // A list of Isoline PolylinePolygon, for each isoline PolylinePolygon, it + // contains PolylinePolygon of the first linear ring (the outer ring) and from + // second item to the last item (the inner rings). For more information on polyline + // encoding, see [https://github.com/heremaps/flexiblepolyline/blob/master/README.md]. + // + // [https://github.com/heremaps/flexiblepolyline/blob/master/README.md]: https://github.com/heremaps/flexiblepolyline/blob/master/README.md + PolylinePolygon []string + + noSmithyDocumentSerde +} + +// Options related to the route matrix. +type RouteMatrixAvoidanceOptions struct { + + // Areas to be avoided. + Areas []RouteMatrixAvoidanceArea + + // Avoid car-shuttle-trains while calculating the route. + CarShuttleTrains *bool + + // Avoid controlled access highways while calculating the route. + ControlledAccessHighways *bool + + // Avoid dirt roads while calculating the route. + DirtRoads *bool + + // Avoid ferries while calculating the route. + Ferries *bool + + // Avoids roads where the specified toll transponders are the only mode of payment. + TollRoads *bool + + // Avoids roads where the specified toll transponders are the only mode of payment. + TollTransponders *bool + + // Truck road type identifiers. BK1 through BK4 apply only to Sweden. + // A2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico. + // + // There are currently no other supported values as of 26th April 2024. + TruckRoadTypes []string + + // Avoid tunnels while calculating the route. + Tunnels *bool + + // Avoid U-turns for calculation on highways and motorways. + UTurns *bool + + // Zone categories to be avoided. + ZoneCategories []RouteMatrixAvoidanceZoneCategory + + noSmithyDocumentSerde +} + +// Zone categories to be avoided. +type RouteMatrixAvoidanceZoneCategory struct { + + // Zone category to be avoided. + Category RouteMatrixZoneCategory + + noSmithyDocumentSerde +} + +// Boundary within which the matrix is to be calculated. All data, origins and +// destinations outside the boundary are considered invalid. +type RouteMatrixBoundary struct { + + // Geometry of the area to be avoided. + Geometry *RouteMatrixBoundaryGeometry + + // No restrictions in terms of a routing boundary, and is typically used for + // longer routes. + Unbounded *bool + + noSmithyDocumentSerde +} + +// Geometry of the routing boundary. +type RouteMatrixBoundaryGeometry struct { + + // Provides the circle that was used while calculating the route. + AutoCircle *RouteMatrixAutoCircle + + // Geometry defined as a bounding box. The first pair represents the X and Y + // coordinates (longitude and latitude,) of the southwest corner of the bounding + // box; the second pair represents the X and Y coordinates (longitude and latitude) + // of the northeast corner. + BoundingBox []float64 + + // Geometry defined as a circle. When request routing boundary was set as + // AutoCircle , the response routing boundary will return Circle derived from the + // AutoCircle settings. + Circle *Circle + + // Geometry defined as a polygon with only one linear ring. + Polygon [][][]float64 + + noSmithyDocumentSerde +} + +// Options related to the car. +type RouteMatrixCarOptions struct { + + // The vehicle License Plate. + LicensePlate *RouteMatrixVehicleLicensePlate + + // Maximum speed + // + // Unit: KilometersPerHour + MaxSpeed *float64 + + // The number of occupants in the vehicle. + // + // Default Value: 1 + Occupancy *int32 + + noSmithyDocumentSerde +} + +// The route destination. +type RouteMatrixDestination struct { + + // Position defined as [longitude, latitude] . + // + // This member is required. + Position []float64 + + // Destination related options. + Options *RouteMatrixDestinationOptions + + noSmithyDocumentSerde +} + +// Options related to the destination. +type RouteMatrixDestinationOptions struct { + + // Avoids actions for the provided distance. This is typically to consider for + // users in moving vehicles who may not have sufficient time to make an action at + // an origin or a destination. + AvoidActionsForDistance int64 + + // GPS Heading at the position. + Heading float64 + + // Options to configure matching the provided position to the road network. + Matching *RouteMatrixMatchingOptions + + // Options to configure matching the provided position to a side of the street. + SideOfStreet *RouteMatrixSideOfStreetOptions + + noSmithyDocumentSerde +} + +// The calculated route matrix containing the results for all pairs of Origins to +// Destination positions. Each row corresponds to one entry in Origins. Each entry +// in the row corresponds to the route from that entry in Origins to an entry in +// Destination positions. +type RouteMatrixEntry struct { + + // The total distance of travel for the route. + // + // This member is required. + Distance int64 + + // The expected duration of travel for the route. + // + // Unit: seconds + // + // This member is required. + Duration int64 + + // Error code that occurred during calculation of the route. + Error RouteMatrixErrorCode + + noSmithyDocumentSerde +} + +// Exclusion options. +type RouteMatrixExclusionOptions struct { + + // List of countries to be avoided defined by two-letter or three-letter country + // codes. + // + // This member is required. + Countries []string + + noSmithyDocumentSerde +} + +// Matching options. +type RouteMatrixMatchingOptions struct { + + // Attempts to match the provided position to a road similar to the provided name. + NameHint *string + + // If the distance to a highway/bridge/tunnel/sliproad is within threshold, the + // waypoint will be snapped to the highway/bridge/tunnel/sliproad. + // + // Unit: meters + OnRoadThreshold int64 + + // Considers all roads within the provided radius to match the provided + // destination to. The roads that are considered are determined by the provided + // Strategy. + // + // Unit: Meters + Radius int64 + + // Strategy that defines matching of the position onto the road network. MatchAny + // considers all roads possible, whereas MatchMostSignificantRoad matches to the + // most significant road. + Strategy MatchingStrategy + + noSmithyDocumentSerde +} + +// The start position for the route. +type RouteMatrixOrigin struct { + + // Position defined as [longitude, latitude] . + // + // This member is required. + Position []float64 + + // Origin related options. + Options *RouteMatrixOriginOptions + + noSmithyDocumentSerde +} + +// Origin related options. +type RouteMatrixOriginOptions struct { + + // Avoids actions for the provided distance. This is typically to consider for + // users in moving vehicles who may not have sufficient time to make an action at + // an origin or a destination. + AvoidActionsForDistance int64 + + // GPS Heading at the position. + Heading float64 + + // Options to configure matching the provided position to the road network. + Matching *RouteMatrixMatchingOptions + + // Options to configure matching the provided position to a side of the street. + SideOfStreet *RouteMatrixSideOfStreetOptions + + noSmithyDocumentSerde +} + +// Travel mode options when the provided travel mode is "Scooter" +type RouteMatrixScooterOptions struct { + + // The vehicle License Plate. + LicensePlate *RouteMatrixVehicleLicensePlate + + // Maximum speed. + // + // Unit: KilometersPerHour + MaxSpeed *float64 + + // The number of occupants in the vehicle. + // + // Default Value: 1 + Occupancy *int32 + + noSmithyDocumentSerde +} + +// Options to configure matching the provided position to a side of the street. +type RouteMatrixSideOfStreetOptions struct { + + // Position defined as [longitude, latitude] . + // + // This member is required. + Position []float64 + + // Strategy that defines when the side of street position should be used. + // AnyStreet will always use the provided position. + // + // Default Value: DividedStreetOnly + UseWith SideOfStreetMatchingStrategy + + noSmithyDocumentSerde +} + +// Traffic related options. +type RouteMatrixTrafficOptions struct { + + // Duration for which flow traffic is considered valid. For this period, the flow + // traffic is used over historical traffic data. Flow traffic refers to congestion, + // which changes very quickly. Duration in seconds for which flow traffic event + // would be considered valid. While flow traffic event is valid it will be used + // over the historical traffic data. + FlowEventThresholdOverride int64 + + // Determines if traffic should be used or ignored while calculating the route. + // + // Default Value: UseTrafficData + Usage TrafficUsage + + noSmithyDocumentSerde +} + +// Trailer options corresponding to the vehicle. +type RouteMatrixTrailerOptions struct { + + // Number of trailers attached to the vehicle. + // + // Default Value: 0 + TrailerCount *int32 + + noSmithyDocumentSerde +} + +// Travel mode related options for the provided travel mode. +type RouteMatrixTravelModeOptions struct { + + // Travel mode options when the provided travel mode is "Car" + Car *RouteMatrixCarOptions + + // Travel mode options when the provided travel mode is "Scooter" + Scooter *RouteMatrixScooterOptions + + // Travel mode options when the provided travel mode is "Truck" + Truck *RouteMatrixTruckOptions + + noSmithyDocumentSerde +} + +// Travel mode options when the provided travel mode is "Truck" +type RouteMatrixTruckOptions struct { + + // Total number of axles of the vehicle. + AxleCount *int32 + + // Gross weight of the vehicle including trailers, and goods at capacity. + // + // Unit: Kilograms + GrossWeight int64 + + // List of Hazardous cargo contained in the vehicle. + HazardousCargos []RouteMatrixHazardousCargoType + + // Height of the vehicle. + // + // Unit: centimeters + Height int64 + + // Kingpin to rear axle length of the vehicle + // + // Unit: centimeters + KpraLength int64 + + // Length of the vehicle. + // + // Unit: centimeters + Length int64 + + // The vehicle License Plate. + LicensePlate *RouteMatrixVehicleLicensePlate + + // Maximum speed + // + // Unit: KilometersPerHour + MaxSpeed *float64 + + // The number of occupants in the vehicle. + // + // Default Value: 1 + Occupancy *int32 + + // Payload capacity of the vehicle and trailers attached. + // + // Unit: kilograms + PayloadCapacity int64 + + // Trailer options corresponding to the vehicle. + Trailer *RouteMatrixTrailerOptions + + // Type of the truck. + TruckType RouteMatrixTruckType + + // The tunnel restriction code. + // + // Tunnel categories in this list indicate the restrictions which apply to certain + // tunnels in Great Britain. They relate to the types of dangerous goods that can + // be transported through them. + // + // - Tunnel Category B + // + // - Risk Level: Limited risk + // + // - Restrictions: Few restrictions + // + // - Tunnel Category C + // + // - Risk Level: Medium risk + // + // - Restrictions: Some restrictions + // + // - Tunnel Category D + // + // - Risk Level: High risk + // + // - Restrictions: Many restrictions occur + // + // - Tunnel Category E + // + // - Risk Level: Very high risk + // + // - Restrictions: Restricted tunnel + TunnelRestrictionCode *string + + // Heaviest weight per axle irrespective of the axle type or the axle group. Meant + // for usage in countries where the differences in axle types or axle groups are + // not distinguished. + // + // Unit: Kilograms + WeightPerAxle int64 + + // Specifies the total weight for the specified axle group. Meant for usage in + // countries that have different regulations based on the axle group type. + WeightPerAxleGroup *WeightPerAxleGroup + + // Width of the vehicle. + // + // Unit: centimeters + Width int64 + + noSmithyDocumentSerde +} + +// The vehicle License Plate. +type RouteMatrixVehicleLicensePlate struct { + + // The last character of the License Plate. + LastCharacter *string + + noSmithyDocumentSerde +} + +// Notice Detail that is a range. +type RouteNoticeDetailRange struct { + + // Maximum value for the range. + Max *int32 + + // Minimum value for the range. + Min *int32 + + noSmithyDocumentSerde +} + +// The route number. +type RouteNumber struct { + + // The route number. + // + // This member is required. + Value *string + + // Directional identifier of the route. + Direction RouteDirection + + // List of languages for instructions corresponding to the route number. + Language *string + + noSmithyDocumentSerde +} + +// Origin related options. +type RouteOriginOptions struct { + + // Avoids actions for the provided distance. This is typically to consider for + // users in moving vehicles who may not have sufficient time to make an action at + // an origin or a destination. + AvoidActionsForDistance int64 + + // Avoid U-turns for calculation on highways and motorways. + AvoidUTurns *bool + + // GPS Heading at the position. + Heading float64 + + // Options to configure matching the provided position to the road network. + Matching *RouteMatchingOptions + + // Options to configure matching the provided position to a side of the street. + SideOfStreet *RouteSideOfStreetOptions + + noSmithyDocumentSerde +} + +// The place where the waypoint is passed through and not treated as a stop. +type RoutePassThroughPlace struct { + + // Position defined as [longitude, latitude] . + // + // This member is required. + Position []float64 + + // Position provided in the request. + OriginalPosition []float64 + + // Index of the waypoint in the request. + WaypointIndex *int32 + + noSmithyDocumentSerde +} + +// If the waypoint should be treated as a stop. If yes, the route is split up into +// different legs around the stop. +type RoutePassThroughWaypoint struct { + + // The place details. + // + // This member is required. + Place *RoutePassThroughPlace + + // Offset in the leg geometry corresponding to the start of this step. + GeometryOffset *int32 + + noSmithyDocumentSerde +} + +// Details corresponding to the arrival for a leg. +// +// Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm +// +// Examples: +// +// 2020-04-22T17:57:24Z +// +// 2020-04-22T17:57:24+02:00 +type RoutePedestrianArrival struct { + + // The place details. + // + // This member is required. + Place *RoutePedestrianPlace + + // The time. + Time *string + + noSmithyDocumentSerde +} + +// Details corresponding to the departure for a leg. +// +// Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm +// +// Examples: +// +// 2020-04-22T17:57:24Z +// +// 2020-04-22T17:57:24+02:00 +type RoutePedestrianDeparture struct { + + // The place details. + // + // This member is required. + Place *RoutePedestrianPlace + + // The time. + Time *string + + noSmithyDocumentSerde +} + +// Details that are specific to a pedestrian leg. +type RoutePedestrianLegDetails struct { + + // Details corresponding to the arrival for the leg. + // + // This member is required. + Arrival *RoutePedestrianArrival + + // Details corresponding to the departure for the leg. + // + // This member is required. + Departure *RoutePedestrianDeparture + + // Notices are additional information returned that indicate issues that occurred + // during route calculation. + // + // This member is required. + Notices []RoutePedestrianNotice + + // Waypoints that were passed through during the leg. This includes the waypoints + // that were configured with the PassThrough option. + // + // This member is required. + PassThroughWaypoints []RoutePassThroughWaypoint + + // Spans that were computed for the requested SpanAdditionalFeatures. + // + // This member is required. + Spans []RoutePedestrianSpan + + // Steps of a leg that must be performed before the travel portion of the leg. + // + // This member is required. + TravelSteps []RoutePedestrianTravelStep + + // Summarized details of the leg. + Summary *RoutePedestrianSummary + + noSmithyDocumentSerde +} + +// Notices are additional information returned that indicate issues that occurred +// during route calculation. +type RoutePedestrianNotice struct { + + // Code corresponding to the issue. + // + // This member is required. + Code RoutePedestrianNoticeCode + + // Impact corresponding to the issue. While Low impact notices can be safely + // ignored, High impact notices must be evaluated further to determine the impact. + Impact RouteNoticeImpact + + noSmithyDocumentSerde +} + +// Options related to the pedestrian. +type RoutePedestrianOptions struct { + + // Walking speed in Kilometers per hour. + Speed *float64 + + noSmithyDocumentSerde +} + +// Provides a summary of a pedestrian route step. +type RoutePedestrianOverviewSummary struct { + + // Distance of the step. + // + // This member is required. + Distance int64 + + // Duration of the step. + // + // This member is required. + Duration int64 + + noSmithyDocumentSerde +} + +// Place details corresponding to the arrival or departure. +type RoutePedestrianPlace struct { + + // Position defined as [longitude, latitude] . + // + // This member is required. + Position []float64 + + // The name of the place. + Name *string + + // Position provided in the request. + OriginalPosition []float64 + + // Options to configure matching the provided position to a side of the street. + SideOfStreet RouteSideOfStreet + + // Index of the waypoint in the request. + WaypointIndex *int32 + + noSmithyDocumentSerde +} + +// Span computed for the requested SpanAdditionalFeatures. +type RoutePedestrianSpan struct { + + // Duration of the computed span without traffic congestion. + // + // Unit: seconds + BestCaseDuration int64 + + // 3 letter Country code corresponding to the Span. + Country *string + + // Distance of the computed span. This feature doesn't split a span, but is always + // computed on a span split by other properties. + Distance int64 + + // Duration of the computed span. This feature doesn't split a span, but is always + // computed on a span split by other properties. + // + // Unit: seconds + Duration int64 + + // Dynamic speed details corresponding to the span. + // + // Unit: KilometersPerHour + DynamicSpeed *RouteSpanDynamicSpeedDetails + + // Functional classification of the road segment corresponding to the span. + FunctionalClassification *int32 + + // Offset in the leg geometry corresponding to the start of this span. + GeometryOffset *int32 + + // Incidents corresponding to the span. These index into the Incidents in the + // parent Leg. + Incidents []int32 + + // Provides an array of names of the pedestrian span in available languages. + Names []LocalizedString + + // Access attributes for a pedestrian corresponding to the span. + PedestrianAccess []RouteSpanPedestrianAccessAttribute + + // 2-3 letter Region code corresponding to the Span. This is either a province or + // a state. + Region *string + + // Attributes for the road segment corresponding to the span. + RoadAttributes []RouteSpanRoadAttribute + + // Designated route name or number corresponding to the span. + RouteNumbers []RouteNumber + + // Speed limit details corresponding to the span. + // + // Unit: KilometersPerHour + SpeedLimit *RouteSpanSpeedLimitDetails + + // Duration of the computed span under typical traffic congestion. + // + // Unit: seconds + TypicalDuration int64 + + noSmithyDocumentSerde +} + +// Summarized details for the leg including before travel, travel and after travel +// steps. +type RoutePedestrianSummary struct { + + // Summarized details for the leg including before travel, travel and after travel + // steps. + Overview *RoutePedestrianOverviewSummary + + // Summarized details for the leg including travel steps only. The Distance for + // the travel only portion of the journey is in meters + TravelOnly *RoutePedestrianTravelOnlySummary + + noSmithyDocumentSerde +} + +// Summarized details for the leg including travel steps. +type RoutePedestrianTravelOnlySummary struct { + + // Duration of the step. + // + // Unit: seconds + // + // This member is required. + Duration int64 + + noSmithyDocumentSerde +} + +// Steps of a leg that must be performed during the travel portion of the leg. +type RoutePedestrianTravelStep struct { + + // Duration of the step. + // + // Unit: seconds + // + // This member is required. + Duration int64 + + // Type of the step. + // + // This member is required. + Type RoutePedestrianTravelStepType + + // Details related to the continue step. + ContinueStepDetails *RouteContinueStepDetails + + // Details of the current road. See RouteRoad for details of sub-attributes. + CurrentRoad *RouteRoad + + // Distance of the step. + Distance int64 + + // Exit number of the road exit, if applicable. + ExitNumber []LocalizedString + + // Offset in the leg geometry corresponding to the start of this step. + GeometryOffset *int32 + + // Brief description of the step in the requested language. + // + // Only available when the TravelStepType is Default. + Instruction *string + + // Details that are specific to a Keep step. + KeepStepDetails *RouteKeepStepDetails + + // Details of the next road. See RouteRoad for details of sub-attributes. + NextRoad *RouteRoad + + // Details that are specific to a Roundabout Enter step. + RoundaboutEnterStepDetails *RouteRoundaboutEnterStepDetails + + // Details that are specific to a Roundabout Exit step. + RoundaboutExitStepDetails *RouteRoundaboutExitStepDetails + + // Details that are specific to a Roundabout Pass step. + RoundaboutPassStepDetails *RouteRoundaboutPassStepDetails + + // Sign post information of the action, applicable only for TurnByTurn steps. See + // RouteSignpost for details of sub-attributes. + Signpost *RouteSignpost + + // Details that are specific to a turn step. + TurnStepDetails *RouteTurnStepDetails + + noSmithyDocumentSerde +} + +// Details that are specific to a ramp step. +type RouteRampStepDetails struct { + + // Name of the intersection, if applicable to the step. + // + // This member is required. + Intersection []LocalizedString + + // Steering direction for the step. + SteeringDirection RouteSteeringDirection + + // Angle of the turn. + TurnAngle float64 + + // Intensity of the turn. + TurnIntensity RouteTurnIntensity + + noSmithyDocumentSerde +} + +// Notices are additional information returned that indicate issues that occurred +// during route calculation. +type RouteResponseNotice struct { + + // Code corresponding to the issue. + // + // This member is required. + Code RouteResponseNoticeCode + + // Impact corresponding to the issue. While Low impact notices can be safely + // ignored, High impact notices must be evaluated further to determine the impact. + Impact RouteNoticeImpact + + noSmithyDocumentSerde +} + +// The road on the route. +type RouteRoad struct { + + // Name of the road (localized). + // + // This member is required. + RoadName []LocalizedString + + // Route number of the road. + // + // This member is required. + RouteNumber []RouteNumber + + // Names of destinations that can be reached when traveling on the road. + // + // This member is required. + Towards []LocalizedString + + // The type of road. + Type RouteRoadType + + noSmithyDocumentSerde +} + +// Details about the roundabout leg. +type RouteRoundaboutEnterStepDetails struct { + + // Name of the intersection, if applicable to the step. + // + // This member is required. + Intersection []LocalizedString + + // Steering direction for the step. + SteeringDirection RouteSteeringDirection + + // Angle of the turn. + TurnAngle float64 + + // Intensity of the turn. + TurnIntensity RouteTurnIntensity + + noSmithyDocumentSerde +} + +// Details about the roundabout step. +type RouteRoundaboutExitStepDetails struct { + + // Name of the intersection, if applicable to the step. + // + // This member is required. + Intersection []LocalizedString + + // Exit to be taken. + RelativeExit *int32 + + // Angle of the roundabout. + RoundaboutAngle float64 + + // Steering direction for the step. + SteeringDirection RouteSteeringDirection + + noSmithyDocumentSerde +} + +// Details about the step. +type RouteRoundaboutPassStepDetails struct { + + // Name of the intersection, if applicable to the step. + // + // This member is required. + Intersection []LocalizedString + + // Steering direction for the step. + SteeringDirection RouteSteeringDirection + + // Angle of the turn. + TurnAngle float64 + + // Intensity of the turn. + TurnIntensity RouteTurnIntensity + + noSmithyDocumentSerde +} + +// Travel mode options when the provided travel mode is "Scooter" +type RouteScooterOptions struct { + + // Engine type of the vehicle. + EngineType RouteEngineType + + // The vehicle License Plate. + LicensePlate *RouteVehicleLicensePlate + + // Maximum speed + // + // Unit: KilometersPerHour + MaxSpeed *float64 + + // The number of occupants in the vehicle. + // + // Default Value: 1 + Occupancy *int32 + + noSmithyDocumentSerde +} + +// Options to configure matching the provided position to a side of the street. +type RouteSideOfStreetOptions struct { + + // Position defined as [longitude, latitude] . + // + // This member is required. + Position []float64 + + // Strategy that defines when the side of street position should be used. + // + // Default Value: DividedStreetOnly + UseWith SideOfStreetMatchingStrategy + + noSmithyDocumentSerde +} + +// Sign post information of the action, applicable only for TurnByTurn steps. See +// RouteSignpost for details of sub-attributes. +type RouteSignpost struct { + + // Labels present on the sign post. + // + // This member is required. + Labels []RouteSignpostLabel + + noSmithyDocumentSerde +} + +// Labels presented on the sign post. +type RouteSignpostLabel struct { + + // Route number of the road. + RouteNumber *RouteNumber + + // The Signpost text. + Text *LocalizedString + + noSmithyDocumentSerde +} + +// Details about the dynamic speed. +// +// Unit: KilometersPerHour +type RouteSpanDynamicSpeedDetails struct { + + // Estimated speed while traversing the span without traffic congestion. + // + // Unit: KilometersPerHour + BestCaseSpeed float64 + + // Estimated time to turn from this span into the next. + // + // Unit: seconds + TurnDuration int64 + + // Estimated speed while traversing the span under typical traffic congestion. + // + // Unit: KilometersPerHour + TypicalSpeed float64 + + noSmithyDocumentSerde +} + +// Details about the speed limit corresponding to the span. +// +// Unit: KilometersPerHour +type RouteSpanSpeedLimitDetails struct { + + // Maximum speed. + // + // Unit: KilometersPerHour + MaxSpeed float64 + + // If the span doesn't have a speed limit like the Autobahn. + Unlimited *bool + + noSmithyDocumentSerde +} + +// Summarized details for the leg including travel steps only. The Distance for +// the travel only portion of the journey is the same as the Distance within the +// Overview summary. +type RouteSummary struct { + + // Distance of the route. + Distance int64 + + // Duration of the route. + // + // Unit: seconds + Duration int64 + + // Toll summary for the complete route. + Tolls *RouteTollSummary + + noSmithyDocumentSerde +} + +// Provides details about toll information along a route, including the payment +// sites, applicable toll rates, toll systems, and the country associated with the +// toll collection. +type RouteToll struct { + + // Locations or sites where the toll fare is collected. + // + // This member is required. + PaymentSites []RouteTollPaymentSite + + // Toll rates that need to be paid to travel this leg of the route. + // + // This member is required. + Rates []RouteTollRate + + // Toll systems are authorities that collect payments for the toll. + // + // This member is required. + Systems []int32 + + // The alpha-2 or alpha-3 character code for the country. + Country *string + + noSmithyDocumentSerde +} + +// Options related to Tolls on a route. +type RouteTollOptions struct { + + // Specifies if the user has valid transponder with access to all toll systems. + // This impacts toll calculation, and if true the price with transponders is used. + AllTransponders *bool + + // Specifies if the user has valid vignettes with access for all toll roads. If a + // user has a vignette for a toll road, then toll cost for that road is omitted + // since no further payment is necessary. + AllVignettes *bool + + // Currency code corresponding to the price. This is the same as Currency + // specified in the request. + Currency *string + + // Emission type of the vehicle for toll cost calculation. + // + // Valid values: Euro1, Euro2, Euro3, Euro4, Euro5, Euro6, EuroEev + EmissionType *RouteEmissionType + + // Vehicle category for toll cost calculation. + VehicleCategory RouteTollVehicleCategory + + noSmithyDocumentSerde +} + +// Details if the toll rate can be a pass that supports multiple trips. +type RouteTollPass struct { + + // If the pass includes the rate for the return leg of the trip. + IncludesReturnTrip *bool + + // If the pass is only valid for senior persons. + SeniorPass *bool + + // If the toll pass can be transferred, and how many times. + TransferCount *int32 + + // Number of trips the pass is valid for. + TripCount *int32 + + // Period for which the pass is valid. + ValidityPeriod *RouteTollPassValidityPeriod + + noSmithyDocumentSerde +} + +// Period for which the pass is valid. +type RouteTollPassValidityPeriod struct { + + // Validity period. + // + // This member is required. + Period RouteTollPassValidityPeriodType + + // Counts for the validity period. + PeriodCount *int32 + + noSmithyDocumentSerde +} + +// Locations or sites where the toll fare is collected. +type RouteTollPaymentSite struct { + + // Position defined as [longitude, latitude] . + // + // This member is required. + Position []float64 + + // Name of the payment site. + Name *string + + noSmithyDocumentSerde +} + +// The toll price. +type RouteTollPrice struct { + + // Currency code corresponding to the price. This is the same as Currency + // specified in the request. + // + // This member is required. + Currency *string + + // If the price is an estimate or an exact value. + // + // This member is required. + Estimate *bool + + // If the price is a range or an exact value. If any of the toll fares making up + // the route is a range, the overall price is also a range. + // + // This member is required. + Range *bool + + // Exact price, if not a range. + // + // This member is required. + Value *float64 + + // Duration for which the price corresponds to. + // + // Unit: seconds + PerDuration int64 + + // Price range with a minimum and maximum value, if a range. + RangeValue *RouteTollPriceValueRange + + noSmithyDocumentSerde +} + +// Summary of the route and toll price. +type RouteTollPriceSummary struct { + + // Currency code corresponding to the price. This is the same as Currency + // specified in the request. + // + // This member is required. + Currency *string + + // If the price is an estimate or an exact value. + // + // This member is required. + Estimate *bool + + // If the price is a range or an exact value. If any of the toll fares making up + // the route is a range, the overall price is also a range. + // + // This member is required. + Range *bool + + // Exact price, if not a range. + // + // This member is required. + Value *float64 + + // Price range with a minimum and maximum value, if a range. + RangeValue *RouteTollPriceValueRange + + noSmithyDocumentSerde +} + +// Price range with a minimum and maximum value, if a range. +type RouteTollPriceValueRange struct { + + // Maximum price. + // + // This member is required. + Max *float64 + + // Minimum price. + // + // This member is required. + Min *float64 + + noSmithyDocumentSerde +} + +// The toll rate. +type RouteTollRate struct { + + // The Toll rate Id. + // + // This member is required. + Id *string + + // Price in the local regional currency. + // + // This member is required. + LocalPrice *RouteTollPrice + + // The name of the toll. + // + // This member is required. + Name *string + + // Accepted payment methods at the toll. + // + // This member is required. + PaymentMethods []RouteTollPaymentMethod + + // Transponders for which this toll can be applied. + // + // This member is required. + Transponders []RouteTransponder + + // Time when the rate is valid. + ApplicableTimes *string + + // Price in the converted currency as specified in the request. + ConvertedPrice *RouteTollPrice + + // Details if the toll rate can be a pass that supports multiple trips. + Pass *RouteTollPass + + noSmithyDocumentSerde +} + +// The toll summary for the complete route. +type RouteTollSummary struct { + + // Total toll summary for the complete route. Total is the only summary available + // today. + Total *RouteTollPriceSummary + + noSmithyDocumentSerde +} + +// Toll systems are authorities that collect payments for the toll. +type RouteTollSystem struct { + + // The toll system name. + Name *string + + noSmithyDocumentSerde +} + +// Traffic options for the route. +type RouteTrafficOptions struct { + + // Duration for which flow traffic is considered valid. For this period, the flow + // traffic is used over historical traffic data. Flow traffic refers to congestion, + // which changes very quickly. Duration in seconds for which flow traffic event + // would be considered valid. While flow traffic event is valid it will be used + // over the historical traffic data. + FlowEventThresholdOverride int64 + + // Determines if traffic should be used or ignored while calculating the route. + // + // Default Value: UseTrafficData + Usage TrafficUsage + + noSmithyDocumentSerde +} + +// Trailer options corresponding to the vehicle. +type RouteTrailerOptions struct { + + // Total number of axles of the vehicle. + AxleCount *int32 + + // Number of trailers attached to the vehicle. + // + // Default Value: 0 + TrailerCount *int32 + + noSmithyDocumentSerde +} + +// Transponders for which this toll can be applied. +type RouteTransponder struct { + + // Names of the toll system collecting the toll. + SystemName *string + + noSmithyDocumentSerde +} + +// Travel mode related options for the provided travel mode. +type RouteTravelModeOptions struct { + + // Travel mode options when the provided travel mode is "Car" + Car *RouteCarOptions + + // Travel mode options when the provided travel mode is "Pedestrian" + Pedestrian *RoutePedestrianOptions + + // Travel mode options when the provided travel mode is "Scooter" + Scooter *RouteScooterOptions + + // Travel mode options when the provided travel mode is "Truck" + Truck *RouteTruckOptions + + noSmithyDocumentSerde +} + +// Travel mode options when the provided travel mode is "Truck" +type RouteTruckOptions struct { + + // Total number of axles of the vehicle. + AxleCount *int32 + + // Engine type of the vehicle. + EngineType RouteEngineType + + // Gross weight of the vehicle including trailers, and goods at capacity. + // + // Unit: Kilograms + GrossWeight int64 + + // List of Hazardous cargo contained in the vehicle. + HazardousCargos []RouteHazardousCargoType + + // Height of the vehicle. + // + // Unit: centimeters + Height int64 + + // Height of the vehicle above its first axle. + // + // Unit: centimeters + HeightAboveFirstAxle int64 + + // Kingpin to rear axle length of the vehicle. + // + // Unit: centimeters + KpraLength int64 + + // Length of the vehicle. + // + // Unit: c + Length int64 + + // The vehicle License Plate. + LicensePlate *RouteVehicleLicensePlate + + // Maximum speed + // + // Unit: KilometersPerHour + MaxSpeed *float64 + + // The number of occupants in the vehicle. + // + // Default Value: 1 + Occupancy *int32 + + // Payload capacity of the vehicle and trailers attached. + // + // Unit: kilograms + PayloadCapacity int64 + + // Number of tires on the vehicle. + TireCount *int32 + + // Trailer options corresponding to the vehicle. + Trailer *RouteTrailerOptions + + // Type of the truck. + TruckType RouteTruckType + + // The tunnel restriction code. + // + // Tunnel categories in this list indicate the restrictions which apply to certain + // tunnels in Great Britain. They relate to the types of dangerous goods that can + // be transported through them. + // + // - Tunnel Category B + // + // - Risk Level: Limited risk + // + // - Restrictions: Few restrictions + // + // - Tunnel Category C + // + // - Risk Level: Medium risk + // + // - Restrictions: Some restrictions + // + // - Tunnel Category D + // + // - Risk Level: High risk + // + // - Restrictions: Many restrictions occur + // + // - Tunnel Category E + // + // - Risk Level: Very high risk + // + // - Restrictions: Restricted tunnel + TunnelRestrictionCode *string + + // Heaviest weight per axle irrespective of the axle type or the axle group. Meant + // for usage in countries where the differences in axle types or axle groups are + // not distinguished. + // + // Unit: Kilograms + WeightPerAxle int64 + + // Specifies the total weight for the specified axle group. Meant for usage in + // countries that have different regulations based on the axle group type. + // + // Unit: Kilograms + WeightPerAxleGroup *WeightPerAxleGroup + + // Width of the vehicle. + // + // Unit: centimeters + Width int64 + + noSmithyDocumentSerde +} + +// Details related to the turn step. +type RouteTurnStepDetails struct { + + // Name of the intersection, if applicable to the step. + // + // This member is required. + Intersection []LocalizedString + + // Steering direction for the step. + SteeringDirection RouteSteeringDirection + + // Angle of the turn. + TurnAngle float64 + + // Intensity of the turn. + TurnIntensity RouteTurnIntensity + + noSmithyDocumentSerde +} + +// Details related to the U-turn step. +type RouteUTurnStepDetails struct { + + // Name of the intersection, if applicable to the step. + // + // This member is required. + Intersection []LocalizedString + + // Steering direction for the step. + SteeringDirection RouteSteeringDirection + + // Angle of the turn. + TurnAngle float64 + + // Intensity of the turn. + TurnIntensity RouteTurnIntensity + + noSmithyDocumentSerde +} + +// Details corresponding to the arrival for a leg. +type RouteVehicleArrival struct { + + // The place details. + // + // This member is required. + Place *RouteVehiclePlace + + // The time. + Time *string + + noSmithyDocumentSerde +} + +// Details corresponding to the departure for the leg. +type RouteVehicleDeparture struct { + + // The place details. + // + // This member is required. + Place *RouteVehiclePlace + + // The departure time. + Time *string + + noSmithyDocumentSerde +} + +// Incidents corresponding to this leg of the route. +type RouteVehicleIncident struct { + + // Brief readable description of the incident. + Description *string + + // End timestamp of the incident. + EndTime *string + + // Severity of the incident Critical - The part of the route the incident affects + // is unusable. Major- Major impact on the leg duration, for example stop and go + // Minor- Minor impact on the leg duration, for example traffic jam Low - Low on + // duration, for example slightly increased traffic + Severity RouteVehicleIncidentSeverity + + // Start time of the incident. + StartTime *string + + // Type of the incident. + Type RouteVehicleIncidentType + + noSmithyDocumentSerde +} + +// Steps of a leg that correspond to the travel portion of the leg. +type RouteVehicleLegDetails struct { + + // Details corresponding to the arrival for the leg. + // + // This member is required. + Arrival *RouteVehicleArrival + + // Details corresponding to the departure for the leg. + // + // This member is required. + Departure *RouteVehicleDeparture + + // Incidents corresponding to this leg of the route. + // + // This member is required. + Incidents []RouteVehicleIncident + + // Notices are additional information returned that indicate issues that occurred + // during route calculation. + // + // This member is required. + Notices []RouteVehicleNotice + + // Waypoints that were passed through during the leg. This includes the waypoints + // that were configured with the PassThrough option. + // + // This member is required. + PassThroughWaypoints []RoutePassThroughWaypoint + + // Spans that were computed for the requested SpanAdditionalFeatures. + // + // This member is required. + Spans []RouteVehicleSpan + + // Toll systems are authorities that collect payments for the toll. + // + // This member is required. + TollSystems []RouteTollSystem + + // Toll related options. + // + // This member is required. + Tolls []RouteToll + + // Steps of a leg that must be performed before the travel portion of the leg. + // + // This member is required. + TravelSteps []RouteVehicleTravelStep + + // Truck road type identifiers. BK1 through BK4 apply only to Sweden. + // A2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico. + // + // There are currently no other supported values as of 26th April 2024. + // + // This member is required. + TruckRoadTypes []string + + // Zones corresponding to this leg of the route. + // + // This member is required. + Zones []RouteZone + + // Summarized details of the leg. + Summary *RouteVehicleSummary + + noSmithyDocumentSerde +} + +// License plate information of the vehicle. Currently, only the last character is +// used where license plate based controlled access is enforced. +type RouteVehicleLicensePlate struct { + + // The last character of the License Plate. + LastCharacter *string + + noSmithyDocumentSerde +} + +// Notices are additional information returned that indicate issues that occurred +// during route calculation. +type RouteVehicleNotice struct { + + // Code corresponding to the issue. + // + // This member is required. + Code RouteVehicleNoticeCode + + // Additional details of the notice. + // + // This member is required. + Details []RouteVehicleNoticeDetail + + // Impact corresponding to the issue. While Low impact notices can be safely + // ignored, High impact notices must be evaluated further to determine the impact. + Impact RouteNoticeImpact + + noSmithyDocumentSerde +} + +// Additional details of the notice. +type RouteVehicleNoticeDetail struct { + + // The notice title. + Title *string + + // Any violated constraints. + ViolatedConstraints *RouteViolatedConstraints + + noSmithyDocumentSerde +} + +// Summarized details of the leg. +type RouteVehicleOverviewSummary struct { + + // Distance of the step. + // + // This member is required. + Distance int64 + + // Duration of the step. + // + // Unit: seconds + // + // This member is required. + Duration int64 + + // Total duration in free flowing traffic, which is the best case or shortest + // duration possible to cover the leg. + // + // Unit: seconds + BestCaseDuration int64 + + // Duration of the computed span under typical traffic congestion. + // + // Unit: seconds + TypicalDuration int64 + + noSmithyDocumentSerde +} + +// Place details corresponding to the arrival or departure. +type RouteVehiclePlace struct { + + // Position defined as [longitude, latitude] . + // + // This member is required. + Position []float64 + + // The name of the place. + Name *string + + // Position provided in the request. + OriginalPosition []float64 + + // Options to configure matching the provided position to a side of the street. + SideOfStreet RouteSideOfStreet + + // Index of the waypoint in the request. + WaypointIndex *int32 + + noSmithyDocumentSerde +} + +// Span computed for the requested SpanAdditionalFeatures. +type RouteVehicleSpan struct { + + // Duration of the computed span without traffic congestion. + // + // Unit: seconds + BestCaseDuration int64 + + // Access attributes for a car corresponding to the span. + CarAccess []RouteSpanCarAccessAttribute + + // 3 letter Country code corresponding to the Span. + Country *string + + // Distance of the computed span. This feature doesn't split a span, but is always + // computed on a span split by other properties. + Distance int64 + + // Duration of the computed span. This feature doesn't split a span, but is always + // computed on a span split by other properties. + // + // Unit: seconds + Duration int64 + + // Dynamic speed details corresponding to the span. + // + // Unit: KilometersPerHour + DynamicSpeed *RouteSpanDynamicSpeedDetails + + // Functional classification of the road segment corresponding to the span. + FunctionalClassification *int32 + + // Attributes corresponding to a gate. The gate is present at the end of the + // returned span. + Gate RouteSpanGateAttribute + + // Offset in the leg geometry corresponding to the start of this span. + GeometryOffset *int32 + + // Incidents corresponding to the span. These index into the Incidents in the + // parent Leg. + Incidents []int32 + + // Provides an array of names of the vehicle span in available languages. + Names []LocalizedString + + // Notices are additional information returned that indicate issues that occurred + // during route calculation. + Notices []int32 + + // Attributes corresponding to a railway crossing. The gate is present at the end + // of the returned span. + RailwayCrossing RouteSpanRailwayCrossingAttribute + + // 2-3 letter Region code corresponding to the Span. This is either a province or + // a state. + Region *string + + // Attributes for the road segment corresponding to the span. + RoadAttributes []RouteSpanRoadAttribute + + // Designated route name or number corresponding to the span. + RouteNumbers []RouteNumber + + // Access attributes for a scooter corresponding to the span. + ScooterAccess []RouteSpanScooterAccessAttribute + + // Speed limit details corresponding to the span. + // + // Unit: KilometersPerHour + SpeedLimit *RouteSpanSpeedLimitDetails + + // Toll systems are authorities that collect payments for the toll. + TollSystems []int32 + + // Access attributes for a truck corresponding to the span. + TruckAccess []RouteSpanTruckAccessAttribute + + // Truck road type identifiers. BK1 through BK4 apply only to Sweden. + // A2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico. + // + // There are currently no other supported values as of 26th April 2024. + TruckRoadTypes []int32 + + // Duration of the computed span under typical traffic congestion. + // + // Unit: seconds + TypicalDuration int64 + + // Zones corresponding to this leg of the route. + Zones []int32 + + noSmithyDocumentSerde +} + +// Summarized details of the route. +type RouteVehicleSummary struct { + + // Summarized details for the leg including before travel, travel and after travel + // steps. + Overview *RouteVehicleOverviewSummary + + // Summarized details for the leg including travel steps only. The Distance for + // the travel only portion of the journey is in meters + TravelOnly *RouteVehicleTravelOnlySummary + + noSmithyDocumentSerde +} + +// Summarized details of the route. +type RouteVehicleTravelOnlySummary struct { + + // Duration of the step. + // + // Unit: seconds + // + // This member is required. + Duration int64 + + // Total duration in free flowing traffic, which is the best case or shortest + // duration possible to cover the leg. + // + // Unit: seconds + BestCaseDuration int64 + + // Duration of the computed span under typical traffic congestion. + // + // Unit: seconds + TypicalDuration int64 + + noSmithyDocumentSerde +} + +// Steps of a leg that correspond to the travel portion of the leg. +type RouteVehicleTravelStep struct { + + // Duration of the step. + // + // Unit: seconds + // + // This member is required. + Duration int64 + + // Type of the step. + // + // This member is required. + Type RouteVehicleTravelStepType + + // Details that are specific to a Continue Highway step. + ContinueHighwayStepDetails *RouteContinueHighwayStepDetails + + // Details that are specific to a Continue step. + ContinueStepDetails *RouteContinueStepDetails + + // Details of the current road. + CurrentRoad *RouteRoad + + // Distance of the step. + Distance int64 + + // Details that are specific to a Enter Highway step. + EnterHighwayStepDetails *RouteEnterHighwayStepDetails + + // Exit number of the road exit, if applicable. + ExitNumber []LocalizedString + + // Details that are specific to a Roundabout Exit step. + ExitStepDetails *RouteExitStepDetails + + // Offset in the leg geometry corresponding to the start of this step. + GeometryOffset *int32 + + // Brief description of the step in the requested language. + // + // Only available when the TravelStepType is Default. + Instruction *string + + // Details that are specific to a Keep step. + KeepStepDetails *RouteKeepStepDetails + + // Details of the next road. See RouteRoad for details of sub-attributes. + NextRoad *RouteRoad + + // Details that are specific to a Ramp step. + RampStepDetails *RouteRampStepDetails + + // Details that are specific to a Roundabout Enter step. + RoundaboutEnterStepDetails *RouteRoundaboutEnterStepDetails + + // Details that are specific to a Roundabout Exit step. + RoundaboutExitStepDetails *RouteRoundaboutExitStepDetails + + // Details that are specific to a Roundabout Pass step. + RoundaboutPassStepDetails *RouteRoundaboutPassStepDetails + + // Sign post information of the action, applicable only for TurnByTurn steps. See + // RouteSignpost for details of sub-attributes. + Signpost *RouteSignpost + + // Details that are specific to a Turn step. + TurnStepDetails *RouteTurnStepDetails + + // Details that are specific to a Turn step. + UTurnStepDetails *RouteUTurnStepDetails + + noSmithyDocumentSerde +} + +// This property contains a summary of violated constraints. +type RouteViolatedConstraints struct { + + // List of Hazardous cargo contained in the vehicle. + // + // This member is required. + HazardousCargos []RouteHazardousCargoType + + // This restriction applies to truck cargo, where the resulting route excludes + // roads on which hazardous materials are prohibited from being transported. + AllHazardsRestricted *bool + + // Total number of axles of the vehicle. + AxleCount *RouteNoticeDetailRange + + // The maximum height of the vehicle. + MaxHeight int64 + + // The maximum Kpra length of the vehicle. + // + // Unit: centimeters + MaxKpraLength int64 + + // The maximum length of the vehicle. + MaxLength int64 + + // The maximum load capacity of the vehicle. + // + // Unit: kilograms + MaxPayloadCapacity int64 + + // The maximum weight of the route. + // + // Unit: Kilograms + MaxWeight *RouteWeightConstraint + + // The maximum weight per axle of the vehicle. + // + // Unit: Kilograms + MaxWeightPerAxle int64 + + // The maximum weight per axle group of the vehicle. + // + // Unit: Kilograms + MaxWeightPerAxleGroup *WeightPerAxleGroup + + // The maximum width of the vehicle. + MaxWidth int64 + + // The number of occupants in the vehicle. + // + // Default Value: 1 + Occupancy *RouteNoticeDetailRange + + // Access radius restrictions based on time. + RestrictedTimes *string + + // The time dependent constraint. + TimeDependent *bool + + // Number of trailers attached to the vehicle. + // + // Default Value: 0 + TrailerCount *RouteNoticeDetailRange + + // Travel mode corresponding to the leg. + TravelMode *bool + + // Truck road type identifiers. BK1 through BK4 apply only to Sweden. + // A2,A4,B2,B4,C,D,ET2,ET4 apply only to Mexico. + // + // There are currently no other supported values as of 26th April 2024. + TruckRoadType *string + + // Type of the truck. + TruckType RouteTruckType + + // The tunnel restriction code. + // + // Tunnel categories in this list indicate the restrictions which apply to certain + // tunnels in Great Britain. They relate to the types of dangerous goods that can + // be transported through them. + // + // - Tunnel Category B + // + // - Risk Level: Limited risk + // + // - Restrictions: Few restrictions + // + // - Tunnel Category C + // + // - Risk Level: Medium risk + // + // - Restrictions: Some restrictions + // + // - Tunnel Category D + // + // - Risk Level: High risk + // + // - Restrictions: Many restrictions occur + // + // - Tunnel Category E + // + // - Risk Level: Very high risk + // + // - Restrictions: Restricted tunnel + TunnelRestrictionCode *string + + noSmithyDocumentSerde +} + +// Waypoint between the Origin and Destination. +type RouteWaypoint struct { + + // Position defined as [longitude, latitude] . + // + // This member is required. + Position []float64 + + // Avoids actions for the provided distance. This is typically to consider for + // users in moving vehicles who may not have sufficient time to make an action at + // an origin or a destination. + AvoidActionsForDistance int64 + + // Avoid U-turns for calculation on highways and motorways. + AvoidUTurns *bool + + // GPS Heading at the position. + Heading float64 + + // Options to configure matching the provided position to the road network. + Matching *RouteMatchingOptions + + // If the waypoint should not be treated as a stop. If yes, the waypoint is passed + // through and doesn't split the route into different legs. + PassThrough *bool + + // Options to configure matching the provided position to a side of the street. + SideOfStreet *RouteSideOfStreetOptions + + // Duration of the stop. + // + // Unit: seconds + StopDuration int64 + + noSmithyDocumentSerde +} + +// The weight constraint for the route. +// +// Unit: Kilograms +type RouteWeightConstraint struct { + + // The type of constraint. + // + // This member is required. + Type RouteWeightConstraintType + + // The constraint value. + // + // Unit: Kilograms + // + // This member is required. + Value int64 + + noSmithyDocumentSerde +} + +// The zone. +type RouteZone struct { + + // The zone category. + Category RouteZoneCategory + + // The name of the zone. + Name *string + + noSmithyDocumentSerde +} + +// The input fails to satisfy the constraints specified by the Amazon Location +// service. +type ValidationExceptionField struct { + + // The error message. + // + // This member is required. + Message *string + + // The name of the Validation Exception Field. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +// Access hours corresponding to when a destination can be visited. +type WaypointOptimizationAccessHours struct { + + // Contains the ID of the starting waypoint in this connection. + // + // This member is required. + From *WaypointOptimizationAccessHoursEntry + + // Contains the ID of the ending waypoint in this connection. + // + // This member is required. + To *WaypointOptimizationAccessHoursEntry + + noSmithyDocumentSerde +} + +// Hours of entry. +type WaypointOptimizationAccessHoursEntry struct { + + // Day of the week. + // + // This member is required. + DayOfWeek DayOfWeek + + // Time of the day. + // + // This member is required. + TimeOfDay *string + + noSmithyDocumentSerde +} + +// The area to be avoided. +type WaypointOptimizationAvoidanceArea struct { + + // Geometry of the area to be avoided. + // + // This member is required. + Geometry *WaypointOptimizationAvoidanceAreaGeometry + + noSmithyDocumentSerde +} + +// Geometry of the area to be avoided. +type WaypointOptimizationAvoidanceAreaGeometry struct { + + // Geometry defined as a bounding box. The first pair represents the X and Y + // coordinates (longitude and latitude,) of the southwest corner of the bounding + // box; the second pair represents the X and Y coordinates (longitude and latitude) + // of the northeast corner. + BoundingBox []float64 + + noSmithyDocumentSerde +} + +// Options for WaypointOptimizationAvoidance. +type WaypointOptimizationAvoidanceOptions struct { + + // Areas to be avoided. + Areas []WaypointOptimizationAvoidanceArea + + // Avoidance options for cars-shuttles-trains. + CarShuttleTrains *bool + + // Avoid controlled access highways while calculating the route. + ControlledAccessHighways *bool + + // Avoid dirt roads while calculating the route. + DirtRoads *bool + + // Avoidance options for ferries. + Ferries *bool + + // Avoids roads where the specified toll transponders are the only mode of payment. + TollRoads *bool + + // Avoid tunnels while calculating the route. + Tunnels *bool + + // Avoid U-turns for calculation on highways and motorways. + UTurns *bool + + noSmithyDocumentSerde +} + +// This contains information such as distance and duration from one waypoint to +// the next waypoint in the sequence. +type WaypointOptimizationConnection struct { + + // Distance of the step. + // + // This member is required. + Distance int64 + + // contains the ID of the starting waypoint in this connection. + // + // This member is required. + From *string + + // Resting time before the driver can continue driving. + // + // This member is required. + RestDuration int64 + + // Contains the ID of the ending waypoint in this connection. + // + // This member is required. + To *string + + // Total duration. + // + // Unit: seconds + // + // This member is required. + TravelDuration int64 + + // Duration of a wait step. + // + // Unit: seconds + // + // This member is required. + WaitDuration int64 + + noSmithyDocumentSerde +} + +// Destination related options. +type WaypointOptimizationDestinationOptions struct { + + // Access hours corresponding to when a waypoint can be visited. + AccessHours *WaypointOptimizationAccessHours + + // Appointment time at the destination. + AppointmentTime *string + + // GPS Heading at the position. + Heading float64 + + // The waypoint Id. + Id *string + + // Service time spent at the destination. At an appointment, the service time + // should be the appointment duration. + // + // Unit: seconds + ServiceDuration int64 + + // Options to configure matching the provided position to a side of the street. + SideOfStreet *WaypointOptimizationSideOfStreetOptions + + noSmithyDocumentSerde +} + +// Driver related options. +type WaypointOptimizationDriverOptions struct { + + // Driver work-rest schedules defined by a short and long cycle. A rest needs to + // be taken after the short work duration. The short cycle can be repeated until + // you hit the long work duration, at which point the long rest duration should be + // taken before restarting. + RestCycles *WaypointOptimizationRestCycles + + // Pre defined rest profiles for a driver schedule. The only currently supported + // profile is EU. + RestProfile *WaypointOptimizationRestProfile + + // If the service time provided at a waypoint/destination should be considered as + // rest or work. This contributes to the total time breakdown returned within the + // response. + TreatServiceTimeAs WaypointOptimizationServiceTimeTreatment + + noSmithyDocumentSerde +} + +// Exclusion options. +type WaypointOptimizationExclusionOptions struct { + + // List of countries to be avoided defined by two-letter or three-letter country + // codes. + // + // This member is required. + Countries []string + + noSmithyDocumentSerde +} + +// The failed constraint. +type WaypointOptimizationFailedConstraint struct { + + // The failed constraint. + Constraint WaypointOptimizationConstraint + + // Reason for the failed constraint. + Reason *string + + noSmithyDocumentSerde +} + +// The impeding waypoint. +type WaypointOptimizationImpedingWaypoint struct { + + // Failed constraints for an impeding waypoint. + // + // This member is required. + FailedConstraints []WaypointOptimizationFailedConstraint + + // The waypoint Id. + // + // This member is required. + Id *string + + // Position defined as [longitude, latitude] . + // + // This member is required. + Position []float64 + + noSmithyDocumentSerde +} + +// The optimized waypoint. +type WaypointOptimizationOptimizedWaypoint struct { + + // Estimated time of departure from thr origin. + // + // Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm + // + // Examples: + // + // 2020-04-22T17:57:24Z + // + // 2020-04-22T17:57:24+02:00 + // + // This member is required. + DepartureTime *string + + // The waypoint Id. + // + // This member is required. + Id *string + + // Position defined as [longitude, latitude] . + // + // This member is required. + Position []float64 + + // Estimated time of arrival at the destination. + // + // Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm + // + // Examples: + // + // 2020-04-22T17:57:24Z + // + // 2020-04-22T17:57:24+02:00 + ArrivalTime *string + + noSmithyDocumentSerde +} + +// Options related to the origin. +type WaypointOptimizationOriginOptions struct { + + // The Origin Id. + Id *string + + noSmithyDocumentSerde +} + +// Options related to a pedestrian. +type WaypointOptimizationPedestrianOptions struct { + + // Walking speed. + // + // Unit: KilometersPerHour + Speed *float64 + + noSmithyDocumentSerde +} + +// Driver work-rest schedules defined by a short and long cycle. A rest needs to +// be taken after the short work duration. The short cycle can be repeated until +// you hit the long work duration, at which point the long rest duration should be +// taken before restarting. +// +// Unit: seconds +type WaypointOptimizationRestCycleDurations struct { + + // Resting phase of the cycle. + // + // Unit: seconds + // + // This member is required. + RestDuration int64 + + // Working phase of the cycle. + // + // Unit: seconds + // + // This member is required. + WorkDuration int64 + + noSmithyDocumentSerde +} + +// Resting phase of the cycle. +type WaypointOptimizationRestCycles struct { + + // Long cycle for a driver work-rest schedule. + // + // This member is required. + LongCycle *WaypointOptimizationRestCycleDurations + + // Short cycle for a driver work-rest schedule + // + // This member is required. + ShortCycle *WaypointOptimizationRestCycleDurations + + noSmithyDocumentSerde +} + +// Pre defined rest profiles for a driver schedule. The only currently supported +// profile is EU. +type WaypointOptimizationRestProfile struct { + + // Pre defined rest profiles for a driver schedule. The only currently supported + // profile is EU. + // + // This member is required. + Profile *string + + noSmithyDocumentSerde +} + +// Options to configure matching the provided position to a side of the street. +type WaypointOptimizationSideOfStreetOptions struct { + + // Position defined as [longitude, latitude] . + // + // This member is required. + Position []float64 + + // Strategy that defines when the side of street position should be used. + // AnyStreet will always use the provided position. + // + // Default Value: DividedStreetOnly + UseWith SideOfStreetMatchingStrategy + + noSmithyDocumentSerde +} + +// Time breakdown for the sequence. +type WaypointOptimizationTimeBreakdown struct { + + // Resting phase of the cycle. + // + // Unit: seconds + // + // This member is required. + RestDuration int64 + + // Service time spent at the destination. At an appointment, the service time + // should be the appointment duration. + // + // Unit: seconds + // + // This member is required. + ServiceDuration int64 + + // Traveling phase of the cycle. + // + // Unit: seconds + // + // This member is required. + TravelDuration int64 + + // Waiting phase of the cycle. + // + // Unit: seconds + // + // This member is required. + WaitDuration int64 + + noSmithyDocumentSerde +} + +// Options related to traffic. +type WaypointOptimizationTrafficOptions struct { + + // Determines if traffic should be used or ignored while calculating the route. + // + // Default Value: UseTrafficData + Usage TrafficUsage + + noSmithyDocumentSerde +} + +// Trailer options corresponding to the vehicle. +type WaypointOptimizationTrailerOptions struct { + + // Number of trailers attached to the vehicle. + // + // Default Value: 0 + TrailerCount *int32 + + noSmithyDocumentSerde +} + +// Travel mode related options for the provided travel mode. +type WaypointOptimizationTravelModeOptions struct { + + // Travel mode options when the provided travel mode is "Pedestrian" + Pedestrian *WaypointOptimizationPedestrianOptions + + // Travel mode options when the provided travel mode is "Truck" + Truck *WaypointOptimizationTruckOptions + + noSmithyDocumentSerde +} + +// Travel mode options when the provided travel mode is "Truck" +type WaypointOptimizationTruckOptions struct { + + // Gross weight of the vehicle including trailers, and goods at capacity. + // + // Unit: Kilograms + GrossWeight int64 + + // List of Hazardous cargo contained in the vehicle. + HazardousCargos []WaypointOptimizationHazardousCargoType + + // Height of the vehicle. + // + // Unit: centimeters + Height int64 + + // Length of the vehicle. + // + // Unit: centimeters + Length int64 + + // Trailer options corresponding to the vehicle. + Trailer *WaypointOptimizationTrailerOptions + + // Type of the truck. + TruckType WaypointOptimizationTruckType + + // The tunnel restriction code. + // + // Tunnel categories in this list indicate the restrictions which apply to certain + // tunnels in Great Britain. They relate to the types of dangerous goods that can + // be transported through them. + // + // - Tunnel Category B + // + // - Risk Level: Limited risk + // + // - Restrictions: Few restrictions + // + // - Tunnel Category C + // + // - Risk Level: Medium risk + // + // - Restrictions: Some restrictions + // + // - Tunnel Category D + // + // - Risk Level: High risk + // + // - Restrictions: Many restrictions occur + // + // - Tunnel Category E + // + // - Risk Level: Very high risk + // + // - Restrictions: Restricted tunnel + TunnelRestrictionCode *string + + // Heaviest weight per axle irrespective of the axle type or the axle group. Meant + // for usage in countries where the differences in axle types or axle groups are + // not distinguished. + // + // Unit: Kilograms + WeightPerAxle int64 + + // Width of the vehicle. + // + // Unit: centimeters + Width int64 + + noSmithyDocumentSerde +} + +// Waypoint between the Origin and Destination. +type WaypointOptimizationWaypoint struct { + + // Position defined as [longitude, latitude] . + // + // This member is required. + Position []float64 + + // Access hours corresponding to when a waypoint can be visited. + AccessHours *WaypointOptimizationAccessHours + + // Appointment time at the waypoint. + AppointmentTime *string + + // Constraint defining what waypoints are to be visited after this waypoint. + Before []int32 + + // GPS Heading at the position. + Heading float64 + + // The waypoint Id. + Id *string + + // Service time spent at the waypoint. At an appointment, the service time should + // be the appointment duration. + // + // Unit: seconds + ServiceDuration int64 + + // Options to configure matching the provided position to a side of the street. + SideOfStreet *WaypointOptimizationSideOfStreetOptions + + noSmithyDocumentSerde +} + +// Specifies the total weight for the specified axle group. Meant for usage in +// countries that have different regulations based on the axle group type. +// +// Unit: Kilograms +type WeightPerAxleGroup struct { + + // Weight for quad axle group. + // + // Unit: Kilograms + Quad int64 + + // Weight for quad quint group. + // + // Unit: Kilograms + Quint int64 + + // Weight for single axle group. + // + // Unit: Kilograms + Single int64 + + // Weight for tandem axle group. + // + // Unit: Kilograms + Tandem int64 + + // Weight for triple axle group. + // + // Unit: Kilograms + Triple int64 + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/georoutes/validators.go b/service/georoutes/validators.go new file mode 100644 index 00000000000..b67dd3b128f --- /dev/null +++ b/service/georoutes/validators.go @@ -0,0 +1,1344 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package georoutes + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/georoutes/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpCalculateIsolines struct { +} + +func (*validateOpCalculateIsolines) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCalculateIsolines) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CalculateIsolinesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCalculateIsolinesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCalculateRouteMatrix struct { +} + +func (*validateOpCalculateRouteMatrix) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCalculateRouteMatrix) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CalculateRouteMatrixInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCalculateRouteMatrixInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCalculateRoutes struct { +} + +func (*validateOpCalculateRoutes) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCalculateRoutes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CalculateRoutesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCalculateRoutesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpOptimizeWaypoints struct { +} + +func (*validateOpOptimizeWaypoints) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpOptimizeWaypoints) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*OptimizeWaypointsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpOptimizeWaypointsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpSnapToRoads struct { +} + +func (*validateOpSnapToRoads) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSnapToRoads) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SnapToRoadsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSnapToRoadsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpCalculateIsolinesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCalculateIsolines{}, middleware.After) +} + +func addOpCalculateRouteMatrixValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCalculateRouteMatrix{}, middleware.After) +} + +func addOpCalculateRoutesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCalculateRoutes{}, middleware.After) +} + +func addOpOptimizeWaypointsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpOptimizeWaypoints{}, middleware.After) +} + +func addOpSnapToRoadsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSnapToRoads{}, middleware.After) +} + +func validateCircle(v *types.Circle) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Circle"} + if v.Center == nil { + invalidParams.Add(smithy.NewErrParamRequired("Center")) + } + if v.Radius == nil { + invalidParams.Add(smithy.NewErrParamRequired("Radius")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCorridor(v *types.Corridor) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Corridor"} + if v.LineString == nil { + invalidParams.Add(smithy.NewErrParamRequired("LineString")) + } + if v.Radius == nil { + invalidParams.Add(smithy.NewErrParamRequired("Radius")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIsolineAvoidanceArea(v *types.IsolineAvoidanceArea) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IsolineAvoidanceArea"} + if v.Except != nil { + if err := validateIsolineAvoidanceAreaGeometryList(v.Except); err != nil { + invalidParams.AddNested("Except", err.(smithy.InvalidParamsError)) + } + } + if v.Geometry == nil { + invalidParams.Add(smithy.NewErrParamRequired("Geometry")) + } else if v.Geometry != nil { + if err := validateIsolineAvoidanceAreaGeometry(v.Geometry); err != nil { + invalidParams.AddNested("Geometry", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIsolineAvoidanceAreaGeometry(v *types.IsolineAvoidanceAreaGeometry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IsolineAvoidanceAreaGeometry"} + if v.Corridor != nil { + if err := validateCorridor(v.Corridor); err != nil { + invalidParams.AddNested("Corridor", err.(smithy.InvalidParamsError)) + } + } + if v.PolylineCorridor != nil { + if err := validatePolylineCorridor(v.PolylineCorridor); err != nil { + invalidParams.AddNested("PolylineCorridor", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIsolineAvoidanceAreaGeometryList(v []types.IsolineAvoidanceAreaGeometry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IsolineAvoidanceAreaGeometryList"} + for i := range v { + if err := validateIsolineAvoidanceAreaGeometry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIsolineAvoidanceAreaList(v []types.IsolineAvoidanceArea) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IsolineAvoidanceAreaList"} + for i := range v { + if err := validateIsolineAvoidanceArea(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIsolineAvoidanceOptions(v *types.IsolineAvoidanceOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IsolineAvoidanceOptions"} + if v.Areas != nil { + if err := validateIsolineAvoidanceAreaList(v.Areas); err != nil { + invalidParams.AddNested("Areas", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIsolineDestinationOptions(v *types.IsolineDestinationOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IsolineDestinationOptions"} + if v.SideOfStreet != nil { + if err := validateIsolineSideOfStreetOptions(v.SideOfStreet); err != nil { + invalidParams.AddNested("SideOfStreet", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIsolineOriginOptions(v *types.IsolineOriginOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IsolineOriginOptions"} + if v.SideOfStreet != nil { + if err := validateIsolineSideOfStreetOptions(v.SideOfStreet); err != nil { + invalidParams.AddNested("SideOfStreet", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIsolineSideOfStreetOptions(v *types.IsolineSideOfStreetOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IsolineSideOfStreetOptions"} + if v.Position == nil { + invalidParams.Add(smithy.NewErrParamRequired("Position")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePolylineCorridor(v *types.PolylineCorridor) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PolylineCorridor"} + if v.Polyline == nil { + invalidParams.Add(smithy.NewErrParamRequired("Polyline")) + } + if v.Radius == nil { + invalidParams.Add(smithy.NewErrParamRequired("Radius")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRoadSnapTracePoint(v *types.RoadSnapTracePoint) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RoadSnapTracePoint"} + if v.Position == nil { + invalidParams.Add(smithy.NewErrParamRequired("Position")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRoadSnapTracePointList(v []types.RoadSnapTracePoint) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RoadSnapTracePointList"} + for i := range v { + if err := validateRoadSnapTracePoint(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteAvoidanceArea(v *types.RouteAvoidanceArea) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteAvoidanceArea"} + if v.Except != nil { + if err := validateRouteAvoidanceAreaGeometryList(v.Except); err != nil { + invalidParams.AddNested("Except", err.(smithy.InvalidParamsError)) + } + } + if v.Geometry == nil { + invalidParams.Add(smithy.NewErrParamRequired("Geometry")) + } else if v.Geometry != nil { + if err := validateRouteAvoidanceAreaGeometry(v.Geometry); err != nil { + invalidParams.AddNested("Geometry", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteAvoidanceAreaGeometry(v *types.RouteAvoidanceAreaGeometry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteAvoidanceAreaGeometry"} + if v.Corridor != nil { + if err := validateCorridor(v.Corridor); err != nil { + invalidParams.AddNested("Corridor", err.(smithy.InvalidParamsError)) + } + } + if v.PolylineCorridor != nil { + if err := validatePolylineCorridor(v.PolylineCorridor); err != nil { + invalidParams.AddNested("PolylineCorridor", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteAvoidanceAreaGeometryList(v []types.RouteAvoidanceAreaGeometry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteAvoidanceAreaGeometryList"} + for i := range v { + if err := validateRouteAvoidanceAreaGeometry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteAvoidanceAreaList(v []types.RouteAvoidanceArea) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteAvoidanceAreaList"} + for i := range v { + if err := validateRouteAvoidanceArea(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteAvoidanceOptions(v *types.RouteAvoidanceOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteAvoidanceOptions"} + if v.Areas != nil { + if err := validateRouteAvoidanceAreaList(v.Areas); err != nil { + invalidParams.AddNested("Areas", err.(smithy.InvalidParamsError)) + } + } + if v.ZoneCategories != nil { + if err := validateRouteAvoidanceZoneCategoryList(v.ZoneCategories); err != nil { + invalidParams.AddNested("ZoneCategories", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteAvoidanceZoneCategory(v *types.RouteAvoidanceZoneCategory) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteAvoidanceZoneCategory"} + if len(v.Category) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Category")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteAvoidanceZoneCategoryList(v []types.RouteAvoidanceZoneCategory) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteAvoidanceZoneCategoryList"} + for i := range v { + if err := validateRouteAvoidanceZoneCategory(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteDestinationOptions(v *types.RouteDestinationOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteDestinationOptions"} + if v.SideOfStreet != nil { + if err := validateRouteSideOfStreetOptions(v.SideOfStreet); err != nil { + invalidParams.AddNested("SideOfStreet", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteDriverOptions(v *types.RouteDriverOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteDriverOptions"} + if v.Schedule != nil { + if err := validateRouteDriverScheduleIntervalList(v.Schedule); err != nil { + invalidParams.AddNested("Schedule", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteDriverScheduleInterval(v *types.RouteDriverScheduleInterval) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteDriverScheduleInterval"} + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteDriverScheduleIntervalList(v []types.RouteDriverScheduleInterval) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteDriverScheduleIntervalList"} + for i := range v { + if err := validateRouteDriverScheduleInterval(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteEmissionType(v *types.RouteEmissionType) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteEmissionType"} + if v.Type == nil { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteExclusionOptions(v *types.RouteExclusionOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteExclusionOptions"} + if v.Countries == nil { + invalidParams.Add(smithy.NewErrParamRequired("Countries")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteMatrixAvoidanceArea(v *types.RouteMatrixAvoidanceArea) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteMatrixAvoidanceArea"} + if v.Geometry == nil { + invalidParams.Add(smithy.NewErrParamRequired("Geometry")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteMatrixAvoidanceAreaList(v []types.RouteMatrixAvoidanceArea) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteMatrixAvoidanceAreaList"} + for i := range v { + if err := validateRouteMatrixAvoidanceArea(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteMatrixAvoidanceOptions(v *types.RouteMatrixAvoidanceOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteMatrixAvoidanceOptions"} + if v.Areas != nil { + if err := validateRouteMatrixAvoidanceAreaList(v.Areas); err != nil { + invalidParams.AddNested("Areas", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteMatrixBoundary(v *types.RouteMatrixBoundary) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteMatrixBoundary"} + if v.Geometry != nil { + if err := validateRouteMatrixBoundaryGeometry(v.Geometry); err != nil { + invalidParams.AddNested("Geometry", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteMatrixBoundaryGeometry(v *types.RouteMatrixBoundaryGeometry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteMatrixBoundaryGeometry"} + if v.Circle != nil { + if err := validateCircle(v.Circle); err != nil { + invalidParams.AddNested("Circle", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteMatrixDestination(v *types.RouteMatrixDestination) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteMatrixDestination"} + if v.Options != nil { + if err := validateRouteMatrixDestinationOptions(v.Options); err != nil { + invalidParams.AddNested("Options", err.(smithy.InvalidParamsError)) + } + } + if v.Position == nil { + invalidParams.Add(smithy.NewErrParamRequired("Position")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteMatrixDestinationList(v []types.RouteMatrixDestination) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteMatrixDestinationList"} + for i := range v { + if err := validateRouteMatrixDestination(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteMatrixDestinationOptions(v *types.RouteMatrixDestinationOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteMatrixDestinationOptions"} + if v.SideOfStreet != nil { + if err := validateRouteMatrixSideOfStreetOptions(v.SideOfStreet); err != nil { + invalidParams.AddNested("SideOfStreet", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteMatrixExclusionOptions(v *types.RouteMatrixExclusionOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteMatrixExclusionOptions"} + if v.Countries == nil { + invalidParams.Add(smithy.NewErrParamRequired("Countries")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteMatrixOrigin(v *types.RouteMatrixOrigin) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteMatrixOrigin"} + if v.Options != nil { + if err := validateRouteMatrixOriginOptions(v.Options); err != nil { + invalidParams.AddNested("Options", err.(smithy.InvalidParamsError)) + } + } + if v.Position == nil { + invalidParams.Add(smithy.NewErrParamRequired("Position")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteMatrixOriginList(v []types.RouteMatrixOrigin) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteMatrixOriginList"} + for i := range v { + if err := validateRouteMatrixOrigin(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteMatrixOriginOptions(v *types.RouteMatrixOriginOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteMatrixOriginOptions"} + if v.SideOfStreet != nil { + if err := validateRouteMatrixSideOfStreetOptions(v.SideOfStreet); err != nil { + invalidParams.AddNested("SideOfStreet", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteMatrixSideOfStreetOptions(v *types.RouteMatrixSideOfStreetOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteMatrixSideOfStreetOptions"} + if v.Position == nil { + invalidParams.Add(smithy.NewErrParamRequired("Position")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteOriginOptions(v *types.RouteOriginOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteOriginOptions"} + if v.SideOfStreet != nil { + if err := validateRouteSideOfStreetOptions(v.SideOfStreet); err != nil { + invalidParams.AddNested("SideOfStreet", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteSideOfStreetOptions(v *types.RouteSideOfStreetOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteSideOfStreetOptions"} + if v.Position == nil { + invalidParams.Add(smithy.NewErrParamRequired("Position")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteTollOptions(v *types.RouteTollOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteTollOptions"} + if v.EmissionType != nil { + if err := validateRouteEmissionType(v.EmissionType); err != nil { + invalidParams.AddNested("EmissionType", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteWaypoint(v *types.RouteWaypoint) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteWaypoint"} + if v.Position == nil { + invalidParams.Add(smithy.NewErrParamRequired("Position")) + } + if v.SideOfStreet != nil { + if err := validateRouteSideOfStreetOptions(v.SideOfStreet); err != nil { + invalidParams.AddNested("SideOfStreet", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRouteWaypointList(v []types.RouteWaypoint) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RouteWaypointList"} + for i := range v { + if err := validateRouteWaypoint(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateWaypointOptimizationAccessHours(v *types.WaypointOptimizationAccessHours) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "WaypointOptimizationAccessHours"} + if v.From == nil { + invalidParams.Add(smithy.NewErrParamRequired("From")) + } else if v.From != nil { + if err := validateWaypointOptimizationAccessHoursEntry(v.From); err != nil { + invalidParams.AddNested("From", err.(smithy.InvalidParamsError)) + } + } + if v.To == nil { + invalidParams.Add(smithy.NewErrParamRequired("To")) + } else if v.To != nil { + if err := validateWaypointOptimizationAccessHoursEntry(v.To); err != nil { + invalidParams.AddNested("To", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateWaypointOptimizationAccessHoursEntry(v *types.WaypointOptimizationAccessHoursEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "WaypointOptimizationAccessHoursEntry"} + if len(v.DayOfWeek) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("DayOfWeek")) + } + if v.TimeOfDay == nil { + invalidParams.Add(smithy.NewErrParamRequired("TimeOfDay")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateWaypointOptimizationAvoidanceArea(v *types.WaypointOptimizationAvoidanceArea) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "WaypointOptimizationAvoidanceArea"} + if v.Geometry == nil { + invalidParams.Add(smithy.NewErrParamRequired("Geometry")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateWaypointOptimizationAvoidanceAreaList(v []types.WaypointOptimizationAvoidanceArea) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "WaypointOptimizationAvoidanceAreaList"} + for i := range v { + if err := validateWaypointOptimizationAvoidanceArea(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateWaypointOptimizationAvoidanceOptions(v *types.WaypointOptimizationAvoidanceOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "WaypointOptimizationAvoidanceOptions"} + if v.Areas != nil { + if err := validateWaypointOptimizationAvoidanceAreaList(v.Areas); err != nil { + invalidParams.AddNested("Areas", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateWaypointOptimizationDestinationOptions(v *types.WaypointOptimizationDestinationOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "WaypointOptimizationDestinationOptions"} + if v.AccessHours != nil { + if err := validateWaypointOptimizationAccessHours(v.AccessHours); err != nil { + invalidParams.AddNested("AccessHours", err.(smithy.InvalidParamsError)) + } + } + if v.SideOfStreet != nil { + if err := validateWaypointOptimizationSideOfStreetOptions(v.SideOfStreet); err != nil { + invalidParams.AddNested("SideOfStreet", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateWaypointOptimizationDriverOptions(v *types.WaypointOptimizationDriverOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "WaypointOptimizationDriverOptions"} + if v.RestCycles != nil { + if err := validateWaypointOptimizationRestCycles(v.RestCycles); err != nil { + invalidParams.AddNested("RestCycles", err.(smithy.InvalidParamsError)) + } + } + if v.RestProfile != nil { + if err := validateWaypointOptimizationRestProfile(v.RestProfile); err != nil { + invalidParams.AddNested("RestProfile", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateWaypointOptimizationExclusionOptions(v *types.WaypointOptimizationExclusionOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "WaypointOptimizationExclusionOptions"} + if v.Countries == nil { + invalidParams.Add(smithy.NewErrParamRequired("Countries")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateWaypointOptimizationRestCycleDurations(v *types.WaypointOptimizationRestCycleDurations) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "WaypointOptimizationRestCycleDurations"} + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateWaypointOptimizationRestCycles(v *types.WaypointOptimizationRestCycles) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "WaypointOptimizationRestCycles"} + if v.LongCycle == nil { + invalidParams.Add(smithy.NewErrParamRequired("LongCycle")) + } else if v.LongCycle != nil { + if err := validateWaypointOptimizationRestCycleDurations(v.LongCycle); err != nil { + invalidParams.AddNested("LongCycle", err.(smithy.InvalidParamsError)) + } + } + if v.ShortCycle == nil { + invalidParams.Add(smithy.NewErrParamRequired("ShortCycle")) + } else if v.ShortCycle != nil { + if err := validateWaypointOptimizationRestCycleDurations(v.ShortCycle); err != nil { + invalidParams.AddNested("ShortCycle", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateWaypointOptimizationRestProfile(v *types.WaypointOptimizationRestProfile) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "WaypointOptimizationRestProfile"} + if v.Profile == nil { + invalidParams.Add(smithy.NewErrParamRequired("Profile")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateWaypointOptimizationSideOfStreetOptions(v *types.WaypointOptimizationSideOfStreetOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "WaypointOptimizationSideOfStreetOptions"} + if v.Position == nil { + invalidParams.Add(smithy.NewErrParamRequired("Position")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateWaypointOptimizationWaypoint(v *types.WaypointOptimizationWaypoint) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "WaypointOptimizationWaypoint"} + if v.AccessHours != nil { + if err := validateWaypointOptimizationAccessHours(v.AccessHours); err != nil { + invalidParams.AddNested("AccessHours", err.(smithy.InvalidParamsError)) + } + } + if v.Position == nil { + invalidParams.Add(smithy.NewErrParamRequired("Position")) + } + if v.SideOfStreet != nil { + if err := validateWaypointOptimizationSideOfStreetOptions(v.SideOfStreet); err != nil { + invalidParams.AddNested("SideOfStreet", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateWaypointOptimizationWaypointList(v []types.WaypointOptimizationWaypoint) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "WaypointOptimizationWaypointList"} + for i := range v { + if err := validateWaypointOptimizationWaypoint(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCalculateIsolinesInput(v *CalculateIsolinesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CalculateIsolinesInput"} + if v.Avoid != nil { + if err := validateIsolineAvoidanceOptions(v.Avoid); err != nil { + invalidParams.AddNested("Avoid", err.(smithy.InvalidParamsError)) + } + } + if v.DestinationOptions != nil { + if err := validateIsolineDestinationOptions(v.DestinationOptions); err != nil { + invalidParams.AddNested("DestinationOptions", err.(smithy.InvalidParamsError)) + } + } + if v.OriginOptions != nil { + if err := validateIsolineOriginOptions(v.OriginOptions); err != nil { + invalidParams.AddNested("OriginOptions", err.(smithy.InvalidParamsError)) + } + } + if v.Thresholds == nil { + invalidParams.Add(smithy.NewErrParamRequired("Thresholds")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCalculateRouteMatrixInput(v *CalculateRouteMatrixInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CalculateRouteMatrixInput"} + if v.Avoid != nil { + if err := validateRouteMatrixAvoidanceOptions(v.Avoid); err != nil { + invalidParams.AddNested("Avoid", err.(smithy.InvalidParamsError)) + } + } + if v.Destinations == nil { + invalidParams.Add(smithy.NewErrParamRequired("Destinations")) + } else if v.Destinations != nil { + if err := validateRouteMatrixDestinationList(v.Destinations); err != nil { + invalidParams.AddNested("Destinations", err.(smithy.InvalidParamsError)) + } + } + if v.Exclude != nil { + if err := validateRouteMatrixExclusionOptions(v.Exclude); err != nil { + invalidParams.AddNested("Exclude", err.(smithy.InvalidParamsError)) + } + } + if v.Origins == nil { + invalidParams.Add(smithy.NewErrParamRequired("Origins")) + } else if v.Origins != nil { + if err := validateRouteMatrixOriginList(v.Origins); err != nil { + invalidParams.AddNested("Origins", err.(smithy.InvalidParamsError)) + } + } + if v.RoutingBoundary == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoutingBoundary")) + } else if v.RoutingBoundary != nil { + if err := validateRouteMatrixBoundary(v.RoutingBoundary); err != nil { + invalidParams.AddNested("RoutingBoundary", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCalculateRoutesInput(v *CalculateRoutesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CalculateRoutesInput"} + if v.Avoid != nil { + if err := validateRouteAvoidanceOptions(v.Avoid); err != nil { + invalidParams.AddNested("Avoid", err.(smithy.InvalidParamsError)) + } + } + if v.Destination == nil { + invalidParams.Add(smithy.NewErrParamRequired("Destination")) + } + if v.DestinationOptions != nil { + if err := validateRouteDestinationOptions(v.DestinationOptions); err != nil { + invalidParams.AddNested("DestinationOptions", err.(smithy.InvalidParamsError)) + } + } + if v.Driver != nil { + if err := validateRouteDriverOptions(v.Driver); err != nil { + invalidParams.AddNested("Driver", err.(smithy.InvalidParamsError)) + } + } + if v.Exclude != nil { + if err := validateRouteExclusionOptions(v.Exclude); err != nil { + invalidParams.AddNested("Exclude", err.(smithy.InvalidParamsError)) + } + } + if v.Origin == nil { + invalidParams.Add(smithy.NewErrParamRequired("Origin")) + } + if v.OriginOptions != nil { + if err := validateRouteOriginOptions(v.OriginOptions); err != nil { + invalidParams.AddNested("OriginOptions", err.(smithy.InvalidParamsError)) + } + } + if v.Tolls != nil { + if err := validateRouteTollOptions(v.Tolls); err != nil { + invalidParams.AddNested("Tolls", err.(smithy.InvalidParamsError)) + } + } + if v.Waypoints != nil { + if err := validateRouteWaypointList(v.Waypoints); err != nil { + invalidParams.AddNested("Waypoints", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpOptimizeWaypointsInput(v *OptimizeWaypointsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OptimizeWaypointsInput"} + if v.Avoid != nil { + if err := validateWaypointOptimizationAvoidanceOptions(v.Avoid); err != nil { + invalidParams.AddNested("Avoid", err.(smithy.InvalidParamsError)) + } + } + if v.DestinationOptions != nil { + if err := validateWaypointOptimizationDestinationOptions(v.DestinationOptions); err != nil { + invalidParams.AddNested("DestinationOptions", err.(smithy.InvalidParamsError)) + } + } + if v.Driver != nil { + if err := validateWaypointOptimizationDriverOptions(v.Driver); err != nil { + invalidParams.AddNested("Driver", err.(smithy.InvalidParamsError)) + } + } + if v.Exclude != nil { + if err := validateWaypointOptimizationExclusionOptions(v.Exclude); err != nil { + invalidParams.AddNested("Exclude", err.(smithy.InvalidParamsError)) + } + } + if v.Origin == nil { + invalidParams.Add(smithy.NewErrParamRequired("Origin")) + } + if v.Waypoints != nil { + if err := validateWaypointOptimizationWaypointList(v.Waypoints); err != nil { + invalidParams.AddNested("Waypoints", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpSnapToRoadsInput(v *SnapToRoadsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SnapToRoadsInput"} + if v.TracePoints == nil { + invalidParams.Add(smithy.NewErrParamRequired("TracePoints")) + } else if v.TracePoints != nil { + if err := validateRoadSnapTracePointList(v.TracePoints); err != nil { + invalidParams.AddNested("TracePoints", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/keyspaces/api_op_CreateKeyspace.go b/service/keyspaces/api_op_CreateKeyspace.go index 4787a848d73..088f6945020 100644 --- a/service/keyspaces/api_op_CreateKeyspace.go +++ b/service/keyspaces/api_op_CreateKeyspace.go @@ -17,9 +17,9 @@ import ( // CreateKeyspace is an asynchronous operation. You can monitor the creation // status of the new keyspace by using the GetKeyspace operation. // -// For more information, see [Creating keyspaces] in the Amazon Keyspaces Developer Guide. +// For more information, see [Create a keyspace] in the Amazon Keyspaces Developer Guide. // -// [Creating keyspaces]: https://docs.aws.amazon.com/keyspaces/latest/devguide/working-with-keyspaces.html#keyspaces-create +// [Create a keyspace]: https://docs.aws.amazon.com/keyspaces/latest/devguide/getting-started.keyspaces.html func (c *Client) CreateKeyspace(ctx context.Context, params *CreateKeyspaceInput, optFns ...func(*Options)) (*CreateKeyspaceOutput, error) { if params == nil { params = &CreateKeyspaceInput{} diff --git a/service/keyspaces/api_op_CreateTable.go b/service/keyspaces/api_op_CreateTable.go index 497e2e5a456..3f46a440bc0 100644 --- a/service/keyspaces/api_op_CreateTable.go +++ b/service/keyspaces/api_op_CreateTable.go @@ -19,9 +19,9 @@ import ( // the new table by using the GetTable operation, which returns the current status // of the table. You can start using a table when the status is ACTIVE . // -// For more information, see [Creating tables] in the Amazon Keyspaces Developer Guide. +// For more information, see [Create a table] in the Amazon Keyspaces Developer Guide. // -// [Creating tables]: https://docs.aws.amazon.com/keyspaces/latest/devguide/working-with-tables.html#tables-create +// [Create a table]: https://docs.aws.amazon.com/keyspaces/latest/devguide/getting-started.tables.html func (c *Client) CreateTable(ctx context.Context, params *CreateTableInput, optFns ...func(*Options)) (*CreateTableOutput, error) { if params == nil { params = &CreateTableInput{} diff --git a/service/keyspaces/api_op_CreateType.go b/service/keyspaces/api_op_CreateType.go new file mode 100644 index 00000000000..d32c58d9ca1 --- /dev/null +++ b/service/keyspaces/api_op_CreateType.go @@ -0,0 +1,196 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package keyspaces + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/keyspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// The CreateType operation creates a new user-defined type in the specified +// +// keyspace. +// +// For more information, see [User-defined types (UDTs)] in the Amazon Keyspaces Developer Guide. +// +// [User-defined types (UDTs)]: https://docs.aws.amazon.com/keyspaces/latest/devguide/udts.html +func (c *Client) CreateType(ctx context.Context, params *CreateTypeInput, optFns ...func(*Options)) (*CreateTypeOutput, error) { + if params == nil { + params = &CreateTypeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateType", params, optFns, c.addOperationCreateTypeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateTypeOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateTypeInput struct { + + // The field definitions, consisting of names and types, that define this type. + // + // This member is required. + FieldDefinitions []types.FieldDefinition + + // The name of the keyspace. + // + // This member is required. + KeyspaceName *string + + // The name of the user-defined type. + // + // UDT names must contain 48 characters or less, must begin with an alphabetic + // character, and can only contain alpha-numeric characters and underscores. Amazon + // Keyspaces converts upper case characters automatically into lower case + // characters. + // + // Alternatively, you can declare a UDT name in double quotes. When declaring a + // UDT name inside double quotes, Amazon Keyspaces preserves upper casing and + // allows special characters. + // + // You can also use double quotes as part of the name when you create the UDT, but + // you must escape each double quote character with an additional double quote + // character. + // + // This member is required. + TypeName *string + + noSmithyDocumentSerde +} + +type CreateTypeOutput struct { + + // The unique identifier of the keyspace that contains the new type in the format + // of an Amazon Resource Name (ARN). + // + // This member is required. + KeyspaceArn *string + + // The formatted name of the user-defined type that was created. Note that Amazon + // Keyspaces requires the formatted name of the type for other operations, for + // example GetType . + // + // This member is required. + TypeName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateTypeMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateType{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateType{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateType"); 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 = addSpanRetryLoop(stack, options); 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 = addOpCreateTypeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateType(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateType(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateType", + } +} diff --git a/service/keyspaces/api_op_DeleteType.go b/service/keyspaces/api_op_DeleteType.go new file mode 100644 index 00000000000..be7fc963a68 --- /dev/null +++ b/service/keyspaces/api_op_DeleteType.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package keyspaces + +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" +) + +// The DeleteType operation deletes a user-defined type (UDT). You can only +// +// delete a type that is not used in a table or another UDT. +func (c *Client) DeleteType(ctx context.Context, params *DeleteTypeInput, optFns ...func(*Options)) (*DeleteTypeOutput, error) { + if params == nil { + params = &DeleteTypeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteType", params, optFns, c.addOperationDeleteTypeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteTypeOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteTypeInput struct { + + // The name of the keyspace of the to be deleted type. + // + // This member is required. + KeyspaceName *string + + // The name of the type to be deleted. + // + // This member is required. + TypeName *string + + noSmithyDocumentSerde +} + +type DeleteTypeOutput struct { + + // The unique identifier of the keyspace from which the type was deleted in the + // format of an Amazon Resource Name (ARN). + // + // This member is required. + KeyspaceArn *string + + // The name of the type that was deleted. + // + // This member is required. + TypeName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteTypeMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteType{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteType{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteType"); 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 = addSpanRetryLoop(stack, options); 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 = addOpDeleteTypeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteType(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteType(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteType", + } +} diff --git a/service/keyspaces/api_op_GetTable.go b/service/keyspaces/api_op_GetTable.go index 8a6e24d18ec..17186db80b6 100644 --- a/service/keyspaces/api_op_GetTable.go +++ b/service/keyspaces/api_op_GetTable.go @@ -15,8 +15,8 @@ import ( // Returns information about the table, including the table's name and current // status, the keyspace name, configuration settings, and metadata. // -// To read table metadata using GetTable , Select action permissions for the table -// and system tables are required to complete the operation. +// To read table metadata using GetTable , the IAM principal needs Select action +// permissions for the table and the system keyspace. func (c *Client) GetTable(ctx context.Context, params *GetTableInput, optFns ...func(*Options)) (*GetTableOutput, error) { if params == nil { params = &GetTableInput{} diff --git a/service/keyspaces/api_op_GetType.go b/service/keyspaces/api_op_GetType.go new file mode 100644 index 00000000000..4a1f0d95e69 --- /dev/null +++ b/service/keyspaces/api_op_GetType.go @@ -0,0 +1,204 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package keyspaces + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/keyspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// The GetType operation returns information about the type, for example the +// +// field definitions, the timestamp when the type was last modified, the level of +// nesting, the status, and details about if the type is used in other types and +// tables. +// +// To read keyspace metadata using GetType , the IAM principal needs Select action +// permissions for the system keyspace. +func (c *Client) GetType(ctx context.Context, params *GetTypeInput, optFns ...func(*Options)) (*GetTypeOutput, error) { + if params == nil { + params = &GetTypeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetType", params, optFns, c.addOperationGetTypeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetTypeOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetTypeInput struct { + + // The name of the keyspace that contains this type. + // + // This member is required. + KeyspaceName *string + + // The formatted name of the type. For example, if the name of the type was + // created without double quotes, Amazon Keyspaces saved the name in lower-case + // characters. If the name was created in double quotes, you must use double quotes + // to specify the type name. + // + // This member is required. + TypeName *string + + noSmithyDocumentSerde +} + +type GetTypeOutput struct { + + // The unique identifier of the keyspace that contains this type in the format of + // an Amazon Resource Name (ARN). + // + // This member is required. + KeyspaceArn *string + + // The name of the keyspace that contains this type. + // + // This member is required. + KeyspaceName *string + + // The name of the type. + // + // This member is required. + TypeName *string + + // The types that use this type. + DirectParentTypes []string + + // The tables that use this type. + DirectReferringTables []string + + // The names and types that define this type. + FieldDefinitions []types.FieldDefinition + + // The timestamp that shows when this type was last modified. + LastModifiedTimestamp *time.Time + + // The level of nesting implemented for this type. + MaxNestingDepth int32 + + // The status of this type. + Status types.TypeStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetTypeMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetType{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetType{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetType"); 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 = addSpanRetryLoop(stack, options); 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 = addOpGetTypeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetType(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetType(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetType", + } +} diff --git a/service/keyspaces/api_op_ListKeyspaces.go b/service/keyspaces/api_op_ListKeyspaces.go index 9df214fe515..6bb47d73246 100644 --- a/service/keyspaces/api_op_ListKeyspaces.go +++ b/service/keyspaces/api_op_ListKeyspaces.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns a list of keyspaces. +// The ListKeyspaces operation returns a list of keyspaces. func (c *Client) ListKeyspaces(ctx context.Context, params *ListKeyspacesInput, optFns ...func(*Options)) (*ListKeyspacesOutput, error) { if params == nil { params = &ListKeyspacesInput{} diff --git a/service/keyspaces/api_op_ListTables.go b/service/keyspaces/api_op_ListTables.go index f1f0df84d32..a9dc5841469 100644 --- a/service/keyspaces/api_op_ListTables.go +++ b/service/keyspaces/api_op_ListTables.go @@ -11,7 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns a list of tables for a specified keyspace. +// The ListTables operation returns a list of tables for a specified keyspace. +// +// To read keyspace metadata using ListTables , the IAM principal needs Select +// action permissions for the system keyspace. func (c *Client) ListTables(ctx context.Context, params *ListTablesInput, optFns ...func(*Options)) (*ListTablesOutput, error) { if params == nil { params = &ListTablesInput{} diff --git a/service/keyspaces/api_op_ListTagsForResource.go b/service/keyspaces/api_op_ListTagsForResource.go index 8526f0abc3e..3171cdb28b9 100644 --- a/service/keyspaces/api_op_ListTagsForResource.go +++ b/service/keyspaces/api_op_ListTagsForResource.go @@ -13,6 +13,9 @@ import ( // Returns a list of all tags associated with the specified Amazon Keyspaces // resource. +// +// To read keyspace metadata using ListTagsForResource , the IAM principal needs +// Select action permissions for the specified resource and the system keyspace. func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if params == nil { params = &ListTagsForResourceInput{} diff --git a/service/keyspaces/api_op_ListTypes.go b/service/keyspaces/api_op_ListTypes.go new file mode 100644 index 00000000000..9ba7e6db049 --- /dev/null +++ b/service/keyspaces/api_op_ListTypes.go @@ -0,0 +1,270 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package keyspaces + +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" +) + +// The ListTypes operation returns a list of types for a specified keyspace. +// +// To read keyspace metadata using ListTypes , the IAM principal needs Select +// action permissions for the system keyspace. +func (c *Client) ListTypes(ctx context.Context, params *ListTypesInput, optFns ...func(*Options)) (*ListTypesOutput, error) { + if params == nil { + params = &ListTypesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTypes", params, optFns, c.addOperationListTypesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTypesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTypesInput struct { + + // The name of the keyspace that contains the listed types. + // + // This member is required. + KeyspaceName *string + + // The total number of types to return in the output. If the total number of + // types available is more than the value specified, a NextToken is provided in + // the output. To resume pagination, provide the NextToken value as an argument of + // a subsequent API invocation. + MaxResults *int32 + + // The pagination token. To resume pagination, provide the NextToken value as an + // argument of a subsequent API invocation. + NextToken *string + + noSmithyDocumentSerde +} + +type ListTypesOutput struct { + + // The list of types contained in the specified keyspace. + // + // This member is required. + Types []string + + // The pagination token. To resume pagination, provide the NextToken value as an + // argument of a subsequent API invocation. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTypesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListTypes{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListTypes{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListTypes"); 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 = addSpanRetryLoop(stack, options); 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 = addOpListTypesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTypes(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListTypesPaginatorOptions is the paginator options for ListTypes +type ListTypesPaginatorOptions struct { + // The total number of types to return in the output. If the total number of + // types available is more than the value specified, a NextToken is provided in + // the output. To resume pagination, provide the NextToken value as an argument of + // a subsequent API invocation. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListTypesPaginator is a paginator for ListTypes +type ListTypesPaginator struct { + options ListTypesPaginatorOptions + client ListTypesAPIClient + params *ListTypesInput + nextToken *string + firstPage bool +} + +// NewListTypesPaginator returns a new ListTypesPaginator +func NewListTypesPaginator(client ListTypesAPIClient, params *ListTypesInput, optFns ...func(*ListTypesPaginatorOptions)) *ListTypesPaginator { + if params == nil { + params = &ListTypesInput{} + } + + options := ListTypesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListTypesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListTypesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListTypes page. +func (p *ListTypesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTypesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListTypes(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListTypesAPIClient is a client that implements the ListTypes operation. +type ListTypesAPIClient interface { + ListTypes(context.Context, *ListTypesInput, ...func(*Options)) (*ListTypesOutput, error) +} + +var _ ListTypesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListTypes(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListTypes", + } +} diff --git a/service/keyspaces/deserializers.go b/service/keyspaces/deserializers.go index 15e7038ebac..e394aba8815 100644 --- a/service/keyspaces/deserializers.go +++ b/service/keyspaces/deserializers.go @@ -279,14 +279,14 @@ func awsAwsjson10_deserializeOpErrorCreateTable(response *smithyhttp.Response, m } } -type awsAwsjson10_deserializeOpDeleteKeyspace struct { +type awsAwsjson10_deserializeOpCreateType struct { } -func (*awsAwsjson10_deserializeOpDeleteKeyspace) ID() string { +func (*awsAwsjson10_deserializeOpCreateType) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteKeyspace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateType) 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) @@ -304,9 +304,9 @@ func (m *awsAwsjson10_deserializeOpDeleteKeyspace) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteKeyspace(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateType(response, &metadata) } - output := &DeleteKeyspaceOutput{} + output := &CreateTypeOutput{} out.Result = output var buff [1024]byte @@ -326,7 +326,7 @@ func (m *awsAwsjson10_deserializeOpDeleteKeyspace) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteKeyspaceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateTypeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -340,7 +340,7 @@ func (m *awsAwsjson10_deserializeOpDeleteKeyspace) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteKeyspace(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateType(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)} @@ -405,14 +405,14 @@ func awsAwsjson10_deserializeOpErrorDeleteKeyspace(response *smithyhttp.Response } } -type awsAwsjson10_deserializeOpDeleteTable struct { +type awsAwsjson10_deserializeOpDeleteKeyspace struct { } -func (*awsAwsjson10_deserializeOpDeleteTable) ID() string { +func (*awsAwsjson10_deserializeOpDeleteKeyspace) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteKeyspace) 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) @@ -430,9 +430,9 @@ func (m *awsAwsjson10_deserializeOpDeleteTable) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteTable(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteKeyspace(response, &metadata) } - output := &DeleteTableOutput{} + output := &DeleteKeyspaceOutput{} out.Result = output var buff [1024]byte @@ -452,7 +452,7 @@ func (m *awsAwsjson10_deserializeOpDeleteTable) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteTableOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteKeyspaceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -466,7 +466,7 @@ func (m *awsAwsjson10_deserializeOpDeleteTable) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteKeyspace(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)} @@ -531,14 +531,14 @@ func awsAwsjson10_deserializeOpErrorDeleteTable(response *smithyhttp.Response, m } } -type awsAwsjson10_deserializeOpGetKeyspace struct { +type awsAwsjson10_deserializeOpDeleteTable struct { } -func (*awsAwsjson10_deserializeOpGetKeyspace) ID() string { +func (*awsAwsjson10_deserializeOpDeleteTable) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetKeyspace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteTable) 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) @@ -556,9 +556,9 @@ func (m *awsAwsjson10_deserializeOpGetKeyspace) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetKeyspace(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteTable(response, &metadata) } - output := &GetKeyspaceOutput{} + output := &DeleteTableOutput{} out.Result = output var buff [1024]byte @@ -578,7 +578,7 @@ func (m *awsAwsjson10_deserializeOpGetKeyspace) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetKeyspaceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteTableOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -592,7 +592,7 @@ func (m *awsAwsjson10_deserializeOpGetKeyspace) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetKeyspace(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteTable(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)} @@ -632,6 +632,9 @@ func awsAwsjson10_deserializeOpErrorGetKeyspace(response *smithyhttp.Response, m case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -654,14 +657,14 @@ func awsAwsjson10_deserializeOpErrorGetKeyspace(response *smithyhttp.Response, m } } -type awsAwsjson10_deserializeOpGetTable struct { +type awsAwsjson10_deserializeOpDeleteType struct { } -func (*awsAwsjson10_deserializeOpGetTable) ID() string { +func (*awsAwsjson10_deserializeOpDeleteType) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteType) 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) @@ -679,9 +682,9 @@ func (m *awsAwsjson10_deserializeOpGetTable) HandleDeserialize(ctx context.Conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetTable(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteType(response, &metadata) } - output := &GetTableOutput{} + output := &DeleteTypeOutput{} out.Result = output var buff [1024]byte @@ -701,7 +704,7 @@ func (m *awsAwsjson10_deserializeOpGetTable) HandleDeserialize(ctx context.Conte return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetTableOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteTypeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -715,7 +718,7 @@ func (m *awsAwsjson10_deserializeOpGetTable) HandleDeserialize(ctx context.Conte return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteType(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)} @@ -755,6 +758,9 @@ func awsAwsjson10_deserializeOpErrorGetTable(response *smithyhttp.Response, meta case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -777,14 +783,14 @@ func awsAwsjson10_deserializeOpErrorGetTable(response *smithyhttp.Response, meta } } -type awsAwsjson10_deserializeOpGetTableAutoScalingSettings struct { +type awsAwsjson10_deserializeOpGetKeyspace struct { } -func (*awsAwsjson10_deserializeOpGetTableAutoScalingSettings) ID() string { +func (*awsAwsjson10_deserializeOpGetKeyspace) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetTableAutoScalingSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetKeyspace) 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) @@ -802,9 +808,9 @@ func (m *awsAwsjson10_deserializeOpGetTableAutoScalingSettings) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetTableAutoScalingSettings(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetKeyspace(response, &metadata) } - output := &GetTableAutoScalingSettingsOutput{} + output := &GetKeyspaceOutput{} out.Result = output var buff [1024]byte @@ -824,7 +830,7 @@ func (m *awsAwsjson10_deserializeOpGetTableAutoScalingSettings) HandleDeserializ return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetTableAutoScalingSettingsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetKeyspaceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -838,7 +844,7 @@ func (m *awsAwsjson10_deserializeOpGetTableAutoScalingSettings) HandleDeserializ return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetTableAutoScalingSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetKeyspace(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)} @@ -900,14 +906,14 @@ func awsAwsjson10_deserializeOpErrorGetTableAutoScalingSettings(response *smithy } } -type awsAwsjson10_deserializeOpListKeyspaces struct { +type awsAwsjson10_deserializeOpGetTable struct { } -func (*awsAwsjson10_deserializeOpListKeyspaces) ID() string { +func (*awsAwsjson10_deserializeOpGetTable) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListKeyspaces) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetTable) 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) @@ -925,9 +931,9 @@ func (m *awsAwsjson10_deserializeOpListKeyspaces) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListKeyspaces(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetTable(response, &metadata) } - output := &ListKeyspacesOutput{} + output := &GetTableOutput{} out.Result = output var buff [1024]byte @@ -947,7 +953,7 @@ func (m *awsAwsjson10_deserializeOpListKeyspaces) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListKeyspacesOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetTableOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -961,7 +967,7 @@ func (m *awsAwsjson10_deserializeOpListKeyspaces) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListKeyspaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetTable(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)} @@ -1023,14 +1029,14 @@ func awsAwsjson10_deserializeOpErrorListKeyspaces(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpListTables struct { +type awsAwsjson10_deserializeOpGetTableAutoScalingSettings struct { } -func (*awsAwsjson10_deserializeOpListTables) ID() string { +func (*awsAwsjson10_deserializeOpGetTableAutoScalingSettings) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListTables) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetTableAutoScalingSettings) 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) @@ -1048,9 +1054,9 @@ func (m *awsAwsjson10_deserializeOpListTables) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListTables(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetTableAutoScalingSettings(response, &metadata) } - output := &ListTablesOutput{} + output := &GetTableAutoScalingSettingsOutput{} out.Result = output var buff [1024]byte @@ -1070,7 +1076,7 @@ func (m *awsAwsjson10_deserializeOpListTables) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListTablesOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetTableAutoScalingSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1084,7 +1090,7 @@ func (m *awsAwsjson10_deserializeOpListTables) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListTables(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetTableAutoScalingSettings(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)} @@ -1146,14 +1152,14 @@ func awsAwsjson10_deserializeOpErrorListTables(response *smithyhttp.Response, me } } -type awsAwsjson10_deserializeOpListTagsForResource struct { +type awsAwsjson10_deserializeOpGetType struct { } -func (*awsAwsjson10_deserializeOpListTagsForResource) ID() string { +func (*awsAwsjson10_deserializeOpGetType) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetType) 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) @@ -1171,9 +1177,9 @@ func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetType(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &GetTypeOutput{} out.Result = output var buff [1024]byte @@ -1193,7 +1199,7 @@ func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetTypeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1207,7 +1213,7 @@ func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetType(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)} @@ -1269,14 +1275,14 @@ func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -type awsAwsjson10_deserializeOpRestoreTable struct { +type awsAwsjson10_deserializeOpListKeyspaces struct { } -func (*awsAwsjson10_deserializeOpRestoreTable) ID() string { +func (*awsAwsjson10_deserializeOpListKeyspaces) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpRestoreTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListKeyspaces) 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) @@ -1294,9 +1300,9 @@ func (m *awsAwsjson10_deserializeOpRestoreTable) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorRestoreTable(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListKeyspaces(response, &metadata) } - output := &RestoreTableOutput{} + output := &ListKeyspacesOutput{} out.Result = output var buff [1024]byte @@ -1316,7 +1322,7 @@ func (m *awsAwsjson10_deserializeOpRestoreTable) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentRestoreTableOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListKeyspacesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1330,7 +1336,7 @@ func (m *awsAwsjson10_deserializeOpRestoreTable) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson10_deserializeOpErrorRestoreTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListKeyspaces(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)} @@ -1370,9 +1376,6 @@ func awsAwsjson10_deserializeOpErrorRestoreTable(response *smithyhttp.Response, case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -1395,14 +1398,14 @@ func awsAwsjson10_deserializeOpErrorRestoreTable(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpTagResource struct { +type awsAwsjson10_deserializeOpListTables struct { } -func (*awsAwsjson10_deserializeOpTagResource) ID() string { +func (*awsAwsjson10_deserializeOpListTables) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListTables) 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) @@ -1420,9 +1423,9 @@ func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListTables(response, &metadata) } - output := &TagResourceOutput{} + output := &ListTablesOutput{} out.Result = output var buff [1024]byte @@ -1442,7 +1445,7 @@ func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentTagResourceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListTablesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1456,7 +1459,7 @@ func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListTables(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)} @@ -1518,14 +1521,14 @@ func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsAwsjson10_deserializeOpUntagResource struct { +type awsAwsjson10_deserializeOpListTagsForResource struct { } -func (*awsAwsjson10_deserializeOpUntagResource) ID() string { +func (*awsAwsjson10_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1543,9 +1546,9 @@ func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &UntagResourceOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -1565,7 +1568,7 @@ func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUntagResourceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1579,7 +1582,7 @@ func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1619,9 +1622,6 @@ func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -1644,14 +1644,14 @@ func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpUpdateTable struct { +type awsAwsjson10_deserializeOpListTypes struct { } -func (*awsAwsjson10_deserializeOpUpdateTable) ID() string { +func (*awsAwsjson10_deserializeOpListTypes) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListTypes) 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) @@ -1669,9 +1669,9 @@ func (m *awsAwsjson10_deserializeOpUpdateTable) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateTable(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListTypes(response, &metadata) } - output := &UpdateTableOutput{} + output := &ListTypesOutput{} out.Result = output var buff [1024]byte @@ -1691,7 +1691,7 @@ func (m *awsAwsjson10_deserializeOpUpdateTable) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateTableOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListTypesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1705,7 +1705,7 @@ func (m *awsAwsjson10_deserializeOpUpdateTable) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListTypes(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)} @@ -1745,9 +1745,6 @@ func awsAwsjson10_deserializeOpErrorUpdateTable(response *smithyhttp.Response, m case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -1770,46 +1767,40 @@ func awsAwsjson10_deserializeOpErrorUpdateTable(response *smithyhttp.Response, m } } -func awsAwsjson10_deserializeErrorAccessDeniedException(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 - } +type awsAwsjson10_deserializeOpRestoreTable struct { +} - output := &types.AccessDeniedException{} - err := awsAwsjson10_deserializeDocumentAccessDeniedException(&output, shape) +func (*awsAwsjson10_deserializeOpRestoreTable) ID() string { + return "OperationDeserializer" +} +func (m *awsAwsjson10_deserializeOpRestoreTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output -} + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsAwsjson10_deserializeOpErrorRestoreTable(response, &metadata) + } + output := &RestoreTableOutput{} + out.Result = output -func awsAwsjson10_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -1820,12 +1811,10 @@ func awsAwsjson10_deserializeErrorConflictException(response *smithyhttp.Respons Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.ConflictException{} - err := awsAwsjson10_deserializeDocumentConflictException(&output, shape) - + err = awsAwsjson10_deserializeOpDocumentRestoreTableOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1833,34 +1822,31 @@ func awsAwsjson10_deserializeErrorConflictException(response *smithyhttp.Respons Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson10_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson10_deserializeOpErrorRestoreTable(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() - 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.InternalServerException{} - err := awsAwsjson10_deserializeDocumentInternalServerException(&output, shape) - + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1872,12 +1858,527 @@ func awsAwsjson10_deserializeErrorInternalServerException(response *smithyhttp.R } errorBody.Seek(0, io.SeekStart) - return output -} - -func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpTagResource struct { +} + +func (*awsAwsjson10_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsAwsjson10_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentTagResourceOutput(&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 awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + 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("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUntagResource struct { +} + +func (*awsAwsjson10_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsAwsjson10_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentUntagResourceOutput(&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 awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + 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("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateTable struct { +} + +func (*awsAwsjson10_deserializeOpUpdateTable) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateTable) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsAwsjson10_deserializeOpErrorUpdateTable(response, &metadata) + } + output := &UpdateTableOutput{} + 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 = awsAwsjson10_deserializeOpDocumentUpdateTableOutput(&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 awsAwsjson10_deserializeOpErrorUpdateTable(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("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsAwsjson10_deserializeErrorAccessDeniedException(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.AccessDeniedException{} + err := awsAwsjson10_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorConflictException(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.ConflictException{} + err := awsAwsjson10_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorInternalServerException(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.InternalServerException{} + err := awsAwsjson10_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) @@ -2585,6 +3086,89 @@ func awsAwsjson10_deserializeDocumentEncryptionSpecification(v **types.Encryptio return nil } +func awsAwsjson10_deserializeDocumentFieldDefinition(v **types.FieldDefinition, 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.FieldDefinition + if *v == nil { + sv = &types.FieldDefinition{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentFieldList(v *[]types.FieldDefinition, 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.FieldDefinition + if *v == nil { + cv = []types.FieldDefinition{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FieldDefinition + destAddr := &col + if err := awsAwsjson10_deserializeDocumentFieldDefinition(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -3261,7 +3845,43 @@ func awsAwsjson10_deserializeDocumentStaticColumnList(v *[]types.StaticColumn, v if err := awsAwsjson10_deserializeDocumentStaticColumn(&destAddr, value); err != nil { return err } - col = *destAddr + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentTableNameList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TableName to be of type string, got %T instead", value) + } + col = jtv + } cv = append(cv, col) } @@ -3584,6 +4204,42 @@ func awsAwsjson10_deserializeDocumentTimeToLive(v **types.TimeToLive, value inte return nil } +func awsAwsjson10_deserializeDocumentTypeNameList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TypeName to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -3704,6 +4360,55 @@ func awsAwsjson10_deserializeOpDocumentCreateTableOutput(v **CreateTableOutput, return nil } +func awsAwsjson10_deserializeOpDocumentCreateTypeOutput(v **CreateTypeOutput, 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 *CreateTypeOutput + if *v == nil { + sv = &CreateTypeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "keyspaceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.KeyspaceArn = ptr.String(jtv) + } + + case "typeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TypeName to be of type string, got %T instead", value) + } + sv.TypeName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentDeleteKeyspaceOutput(v **DeleteKeyspaceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -3766,6 +4471,55 @@ func awsAwsjson10_deserializeOpDocumentDeleteTableOutput(v **DeleteTableOutput, return nil } +func awsAwsjson10_deserializeOpDocumentDeleteTypeOutput(v **DeleteTypeOutput, 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 *DeleteTypeOutput + if *v == nil { + sv = &DeleteTypeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "keyspaceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.KeyspaceArn = ptr.String(jtv) + } + + case "typeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TypeName to be of type string, got %T instead", value) + } + sv.TypeName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentGetKeyspaceOutput(v **GetKeyspaceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -4033,6 +4787,117 @@ func awsAwsjson10_deserializeOpDocumentGetTableOutput(v **GetTableOutput, value return nil } +func awsAwsjson10_deserializeOpDocumentGetTypeOutput(v **GetTypeOutput, 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 *GetTypeOutput + if *v == nil { + sv = &GetTypeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "directParentTypes": + if err := awsAwsjson10_deserializeDocumentTypeNameList(&sv.DirectParentTypes, value); err != nil { + return err + } + + case "directReferringTables": + if err := awsAwsjson10_deserializeDocumentTableNameList(&sv.DirectReferringTables, value); err != nil { + return err + } + + case "fieldDefinitions": + if err := awsAwsjson10_deserializeDocumentFieldList(&sv.FieldDefinitions, value); err != nil { + return err + } + + case "keyspaceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.KeyspaceArn = ptr.String(jtv) + } + + case "keyspaceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KeyspaceName to be of type string, got %T instead", value) + } + sv.KeyspaceName = 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 Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "maxNestingDepth": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Depth to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxNestingDepth = int32(i64) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TypeStatus to be of type string, got %T instead", value) + } + sv.Status = types.TypeStatus(jtv) + } + + case "typeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TypeName to be of type string, got %T instead", value) + } + sv.TypeName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentListKeyspacesOutput(v **ListKeyspacesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -4168,6 +5033,51 @@ func awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } +func awsAwsjson10_deserializeOpDocumentListTypesOutput(v **ListTypesOutput, 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 *ListTypesOutput + if *v == nil { + sv = &ListTypesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "types": + if err := awsAwsjson10_deserializeDocumentTypeNameList(&sv.Types, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentRestoreTableOutput(v **RestoreTableOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/keyspaces/generated.json b/service/keyspaces/generated.json index cee061283f8..7dd26df5318 100644 --- a/service/keyspaces/generated.json +++ b/service/keyspaces/generated.json @@ -10,14 +10,18 @@ "api_client_test.go", "api_op_CreateKeyspace.go", "api_op_CreateTable.go", + "api_op_CreateType.go", "api_op_DeleteKeyspace.go", "api_op_DeleteTable.go", + "api_op_DeleteType.go", "api_op_GetKeyspace.go", "api_op_GetTable.go", "api_op_GetTableAutoScalingSettings.go", + "api_op_GetType.go", "api_op_ListKeyspaces.go", "api_op_ListTables.go", "api_op_ListTagsForResource.go", + "api_op_ListTypes.go", "api_op_RestoreTable.go", "api_op_TagResource.go", "api_op_UntagResource.go", diff --git a/service/keyspaces/serializers.go b/service/keyspaces/serializers.go index d4bd6b229df..22dba837868 100644 --- a/service/keyspaces/serializers.go +++ b/service/keyspaces/serializers.go @@ -140,6 +140,67 @@ func (m *awsAwsjson10_serializeOpCreateTable) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpCreateType struct { +} + +func (*awsAwsjson10_serializeOpCreateType) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpCreateType) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CreateTypeInput) + _ = 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.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("KeyspacesService.CreateType") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentCreateTypeInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpDeleteKeyspace struct { } @@ -262,6 +323,67 @@ func (m *awsAwsjson10_serializeOpDeleteTable) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpDeleteType struct { +} + +func (*awsAwsjson10_serializeOpDeleteType) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpDeleteType) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteTypeInput) + _ = 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.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("KeyspacesService.DeleteType") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentDeleteTypeInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpGetKeyspace struct { } @@ -445,6 +567,67 @@ func (m *awsAwsjson10_serializeOpGetTableAutoScalingSettings) HandleSerialize(ct return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpGetType struct { +} + +func (*awsAwsjson10_serializeOpGetType) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetType) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetTypeInput) + _ = 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.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("KeyspacesService.GetType") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetTypeInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpListKeyspaces struct { } @@ -628,6 +811,67 @@ func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpListTypes struct { +} + +func (*awsAwsjson10_serializeOpListTypes) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListTypes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListTypesInput) + _ = 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.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("KeyspacesService.ListTypes") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListTypesInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpRestoreTable struct { } @@ -1058,6 +1302,36 @@ func awsAwsjson10_serializeDocumentEncryptionSpecification(v *types.EncryptionSp return nil } +func awsAwsjson10_serializeDocumentFieldDefinition(v *types.FieldDefinition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Type != nil { + ok := object.Key("type") + ok.String(*v.Type) + } + + return nil +} + +func awsAwsjson10_serializeDocumentFieldList(v []types.FieldDefinition, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentFieldDefinition(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsjson10_serializeDocumentPartitionKey(v *types.PartitionKey, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1422,6 +1696,30 @@ func awsAwsjson10_serializeOpDocumentCreateTableInput(v *CreateTableInput, value return nil } +func awsAwsjson10_serializeOpDocumentCreateTypeInput(v *CreateTypeInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FieldDefinitions != nil { + ok := object.Key("fieldDefinitions") + if err := awsAwsjson10_serializeDocumentFieldList(v.FieldDefinitions, ok); err != nil { + return err + } + } + + if v.KeyspaceName != nil { + ok := object.Key("keyspaceName") + ok.String(*v.KeyspaceName) + } + + if v.TypeName != nil { + ok := object.Key("typeName") + ok.String(*v.TypeName) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentDeleteKeyspaceInput(v *DeleteKeyspaceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1451,6 +1749,23 @@ func awsAwsjson10_serializeOpDocumentDeleteTableInput(v *DeleteTableInput, value return nil } +func awsAwsjson10_serializeOpDocumentDeleteTypeInput(v *DeleteTypeInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.KeyspaceName != nil { + ok := object.Key("keyspaceName") + ok.String(*v.KeyspaceName) + } + + if v.TypeName != nil { + ok := object.Key("typeName") + ok.String(*v.TypeName) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentGetKeyspaceInput(v *GetKeyspaceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1497,6 +1812,23 @@ func awsAwsjson10_serializeOpDocumentGetTableInput(v *GetTableInput, value smith return nil } +func awsAwsjson10_serializeOpDocumentGetTypeInput(v *GetTypeInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.KeyspaceName != nil { + ok := object.Key("keyspaceName") + ok.String(*v.KeyspaceName) + } + + if v.TypeName != nil { + ok := object.Key("typeName") + ok.String(*v.TypeName) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentListKeyspacesInput(v *ListKeyspacesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1558,6 +1890,28 @@ func awsAwsjson10_serializeOpDocumentListTagsForResourceInput(v *ListTagsForReso return nil } +func awsAwsjson10_serializeOpDocumentListTypesInput(v *ListTypesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.KeyspaceName != nil { + ok := object.Key("keyspaceName") + ok.String(*v.KeyspaceName) + } + + 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 awsAwsjson10_serializeOpDocumentRestoreTableInput(v *RestoreTableInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/keyspaces/snapshot/api_op_CreateType.go.snap b/service/keyspaces/snapshot/api_op_CreateType.go.snap new file mode 100644 index 00000000000..9ad6124a2fd --- /dev/null +++ b/service/keyspaces/snapshot/api_op_CreateType.go.snap @@ -0,0 +1,41 @@ +CreateType + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/keyspaces/snapshot/api_op_DeleteType.go.snap b/service/keyspaces/snapshot/api_op_DeleteType.go.snap new file mode 100644 index 00000000000..14cc248b3d2 --- /dev/null +++ b/service/keyspaces/snapshot/api_op_DeleteType.go.snap @@ -0,0 +1,41 @@ +DeleteType + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/keyspaces/snapshot/api_op_GetType.go.snap b/service/keyspaces/snapshot/api_op_GetType.go.snap new file mode 100644 index 00000000000..764cc0b4c51 --- /dev/null +++ b/service/keyspaces/snapshot/api_op_GetType.go.snap @@ -0,0 +1,41 @@ +GetType + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/keyspaces/snapshot/api_op_ListTypes.go.snap b/service/keyspaces/snapshot/api_op_ListTypes.go.snap new file mode 100644 index 00000000000..f6c0cc1cf02 --- /dev/null +++ b/service/keyspaces/snapshot/api_op_ListTypes.go.snap @@ -0,0 +1,41 @@ +ListTypes + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/keyspaces/snapshot_test.go b/service/keyspaces/snapshot_test.go index a21e1f7f43c..32acd8f6f4a 100644 --- a/service/keyspaces/snapshot_test.go +++ b/service/keyspaces/snapshot_test.go @@ -86,6 +86,18 @@ func TestCheckSnapshot_CreateTable(t *testing.T) { } } +func TestCheckSnapshot_CreateType(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateType(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateType") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteKeyspace(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteKeyspace(context.Background(), nil, func(o *Options) { @@ -110,6 +122,18 @@ func TestCheckSnapshot_DeleteTable(t *testing.T) { } } +func TestCheckSnapshot_DeleteType(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteType(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteType") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetKeyspace(t *testing.T) { svc := New(Options{}) _, err := svc.GetKeyspace(context.Background(), nil, func(o *Options) { @@ -146,6 +170,18 @@ func TestCheckSnapshot_GetTableAutoScalingSettings(t *testing.T) { } } +func TestCheckSnapshot_GetType(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetType(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetType") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListKeyspaces(t *testing.T) { svc := New(Options{}) _, err := svc.ListKeyspaces(context.Background(), nil, func(o *Options) { @@ -182,6 +218,18 @@ func TestCheckSnapshot_ListTagsForResource(t *testing.T) { } } +func TestCheckSnapshot_ListTypes(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListTypes(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListTypes") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_RestoreTable(t *testing.T) { svc := New(Options{}) _, err := svc.RestoreTable(context.Background(), nil, func(o *Options) { @@ -253,6 +301,18 @@ func TestUpdateSnapshot_CreateTable(t *testing.T) { } } +func TestUpdateSnapshot_CreateType(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateType(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateType") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteKeyspace(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteKeyspace(context.Background(), nil, func(o *Options) { @@ -277,6 +337,18 @@ func TestUpdateSnapshot_DeleteTable(t *testing.T) { } } +func TestUpdateSnapshot_DeleteType(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteType(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteType") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetKeyspace(t *testing.T) { svc := New(Options{}) _, err := svc.GetKeyspace(context.Background(), nil, func(o *Options) { @@ -313,6 +385,18 @@ func TestUpdateSnapshot_GetTableAutoScalingSettings(t *testing.T) { } } +func TestUpdateSnapshot_GetType(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetType(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetType") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListKeyspaces(t *testing.T) { svc := New(Options{}) _, err := svc.ListKeyspaces(context.Background(), nil, func(o *Options) { @@ -349,6 +433,18 @@ func TestUpdateSnapshot_ListTagsForResource(t *testing.T) { } } +func TestUpdateSnapshot_ListTypes(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListTypes(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListTypes") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_RestoreTable(t *testing.T) { svc := New(Options{}) _, err := svc.RestoreTable(context.Background(), nil, func(o *Options) { diff --git a/service/keyspaces/types/enums.go b/service/keyspaces/types/enums.go index 300e2d7fbd5..1b3db8566ad 100644 --- a/service/keyspaces/types/enums.go +++ b/service/keyspaces/types/enums.go @@ -159,3 +159,26 @@ func (TimeToLiveStatus) Values() []TimeToLiveStatus { "ENABLED", } } + +type TypeStatus string + +// Enum values for TypeStatus +const ( + TypeStatusActive TypeStatus = "ACTIVE" + TypeStatusCreating TypeStatus = "CREATING" + TypeStatusDeleting TypeStatus = "DELETING" + TypeStatusRestoring TypeStatus = "RESTORING" +) + +// Values returns all known values for TypeStatus. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (TypeStatus) Values() []TypeStatus { + return []TypeStatus{ + "ACTIVE", + "CREATING", + "DELETING", + "RESTORING", + } +} diff --git a/service/keyspaces/types/errors.go b/service/keyspaces/types/errors.go index eb367db734a..6994df816b7 100644 --- a/service/keyspaces/types/errors.go +++ b/service/keyspaces/types/errors.go @@ -88,8 +88,9 @@ func (e *InternalServerException) ErrorCode() string { } func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// The operation tried to access a keyspace or table that doesn't exist. The -// resource might not be specified correctly, or its status might not be ACTIVE . +// The operation tried to access a keyspace, table, or type that doesn't exist. +// The resource might not be specified correctly, or its status might not be ACTIVE +// . type ResourceNotFoundException struct { Message *string diff --git a/service/keyspaces/types/types.go b/service/keyspaces/types/types.go index 1c7607899b6..fde02bb0686 100644 --- a/service/keyspaces/types/types.go +++ b/service/keyspaces/types/types.go @@ -295,6 +295,27 @@ type EncryptionSpecification struct { noSmithyDocumentSerde } +// A field definition consists out of a name and a type. +type FieldDefinition struct { + + // The identifier. + // + // This member is required. + Name *string + + // Any supported Cassandra data type, including collections and other + // user-defined types that are contained in the same keyspace. + // + // For more information, see [Cassandra data type support] in the Amazon Keyspaces Developer Guide. + // + // [Cassandra data type support]: https://docs.aws.amazon.com/keyspaces/latest/devguide/cassandra-apis.html#cassandra-data-type + // + // This member is required. + Type *string + + noSmithyDocumentSerde +} + // Represents the properties of a keyspace. type KeyspaceSummary struct { diff --git a/service/keyspaces/validators.go b/service/keyspaces/validators.go index d1bd7443fb4..76adefc2103 100644 --- a/service/keyspaces/validators.go +++ b/service/keyspaces/validators.go @@ -50,6 +50,26 @@ func (m *validateOpCreateTable) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpCreateType struct { +} + +func (*validateOpCreateType) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateType) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateTypeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateTypeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteKeyspace struct { } @@ -90,6 +110,26 @@ func (m *validateOpDeleteTable) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpDeleteType struct { +} + +func (*validateOpDeleteType) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteType) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteTypeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteTypeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetKeyspace struct { } @@ -150,6 +190,26 @@ func (m *validateOpGetTable) HandleInitialize(ctx context.Context, in middleware return next.HandleInitialize(ctx, in) } +type validateOpGetType struct { +} + +func (*validateOpGetType) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetType) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetTypeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetTypeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListTables struct { } @@ -190,6 +250,26 @@ func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpListTypes struct { +} + +func (*validateOpListTypes) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTypes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTypesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTypesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpRestoreTable struct { } @@ -278,6 +358,10 @@ func addOpCreateTableValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateTable{}, middleware.After) } +func addOpCreateTypeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateType{}, middleware.After) +} + func addOpDeleteKeyspaceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteKeyspace{}, middleware.After) } @@ -286,6 +370,10 @@ func addOpDeleteTableValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteTable{}, middleware.After) } +func addOpDeleteTypeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteType{}, middleware.After) +} + func addOpGetKeyspaceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetKeyspace{}, middleware.After) } @@ -298,6 +386,10 @@ func addOpGetTableValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetTable{}, middleware.After) } +func addOpGetTypeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetType{}, middleware.After) +} + func addOpListTablesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTables{}, middleware.After) } @@ -306,6 +398,10 @@ func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } +func addOpListTypesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTypes{}, middleware.After) +} + func addOpRestoreTableValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRestoreTable{}, middleware.After) } @@ -508,6 +604,41 @@ func validateEncryptionSpecification(v *types.EncryptionSpecification) error { } } +func validateFieldDefinition(v *types.FieldDefinition) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FieldDefinition"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Type == nil { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFieldList(v []types.FieldDefinition) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FieldList"} + for i := range v { + if err := validateFieldDefinition(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validatePartitionKey(v *types.PartitionKey) error { if v == nil { return nil @@ -832,6 +963,31 @@ func validateOpCreateTableInput(v *CreateTableInput) error { } } +func validateOpCreateTypeInput(v *CreateTypeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateTypeInput"} + if v.KeyspaceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("KeyspaceName")) + } + if v.TypeName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TypeName")) + } + if v.FieldDefinitions == nil { + invalidParams.Add(smithy.NewErrParamRequired("FieldDefinitions")) + } else if v.FieldDefinitions != nil { + if err := validateFieldList(v.FieldDefinitions); err != nil { + invalidParams.AddNested("FieldDefinitions", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteKeyspaceInput(v *DeleteKeyspaceInput) error { if v == nil { return nil @@ -865,6 +1021,24 @@ func validateOpDeleteTableInput(v *DeleteTableInput) error { } } +func validateOpDeleteTypeInput(v *DeleteTypeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteTypeInput"} + if v.KeyspaceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("KeyspaceName")) + } + if v.TypeName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TypeName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetKeyspaceInput(v *GetKeyspaceInput) error { if v == nil { return nil @@ -916,6 +1090,24 @@ func validateOpGetTableInput(v *GetTableInput) error { } } +func validateOpGetTypeInput(v *GetTypeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetTypeInput"} + if v.KeyspaceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("KeyspaceName")) + } + if v.TypeName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TypeName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListTablesInput(v *ListTablesInput) error { if v == nil { return nil @@ -946,6 +1138,21 @@ func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { } } +func validateOpListTypesInput(v *ListTypesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTypesInput"} + if v.KeyspaceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("KeyspaceName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpRestoreTableInput(v *RestoreTableInput) error { if v == nil { return nil diff --git a/service/memorydb/internal/endpoints/endpoints.go b/service/memorydb/internal/endpoints/endpoints.go index 4e8873c1ade..c32afe6d4bd 100644 --- a/service/memorydb/internal/endpoints/endpoints.go +++ b/service/memorydb/internal/endpoints/endpoints.go @@ -367,5 +367,13 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "us-gov-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + }: endpoints.Endpoint{}, + }, }, } diff --git a/service/networkfirewall/deserializers.go b/service/networkfirewall/deserializers.go index bd742cb890d..97edb3f1316 100644 --- a/service/networkfirewall/deserializers.go +++ b/service/networkfirewall/deserializers.go @@ -6119,6 +6119,50 @@ func awsAwsjson10_deserializeDocumentFlags(v *[]types.TCPFlag, value interface{} return nil } +func awsAwsjson10_deserializeDocumentFlowTimeouts(v **types.FlowTimeouts, 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.FlowTimeouts + if *v == nil { + sv = &types.FlowTimeouts{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "TcpIdleTimeoutSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TcpIdleTimeoutRangeBound to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TcpIdleTimeoutSeconds = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentHeader(v **types.Header, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8446,6 +8490,11 @@ func awsAwsjson10_deserializeDocumentStatefulEngineOptions(v **types.StatefulEng for key, value := range shape { switch key { + case "FlowTimeouts": + if err := awsAwsjson10_deserializeDocumentFlowTimeouts(&sv.FlowTimeouts, value); err != nil { + return err + } + case "RuleOrder": if value != nil { jtv, ok := value.(string) diff --git a/service/networkfirewall/doc.go b/service/networkfirewall/doc.go index 9be6e7668fb..cfcdb4e6644 100644 --- a/service/networkfirewall/doc.go +++ b/service/networkfirewall/doc.go @@ -29,8 +29,7 @@ // includes filtering traffic going to and coming from an internet gateway, NAT // gateway, or over VPN or Direct Connect. Network Firewall uses rules that are // compatible with Suricata, a free, open source network analysis and threat -// detection engine. Network Firewall supports Suricata version 6.0.9. For -// information about Suricata, see the [Suricata website]. +// detection engine. // // You can use Network Firewall to monitor and protect your VPC traffic in a // number of ways. The following are just a few examples: @@ -71,7 +70,6 @@ // - In Amazon VPC, use ingress routing enhancements to route traffic through // the new firewall endpoints. // -// [Suricata website]: https://suricata.io/ // [Amazon Web Services APIs]: https://docs.aws.amazon.com/general/latest/gr/aws-apis.html // [Amazon VPC User Guide]: https://docs.aws.amazon.com/vpc/latest/userguide/ // diff --git a/service/networkfirewall/serializers.go b/service/networkfirewall/serializers.go index c1c0a7f98e8..e4925cb5a09 100644 --- a/service/networkfirewall/serializers.go +++ b/service/networkfirewall/serializers.go @@ -2431,6 +2431,18 @@ func awsAwsjson10_serializeDocumentFlags(v []types.TCPFlag, value smithyjson.Val return nil } +func awsAwsjson10_serializeDocumentFlowTimeouts(v *types.FlowTimeouts, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TcpIdleTimeoutSeconds != nil { + ok := object.Key("TcpIdleTimeoutSeconds") + ok.Integer(*v.TcpIdleTimeoutSeconds) + } + + return nil +} + func awsAwsjson10_serializeDocumentHeader(v *types.Header, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3092,6 +3104,13 @@ func awsAwsjson10_serializeDocumentStatefulEngineOptions(v *types.StatefulEngine object := value.Object() defer object.Close() + if v.FlowTimeouts != nil { + ok := object.Key("FlowTimeouts") + if err := awsAwsjson10_serializeDocumentFlowTimeouts(v.FlowTimeouts, ok); err != nil { + return err + } + } + if len(v.RuleOrder) > 0 { ok := object.Key("RuleOrder") ok.String(string(v.RuleOrder)) diff --git a/service/networkfirewall/types/types.go b/service/networkfirewall/types/types.go index dcae145efb5..ce9bee88c43 100644 --- a/service/networkfirewall/types/types.go +++ b/service/networkfirewall/types/types.go @@ -579,6 +579,26 @@ type FirewallStatus struct { noSmithyDocumentSerde } +// Describes the amount of time that can pass without any traffic sent through the +// firewall before the firewall determines that the connection is idle and Network +// Firewall removes the flow entry from its flow table. Existing connections and +// flows are not impacted when you update this value. Only new connections after +// you update this value are impacted. +type FlowTimeouts struct { + + // The number of seconds that can pass without any TCP traffic sent through the + // firewall before the firewall determines that the connection is idle. After the + // idle timeout passes, data packets are dropped, however, the next TCP SYN packet + // is considered a new flow and is processed by the firewall. Clients or targets + // can use TCP keepalive packets to reset the idle timeout. + // + // You can define the TcpIdleTimeoutSeconds value to be between 60 and 6000 + // seconds. If no value is provided, it defaults to 350 seconds. + TcpIdleTimeoutSeconds *int32 + + noSmithyDocumentSerde +} + // The basic rule criteria for Network Firewall to use to inspect packet headers // in stateful traffic flow inspection. Traffic flows that match the criteria are a // match for the corresponding StatefulRule. @@ -1342,6 +1362,10 @@ type SourceMetadata struct { // firewall policy. type StatefulEngineOptions struct { + // Configures the amount of time that can pass without any traffic sent through + // the firewall before the firewall determines that the connection is idle. + FlowTimeouts *FlowTimeouts + // Indicates how to manage the order of stateful rule evaluation for the policy. // STRICT_ORDER is the default and recommended option. With STRICT_ORDER , provide // your rules in the order that you want them to be evaluated. You can then choose diff --git a/service/opensearch/api_client.go b/service/opensearch/api_client.go index 351d593d50a..d04c689f01b 100644 --- a/service/opensearch/api_client.go +++ b/service/opensearch/api_client.go @@ -4,6 +4,7 @@ package opensearch import ( "context" + cryptorand "crypto/rand" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" @@ -22,6 +23,7 @@ import ( "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net" @@ -185,6 +187,8 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveHTTPSignerV4(&options) + resolveIdempotencyTokenProvider(&options) + resolveEndpointResolverV2(&options) resolveTracerProvider(&options) @@ -680,6 +684,13 @@ func addIsPaginatorUserAgent(o *Options) { }) } +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -774,6 +785,11 @@ func resolveMeterProvider(options *Options) { } } +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/opensearch/api_op_AuthorizeVpcEndpointAccess.go b/service/opensearch/api_op_AuthorizeVpcEndpointAccess.go index 9e8dbc1b9ff..718dc6078fb 100644 --- a/service/opensearch/api_op_AuthorizeVpcEndpointAccess.go +++ b/service/opensearch/api_op_AuthorizeVpcEndpointAccess.go @@ -30,16 +30,17 @@ func (c *Client) AuthorizeVpcEndpointAccess(ctx context.Context, params *Authori type AuthorizeVpcEndpointAccessInput struct { - // The Amazon Web Services account ID to grant access to. - // - // This member is required. - Account *string - // The name of the OpenSearch Service domain to provide access to. // // This member is required. DomainName *string + // The Amazon Web Services account ID to grant access to. + Account *string + + // The Amazon Web Services service SP to grant access to. + Service types.AWSServicePrincipal + noSmithyDocumentSerde } diff --git a/service/opensearch/api_op_CreateApplication.go b/service/opensearch/api_op_CreateApplication.go new file mode 100644 index 00000000000..ce659e2d4b8 --- /dev/null +++ b/service/opensearch/api_op_CreateApplication.go @@ -0,0 +1,235 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates an OpenSearch Application. +func (c *Client) CreateApplication(ctx context.Context, params *CreateApplicationInput, optFns ...func(*Options)) (*CreateApplicationOutput, error) { + if params == nil { + params = &CreateApplicationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateApplication", params, optFns, c.addOperationCreateApplicationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateApplicationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateApplicationInput struct { + + // Name of the OpenSearch Appication to create. Application names are unique + // across the applications owned by an account within an Amazon Web Services + // Region. + // + // This member is required. + Name *string + + // Configurations of the OpenSearch Application, inlcuding admin configuration. + AppConfigs []types.AppConfig + + // A unique client idempotency token. It will be auto generated if not provided. + ClientToken *string + + // Data sources to be associated with the OpenSearch Application. + DataSources []types.DataSource + + // Settings of IAM Identity Center for the OpenSearch Application. + IamIdentityCenterOptions *types.IamIdentityCenterOptionsInput + + // A list of tags attached to a domain. + TagList []types.Tag + + noSmithyDocumentSerde +} + +type CreateApplicationOutput struct { + + // Configurations of the OpenSearch Application, inlcuding admin configuration. + AppConfigs []types.AppConfig + + // The Amazon Resource Name (ARN) of the domain. See [Identifiers for IAM Entities] in Using Amazon Web Services + // Identity and Access Management for more information. + // + // [Identifiers for IAM Entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/index.html + Arn *string + + // Timestamp when the OpenSearch Application was created. + CreatedAt *time.Time + + // Data sources associated with the created OpenSearch Application. + DataSources []types.DataSource + + // Settings of IAM Identity Center for the created OpenSearch Application. + IamIdentityCenterOptions *types.IamIdentityCenterOptions + + // Unique identifier for the created OpenSearch Application. + Id *string + + // Name of the created OpenSearch Application. + Name *string + + // A list of tags attached to a domain. + TagList []types.Tag + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateApplication{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateApplication{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateApplication"); 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 = addSpanRetryLoop(stack, options); 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 = addIdempotencyToken_opCreateApplicationMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateApplicationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateApplication(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateApplication struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateApplication) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateApplicationInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateApplicationInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateApplicationMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateApplication{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateApplication(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateApplication", + } +} diff --git a/service/opensearch/api_op_CreateDomain.go b/service/opensearch/api_op_CreateDomain.go index 6339a09b3f5..045745d114e 100644 --- a/service/opensearch/api_op_CreateDomain.go +++ b/service/opensearch/api_op_CreateDomain.go @@ -111,6 +111,9 @@ type CreateDomainInput struct { // change your address type later. IPAddressType types.IPAddressType + // Options for IAM Identity Center Option control for the domain. + IdentityCenterOptions *types.IdentityCenterOptionsInput + // Key-value pairs to configure log publishing. LogPublishingOptions map[string]types.LogPublishingOption diff --git a/service/opensearch/api_op_DeleteApplication.go b/service/opensearch/api_op_DeleteApplication.go new file mode 100644 index 00000000000..ba50603c37f --- /dev/null +++ b/service/opensearch/api_op_DeleteApplication.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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 an existing OpenSearch Application. +func (c *Client) DeleteApplication(ctx context.Context, params *DeleteApplicationInput, optFns ...func(*Options)) (*DeleteApplicationOutput, error) { + if params == nil { + params = &DeleteApplicationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteApplication", params, optFns, c.addOperationDeleteApplicationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteApplicationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteApplicationInput struct { + + // Unique identifier for the OpenSearch Application that you want to delete. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type DeleteApplicationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteApplication{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteApplication{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteApplication"); 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 = addSpanRetryLoop(stack, options); 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 = addOpDeleteApplicationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteApplication(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteApplication(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteApplication", + } +} diff --git a/service/opensearch/api_op_GetApplication.go b/service/opensearch/api_op_GetApplication.go new file mode 100644 index 00000000000..4d72c5914a9 --- /dev/null +++ b/service/opensearch/api_op_GetApplication.go @@ -0,0 +1,189 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Check the configuration and status of an existing OpenSearch Application. +func (c *Client) GetApplication(ctx context.Context, params *GetApplicationInput, optFns ...func(*Options)) (*GetApplicationOutput, error) { + if params == nil { + params = &GetApplicationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetApplication", params, optFns, c.addOperationGetApplicationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetApplicationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetApplicationInput struct { + + // Unique identifier of the checked OpenSearch Application. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetApplicationOutput struct { + + // App configurations of the checked OpenSearch Application. + AppConfigs []types.AppConfig + + // The Amazon Resource Name (ARN) of the domain. See [Identifiers for IAM Entities] in Using Amazon Web Services + // Identity and Access Management for more information. + // + // [Identifiers for IAM Entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/index.html + Arn *string + + // Timestamp at which the checked OpenSearch Application was created. + CreatedAt *time.Time + + // Associated data sources to the checked OpenSearch Application. + DataSources []types.DataSource + + // Endpoint URL of the checked OpenSearch Application. + Endpoint *string + + // IAM Identity Center settings for the checked OpenSearch Application. + IamIdentityCenterOptions *types.IamIdentityCenterOptions + + // Unique identifier of the checked OpenSearch Application. + Id *string + + // Timestamp at which the checked OpenSearch Application was last updated. + LastUpdatedAt *time.Time + + // Name of the checked OpenSearch Application. + Name *string + + // Current status of the checked OpenSearch Application. Possible values are + // CREATING , UPDATING , DELETING , FAILED , ACTIVE , and DELETED . + Status types.ApplicationStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetApplication{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetApplication{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetApplication"); 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 = addSpanRetryLoop(stack, options); 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 = addOpGetApplicationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetApplication(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetApplication(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetApplication", + } +} diff --git a/service/opensearch/api_op_ListApplications.go b/service/opensearch/api_op_ListApplications.go new file mode 100644 index 00000000000..216abe9d495 --- /dev/null +++ b/service/opensearch/api_op_ListApplications.go @@ -0,0 +1,259 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List all OpenSearch Applications under your account. +func (c *Client) ListApplications(ctx context.Context, params *ListApplicationsInput, optFns ...func(*Options)) (*ListApplicationsOutput, error) { + if params == nil { + params = &ListApplicationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListApplications", params, optFns, c.addOperationListApplicationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListApplicationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListApplicationsInput struct { + + // An optional parameter that specifies the maximum number of results to return + // for a given request. + MaxResults int32 + + // When nextToken is returned, there are more results available. The value of + // nextToken is a unique pagination token for each page. Send the request again + // using the returned token to retrieve the next page. + NextToken *string + + // OpenSearch Application Status can be used as filters for the listing request. + // Possible values are CREATING , UPDATING , DELETING , FAILED , ACTIVE , and + // DELETED . + Statuses []types.ApplicationStatus + + noSmithyDocumentSerde +} + +type ListApplicationsOutput struct { + + // Summary of the OpenSearch Applications, including ID, ARN, name, endpoint, + // status, create time and last update time. + ApplicationSummaries []types.ApplicationSummary + + // When nextToken is returned, there are more results available. The value of + // nextToken is a unique pagination token for each page. Send the request again + // using the returned token to retrieve the next page. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListApplications{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListApplications{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListApplications"); 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 = addSpanRetryLoop(stack, options); 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_opListApplications(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListApplicationsPaginatorOptions is the paginator options for ListApplications +type ListApplicationsPaginatorOptions struct { + // An optional parameter that specifies the maximum number of results to return + // for a given request. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListApplicationsPaginator is a paginator for ListApplications +type ListApplicationsPaginator struct { + options ListApplicationsPaginatorOptions + client ListApplicationsAPIClient + params *ListApplicationsInput + nextToken *string + firstPage bool +} + +// NewListApplicationsPaginator returns a new ListApplicationsPaginator +func NewListApplicationsPaginator(client ListApplicationsAPIClient, params *ListApplicationsInput, optFns ...func(*ListApplicationsPaginatorOptions)) *ListApplicationsPaginator { + if params == nil { + params = &ListApplicationsInput{} + } + + options := ListApplicationsPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListApplicationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListApplicationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListApplications page. +func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListApplicationsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListApplications(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListApplicationsAPIClient is a client that implements the ListApplications +// operation. +type ListApplicationsAPIClient interface { + ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) +} + +var _ ListApplicationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListApplications(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListApplications", + } +} diff --git a/service/opensearch/api_op_RevokeVpcEndpointAccess.go b/service/opensearch/api_op_RevokeVpcEndpointAccess.go index a8c7fd3c556..8bcd09dfe75 100644 --- a/service/opensearch/api_op_RevokeVpcEndpointAccess.go +++ b/service/opensearch/api_op_RevokeVpcEndpointAccess.go @@ -6,6 +6,7 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/opensearch/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -29,16 +30,17 @@ func (c *Client) RevokeVpcEndpointAccess(ctx context.Context, params *RevokeVpcE type RevokeVpcEndpointAccessInput struct { - // The account ID to revoke access from. - // - // This member is required. - Account *string - // The name of the OpenSearch Service domain. // // This member is required. DomainName *string + // The account ID to revoke access from. + Account *string + + // The service SP to revoke access from. + Service types.AWSServicePrincipal + noSmithyDocumentSerde } diff --git a/service/opensearch/api_op_UpdateApplication.go b/service/opensearch/api_op_UpdateApplication.go new file mode 100644 index 00000000000..931e019cece --- /dev/null +++ b/service/opensearch/api_op_UpdateApplication.go @@ -0,0 +1,188 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Update the OpenSearch Application. +func (c *Client) UpdateApplication(ctx context.Context, params *UpdateApplicationInput, optFns ...func(*Options)) (*UpdateApplicationOutput, error) { + if params == nil { + params = &UpdateApplicationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateApplication", params, optFns, c.addOperationUpdateApplicationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateApplicationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateApplicationInput struct { + + // Unique identifier of the OpenSearch Application to be updated. + // + // This member is required. + Id *string + + // Configurations to be changed for the OpenSearch Application. + AppConfigs []types.AppConfig + + // Data sources to be associated with the OpenSearch Application. + DataSources []types.DataSource + + noSmithyDocumentSerde +} + +type UpdateApplicationOutput struct { + + // Configurations for the updated OpenSearch Application. + AppConfigs []types.AppConfig + + // The Amazon Resource Name (ARN) of the domain. See [Identifiers for IAM Entities] in Using Amazon Web Services + // Identity and Access Management for more information. + // + // [Identifiers for IAM Entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/index.html + Arn *string + + // Timestamp at which the OpenSearch Application was created. + CreatedAt *time.Time + + // Data sources associated with the updated OpenSearch Application. + DataSources []types.DataSource + + // IAM Identity Center settings for the updated OpenSearch Application. + IamIdentityCenterOptions *types.IamIdentityCenterOptions + + // Unique identifier of the updated OpenSearch Application. + Id *string + + // Timestamp at which the OpenSearch Application was last updated. + LastUpdatedAt *time.Time + + // Name of the updated OpenSearch Application. + Name *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateApplication{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateApplication{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateApplication"); 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 = addSpanRetryLoop(stack, options); 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 = addOpUpdateApplicationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateApplication(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateApplication(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateApplication", + } +} diff --git a/service/opensearch/api_op_UpdateDomainConfig.go b/service/opensearch/api_op_UpdateDomainConfig.go index ececf263cd8..fbbc98d2adc 100644 --- a/service/opensearch/api_op_UpdateDomainConfig.go +++ b/service/opensearch/api_op_UpdateDomainConfig.go @@ -111,6 +111,9 @@ type UpdateDomainConfigInput struct { // can't change it. IPAddressType types.IPAddressType + // Container for IAM Identity Center Options settings. + IdentityCenterOptions *types.IdentityCenterOptionsInput + // Options to publish OpenSearch logs to Amazon CloudWatch Logs. LogPublishingOptions map[string]types.LogPublishingOption diff --git a/service/opensearch/deserializers.go b/service/opensearch/deserializers.go index fadb61378f5..158751d876b 100644 --- a/service/opensearch/deserializers.go +++ b/service/opensearch/deserializers.go @@ -1139,6 +1139,231 @@ func awsRestjson1_deserializeOpDocumentCancelServiceSoftwareUpdateOutput(v **Can return nil } +type awsRestjson1_deserializeOpCreateApplication struct { +} + +func (*awsRestjson1_deserializeOpCreateApplication) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateApplication) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateApplication(response, &metadata) + } + output := &CreateApplicationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateApplicationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateApplication(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateApplicationOutput(v **CreateApplicationOutput, 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 *CreateApplicationOutput + if *v == nil { + sv = &CreateApplicationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "appConfigs": + if err := awsRestjson1_deserializeDocumentAppConfigs(&sv.AppConfigs, value); err != nil { + return err + } + + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "dataSources": + if err := awsRestjson1_deserializeDocumentDataSources(&sv.DataSources, value); err != nil { + return err + } + + case "iamIdentityCenterOptions": + if err := awsRestjson1_deserializeDocumentIamIdentityCenterOptions(&sv.IamIdentityCenterOptions, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Id 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 ApplicationName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "tagList": + if err := awsRestjson1_deserializeDocumentTagList(&sv.TagList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpCreateDomain struct { } @@ -1849,14 +2074,14 @@ func awsRestjson1_deserializeOpDocumentCreateVpcEndpointOutput(v **CreateVpcEndp return nil } -type awsRestjson1_deserializeOpDeleteDataSource struct { +type awsRestjson1_deserializeOpDeleteApplication struct { } -func (*awsRestjson1_deserializeOpDeleteDataSource) ID() string { +func (*awsRestjson1_deserializeOpDeleteApplication) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteApplication) 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) @@ -1874,44 +2099,16 @@ func (m *awsRestjson1_deserializeOpDeleteDataSource) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteDataSource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteApplication(response, &metadata) } - output := &DeleteDataSourceOutput{} + output := &DeleteApplicationOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentDeleteDataSourceOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteApplication(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)} @@ -1952,11 +2149,14 @@ func awsRestjson1_deserializeOpErrorDeleteDataSource(response *smithyhttp.Respon } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("BaseException", errorCode): return awsRestjson1_deserializeErrorBaseException(response, errorBody) - case strings.EqualFold("DependencyFailureException", errorCode): - return awsRestjson1_deserializeErrorDependencyFailureException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("DisabledOperationException", errorCode): return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) @@ -1980,20 +2180,151 @@ func awsRestjson1_deserializeOpErrorDeleteDataSource(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentDeleteDataSourceOutput(v **DeleteDataSourceOutput, 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) - } +type awsRestjson1_deserializeOpDeleteDataSource struct { +} - var sv *DeleteDataSourceOutput +func (*awsRestjson1_deserializeOpDeleteDataSource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteDataSource) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteDataSource(response, &metadata) + } + output := &DeleteDataSourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDeleteDataSourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("DependencyFailureException", errorCode): + return awsRestjson1_deserializeErrorDependencyFailureException(response, errorBody) + + case strings.EqualFold("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDeleteDataSourceOutput(v **DeleteDataSourceOutput, 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 *DeleteDataSourceOutput if *v == nil { sv = &DeleteDataSourceOutput{} } else { @@ -5584,14 +5915,14 @@ func awsRestjson1_deserializeOpDocumentDissociatePackageOutput(v **DissociatePac return nil } -type awsRestjson1_deserializeOpGetCompatibleVersions struct { +type awsRestjson1_deserializeOpGetApplication struct { } -func (*awsRestjson1_deserializeOpGetCompatibleVersions) ID() string { +func (*awsRestjson1_deserializeOpGetApplication) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetCompatibleVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetApplication) 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) @@ -5609,9 +5940,9 @@ func (m *awsRestjson1_deserializeOpGetCompatibleVersions) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetCompatibleVersions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetApplication(response, &metadata) } - output := &GetCompatibleVersionsOutput{} + output := &GetApplicationOutput{} out.Result = output var buff [1024]byte @@ -5632,7 +5963,7 @@ func (m *awsRestjson1_deserializeOpGetCompatibleVersions) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetCompatibleVersionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetApplicationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5646,7 +5977,7 @@ func (m *awsRestjson1_deserializeOpGetCompatibleVersions) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetCompatibleVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetApplication(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)} @@ -5687,6 +6018,9 @@ func awsRestjson1_deserializeOpErrorGetCompatibleVersions(response *smithyhttp.R } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("BaseException", errorCode): return awsRestjson1_deserializeErrorBaseException(response, errorBody) @@ -5712,7 +6046,7 @@ func awsRestjson1_deserializeOpErrorGetCompatibleVersions(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentGetCompatibleVersionsOutput(v **GetCompatibleVersionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetApplicationOutput(v **GetApplicationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5725,20 +6059,107 @@ func awsRestjson1_deserializeOpDocumentGetCompatibleVersionsOutput(v **GetCompat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetCompatibleVersionsOutput + var sv *GetApplicationOutput if *v == nil { - sv = &GetCompatibleVersionsOutput{} + sv = &GetApplicationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "CompatibleVersions": - if err := awsRestjson1_deserializeDocumentCompatibleVersionsList(&sv.CompatibleVersions, value); err != nil { + case "appConfigs": + if err := awsRestjson1_deserializeDocumentAppConfigs(&sv.AppConfigs, value); err != nil { + return err + } + + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "dataSources": + if err := awsRestjson1_deserializeDocumentDataSources(&sv.DataSources, value); err != nil { + return err + } + + case "endpoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Endpoint = ptr.String(jtv) + } + + case "iamIdentityCenterOptions": + if err := awsRestjson1_deserializeDocumentIamIdentityCenterOptions(&sv.IamIdentityCenterOptions, value); err != nil { return err } + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Id to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "lastUpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationStatus to be of type string, got %T instead", value) + } + sv.Status = types.ApplicationStatus(jtv) + } + default: _, _ = key, value @@ -5748,14 +6169,14 @@ func awsRestjson1_deserializeOpDocumentGetCompatibleVersionsOutput(v **GetCompat return nil } -type awsRestjson1_deserializeOpGetDataSource struct { +type awsRestjson1_deserializeOpGetCompatibleVersions struct { } -func (*awsRestjson1_deserializeOpGetDataSource) ID() string { +func (*awsRestjson1_deserializeOpGetCompatibleVersions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetCompatibleVersions) 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) @@ -5773,9 +6194,9 @@ func (m *awsRestjson1_deserializeOpGetDataSource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetDataSource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetCompatibleVersions(response, &metadata) } - output := &GetDataSourceOutput{} + output := &GetCompatibleVersionsOutput{} out.Result = output var buff [1024]byte @@ -5796,7 +6217,7 @@ func (m *awsRestjson1_deserializeOpGetDataSource) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetDataSourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetCompatibleVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5810,7 +6231,7 @@ func (m *awsRestjson1_deserializeOpGetDataSource) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetCompatibleVersions(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)} @@ -5854,9 +6275,6 @@ func awsRestjson1_deserializeOpErrorGetDataSource(response *smithyhttp.Response, case strings.EqualFold("BaseException", errorCode): return awsRestjson1_deserializeErrorBaseException(response, errorBody) - case strings.EqualFold("DependencyFailureException", errorCode): - return awsRestjson1_deserializeErrorDependencyFailureException(response, errorBody) - case strings.EqualFold("DisabledOperationException", errorCode): return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) @@ -5879,7 +6297,7 @@ func awsRestjson1_deserializeOpErrorGetDataSource(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentGetDataSourceOutput(v **GetDataSourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetCompatibleVersionsOutput(v **GetCompatibleVersionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5892,23 +6310,190 @@ func awsRestjson1_deserializeOpDocumentGetDataSourceOutput(v **GetDataSourceOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetDataSourceOutput + var sv *GetCompatibleVersionsOutput if *v == nil { - sv = &GetDataSourceOutput{} + sv = &GetCompatibleVersionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSourceType": - if err := awsRestjson1_deserializeDocumentDataSourceType(&sv.DataSourceType, value); err != nil { + case "CompatibleVersions": + if err := awsRestjson1_deserializeDocumentCompatibleVersionsList(&sv.CompatibleVersions, value); err != nil { return err } - case "Description": - if value != nil { - jtv, ok := value.(string) + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetDataSource struct { +} + +func (*awsRestjson1_deserializeOpGetDataSource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetDataSource) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetDataSource(response, &metadata) + } + output := &GetDataSourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetDataSourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("DependencyFailureException", errorCode): + return awsRestjson1_deserializeErrorDependencyFailureException(response, errorBody) + + case strings.EqualFold("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetDataSourceOutput(v **GetDataSourceOutput, 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 *GetDataSourceOutput + if *v == nil { + sv = &GetDataSourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DataSourceType": + if err := awsRestjson1_deserializeDocumentDataSourceType(&sv.DataSourceType, value); err != nil { + return err + } + + case "Description": + if value != nil { + jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DataSourceDescription to be of type string, got %T instead", value) } @@ -6297,7 +6882,189 @@ func awsRestjson1_deserializeOpErrorGetPackageVersionHistory(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentGetPackageVersionHistoryOutput(v **GetPackageVersionHistoryOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetPackageVersionHistoryOutput(v **GetPackageVersionHistoryOutput, 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 *GetPackageVersionHistoryOutput + if *v == nil { + sv = &GetPackageVersionHistoryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "PackageID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageID to be of type string, got %T instead", value) + } + sv.PackageID = ptr.String(jtv) + } + + case "PackageVersionHistoryList": + if err := awsRestjson1_deserializeDocumentPackageVersionHistoryList(&sv.PackageVersionHistoryList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetUpgradeHistory struct { +} + +func (*awsRestjson1_deserializeOpGetUpgradeHistory) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetUpgradeHistory) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetUpgradeHistory(response, &metadata) + } + output := &GetUpgradeHistoryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetUpgradeHistoryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetUpgradeHistory(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetUpgradeHistoryOutput(v **GetUpgradeHistoryOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6310,9 +7077,9 @@ func awsRestjson1_deserializeOpDocumentGetPackageVersionHistoryOutput(v **GetPac return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetPackageVersionHistoryOutput + var sv *GetUpgradeHistoryOutput if *v == nil { - sv = &GetPackageVersionHistoryOutput{} + sv = &GetUpgradeHistoryOutput{} } else { sv = *v } @@ -6328,17 +7095,8 @@ func awsRestjson1_deserializeOpDocumentGetPackageVersionHistoryOutput(v **GetPac sv.NextToken = ptr.String(jtv) } - case "PackageID": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PackageID to be of type string, got %T instead", value) - } - sv.PackageID = ptr.String(jtv) - } - - case "PackageVersionHistoryList": - if err := awsRestjson1_deserializeDocumentPackageVersionHistoryList(&sv.PackageVersionHistoryList, value); err != nil { + case "UpgradeHistories": + if err := awsRestjson1_deserializeDocumentUpgradeHistoryList(&sv.UpgradeHistories, value); err != nil { return err } @@ -6351,14 +7109,14 @@ func awsRestjson1_deserializeOpDocumentGetPackageVersionHistoryOutput(v **GetPac return nil } -type awsRestjson1_deserializeOpGetUpgradeHistory struct { +type awsRestjson1_deserializeOpGetUpgradeStatus struct { } -func (*awsRestjson1_deserializeOpGetUpgradeHistory) ID() string { +func (*awsRestjson1_deserializeOpGetUpgradeStatus) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetUpgradeHistory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetUpgradeStatus) 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) @@ -6376,9 +7134,9 @@ func (m *awsRestjson1_deserializeOpGetUpgradeHistory) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetUpgradeHistory(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetUpgradeStatus(response, &metadata) } - output := &GetUpgradeHistoryOutput{} + output := &GetUpgradeStatusOutput{} out.Result = output var buff [1024]byte @@ -6399,7 +7157,7 @@ func (m *awsRestjson1_deserializeOpGetUpgradeHistory) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetUpgradeHistoryOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetUpgradeStatusOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6413,7 +7171,7 @@ func (m *awsRestjson1_deserializeOpGetUpgradeHistory) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetUpgradeHistory(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetUpgradeStatus(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)} @@ -6479,7 +7237,7 @@ func awsRestjson1_deserializeOpErrorGetUpgradeHistory(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentGetUpgradeHistoryOutput(v **GetUpgradeHistoryOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetUpgradeStatusOutput(v **GetUpgradeStatusOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6492,27 +7250,40 @@ func awsRestjson1_deserializeOpDocumentGetUpgradeHistoryOutput(v **GetUpgradeHis return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetUpgradeHistoryOutput + var sv *GetUpgradeStatusOutput if *v == nil { - sv = &GetUpgradeHistoryOutput{} + sv = &GetUpgradeStatusOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "NextToken": + case "StepStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected UpgradeStatus to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.StepStatus = types.UpgradeStatus(jtv) } - case "UpgradeHistories": - if err := awsRestjson1_deserializeDocumentUpgradeHistoryList(&sv.UpgradeHistories, value); err != nil { - return err + case "UpgradeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpgradeName to be of type string, got %T instead", value) + } + sv.UpgradeName = ptr.String(jtv) + } + + case "UpgradeStep": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpgradeStep to be of type string, got %T instead", value) + } + sv.UpgradeStep = types.UpgradeStep(jtv) } default: @@ -6524,14 +7295,14 @@ func awsRestjson1_deserializeOpDocumentGetUpgradeHistoryOutput(v **GetUpgradeHis return nil } -type awsRestjson1_deserializeOpGetUpgradeStatus struct { +type awsRestjson1_deserializeOpListApplications struct { } -func (*awsRestjson1_deserializeOpGetUpgradeStatus) ID() string { +func (*awsRestjson1_deserializeOpListApplications) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetUpgradeStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListApplications) 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) @@ -6549,9 +7320,9 @@ func (m *awsRestjson1_deserializeOpGetUpgradeStatus) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetUpgradeStatus(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListApplications(response, &metadata) } - output := &GetUpgradeStatusOutput{} + output := &ListApplicationsOutput{} out.Result = output var buff [1024]byte @@ -6572,7 +7343,7 @@ func (m *awsRestjson1_deserializeOpGetUpgradeStatus) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetUpgradeStatusOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListApplicationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6586,7 +7357,7 @@ func (m *awsRestjson1_deserializeOpGetUpgradeStatus) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetUpgradeStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListApplications(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)} @@ -6627,6 +7398,9 @@ func awsRestjson1_deserializeOpErrorGetUpgradeStatus(response *smithyhttp.Respon } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("BaseException", errorCode): return awsRestjson1_deserializeErrorBaseException(response, errorBody) @@ -6652,7 +7426,7 @@ func awsRestjson1_deserializeOpErrorGetUpgradeStatus(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentGetUpgradeStatusOutput(v **GetUpgradeStatusOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListApplicationsOutput(v **ListApplicationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6665,40 +7439,27 @@ func awsRestjson1_deserializeOpDocumentGetUpgradeStatusOutput(v **GetUpgradeStat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetUpgradeStatusOutput + var sv *ListApplicationsOutput if *v == nil { - sv = &GetUpgradeStatusOutput{} + sv = &ListApplicationsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "StepStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UpgradeStatus to be of type string, got %T instead", value) - } - sv.StepStatus = types.UpgradeStatus(jtv) - } - - case "UpgradeName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UpgradeName to be of type string, got %T instead", value) - } - sv.UpgradeName = ptr.String(jtv) + case "ApplicationSummaries": + if err := awsRestjson1_deserializeDocumentApplicationSummaries(&sv.ApplicationSummaries, value); err != nil { + return err } - case "UpgradeStep": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected UpgradeStep to be of type string, got %T instead", value) + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } - sv.UpgradeStep = types.UpgradeStep(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -9537,10 +10298,180 @@ func awsRestjson1_deserializeOpErrorStartServiceSoftwareUpdate(response *smithyh errorMessage = message } - switch { + switch { + case strings.EqualFold("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentStartServiceSoftwareUpdateOutput(v **StartServiceSoftwareUpdateOutput, 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 *StartServiceSoftwareUpdateOutput + if *v == nil { + sv = &StartServiceSoftwareUpdateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ServiceSoftwareOptions": + if err := awsRestjson1_deserializeDocumentServiceSoftwareOptions(&sv.ServiceSoftwareOptions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateApplication struct { +} + +func (*awsRestjson1_deserializeOpUpdateApplication) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateApplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateApplication(response, &metadata) + } + output := &UpdateApplicationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateApplicationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateApplication(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("BaseException", errorCode): return awsRestjson1_deserializeErrorBaseException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + case strings.EqualFold("InternalException", errorCode): return awsRestjson1_deserializeErrorInternalException(response, errorBody) @@ -9560,7 +10491,7 @@ func awsRestjson1_deserializeOpErrorStartServiceSoftwareUpdate(response *smithyh } } -func awsRestjson1_deserializeOpDocumentStartServiceSoftwareUpdateOutput(v **StartServiceSoftwareUpdateOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateApplicationOutput(v **UpdateApplicationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9573,20 +10504,89 @@ func awsRestjson1_deserializeOpDocumentStartServiceSoftwareUpdateOutput(v **Star return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartServiceSoftwareUpdateOutput + var sv *UpdateApplicationOutput if *v == nil { - sv = &StartServiceSoftwareUpdateOutput{} + sv = &UpdateApplicationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ServiceSoftwareOptions": - if err := awsRestjson1_deserializeDocumentServiceSoftwareOptions(&sv.ServiceSoftwareOptions, value); err != nil { + case "appConfigs": + if err := awsRestjson1_deserializeDocumentAppConfigs(&sv.AppConfigs, value); err != nil { + return err + } + + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "dataSources": + if err := awsRestjson1_deserializeDocumentDataSources(&sv.DataSources, value); err != nil { + return err + } + + case "iamIdentityCenterOptions": + if err := awsRestjson1_deserializeDocumentIamIdentityCenterOptions(&sv.IamIdentityCenterOptions, value); err != nil { return err } + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Id to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "lastUpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + default: _, _ = key, value @@ -11546,16 +12546,241 @@ func awsRestjson1_deserializeDocumentAIMLOptionsStatus(v **types.AIMLOptionsStat sv = *v } - for key, value := range shape { - switch key { - case "Options": - if err := awsRestjson1_deserializeDocumentAIMLOptionsOutput(&sv.Options, value); err != nil { - return err + for key, value := range shape { + switch key { + case "Options": + if err := awsRestjson1_deserializeDocumentAIMLOptionsOutput(&sv.Options, value); err != nil { + return err + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAppConfig(v **types.AppConfig, 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.AppConfig + if *v == nil { + sv = &types.AppConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AppConfigType to be of type string, got %T instead", value) + } + sv.Key = types.AppConfigType(jtv) + } + + case "value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AppConfigValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAppConfigs(v *[]types.AppConfig, 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.AppConfig + if *v == nil { + cv = []types.AppConfig{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AppConfig + destAddr := &col + if err := awsRestjson1_deserializeDocumentAppConfig(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentApplicationSummaries(v *[]types.ApplicationSummary, 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.ApplicationSummary + if *v == nil { + cv = []types.ApplicationSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ApplicationSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentApplicationSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentApplicationSummary(v **types.ApplicationSummary, 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.ApplicationSummary + if *v == nil { + sv = &types.ApplicationSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "endpoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Endpoint = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Id to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "lastUpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) } - case "Status": - if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { - return err + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationStatus to be of type string, got %T instead", value) + } + sv.Status = types.ApplicationStatus(jtv) } default: @@ -13345,6 +14570,55 @@ func awsRestjson1_deserializeDocumentCrossClusterSearchConnectionProperties(v ** return nil } +func awsRestjson1_deserializeDocumentDataSource(v **types.DataSource, 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.DataSource + if *v == nil { + sv = &types.DataSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "dataSourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.DataSourceArn = ptr.String(jtv) + } + + case "dataSourceDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataSourceDescription to be of type string, got %T instead", value) + } + sv.DataSourceDescription = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentDataSourceDetails(v **types.DataSourceDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13442,6 +14716,40 @@ func awsRestjson1_deserializeDocumentDataSourceList(v *[]types.DataSourceDetails return nil } +func awsRestjson1_deserializeDocumentDataSources(v *[]types.DataSource, 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.DataSource + if *v == nil { + cv = []types.DataSource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DataSource + destAddr := &col + if err := awsRestjson1_deserializeDocumentDataSource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentDataSourceType(v *types.DataSourceType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13644,6 +14952,11 @@ func awsRestjson1_deserializeDocumentDomainConfig(v **types.DomainConfig, value return err } + case "IdentityCenterOptions": + if err := awsRestjson1_deserializeDocumentIdentityCenterOptionsStatus(&sv.IdentityCenterOptions, value); err != nil { + return err + } + case "IPAddressType": if err := awsRestjson1_deserializeDocumentIPAddressTypeStatus(&sv.IPAddressType, value); err != nil { return err @@ -14542,6 +15855,11 @@ func awsRestjson1_deserializeDocumentDomainStatus(v **types.DomainStatus, value sv.EngineVersion = ptr.String(jtv) } + case "IdentityCenterOptions": + if err := awsRestjson1_deserializeDocumentIdentityCenterOptions(&sv.IdentityCenterOptions, value); err != nil { + return err + } + case "IPAddressType": if value != nil { jtv, ok := value.(string) @@ -15236,6 +16554,199 @@ func awsRestjson1_deserializeDocumentGUIDList(v *[]string, value interface{}) er return nil } +func awsRestjson1_deserializeDocumentIamIdentityCenterOptions(v **types.IamIdentityCenterOptions, 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.IamIdentityCenterOptions + if *v == nil { + sv = &types.IamIdentityCenterOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Enabled = ptr.Bool(jtv) + } + + case "iamIdentityCenterApplicationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.IamIdentityCenterApplicationArn = ptr.String(jtv) + } + + case "iamIdentityCenterInstanceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.IamIdentityCenterInstanceArn = ptr.String(jtv) + } + + case "iamRoleForIdentityCenterApplicationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.IamRoleForIdentityCenterApplicationArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIdentityCenterOptions(v **types.IdentityCenterOptions, 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.IdentityCenterOptions + if *v == nil { + sv = &types.IdentityCenterOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EnabledAPIAccess": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.EnabledAPIAccess = ptr.Bool(jtv) + } + + case "IdentityCenterApplicationARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdentityCenterApplicationARN to be of type string, got %T instead", value) + } + sv.IdentityCenterApplicationARN = ptr.String(jtv) + } + + case "IdentityCenterInstanceARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdentityCenterInstanceARN to be of type string, got %T instead", value) + } + sv.IdentityCenterInstanceARN = ptr.String(jtv) + } + + case "IdentityStoreId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdentityStoreId to be of type string, got %T instead", value) + } + sv.IdentityStoreId = ptr.String(jtv) + } + + case "RolesKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RolesKeyIdCOption to be of type string, got %T instead", value) + } + sv.RolesKey = types.RolesKeyIdCOption(jtv) + } + + case "SubjectKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubjectKeyIdCOption to be of type string, got %T instead", value) + } + sv.SubjectKey = types.SubjectKeyIdCOption(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIdentityCenterOptionsStatus(v **types.IdentityCenterOptionsStatus, 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.IdentityCenterOptionsStatus + if *v == nil { + sv = &types.IdentityCenterOptionsStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if err := awsRestjson1_deserializeDocumentIdentityCenterOptions(&sv.Options, value); err != nil { + return err + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentInboundConnection(v **types.InboundConnection, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/opensearch/generated.json b/service/opensearch/generated.json index 84faaddfce8..25d3a9c4136 100644 --- a/service/opensearch/generated.json +++ b/service/opensearch/generated.json @@ -15,10 +15,12 @@ "api_op_AuthorizeVpcEndpointAccess.go", "api_op_CancelDomainConfigChange.go", "api_op_CancelServiceSoftwareUpdate.go", + "api_op_CreateApplication.go", "api_op_CreateDomain.go", "api_op_CreateOutboundConnection.go", "api_op_CreatePackage.go", "api_op_CreateVpcEndpoint.go", + "api_op_DeleteApplication.go", "api_op_DeleteDataSource.go", "api_op_DeleteDomain.go", "api_op_DeleteInboundConnection.go", @@ -41,12 +43,14 @@ "api_op_DescribeReservedInstances.go", "api_op_DescribeVpcEndpoints.go", "api_op_DissociatePackage.go", + "api_op_GetApplication.go", "api_op_GetCompatibleVersions.go", "api_op_GetDataSource.go", "api_op_GetDomainMaintenanceStatus.go", "api_op_GetPackageVersionHistory.go", "api_op_GetUpgradeHistory.go", "api_op_GetUpgradeStatus.go", + "api_op_ListApplications.go", "api_op_ListDataSources.go", "api_op_ListDomainMaintenances.go", "api_op_ListDomainNames.go", @@ -65,6 +69,7 @@ "api_op_RevokeVpcEndpointAccess.go", "api_op_StartDomainMaintenance.go", "api_op_StartServiceSoftwareUpdate.go", + "api_op_UpdateApplication.go", "api_op_UpdateDataSource.go", "api_op_UpdateDomainConfig.go", "api_op_UpdatePackage.go", diff --git a/service/opensearch/options.go b/service/opensearch/options.go index 4d25967ade4..55533552897 100644 --- a/service/opensearch/options.go +++ b/service/opensearch/options.go @@ -65,6 +65,10 @@ type Options struct { // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 + // Provides idempotency tokens values that will be automatically populated into + // idempotent API operations. + IdempotencyTokenProvider IdempotencyTokenProvider + // The logger writer interface to write logging messages to. Logger logging.Logger diff --git a/service/opensearch/serializers.go b/service/opensearch/serializers.go index 7c0cc10054d..5ba1917f17c 100644 --- a/service/opensearch/serializers.go +++ b/service/opensearch/serializers.go @@ -452,6 +452,11 @@ func awsRestjson1_serializeOpDocumentAuthorizeVpcEndpointAccessInput(v *Authoriz ok.String(*v.Account) } + if len(v.Service) > 0 { + ok := object.Key("Service") + ok.String(string(v.Service)) + } + return nil } @@ -630,6 +635,120 @@ func awsRestjson1_serializeOpDocumentCancelServiceSoftwareUpdateInput(v *CancelS return nil } +type awsRestjson1_serializeOpCreateApplication struct { +} + +func (*awsRestjson1_serializeOpCreateApplication) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateApplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CreateApplicationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/application") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateApplicationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateApplicationInput(v *CreateApplicationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateApplicationInput(v *CreateApplicationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AppConfigs != nil { + ok := object.Key("appConfigs") + if err := awsRestjson1_serializeDocumentAppConfigs(v.AppConfigs, ok); err != nil { + return err + } + } + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.DataSources != nil { + ok := object.Key("dataSources") + if err := awsRestjson1_serializeDocumentDataSources(v.DataSources, ok); err != nil { + return err + } + } + + if v.IamIdentityCenterOptions != nil { + ok := object.Key("iamIdentityCenterOptions") + if err := awsRestjson1_serializeDocumentIamIdentityCenterOptionsInput(v.IamIdentityCenterOptions, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.TagList != nil { + ok := object.Key("tagList") + if err := awsRestjson1_serializeDocumentTagList(v.TagList, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateDomain struct { } @@ -781,6 +900,13 @@ func awsRestjson1_serializeOpDocumentCreateDomainInput(v *CreateDomainInput, val ok.String(*v.EngineVersion) } + if v.IdentityCenterOptions != nil { + ok := object.Key("IdentityCenterOptions") + if err := awsRestjson1_serializeDocumentIdentityCenterOptionsInput(v.IdentityCenterOptions, ok); err != nil { + return err + } + } + if len(v.IPAddressType) > 0 { ok := object.Key("IPAddressType") ok.String(string(v.IPAddressType)) @@ -1136,6 +1262,77 @@ func awsRestjson1_serializeOpDocumentCreateVpcEndpointInput(v *CreateVpcEndpoint return nil } +type awsRestjson1_serializeOpDeleteApplication struct { +} + +func (*awsRestjson1_serializeOpDeleteApplication) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteApplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteApplicationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/application/{id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteApplicationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteApplicationInput(v *DeleteApplicationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteDataSource struct { } @@ -2865,6 +3062,77 @@ func awsRestjson1_serializeOpHttpBindingsDissociatePackageInput(v *DissociatePac return nil } +type awsRestjson1_serializeOpGetApplication struct { +} + +func (*awsRestjson1_serializeOpGetApplication) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetApplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetApplicationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/application/{id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetApplicationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetApplicationInput(v *GetApplicationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetCompatibleVersions struct { } @@ -3315,6 +3583,82 @@ func awsRestjson1_serializeOpHttpBindingsGetUpgradeStatusInput(v *GetUpgradeStat return nil } +type awsRestjson1_serializeOpListApplications struct { +} + +func (*awsRestjson1_serializeOpListApplications) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListApplications) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListApplicationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/list-applications") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListApplicationsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListApplicationsInput(v *ListApplicationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.Statuses != nil { + for i := range v.Statuses { + encoder.AddQuery("statuses").String(string(v.Statuses[i])) + } + } + + return nil +} + type awsRestjson1_serializeOpListDataSources struct { } @@ -4560,6 +4904,11 @@ func awsRestjson1_serializeOpDocumentRevokeVpcEndpointAccessInput(v *RevokeVpcEn ok.String(*v.Account) } + if len(v.Service) > 0 { + ok := object.Key("Service") + ok.String(string(v.Service)) + } + return nil } @@ -4753,6 +5102,109 @@ func awsRestjson1_serializeOpDocumentStartServiceSoftwareUpdateInput(v *StartSer return nil } +type awsRestjson1_serializeOpUpdateApplication struct { +} + +func (*awsRestjson1_serializeOpUpdateApplication) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateApplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*UpdateApplicationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/application/{id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateApplicationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateApplicationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateApplicationInput(v *UpdateApplicationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateApplicationInput(v *UpdateApplicationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AppConfigs != nil { + ok := object.Key("appConfigs") + if err := awsRestjson1_serializeDocumentAppConfigs(v.AppConfigs, ok); err != nil { + return err + } + } + + if v.DataSources != nil { + ok := object.Key("dataSources") + if err := awsRestjson1_serializeDocumentDataSources(v.DataSources, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpUpdateDataSource struct { } @@ -5032,6 +5484,13 @@ func awsRestjson1_serializeOpDocumentUpdateDomainConfigInput(v *UpdateDomainConf } } + if v.IdentityCenterOptions != nil { + ok := object.Key("IdentityCenterOptions") + if err := awsRestjson1_serializeDocumentIdentityCenterOptionsInput(v.IdentityCenterOptions, ok); err != nil { + return err + } + } + if len(v.IPAddressType) > 0 { ok := object.Key("IPAddressType") ok.String(string(v.IPAddressType)) @@ -5543,6 +6002,36 @@ func awsRestjson1_serializeDocumentAIMLOptionsInput(v *types.AIMLOptionsInput, v return nil } +func awsRestjson1_serializeDocumentAppConfig(v *types.AppConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("key") + ok.String(string(v.Key)) + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + +func awsRestjson1_serializeDocumentAppConfigs(v []types.AppConfig, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentAppConfig(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentAutoTuneMaintenanceSchedule(v *types.AutoTuneMaintenanceSchedule, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5803,6 +6292,36 @@ func awsRestjson1_serializeDocumentCrossClusterSearchConnectionProperties(v *typ return nil } +func awsRestjson1_serializeDocumentDataSource(v *types.DataSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DataSourceArn != nil { + ok := object.Key("dataSourceArn") + ok.String(*v.DataSourceArn) + } + + if v.DataSourceDescription != nil { + ok := object.Key("dataSourceDescription") + ok.String(*v.DataSourceDescription) + } + + return nil +} + +func awsRestjson1_serializeDocumentDataSources(v []types.DataSource, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentDataSource(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentDataSourceType(v types.DataSourceType, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6019,6 +6538,55 @@ func awsRestjson1_serializeDocumentFilterList(v []types.Filter, value smithyjson return nil } +func awsRestjson1_serializeDocumentIamIdentityCenterOptionsInput(v *types.IamIdentityCenterOptionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Enabled != nil { + ok := object.Key("enabled") + ok.Boolean(*v.Enabled) + } + + if v.IamIdentityCenterInstanceArn != nil { + ok := object.Key("iamIdentityCenterInstanceArn") + ok.String(*v.IamIdentityCenterInstanceArn) + } + + if v.IamRoleForIdentityCenterApplicationArn != nil { + ok := object.Key("iamRoleForIdentityCenterApplicationArn") + ok.String(*v.IamRoleForIdentityCenterApplicationArn) + } + + return nil +} + +func awsRestjson1_serializeDocumentIdentityCenterOptionsInput(v *types.IdentityCenterOptionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EnabledAPIAccess != nil { + ok := object.Key("EnabledAPIAccess") + ok.Boolean(*v.EnabledAPIAccess) + } + + if v.IdentityCenterInstanceARN != nil { + ok := object.Key("IdentityCenterInstanceARN") + ok.String(*v.IdentityCenterInstanceARN) + } + + if len(v.RolesKey) > 0 { + ok := object.Key("RolesKey") + ok.String(string(v.RolesKey)) + } + + if len(v.SubjectKey) > 0 { + ok := object.Key("SubjectKey") + ok.String(string(v.SubjectKey)) + } + + return nil +} + func awsRestjson1_serializeDocumentJWTOptionsInput(v *types.JWTOptionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/opensearch/snapshot/api_op_CreateApplication.go.snap b/service/opensearch/snapshot/api_op_CreateApplication.go.snap new file mode 100644 index 00000000000..d164013e153 --- /dev/null +++ b/service/opensearch/snapshot/api_op_CreateApplication.go.snap @@ -0,0 +1,42 @@ +CreateApplication + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/opensearch/snapshot/api_op_DeleteApplication.go.snap b/service/opensearch/snapshot/api_op_DeleteApplication.go.snap new file mode 100644 index 00000000000..7d2f59844da --- /dev/null +++ b/service/opensearch/snapshot/api_op_DeleteApplication.go.snap @@ -0,0 +1,41 @@ +DeleteApplication + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/opensearch/snapshot/api_op_GetApplication.go.snap b/service/opensearch/snapshot/api_op_GetApplication.go.snap new file mode 100644 index 00000000000..0e4d096e441 --- /dev/null +++ b/service/opensearch/snapshot/api_op_GetApplication.go.snap @@ -0,0 +1,41 @@ +GetApplication + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/opensearch/snapshot/api_op_ListApplications.go.snap b/service/opensearch/snapshot/api_op_ListApplications.go.snap new file mode 100644 index 00000000000..a3e5fceba8f --- /dev/null +++ b/service/opensearch/snapshot/api_op_ListApplications.go.snap @@ -0,0 +1,40 @@ +ListApplications + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/opensearch/snapshot/api_op_UpdateApplication.go.snap b/service/opensearch/snapshot/api_op_UpdateApplication.go.snap new file mode 100644 index 00000000000..399df2b250c --- /dev/null +++ b/service/opensearch/snapshot/api_op_UpdateApplication.go.snap @@ -0,0 +1,41 @@ +UpdateApplication + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/opensearch/snapshot_test.go b/service/opensearch/snapshot_test.go index e750dc1fef3..5463f14db4a 100644 --- a/service/opensearch/snapshot_test.go +++ b/service/opensearch/snapshot_test.go @@ -146,6 +146,18 @@ func TestCheckSnapshot_CancelServiceSoftwareUpdate(t *testing.T) { } } +func TestCheckSnapshot_CreateApplication(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateApplication(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateApplication") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateDomain(t *testing.T) { svc := New(Options{}) _, err := svc.CreateDomain(context.Background(), nil, func(o *Options) { @@ -194,6 +206,18 @@ func TestCheckSnapshot_CreateVpcEndpoint(t *testing.T) { } } +func TestCheckSnapshot_DeleteApplication(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteApplication(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteApplication") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteDataSource(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteDataSource(context.Background(), nil, func(o *Options) { @@ -458,6 +482,18 @@ func TestCheckSnapshot_DissociatePackage(t *testing.T) { } } +func TestCheckSnapshot_GetApplication(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetApplication(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetApplication") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetCompatibleVersions(t *testing.T) { svc := New(Options{}) _, err := svc.GetCompatibleVersions(context.Background(), nil, func(o *Options) { @@ -530,6 +566,18 @@ func TestCheckSnapshot_GetUpgradeStatus(t *testing.T) { } } +func TestCheckSnapshot_ListApplications(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListApplications(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListApplications") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListDataSources(t *testing.T) { svc := New(Options{}) _, err := svc.ListDataSources(context.Background(), nil, func(o *Options) { @@ -746,6 +794,18 @@ func TestCheckSnapshot_StartServiceSoftwareUpdate(t *testing.T) { } } +func TestCheckSnapshot_UpdateApplication(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateApplication(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateApplication") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateDataSource(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateDataSource(context.Background(), nil, func(o *Options) { @@ -901,6 +961,18 @@ func TestUpdateSnapshot_CancelServiceSoftwareUpdate(t *testing.T) { } } +func TestUpdateSnapshot_CreateApplication(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateApplication(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateApplication") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateDomain(t *testing.T) { svc := New(Options{}) _, err := svc.CreateDomain(context.Background(), nil, func(o *Options) { @@ -949,6 +1021,18 @@ func TestUpdateSnapshot_CreateVpcEndpoint(t *testing.T) { } } +func TestUpdateSnapshot_DeleteApplication(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteApplication(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteApplication") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteDataSource(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteDataSource(context.Background(), nil, func(o *Options) { @@ -1213,6 +1297,18 @@ func TestUpdateSnapshot_DissociatePackage(t *testing.T) { } } +func TestUpdateSnapshot_GetApplication(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetApplication(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetApplication") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetCompatibleVersions(t *testing.T) { svc := New(Options{}) _, err := svc.GetCompatibleVersions(context.Background(), nil, func(o *Options) { @@ -1285,6 +1381,18 @@ func TestUpdateSnapshot_GetUpgradeStatus(t *testing.T) { } } +func TestUpdateSnapshot_ListApplications(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListApplications(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListApplications") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListDataSources(t *testing.T) { svc := New(Options{}) _, err := svc.ListDataSources(context.Background(), nil, func(o *Options) { @@ -1501,6 +1609,18 @@ func TestUpdateSnapshot_StartServiceSoftwareUpdate(t *testing.T) { } } +func TestUpdateSnapshot_UpdateApplication(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateApplication(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateApplication") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateDataSource(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateDataSource(context.Background(), nil, func(o *Options) { diff --git a/service/opensearch/types/enums.go b/service/opensearch/types/enums.go index 31f957fa3ea..b86a59cf06d 100644 --- a/service/opensearch/types/enums.go +++ b/service/opensearch/types/enums.go @@ -71,6 +71,50 @@ func (ActionType) Values() []ActionType { } } +type AppConfigType string + +// Enum values for AppConfigType +const ( + AppConfigTypeOpensearchDashboardAdminUsers AppConfigType = "opensearchDashboards.dashboardAdmin.users" + AppConfigTypeOpensearchDashboardAdminGroups AppConfigType = "opensearchDashboards.dashboardAdmin.groups" +) + +// Values returns all known values for AppConfigType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AppConfigType) Values() []AppConfigType { + return []AppConfigType{ + "opensearchDashboards.dashboardAdmin.users", + "opensearchDashboards.dashboardAdmin.groups", + } +} + +type ApplicationStatus string + +// Enum values for ApplicationStatus +const ( + ApplicationStatusCreating ApplicationStatus = "CREATING" + ApplicationStatusUpdating ApplicationStatus = "UPDATING" + ApplicationStatusDeleting ApplicationStatus = "DELETING" + ApplicationStatusActive ApplicationStatus = "ACTIVE" + ApplicationStatusFailed ApplicationStatus = "FAILED" +) + +// Values returns all known values for ApplicationStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ApplicationStatus) Values() []ApplicationStatus { + return []ApplicationStatus{ + "CREATING", + "UPDATING", + "DELETING", + "ACTIVE", + "FAILED", + } +} + type AutoTuneDesiredState string // Enum values for AutoTuneDesiredState @@ -140,6 +184,23 @@ func (AutoTuneType) Values() []AutoTuneType { } } +type AWSServicePrincipal string + +// Enum values for AWSServicePrincipal +const ( + AWSServicePrincipalApplicationOpensearchserviceAmazonawsCom AWSServicePrincipal = "application.opensearchservice.amazonaws.com" +) + +// Values returns all known values for AWSServicePrincipal. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AWSServicePrincipal) Values() []AWSServicePrincipal { + return []AWSServicePrincipal{ + "application.opensearchservice.amazonaws.com", + } +} + type ConfigChangeStatus string // Enum values for ConfigChangeStatus @@ -1095,6 +1156,25 @@ func (ReservedInstancePaymentOption) Values() []ReservedInstancePaymentOption { } } +type RolesKeyIdCOption string + +// Enum values for RolesKeyIdCOption +const ( + RolesKeyIdCOptionGroupName RolesKeyIdCOption = "GroupName" + RolesKeyIdCOptionGroupId RolesKeyIdCOption = "GroupId" +) + +// Values returns all known values for RolesKeyIdCOption. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RolesKeyIdCOption) Values() []RolesKeyIdCOption { + return []RolesKeyIdCOption{ + "GroupName", + "GroupId", + } +} + type RollbackOnDisable string // Enum values for RollbackOnDisable @@ -1214,6 +1294,27 @@ func (SkipUnavailableStatus) Values() []SkipUnavailableStatus { } } +type SubjectKeyIdCOption string + +// Enum values for SubjectKeyIdCOption +const ( + SubjectKeyIdCOptionUserName SubjectKeyIdCOption = "UserName" + SubjectKeyIdCOptionUserId SubjectKeyIdCOption = "UserId" + SubjectKeyIdCOptionEmail SubjectKeyIdCOption = "Email" +) + +// Values returns all known values for SubjectKeyIdCOption. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SubjectKeyIdCOption) Values() []SubjectKeyIdCOption { + return []SubjectKeyIdCOption{ + "UserName", + "UserId", + "Email", + } +} + type TimeUnit string // Enum values for TimeUnit diff --git a/service/opensearch/types/types.go b/service/opensearch/types/types.go index 966da2a4530..b42fe4c4329 100644 --- a/service/opensearch/types/types.go +++ b/service/opensearch/types/types.go @@ -198,6 +198,50 @@ type AIMLOptionsStatus struct { noSmithyDocumentSerde } +// Configurations of the OpenSearch Application. +type AppConfig struct { + + // Specify the item to configure, such as admin role for the OpenSearch + // Application. + Key AppConfigType + + // Specifies the value to configure for the key, such as an IAM user ARN. + Value *string + + noSmithyDocumentSerde +} + +// Basic information of the OpenSearch Application. +type ApplicationSummary struct { + + // The Amazon Resource Name (ARN) of the domain. See [Identifiers for IAM Entities] in Using Amazon Web Services + // Identity and Access Management for more information. + // + // [Identifiers for IAM Entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/index.html + Arn *string + + // Timestamp at which an OpenSearch Application was created. + CreatedAt *time.Time + + // Endpoint URL of an OpenSearch Application. + Endpoint *string + + // Unique identifier for an OpenSearch application. + Id *string + + // Timestamp at which an OpenSearch Application was last updated. + LastUpdatedAt *time.Time + + // Name of an OpenSearch Application. + Name *string + + // Status of an OpenSearch Application. Possible values are CREATING , UPDATING , + // DELETING , FAILED , ACTIVE , and DELETED . + Status ApplicationStatus + + noSmithyDocumentSerde +} + // Information about an Amazon Web Services account or service that has access to // an Amazon OpenSearch Service domain through the use of an interface VPC // endpoint. @@ -692,6 +736,21 @@ type CrossClusterSearchConnectionProperties struct { noSmithyDocumentSerde } +// Data sources that are associated with an OpenSearch Application. +type DataSource struct { + + // The Amazon Resource Name (ARN) of the domain. See [Identifiers for IAM Entities] in Using Amazon Web Services + // Identity and Access Management for more information. + // + // [Identifiers for IAM Entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/index.html + DataSourceArn *string + + // Detailed description of a data source. + DataSourceDescription *string + + noSmithyDocumentSerde +} + // Details about a direct-query data source. type DataSourceDetails struct { @@ -790,6 +849,9 @@ type DomainConfig struct { // change your address type later. IPAddressType *IPAddressTypeStatus + // Container for IAM Identity Center Option control for the domain. + IdentityCenterOptions *IdentityCenterOptionsStatus + // Key-value pairs to configure log publishing. LogPublishingOptions *LogPublishingOptionsStatus @@ -1086,6 +1148,9 @@ type DomainStatus struct { // The type of IP addresses supported by the endpoint for the domain. IPAddressType IPAddressType + // Container for IAM Identity Center Option control for the domain. + IdentityCenterOptions *IdentityCenterOptions + // Log publishing options for the domain. LogPublishingOptions map[string]LogPublishingOption @@ -1299,6 +1364,113 @@ type Filter struct { noSmithyDocumentSerde } +// Settings for IAM Identity Center for an OpenSearch Application. +type IamIdentityCenterOptions struct { + + // IAM Identity Center is enabled for the OpenSearch Application. + Enabled *bool + + // The Amazon Resource Name (ARN) of the domain. See [Identifiers for IAM Entities] in Using Amazon Web Services + // Identity and Access Management for more information. + // + // [Identifiers for IAM Entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/index.html + IamIdentityCenterApplicationArn *string + + // The Amazon Resource Name (ARN) of the domain. See [Identifiers for IAM Entities] in Using Amazon Web Services + // Identity and Access Management for more information. + // + // [Identifiers for IAM Entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/index.html + IamIdentityCenterInstanceArn *string + + // Amazon Resource Name of the IAM Identity Center's Application created for the + // OpenSearch Application after enabling IAM Identity Center. + IamRoleForIdentityCenterApplicationArn *string + + noSmithyDocumentSerde +} + +// Settings for IAM Identity Center. +type IamIdentityCenterOptionsInput struct { + + // Enable/disable settings for IAM Identity Center. + Enabled *bool + + // The Amazon Resource Name (ARN) of the domain. See [Identifiers for IAM Entities] in Using Amazon Web Services + // Identity and Access Management for more information. + // + // [Identifiers for IAM Entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/index.html + IamIdentityCenterInstanceArn *string + + // Amazon Resource Name of IAM Identity Center's application. + IamRoleForIdentityCenterApplicationArn *string + + noSmithyDocumentSerde +} + +// Container for IAM Identity Center Options settings. +type IdentityCenterOptions struct { + + // True to enable IAM Identity Center for API access in Amazon OpenSearch Service. + EnabledAPIAccess *bool + + // The ARN for IAM Identity Center Application which will integrate with Amazon + // OpenSearch Service. + IdentityCenterApplicationARN *string + + // The ARN for IAM Identity Center Instance. + IdentityCenterInstanceARN *string + + // The ID of IAM Identity Store. + IdentityStoreId *string + + // Specify the attribute that contains the backend role (groupName, groupID) of + // IAM Identity Center + RolesKey RolesKeyIdCOption + + // Specify the attribute that contains the subject (username, userID, email) of + // IAM Identity Center. + SubjectKey SubjectKeyIdCOption + + noSmithyDocumentSerde +} + +// Container for IAM Identity Center Options settings. +type IdentityCenterOptionsInput struct { + + // True to enable IAM Identity Center for API access in Amazon OpenSearch Service. + EnabledAPIAccess *bool + + // The ARN for IAM Identity Center Instance which will be used for IAM Identity + // Center Application creation. + IdentityCenterInstanceARN *string + + // Specify the attribute that contains the backend role (groupName, groupID) of + // IAM Identity Center + RolesKey RolesKeyIdCOption + + // Specify the attribute that contains the subject (username, userID, email) of + // IAM Identity Center. + SubjectKey SubjectKeyIdCOption + + noSmithyDocumentSerde +} + +// The status of IAM Identity Center Options settings for a domain. +type IdentityCenterOptionsStatus struct { + + // Container for IAM Identity Center Options settings. + // + // This member is required. + Options *IdentityCenterOptions + + // The status of IAM Identity Center Options settings for a domain. + // + // This member is required. + Status *OptionStatus + + noSmithyDocumentSerde +} + // Describes an inbound cross-cluster connection for Amazon OpenSearch Service. // For more information, see [Cross-cluster search for Amazon OpenSearch Service]. // diff --git a/service/opensearch/validators.go b/service/opensearch/validators.go index 2d6a4928e4e..14ffb5e0dc8 100644 --- a/service/opensearch/validators.go +++ b/service/opensearch/validators.go @@ -150,6 +150,26 @@ func (m *validateOpCancelServiceSoftwareUpdate) HandleInitialize(ctx context.Con return next.HandleInitialize(ctx, in) } +type validateOpCreateApplication struct { +} + +func (*validateOpCreateApplication) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateApplicationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateApplicationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateDomain struct { } @@ -230,6 +250,26 @@ func (m *validateOpCreateVpcEndpoint) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpDeleteApplication struct { +} + +func (*validateOpDeleteApplication) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteApplicationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteApplicationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteDataSource struct { } @@ -570,6 +610,26 @@ func (m *validateOpDissociatePackage) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpGetApplication struct { +} + +func (*validateOpGetApplication) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetApplicationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetApplicationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetDataSource struct { } @@ -970,6 +1030,26 @@ func (m *validateOpStartServiceSoftwareUpdate) HandleInitialize(ctx context.Cont return next.HandleInitialize(ctx, in) } +type validateOpUpdateApplication struct { +} + +func (*validateOpUpdateApplication) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateApplicationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateApplicationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateDataSource struct { } @@ -1118,6 +1198,10 @@ func addOpCancelServiceSoftwareUpdateValidationMiddleware(stack *middleware.Stac return stack.Initialize.Add(&validateOpCancelServiceSoftwareUpdate{}, middleware.After) } +func addOpCreateApplicationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateApplication{}, middleware.After) +} + func addOpCreateDomainValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateDomain{}, middleware.After) } @@ -1134,6 +1218,10 @@ func addOpCreateVpcEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateVpcEndpoint{}, middleware.After) } +func addOpDeleteApplicationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteApplication{}, middleware.After) +} + func addOpDeleteDataSourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteDataSource{}, middleware.After) } @@ -1202,6 +1290,10 @@ func addOpDissociatePackageValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDissociatePackage{}, middleware.After) } +func addOpGetApplicationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetApplication{}, middleware.After) +} + func addOpGetDataSourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetDataSource{}, middleware.After) } @@ -1282,6 +1374,10 @@ func addOpStartServiceSoftwareUpdateValidationMiddleware(stack *middleware.Stack return stack.Initialize.Add(&validateOpStartServiceSoftwareUpdate{}, middleware.After) } +func addOpUpdateApplicationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateApplication{}, middleware.After) +} + func addOpUpdateDataSourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateDataSource{}, middleware.After) } @@ -1587,9 +1683,6 @@ func validateOpAuthorizeVpcEndpointAccessInput(v *AuthorizeVpcEndpointAccessInpu if v.DomainName == nil { invalidParams.Add(smithy.NewErrParamRequired("DomainName")) } - if v.Account == nil { - invalidParams.Add(smithy.NewErrParamRequired("Account")) - } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1627,6 +1720,26 @@ func validateOpCancelServiceSoftwareUpdateInput(v *CancelServiceSoftwareUpdateIn } } +func validateOpCreateApplicationInput(v *CreateApplicationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateApplicationInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.TagList != nil { + if err := validateTagList(v.TagList); err != nil { + invalidParams.AddNested("TagList", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateDomainInput(v *CreateDomainInput) error { if v == nil { return nil @@ -1730,6 +1843,21 @@ func validateOpCreateVpcEndpointInput(v *CreateVpcEndpointInput) error { } } +func validateOpDeleteApplicationInput(v *DeleteApplicationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteApplicationInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteDataSourceInput(v *DeleteDataSourceInput) error { if v == nil { return nil @@ -1994,6 +2122,21 @@ func validateOpDissociatePackageInput(v *DissociatePackageInput) error { } } +func validateOpGetApplicationInput(v *GetApplicationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetApplicationInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetDataSourceInput(v *GetDataSourceInput) error { if v == nil { return nil @@ -2269,9 +2412,6 @@ func validateOpRevokeVpcEndpointAccessInput(v *RevokeVpcEndpointAccessInput) err if v.DomainName == nil { invalidParams.Add(smithy.NewErrParamRequired("DomainName")) } - if v.Account == nil { - invalidParams.Add(smithy.NewErrParamRequired("Account")) - } if invalidParams.Len() > 0 { return invalidParams } else { @@ -2312,6 +2452,21 @@ func validateOpStartServiceSoftwareUpdateInput(v *StartServiceSoftwareUpdateInpu } } +func validateOpUpdateApplicationInput(v *UpdateApplicationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateApplicationInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateDataSourceInput(v *UpdateDataSourceInput) error { if v == nil { return nil diff --git a/service/opensearchserverless/api_op_CreateSecurityConfig.go b/service/opensearchserverless/api_op_CreateSecurityConfig.go index 96556ab61bf..67a0decbe96 100644 --- a/service/opensearchserverless/api_op_CreateSecurityConfig.go +++ b/service/opensearchserverless/api_op_CreateSecurityConfig.go @@ -48,6 +48,10 @@ type CreateSecurityConfigInput struct { // A description of the security configuration. Description *string + // Describes IAM Identity Center options in the form of a key-value map. This + // field is required if you specify iamidentitycenter for the type parameter. + IamIdentityCenterOptions *types.CreateIamIdentityCenterConfigOptions + // Describes SAML options in in the form of a key-value map. This field is // required if you specify saml for the type parameter. SamlOptions *types.SamlConfigOptions diff --git a/service/opensearchserverless/api_op_UpdateSecurityConfig.go b/service/opensearchserverless/api_op_UpdateSecurityConfig.go index 746509fd2e0..d1f5e46469d 100644 --- a/service/opensearchserverless/api_op_UpdateSecurityConfig.go +++ b/service/opensearchserverless/api_op_UpdateSecurityConfig.go @@ -50,6 +50,9 @@ type UpdateSecurityConfigInput struct { // A description of the security configuration. Description *string + // Describes IAM Identity Center options in the form of a key-value map. + IamIdentityCenterOptionsUpdates *types.UpdateIamIdentityCenterConfigOptions + // SAML options in in the form of a key-value map. SamlOptions *types.SamlConfigOptions diff --git a/service/opensearchserverless/deserializers.go b/service/opensearchserverless/deserializers.go index 98a32bdff1a..5e778d3d007 100644 --- a/service/opensearchserverless/deserializers.go +++ b/service/opensearchserverless/deserializers.go @@ -5920,6 +5920,91 @@ func awsAwsjson10_deserializeDocumentEffectiveLifecyclePolicyErrorDetails(v *[]t return nil } +func awsAwsjson10_deserializeDocumentIamIdentityCenterConfigOptions(v **types.IamIdentityCenterConfigOptions, 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.IamIdentityCenterConfigOptions + if *v == nil { + sv = &types.IamIdentityCenterConfigOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "applicationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IamIdentityCenterApplicationArn to be of type string, got %T instead", value) + } + sv.ApplicationArn = ptr.String(jtv) + } + + case "applicationDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ApplicationDescription = ptr.String(jtv) + } + + case "applicationName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ApplicationName = ptr.String(jtv) + } + + case "groupAttribute": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IamIdentityCenterGroupAttribute to be of type string, got %T instead", value) + } + sv.GroupAttribute = types.IamIdentityCenterGroupAttribute(jtv) + } + + case "instanceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IamIdentityCenterInstanceArn to be of type string, got %T instead", value) + } + sv.InstanceArn = ptr.String(jtv) + } + + case "userAttribute": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IamIdentityCenterUserAttribute to be of type string, got %T instead", value) + } + sv.UserAttribute = types.IamIdentityCenterUserAttribute(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6568,6 +6653,11 @@ func awsAwsjson10_deserializeDocumentSecurityConfigDetail(v **types.SecurityConf sv.Description = ptr.String(jtv) } + case "iamIdentityCenterOptions": + if err := awsAwsjson10_deserializeDocumentIamIdentityCenterConfigOptions(&sv.IamIdentityCenterOptions, value); err != nil { + return err + } + case "id": if value != nil { jtv, ok := value.(string) diff --git a/service/opensearchserverless/serializers.go b/service/opensearchserverless/serializers.go index 3947e16b679..838ba8b1bfe 100644 --- a/service/opensearchserverless/serializers.go +++ b/service/opensearchserverless/serializers.go @@ -2328,6 +2328,28 @@ func awsAwsjson10_serializeDocumentCollectionNames(v []string, value smithyjson. return nil } +func awsAwsjson10_serializeDocumentCreateIamIdentityCenterConfigOptions(v *types.CreateIamIdentityCenterConfigOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.GroupAttribute) > 0 { + ok := object.Key("groupAttribute") + ok.String(string(v.GroupAttribute)) + } + + if v.InstanceArn != nil { + ok := object.Key("instanceArn") + ok.String(*v.InstanceArn) + } + + if len(v.UserAttribute) > 0 { + ok := object.Key("userAttribute") + ok.String(string(v.UserAttribute)) + } + + return nil +} + func awsAwsjson10_serializeDocumentLifecyclePolicyIdentifier(v *types.LifecyclePolicyIdentifier, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2500,6 +2522,23 @@ func awsAwsjson10_serializeDocumentTags(v []types.Tag, value smithyjson.Value) e return nil } +func awsAwsjson10_serializeDocumentUpdateIamIdentityCenterConfigOptions(v *types.UpdateIamIdentityCenterConfigOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.GroupAttribute) > 0 { + ok := object.Key("groupAttribute") + ok.String(string(v.GroupAttribute)) + } + + if len(v.UserAttribute) > 0 { + ok := object.Key("userAttribute") + ok.String(string(v.UserAttribute)) + } + + return nil +} + func awsAwsjson10_serializeDocumentVpcEndpointFilters(v *types.VpcEndpointFilters, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2703,6 +2742,13 @@ func awsAwsjson10_serializeOpDocumentCreateSecurityConfigInput(v *CreateSecurity ok.String(*v.Description) } + if v.IamIdentityCenterOptions != nil { + ok := object.Key("iamIdentityCenterOptions") + if err := awsAwsjson10_serializeDocumentCreateIamIdentityCenterConfigOptions(v.IamIdentityCenterOptions, ok); err != nil { + return err + } + } + if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) @@ -3304,6 +3350,13 @@ func awsAwsjson10_serializeOpDocumentUpdateSecurityConfigInput(v *UpdateSecurity ok.String(*v.Description) } + if v.IamIdentityCenterOptionsUpdates != nil { + ok := object.Key("iamIdentityCenterOptionsUpdates") + if err := awsAwsjson10_serializeDocumentUpdateIamIdentityCenterConfigOptions(v.IamIdentityCenterOptionsUpdates, ok); err != nil { + return err + } + } + if v.Id != nil { ok := object.Key("id") ok.String(*v.Id) diff --git a/service/opensearchserverless/types/enums.go b/service/opensearchserverless/types/enums.go index e0751976ed9..ec54c3ad7c0 100644 --- a/service/opensearchserverless/types/enums.go +++ b/service/opensearchserverless/types/enums.go @@ -71,6 +71,53 @@ func (CollectionType) Values() []CollectionType { } } +type IamIdentityCenterGroupAttribute string + +// Enum values for IamIdentityCenterGroupAttribute +const ( + // Group ID + IamIdentityCenterGroupAttributeGroupId IamIdentityCenterGroupAttribute = "GroupId" + // Group Name + IamIdentityCenterGroupAttributeGroupName IamIdentityCenterGroupAttribute = "GroupName" +) + +// Values returns all known values for IamIdentityCenterGroupAttribute. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (IamIdentityCenterGroupAttribute) Values() []IamIdentityCenterGroupAttribute { + return []IamIdentityCenterGroupAttribute{ + "GroupId", + "GroupName", + } +} + +type IamIdentityCenterUserAttribute string + +// Enum values for IamIdentityCenterUserAttribute +const ( + // User ID + IamIdentityCenterUserAttributeUserId IamIdentityCenterUserAttribute = "UserId" + // User Name + IamIdentityCenterUserAttributeUserName IamIdentityCenterUserAttribute = "UserName" + // Email + IamIdentityCenterUserAttributeEmail IamIdentityCenterUserAttribute = "Email" +) + +// Values returns all known values for IamIdentityCenterUserAttribute. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (IamIdentityCenterUserAttribute) Values() []IamIdentityCenterUserAttribute { + return []IamIdentityCenterUserAttribute{ + "UserId", + "UserName", + "Email", + } +} + type LifecyclePolicyType string // Enum values for LifecyclePolicyType @@ -113,6 +160,8 @@ type SecurityConfigType string const ( // saml provider SecurityConfigTypeSaml SecurityConfigType = "saml" + // iam identity center + SecurityConfigTypeIamidentitycenter SecurityConfigType = "iamidentitycenter" ) // Values returns all known values for SecurityConfigType. Note that this can be @@ -122,6 +171,7 @@ const ( func (SecurityConfigType) Values() []SecurityConfigType { return []SecurityConfigType{ "saml", + "iamidentitycenter", } } diff --git a/service/opensearchserverless/types/types.go b/service/opensearchserverless/types/types.go index 42e32507de7..7a829fd66e1 100644 --- a/service/opensearchserverless/types/types.go +++ b/service/opensearchserverless/types/types.go @@ -234,6 +234,26 @@ type CreateCollectionDetail struct { noSmithyDocumentSerde } +// Describes IAM Identity Center options for creating an OpenSearch Serverless +// security configuration in the form of a key-value map. +type CreateIamIdentityCenterConfigOptions struct { + + // The ARN of the IAM Identity Center instance used to integrate with OpenSearch + // Serverless. + // + // This member is required. + InstanceArn *string + + // The group attribute for this IAM Identity Center integration. Defaults to + // GroupId . + GroupAttribute IamIdentityCenterGroupAttribute + + // The user attribute for this IAM Identity Center integration. Defaults to UserId . + UserAttribute IamIdentityCenterUserAttribute + + noSmithyDocumentSerde +} + // Creation details for an OpenSearch Serverless-managed interface endpoint. For // more information, see [Access Amazon OpenSearch Serverless using an interface endpoint]. // @@ -329,6 +349,36 @@ type EffectiveLifecyclePolicyErrorDetail struct { noSmithyDocumentSerde } +// Describes IAM Identity Center options for an OpenSearch Serverless security +// configuration in the form of a key-value map. +type IamIdentityCenterConfigOptions struct { + + // The ARN of the IAM Identity Center application used to integrate with + // OpenSearch Serverless. + ApplicationArn *string + + // The description of the IAM Identity Center application used to integrate with + // OpenSearch Serverless. + ApplicationDescription *string + + // The name of the IAM Identity Center application used to integrate with + // OpenSearch Serverless. + ApplicationName *string + + // The group attribute for this IAM Identity Center integration. Defaults to + // GroupId . + GroupAttribute IamIdentityCenterGroupAttribute + + // The ARN of the IAM Identity Center instance used to integrate with OpenSearch + // Serverless. + InstanceArn *string + + // The user attribute for this IAM Identity Center integration. Defaults to UserId + UserAttribute IamIdentityCenterUserAttribute + + noSmithyDocumentSerde +} + // Details about an OpenSearch Serverless lifecycle policy. type LifecyclePolicyDetail struct { @@ -473,6 +523,9 @@ type SecurityConfigDetail struct { // The description of the security configuration. Description *string + // Describes IAM Identity Center options in the form of a key-value map. + IamIdentityCenterOptions *IamIdentityCenterConfigOptions + // The unique identifier of the security configuration. Id *string @@ -630,6 +683,20 @@ type UpdateCollectionDetail struct { noSmithyDocumentSerde } +// Describes IAM Identity Center options for updating an OpenSearch Serverless +// security configuration in the form of a key-value map. +type UpdateIamIdentityCenterConfigOptions struct { + + // The group attribute for this IAM Identity Center integration. Defaults to + // GroupId . + GroupAttribute IamIdentityCenterGroupAttribute + + // The user attribute for this IAM Identity Center integration. Defaults to UserId . + UserAttribute IamIdentityCenterUserAttribute + + noSmithyDocumentSerde +} + // Update details for an OpenSearch Serverless-managed interface endpoint. type UpdateVpcEndpointDetail struct { diff --git a/service/opensearchserverless/validators.go b/service/opensearchserverless/validators.go index 616286d00a8..4165a1ee8b5 100644 --- a/service/opensearchserverless/validators.go +++ b/service/opensearchserverless/validators.go @@ -754,6 +754,21 @@ func addOpUpdateVpcEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateVpcEndpoint{}, middleware.After) } +func validateCreateIamIdentityCenterConfigOptions(v *types.CreateIamIdentityCenterConfigOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateIamIdentityCenterConfigOptions"} + if v.InstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateLifecyclePolicyIdentifier(v *types.LifecyclePolicyIdentifier) error { if v == nil { return nil @@ -1005,6 +1020,11 @@ func validateOpCreateSecurityConfigInput(v *CreateSecurityConfigInput) error { invalidParams.AddNested("SamlOptions", err.(smithy.InvalidParamsError)) } } + if v.IamIdentityCenterOptions != nil { + if err := validateCreateIamIdentityCenterConfigOptions(v.IamIdentityCenterOptions); err != nil { + invalidParams.AddNested("IamIdentityCenterOptions", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/redshift/api_op_CreateIntegration.go b/service/redshift/api_op_CreateIntegration.go index b858ac252cc..9784648ced0 100644 --- a/service/redshift/api_op_CreateIntegration.go +++ b/service/redshift/api_op_CreateIntegration.go @@ -12,7 +12,7 @@ import ( "time" ) -// Creates a zero-ETL integration with Amazon Redshift. +// Creates a zero-ETL integration or S3 event integration with Amazon Redshift. func (c *Client) CreateIntegration(ctx context.Context, params *CreateIntegrationInput, optFns ...func(*Options)) (*CreateIntegrationOutput, error) { if params == nil { params = &CreateIntegrationInput{} diff --git a/service/redshift/api_op_DeleteIntegration.go b/service/redshift/api_op_DeleteIntegration.go index a0833ae00a8..758bdc7dd44 100644 --- a/service/redshift/api_op_DeleteIntegration.go +++ b/service/redshift/api_op_DeleteIntegration.go @@ -12,7 +12,7 @@ import ( "time" ) -// Deletes a zero-ETL integration with Amazon Redshift. +// Deletes a zero-ETL integration or S3 event integration with Amazon Redshift. func (c *Client) DeleteIntegration(ctx context.Context, params *DeleteIntegrationInput, optFns ...func(*Options)) (*DeleteIntegrationOutput, error) { if params == nil { params = &DeleteIntegrationInput{} diff --git a/service/redshift/api_op_DescribeIntegrations.go b/service/redshift/api_op_DescribeIntegrations.go index 5939f67d134..8bcaf348de7 100644 --- a/service/redshift/api_op_DescribeIntegrations.go +++ b/service/redshift/api_op_DescribeIntegrations.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Describes one or more zero-ETL integrations with Amazon Redshift. +// Describes one or more zero-ETL or S3 event integrations with Amazon Redshift. func (c *Client) DescribeIntegrations(ctx context.Context, params *DescribeIntegrationsInput, optFns ...func(*Options)) (*DescribeIntegrationsOutput, error) { if params == nil { params = &DescribeIntegrationsInput{} diff --git a/service/redshift/api_op_DescribeTags.go b/service/redshift/api_op_DescribeTags.go index d0f9c5cef07..347ffce99f4 100644 --- a/service/redshift/api_op_DescribeTags.go +++ b/service/redshift/api_op_DescribeTags.go @@ -92,7 +92,7 @@ type DescribeTagsInput struct { // // - Snapshot copy grant // - // - Integration (zero-ETL integration) + // - Integration (zero-ETL integration or S3 event integration) // // To describe the tags associated with an integration , don't specify ResourceType // , instead specify the ResourceName of the integration. diff --git a/service/redshift/api_op_ModifyIntegration.go b/service/redshift/api_op_ModifyIntegration.go index 2f148c62b49..13a2074d427 100644 --- a/service/redshift/api_op_ModifyIntegration.go +++ b/service/redshift/api_op_ModifyIntegration.go @@ -12,7 +12,7 @@ import ( "time" ) -// Modifies a zero-ETL integration with Amazon Redshift. +// Modifies a zero-ETL integration or S3 event integration with Amazon Redshift. func (c *Client) ModifyIntegration(ctx context.Context, params *ModifyIntegrationInput, optFns ...func(*Options)) (*ModifyIntegrationOutput, error) { if params == nil { params = &ModifyIntegrationInput{} diff --git a/service/redshift/types/errors.go b/service/redshift/types/errors.go index 3b02a6d12d5..92fd9550261 100644 --- a/service/redshift/types/errors.go +++ b/service/redshift/types/errors.go @@ -1594,8 +1594,8 @@ func (e *IntegrationNotFoundFault) ErrorCode() string { } func (e *IntegrationNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// You can't create any more zero-ETL integrations because the quota has been -// reached. +// You can't create any more zero-ETL or S3 event integrations because the quota +// has been reached. type IntegrationQuotaExceededFault struct { Message *string diff --git a/service/redshiftserverless/api_op_CreateWorkgroup.go b/service/redshiftserverless/api_op_CreateWorkgroup.go index fc13dd32d79..408b0afd7ad 100644 --- a/service/redshiftserverless/api_op_CreateWorkgroup.go +++ b/service/redshiftserverless/api_op_CreateWorkgroup.go @@ -70,6 +70,10 @@ type CreateWorkgroupInput struct { // 5431-5455 and 8191-8215. The default is 5439. Port *int32 + // An object that represents the price performance target settings for the + // workgroup. + PricePerformanceTarget *types.PerformanceTarget + // A value that specifies whether the workgroup can be accessed from a public // network. PubliclyAccessible *bool diff --git a/service/redshiftserverless/api_op_UpdateWorkgroup.go b/service/redshiftserverless/api_op_UpdateWorkgroup.go index 5fc60443f23..dc1fed67dff 100644 --- a/service/redshiftserverless/api_op_UpdateWorkgroup.go +++ b/service/redshiftserverless/api_op_UpdateWorkgroup.go @@ -67,6 +67,10 @@ type UpdateWorkgroupInput struct { // 5431-5455 and 8191-8215. The default is 5439. Port *int32 + // An object that represents the price performance target settings for the + // workgroup. + PricePerformanceTarget *types.PerformanceTarget + // A value that specifies whether the workgroup can be accessible from a public // network. PubliclyAccessible *bool diff --git a/service/redshiftserverless/deserializers.go b/service/redshiftserverless/deserializers.go index 5b8c25c4bf9..d93ca19a254 100644 --- a/service/redshiftserverless/deserializers.go +++ b/service/redshiftserverless/deserializers.go @@ -8206,6 +8206,59 @@ func awsAwsjson11_deserializeDocumentNextInvocationsList(v *[]time.Time, value i return nil } +func awsAwsjson11_deserializeDocumentPerformanceTarget(v **types.PerformanceTarget, 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.PerformanceTarget + if *v == nil { + sv = &types.PerformanceTarget{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "level": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Level = ptr.Int32(int32(i64)) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PerformanceTargetStatus to be of type string, got %T instead", value) + } + sv.Status = types.PerformanceTargetStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentRecoveryPoint(v **types.RecoveryPoint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10322,6 +10375,11 @@ func awsAwsjson11_deserializeDocumentWorkgroup(v **types.Workgroup, value interf sv.Port = ptr.Int32(int32(i64)) } + case "pricePerformanceTarget": + if err := awsAwsjson11_deserializeDocumentPerformanceTarget(&sv.PricePerformanceTarget, value); err != nil { + return err + } + case "publiclyAccessible": if value != nil { jtv, ok := value.(bool) diff --git a/service/redshiftserverless/serializers.go b/service/redshiftserverless/serializers.go index 127fbac3938..fed19507b5c 100644 --- a/service/redshiftserverless/serializers.go +++ b/service/redshiftserverless/serializers.go @@ -3452,6 +3452,23 @@ func awsAwsjson11_serializeDocumentLogExportList(v []types.LogExport, value smit return nil } +func awsAwsjson11_serializeDocumentPerformanceTarget(v *types.PerformanceTarget, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Level != nil { + ok := object.Key("level") + ok.Integer(*v.Level) + } + + if len(v.Status) > 0 { + ok := object.Key("status") + ok.String(string(v.Status)) + } + + return nil +} + func awsAwsjson11_serializeDocumentSchedule(v types.Schedule, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3909,6 +3926,13 @@ func awsAwsjson11_serializeOpDocumentCreateWorkgroupInput(v *CreateWorkgroupInpu ok.Integer(*v.Port) } + if v.PricePerformanceTarget != nil { + ok := object.Key("pricePerformanceTarget") + if err := awsAwsjson11_serializeDocumentPerformanceTarget(v.PricePerformanceTarget, ok); err != nil { + return err + } + } + if v.PubliclyAccessible != nil { ok := object.Key("publiclyAccessible") ok.Boolean(*v.PubliclyAccessible) @@ -4988,6 +5012,13 @@ func awsAwsjson11_serializeOpDocumentUpdateWorkgroupInput(v *UpdateWorkgroupInpu ok.Integer(*v.Port) } + if v.PricePerformanceTarget != nil { + ok := object.Key("pricePerformanceTarget") + if err := awsAwsjson11_serializeDocumentPerformanceTarget(v.PricePerformanceTarget, ok); err != nil { + return err + } + } + if v.PubliclyAccessible != nil { ok := object.Key("publiclyAccessible") ok.Boolean(*v.PubliclyAccessible) diff --git a/service/redshiftserverless/types/enums.go b/service/redshiftserverless/types/enums.go index de41a1f272f..3df11804818 100644 --- a/service/redshiftserverless/types/enums.go +++ b/service/redshiftserverless/types/enums.go @@ -44,6 +44,25 @@ func (NamespaceStatus) Values() []NamespaceStatus { } } +type PerformanceTargetStatus string + +// Enum values for PerformanceTargetStatus +const ( + PerformanceTargetStatusEnabled PerformanceTargetStatus = "ENABLED" + PerformanceTargetStatusDisabled PerformanceTargetStatus = "DISABLED" +) + +// Values returns all known values for PerformanceTargetStatus. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PerformanceTargetStatus) Values() []PerformanceTargetStatus { + return []PerformanceTargetStatus{ + "ENABLED", + "DISABLED", + } +} + type SnapshotStatus string // Enum values for SnapshotStatus diff --git a/service/redshiftserverless/types/types.go b/service/redshiftserverless/types/types.go index ee6dfef2363..c5cc4845732 100644 --- a/service/redshiftserverless/types/types.go +++ b/service/redshiftserverless/types/types.go @@ -205,6 +205,21 @@ type NetworkInterface struct { noSmithyDocumentSerde } +// An object that represents the price performance target settings for the +// workgroup. +type PerformanceTarget struct { + + // The target price performance level for the workgroup. Valid values include 1, + // 25, 50, 75, and 100. These correspond to the price performance levels LOW_COST, + // ECONOMICAL, BALANCED, RESOURCEFUL, and HIGH_PERFORMANCE. + Level *int32 + + // Whether the price performance target is enabled for the workgroup. + Status PerformanceTargetStatus + + noSmithyDocumentSerde +} + // The automatically created recovery point of a namespace. Recovery points are // created every 30 minutes and kept for 24 hours. type RecoveryPoint struct { @@ -683,6 +698,10 @@ type Workgroup struct { // 5431-5455 and 8191-8215. The default is 5439. Port *int32 + // An object that represents the price performance target settings for the + // workgroup. + PricePerformanceTarget *PerformanceTarget + // A value that specifies whether the workgroup can be accessible from a public // network. PubliclyAccessible *bool diff --git a/service/route53/api_op_CreateQueryLoggingConfig.go b/service/route53/api_op_CreateQueryLoggingConfig.go index caa1c885b93..bce958b3799 100644 --- a/service/route53/api_op_CreateQueryLoggingConfig.go +++ b/service/route53/api_op_CreateQueryLoggingConfig.go @@ -54,10 +54,11 @@ import ( // logging. // // - Create a CloudWatch Logs resource policy, and give it the permissions that -// Route 53 needs to create log streams and to send query logs to log streams. For -// the value of Resource , specify the ARN for the log group that you created in -// the previous step. To use the same resource policy for all the CloudWatch Logs -// log groups that you created for query logging configurations, replace the hosted +// Route 53 needs to create log streams and to send query logs to log streams. You +// must create the CloudWatch Logs resource policy in the us-east-1 region. For the +// value of Resource , specify the ARN for the log group that you created in the +// previous step. To use the same resource policy for all the CloudWatch Logs log +// groups that you created for query logging configurations, replace the hosted // zone name with * , for example: // // arn:aws:logs:us-east-1:123412341234:log-group:/aws/route53/* diff --git a/service/route53/api_op_GetHostedZone.go b/service/route53/api_op_GetHostedZone.go index 03d43c25c2b..40422e1bcbc 100644 --- a/service/route53/api_op_GetHostedZone.go +++ b/service/route53/api_op_GetHostedZone.go @@ -13,6 +13,12 @@ import ( // Gets information about a specified hosted zone including the four name servers // assigned to the hosted zone. +// +// returns the VPCs associated with the specified hosted zone and does not reflect +// the VPC associations by Route 53 Profiles. To get the associations to a Profile, +// call the [ListProfileAssociations]API. +// +// [ListProfileAssociations]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53profiles_ListProfileAssociations.html func (c *Client) GetHostedZone(ctx context.Context, params *GetHostedZoneInput, optFns ...func(*Options)) (*GetHostedZoneOutput, error) { if params == nil { params = &GetHostedZoneInput{} diff --git a/service/route53/api_op_ListHostedZonesByVPC.go b/service/route53/api_op_ListHostedZonesByVPC.go index aed43dc8237..c9c128ef787 100644 --- a/service/route53/api_op_ListHostedZonesByVPC.go +++ b/service/route53/api_op_ListHostedZonesByVPC.go @@ -25,6 +25,10 @@ import ( // by Amazon Elastic File System (Amazon EFS), the value of Owner is // efs.amazonaws.com . // +// ListHostedZonesByVPC returns the hosted zones associated with the specified VPC +// and does not reflect the hosted zone associations to VPCs via Route 53 Profiles. +// To get the associations to a Profile, call the [ListProfileResourceAssociations]API. +// // When listing private hosted zones, the hosted zone and the Amazon VPC must // belong to the same partition where the hosted zones were created. A partition is // a group of Amazon Web Services Regions. Each Amazon Web Services account is @@ -41,6 +45,7 @@ import ( // For more information, see [Access Management] in the Amazon Web Services General Reference. // // [Access Management]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html +// [ListProfileResourceAssociations]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53profiles_ListProfileResourceAssociations.html func (c *Client) ListHostedZonesByVPC(ctx context.Context, params *ListHostedZonesByVPCInput, optFns ...func(*Options)) (*ListHostedZonesByVPCOutput, error) { if params == nil { params = &ListHostedZonesByVPCInput{} diff --git a/service/route53/types/enums.go b/service/route53/types/enums.go index 32f54d6226c..eff074a6b3b 100644 --- a/service/route53/types/enums.go +++ b/service/route53/types/enums.go @@ -474,6 +474,10 @@ const ( RRTypeAaaa RRType = "AAAA" RRTypeCaa RRType = "CAA" RRTypeDs RRType = "DS" + RRTypeTlsa RRType = "TLSA" + RRTypeSshfp RRType = "SSHFP" + RRTypeSvcb RRType = "SVCB" + RRTypeHttps RRType = "HTTPS" ) // Values returns all known values for RRType. Note that this can be expanded in @@ -495,6 +499,10 @@ func (RRType) Values() []RRType { "AAAA", "CAA", "DS", + "TLSA", + "SSHFP", + "SVCB", + "HTTPS", } } @@ -575,6 +583,7 @@ const ( VPCRegionSaEast1 VPCRegion = "sa-east-1" VPCRegionCaCentral1 VPCRegion = "ca-central-1" VPCRegionCnNorth1 VPCRegion = "cn-north-1" + VPCRegionCnNorthwest1 VPCRegion = "cn-northwest-1" VPCRegionAfSouth1 VPCRegion = "af-south-1" VPCRegionEuSouth1 VPCRegion = "eu-south-1" VPCRegionEuSouth2 VPCRegion = "eu-south-2" @@ -619,6 +628,7 @@ func (VPCRegion) Values() []VPCRegion { "sa-east-1", "ca-central-1", "cn-north-1", + "cn-northwest-1", "af-south-1", "eu-south-1", "eu-south-2", diff --git a/service/route53/types/types.go b/service/route53/types/types.go index 3ffd60e21f5..a213c93f266 100644 --- a/service/route53/types/types.go +++ b/service/route53/types/types.go @@ -875,8 +875,8 @@ type HealthCheckConfig struct { // 53 submits an HTTPS request and waits for an HTTP status code of 200 or greater // and less than 400. // - // If you specify HTTPS for the value of Type , the endpoint must support TLS v1.0 - // or later. + // If you specify HTTPS for the value of Type , the endpoint must support TLS v1.0, + // v1.1, or v1.2. // // - HTTP_STR_MATCH: Route 53 tries to establish a TCP connection. If // successful, Route 53 submits an HTTP request and searches the first 5,120 bytes @@ -1569,15 +1569,16 @@ type ResourceRecordSet struct { // is encoded for them, see [Supported DNS Resource Record Types]in the Amazon Route 53 Developer Guide. // // Valid values for basic resource record sets: A | AAAA | CAA | CNAME | DS | MX | - // NAPTR | NS | PTR | SOA | SPF | SRV | TXT + // NAPTR | NS | PTR | SOA | SPF | SRV | TXT | TLSA | SSHFP | SVCB | HTTPS // // Values for weighted, latency, geolocation, and failover resource record sets: A - // | AAAA | CAA | CNAME | MX | NAPTR | PTR | SPF | SRV | TXT . When creating a - // group of weighted, latency, geolocation, or failover resource record sets, - // specify the same value for all of the resource record sets in the group. + // | AAAA | CAA | CNAME | MX | NAPTR | PTR | SPF | SRV | TXT | TLSA | SSHFP | SVCB + // | HTTPS . When creating a group of weighted, latency, geolocation, or failover + // resource record sets, specify the same value for all of the resource record sets + // in the group. // // Valid values for multivalue answer resource record sets: A | AAAA | MX | NAPTR - // | PTR | SPF | SRV | TXT + // | PTR | SPF | SRV | TXT | CAA | TLSA | SSHFP | SVCB | HTTPS // // SPF records were formerly used to verify the identity of the sender of email // messages. However, we no longer recommend that you create resource record sets diff --git a/service/sagemaker/api_op_CreateModelPackage.go b/service/sagemaker/api_op_CreateModelPackage.go index 0497f4546f5..f7f71b027db 100644 --- a/service/sagemaker/api_op_CreateModelPackage.go +++ b/service/sagemaker/api_op_CreateModelPackage.go @@ -112,6 +112,9 @@ type CreateModelPackageInput struct { // [View the Details of a Model Version]: https://docs.aws.amazon.com/sagemaker/latest/dg/model-registry-details.html ModelCard *types.ModelPackageModelCard + // A structure describing the current state of the model in its life cycle. + ModelLifeCycle *types.ModelLifeCycle + // A structure that contains model metrics reports. ModelMetrics *types.ModelMetrics diff --git a/service/sagemaker/api_op_CreatePresignedDomainUrl.go b/service/sagemaker/api_op_CreatePresignedDomainUrl.go index 92c835b6896..e791f6d8e19 100644 --- a/service/sagemaker/api_op_CreatePresignedDomainUrl.go +++ b/service/sagemaker/api_op_CreatePresignedDomainUrl.go @@ -25,10 +25,13 @@ import ( // IP addresses, Amazon VPCs or Amazon VPC Endpoints that you specify. For more // information, see [Connect to Amazon SageMaker Studio Through an Interface VPC Endpoint]. // -// The URL that you get from a call to CreatePresignedDomainUrl has a default -// timeout of 5 minutes. You can configure this value using ExpiresInSeconds . If -// you try to use the URL after the timeout limit expires, you are directed to the -// Amazon Web Services console sign-in page. +// - The URL that you get from a call to CreatePresignedDomainUrl has a default +// timeout of 5 minutes. You can configure this value using ExpiresInSeconds . If +// you try to use the URL after the timeout limit expires, you are directed to the +// Amazon Web Services console sign-in page. +// +// - The JupyterLab session default expiration time is 12 hours. You can +// configure this value using SessionExpirationDurationInSeconds. // // [Connect to Amazon SageMaker Studio Through an Interface VPC Endpoint]: https://docs.aws.amazon.com/sagemaker/latest/dg/studio-interface-endpoint.html func (c *Client) CreatePresignedDomainUrl(ctx context.Context, params *CreatePresignedDomainUrlInput, optFns ...func(*Options)) (*CreatePresignedDomainUrlOutput, error) { diff --git a/service/sagemaker/api_op_DescribeModelPackage.go b/service/sagemaker/api_op_DescribeModelPackage.go index 6d572e95458..93cda691f93 100644 --- a/service/sagemaker/api_op_DescribeModelPackage.go +++ b/service/sagemaker/api_op_DescribeModelPackage.go @@ -137,6 +137,9 @@ type DescribeModelPackageOutput struct { // [View the Details of a Model Version]: https://docs.aws.amazon.com/sagemaker/latest/dg/model-registry-details.html ModelCard *types.ModelPackageModelCard + // A structure describing the current state of the model in its life cycle. + ModelLifeCycle *types.ModelLifeCycle + // Metrics for the model. ModelMetrics *types.ModelMetrics diff --git a/service/sagemaker/api_op_UpdateModelPackage.go b/service/sagemaker/api_op_UpdateModelPackage.go index 7d09064837a..37ac9568f6d 100644 --- a/service/sagemaker/api_op_UpdateModelPackage.go +++ b/service/sagemaker/api_op_UpdateModelPackage.go @@ -45,6 +45,9 @@ type UpdateModelPackageInput struct { // A description for the approval status of the model. ApprovalDescription *string + // A unique token that guarantees that the call to this API is idempotent. + ClientToken *string + // The metadata properties associated with the model package versions. CustomerMetadataProperties map[string]string @@ -79,6 +82,9 @@ type UpdateModelPackageInput struct { // [View the Details of a Model Version]: https://docs.aws.amazon.com/sagemaker/latest/dg/model-registry-details.html ModelCard *types.ModelPackageModelCard + // A structure describing the current state of the model in its life cycle. + ModelLifeCycle *types.ModelLifeCycle + // The URI of the source for the model package. SourceUri *string diff --git a/service/sagemaker/deserializers.go b/service/sagemaker/deserializers.go index 40ef5b7dc57..1eb530c6530 100644 --- a/service/sagemaker/deserializers.go +++ b/service/sagemaker/deserializers.go @@ -62374,6 +62374,64 @@ func awsAwsjson11_deserializeDocumentModelLatencyThresholds(v *[]types.ModelLate return nil } +func awsAwsjson11_deserializeDocumentModelLifeCycle(v **types.ModelLifeCycle, 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.ModelLifeCycle + if *v == nil { + sv = &types.ModelLifeCycle{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Stage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.Stage = ptr.String(jtv) + } + + case "StageDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StageDescription to be of type string, got %T instead", value) + } + sv.StageDescription = ptr.String(jtv) + } + + case "StageStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.StageStatus = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentModelMetadataSummaries(v *[]types.ModelMetadataSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -62665,6 +62723,11 @@ func awsAwsjson11_deserializeDocumentModelPackage(v **types.ModelPackage, value return err } + case "ModelLifeCycle": + if err := awsAwsjson11_deserializeDocumentModelLifeCycle(&sv.ModelLifeCycle, value); err != nil { + return err + } + case "ModelMetrics": if err := awsAwsjson11_deserializeDocumentModelMetrics(&sv.ModelMetrics, value); err != nil { return err @@ -92601,6 +92664,11 @@ func awsAwsjson11_deserializeOpDocumentDescribeModelPackageOutput(v **DescribeMo return err } + case "ModelLifeCycle": + if err := awsAwsjson11_deserializeDocumentModelLifeCycle(&sv.ModelLifeCycle, value); err != nil { + return err + } + case "ModelMetrics": if err := awsAwsjson11_deserializeDocumentModelMetrics(&sv.ModelMetrics, value); err != nil { return err diff --git a/service/sagemaker/serializers.go b/service/sagemaker/serializers.go index 52bb50b40b5..0fa4c313299 100644 --- a/service/sagemaker/serializers.go +++ b/service/sagemaker/serializers.go @@ -26746,6 +26746,28 @@ func awsAwsjson11_serializeDocumentModelLatencyThresholds(v []types.ModelLatency return nil } +func awsAwsjson11_serializeDocumentModelLifeCycle(v *types.ModelLifeCycle, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Stage != nil { + ok := object.Key("Stage") + ok.String(*v.Stage) + } + + if v.StageDescription != nil { + ok := object.Key("StageDescription") + ok.String(*v.StageDescription) + } + + if v.StageStatus != nil { + ok := object.Key("StageStatus") + ok.String(*v.StageStatus) + } + + return nil +} + func awsAwsjson11_serializeDocumentModelMetadataFilter(v *types.ModelMetadataFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -34042,6 +34064,13 @@ func awsAwsjson11_serializeOpDocumentCreateModelPackageInput(v *CreateModelPacka } } + if v.ModelLifeCycle != nil { + ok := object.Key("ModelLifeCycle") + if err := awsAwsjson11_serializeDocumentModelLifeCycle(v.ModelLifeCycle, ok); err != nil { + return err + } + } + if v.ModelMetrics != nil { ok := object.Key("ModelMetrics") if err := awsAwsjson11_serializeDocumentModelMetrics(v.ModelMetrics, ok); err != nil { @@ -41960,6 +41989,11 @@ func awsAwsjson11_serializeOpDocumentUpdateModelPackageInput(v *UpdateModelPacka ok.String(*v.ApprovalDescription) } + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + if v.CustomerMetadataProperties != nil { ok := object.Key("CustomerMetadataProperties") if err := awsAwsjson11_serializeDocumentCustomerMetadataMap(v.CustomerMetadataProperties, ok); err != nil { @@ -41993,6 +42027,13 @@ func awsAwsjson11_serializeOpDocumentUpdateModelPackageInput(v *UpdateModelPacka } } + if v.ModelLifeCycle != nil { + ok := object.Key("ModelLifeCycle") + if err := awsAwsjson11_serializeDocumentModelLifeCycle(v.ModelLifeCycle, ok); err != nil { + return err + } + } + if v.ModelPackageArn != nil { ok := object.Key("ModelPackageArn") ok.String(*v.ModelPackageArn) diff --git a/service/sagemaker/types/enums.go b/service/sagemaker/types/enums.go index 017e5089287..5acac771a88 100644 --- a/service/sagemaker/types/enums.go +++ b/service/sagemaker/types/enums.go @@ -7356,7 +7356,6 @@ const ( TrainingInstanceTypeMlP4de24xlarge TrainingInstanceType = "ml.p4de.24xlarge" TrainingInstanceTypeMlP548xlarge TrainingInstanceType = "ml.p5.48xlarge" TrainingInstanceTypeMlP5e48xlarge TrainingInstanceType = "ml.p5e.48xlarge" - TrainingInstanceTypeMlP5en48xlarge TrainingInstanceType = "ml.p5en.48xlarge" TrainingInstanceTypeMlC5Xlarge TrainingInstanceType = "ml.c5.xlarge" TrainingInstanceTypeMlC52xlarge TrainingInstanceType = "ml.c5.2xlarge" TrainingInstanceTypeMlC54xlarge TrainingInstanceType = "ml.c5.4xlarge" @@ -7378,7 +7377,6 @@ const ( TrainingInstanceTypeMlTrn12xlarge TrainingInstanceType = "ml.trn1.2xlarge" TrainingInstanceTypeMlTrn132xlarge TrainingInstanceType = "ml.trn1.32xlarge" TrainingInstanceTypeMlTrn1n32xlarge TrainingInstanceType = "ml.trn1n.32xlarge" - TrainingInstanceTypeMlTrn248xlarge TrainingInstanceType = "ml.trn2.48xlarge" TrainingInstanceTypeMlM6iLarge TrainingInstanceType = "ml.m6i.large" TrainingInstanceTypeMlM6iXlarge TrainingInstanceType = "ml.m6i.xlarge" TrainingInstanceTypeMlM6i2xlarge TrainingInstanceType = "ml.m6i.2xlarge" @@ -7456,7 +7454,6 @@ func (TrainingInstanceType) Values() []TrainingInstanceType { "ml.p4de.24xlarge", "ml.p5.48xlarge", "ml.p5e.48xlarge", - "ml.p5en.48xlarge", "ml.c5.xlarge", "ml.c5.2xlarge", "ml.c5.4xlarge", @@ -7478,7 +7475,6 @@ func (TrainingInstanceType) Values() []TrainingInstanceType { "ml.trn1.2xlarge", "ml.trn1.32xlarge", "ml.trn1n.32xlarge", - "ml.trn2.48xlarge", "ml.m6i.large", "ml.m6i.xlarge", "ml.m6i.2xlarge", diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index 46191b926a5..0cba8ba5db3 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -11013,6 +11013,25 @@ type ModelLatencyThreshold struct { noSmithyDocumentSerde } +// A structure describing the current state of the model in its life cycle. +type ModelLifeCycle struct { + + // The current stage in the model life cycle. + // + // This member is required. + Stage *string + + // The current status of a stage in model life cycle. + // + // This member is required. + StageStatus *string + + // Describes the stage related details. + StageDescription *string + + noSmithyDocumentSerde +} + // Part of the search expression. You can specify the name and value (domain, // task, framework, framework version, task, and model). type ModelMetadataFilter struct { @@ -11159,6 +11178,9 @@ type ModelPackage struct { // [View the Details of a Model Version]: https://docs.aws.amazon.com/sagemaker/latest/dg/model-registry-details.html ModelCard *ModelPackageModelCard + // A structure describing the current state of the model in its life cycle. + ModelLifeCycle *ModelLifeCycle + // Metrics for the model. ModelMetrics *ModelMetrics diff --git a/service/sagemaker/validators.go b/service/sagemaker/validators.go index 194048296e1..8cda94002db 100644 --- a/service/sagemaker/validators.go +++ b/service/sagemaker/validators.go @@ -10176,6 +10176,24 @@ func validateModelInput(v *types.ModelInput) error { } } +func validateModelLifeCycle(v *types.ModelLifeCycle) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ModelLifeCycle"} + if v.Stage == nil { + invalidParams.Add(smithy.NewErrParamRequired("Stage")) + } + if v.StageStatus == nil { + invalidParams.Add(smithy.NewErrParamRequired("StageStatus")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateModelMetadataFilter(v *types.ModelMetadataFilter) error { if v == nil { return nil @@ -14381,6 +14399,11 @@ func validateOpCreateModelPackageInput(v *CreateModelPackageInput) error { invalidParams.AddNested("SecurityConfig", err.(smithy.InvalidParamsError)) } } + if v.ModelLifeCycle != nil { + if err := validateModelLifeCycle(v.ModelLifeCycle); err != nil { + invalidParams.AddNested("ModelLifeCycle", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -18276,6 +18299,11 @@ func validateOpUpdateModelPackageInput(v *UpdateModelPackageInput) error { invalidParams.AddNested("InferenceSpecification", err.(smithy.InvalidParamsError)) } } + if v.ModelLifeCycle != nil { + if err := validateModelLifeCycle(v.ModelLifeCycle); err != nil { + invalidParams.AddNested("ModelLifeCycle", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/workmail/api_op_CreateIdentityCenterApplication.go b/service/workmail/api_op_CreateIdentityCenterApplication.go new file mode 100644 index 00000000000..b07c412210d --- /dev/null +++ b/service/workmail/api_op_CreateIdentityCenterApplication.go @@ -0,0 +1,204 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package workmail + +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" +) + +// Creates the WorkMail application in IAM Identity Center that can be used later +// +// in the WorkMail - IdC integration. For more information, see +// PutIdentityProviderConfiguration. This action does not affect the authentication +// settings for any WorkMail organizations. +func (c *Client) CreateIdentityCenterApplication(ctx context.Context, params *CreateIdentityCenterApplicationInput, optFns ...func(*Options)) (*CreateIdentityCenterApplicationOutput, error) { + if params == nil { + params = &CreateIdentityCenterApplicationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateIdentityCenterApplication", params, optFns, c.addOperationCreateIdentityCenterApplicationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateIdentityCenterApplicationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateIdentityCenterApplicationInput struct { + + // The Amazon Resource Name (ARN) of the instance. + // + // This member is required. + InstanceArn *string + + // The name of the IAM Identity Center application. + // + // This member is required. + Name *string + + // The idempotency token associated with the request. + ClientToken *string + + noSmithyDocumentSerde +} + +type CreateIdentityCenterApplicationOutput struct { + + // The Amazon Resource Name (ARN) of the application. + ApplicationArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateIdentityCenterApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateIdentityCenterApplication{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateIdentityCenterApplication{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateIdentityCenterApplication"); 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 = addSpanRetryLoop(stack, options); 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 = addIdempotencyToken_opCreateIdentityCenterApplicationMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateIdentityCenterApplicationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateIdentityCenterApplication(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateIdentityCenterApplication struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateIdentityCenterApplication) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateIdentityCenterApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateIdentityCenterApplicationInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateIdentityCenterApplicationInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateIdentityCenterApplicationMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateIdentityCenterApplication{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateIdentityCenterApplication(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateIdentityCenterApplication", + } +} diff --git a/service/workmail/api_op_CreateUser.go b/service/workmail/api_op_CreateUser.go index c36aa3fe725..f8c6ab95acd 100644 --- a/service/workmail/api_op_CreateUser.go +++ b/service/workmail/api_op_CreateUser.go @@ -51,6 +51,11 @@ type CreateUserInput struct { // If this parameter is enabled, the user will be hidden from the address book. HiddenFromGlobalAddressList bool + // User ID from the IAM Identity Center. If this parameter is empty it will be + // updated automatically when the user logs in for the first time to the mailbox + // associated with WorkMail. + IdentityProviderUserId *string + // The last name of the new user. LastName *string diff --git a/service/workmail/api_op_DeleteIdentityCenterApplication.go b/service/workmail/api_op_DeleteIdentityCenterApplication.go new file mode 100644 index 00000000000..f3a248ac563 --- /dev/null +++ b/service/workmail/api_op_DeleteIdentityCenterApplication.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package workmail + +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 the IAM Identity Center application from WorkMail. This action does +// +// not affect the authentication settings for any WorkMail organizations. +func (c *Client) DeleteIdentityCenterApplication(ctx context.Context, params *DeleteIdentityCenterApplicationInput, optFns ...func(*Options)) (*DeleteIdentityCenterApplicationOutput, error) { + if params == nil { + params = &DeleteIdentityCenterApplicationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteIdentityCenterApplication", params, optFns, c.addOperationDeleteIdentityCenterApplicationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteIdentityCenterApplicationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteIdentityCenterApplicationInput struct { + + // The Amazon Resource Name (ARN) of the application. + // + // This member is required. + ApplicationArn *string + + noSmithyDocumentSerde +} + +type DeleteIdentityCenterApplicationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteIdentityCenterApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteIdentityCenterApplication{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteIdentityCenterApplication{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteIdentityCenterApplication"); 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 = addSpanRetryLoop(stack, options); 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 = addOpDeleteIdentityCenterApplicationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteIdentityCenterApplication(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteIdentityCenterApplication(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteIdentityCenterApplication", + } +} diff --git a/service/workmail/api_op_DeleteIdentityProviderConfiguration.go b/service/workmail/api_op_DeleteIdentityProviderConfiguration.go new file mode 100644 index 00000000000..fbbf1e68ac0 --- /dev/null +++ b/service/workmail/api_op_DeleteIdentityProviderConfiguration.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package workmail + +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" +) + +// Disables the integration between IdC and WorkMail. Authentication will +// +// continue with the directory as it was before the IdC integration. You might have +// to reset your directory passwords and reconfigure your desktop and mobile email +// clients. +func (c *Client) DeleteIdentityProviderConfiguration(ctx context.Context, params *DeleteIdentityProviderConfigurationInput, optFns ...func(*Options)) (*DeleteIdentityProviderConfigurationOutput, error) { + if params == nil { + params = &DeleteIdentityProviderConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteIdentityProviderConfiguration", params, optFns, c.addOperationDeleteIdentityProviderConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteIdentityProviderConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteIdentityProviderConfigurationInput struct { + + // The Organization ID. + // + // This member is required. + OrganizationId *string + + noSmithyDocumentSerde +} + +type DeleteIdentityProviderConfigurationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteIdentityProviderConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteIdentityProviderConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteIdentityProviderConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteIdentityProviderConfiguration"); 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 = addSpanRetryLoop(stack, options); 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 = addOpDeleteIdentityProviderConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteIdentityProviderConfiguration(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteIdentityProviderConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteIdentityProviderConfiguration", + } +} diff --git a/service/workmail/api_op_DeleteOrganization.go b/service/workmail/api_op_DeleteOrganization.go index 0b4e5894328..b74a89b426f 100644 --- a/service/workmail/api_op_DeleteOrganization.go +++ b/service/workmail/api_op_DeleteOrganization.go @@ -47,6 +47,10 @@ type DeleteOrganizationInput struct { // The idempotency token associated with the request. ClientToken *string + // Deletes IAM Identity Center application for WorkMail. This action does not + // affect authentication settings for any organization. + DeleteIdentityCenterApplication bool + // Deletes a WorkMail organization even if the organization has enabled users. ForceDelete bool diff --git a/service/workmail/api_op_DeletePersonalAccessToken.go b/service/workmail/api_op_DeletePersonalAccessToken.go new file mode 100644 index 00000000000..4f2b477547c --- /dev/null +++ b/service/workmail/api_op_DeletePersonalAccessToken.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package workmail + +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 the Personal Access Token from the provided WorkMail Organization. +func (c *Client) DeletePersonalAccessToken(ctx context.Context, params *DeletePersonalAccessTokenInput, optFns ...func(*Options)) (*DeletePersonalAccessTokenOutput, error) { + if params == nil { + params = &DeletePersonalAccessTokenInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeletePersonalAccessToken", params, optFns, c.addOperationDeletePersonalAccessTokenMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeletePersonalAccessTokenOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeletePersonalAccessTokenInput struct { + + // The Organization ID. + // + // This member is required. + OrganizationId *string + + // The Personal Access Token ID. + // + // This member is required. + PersonalAccessTokenId *string + + noSmithyDocumentSerde +} + +type DeletePersonalAccessTokenOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeletePersonalAccessTokenMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeletePersonalAccessToken{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeletePersonalAccessToken{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeletePersonalAccessToken"); 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 = addSpanRetryLoop(stack, options); 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 = addOpDeletePersonalAccessTokenValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePersonalAccessToken(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeletePersonalAccessToken(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeletePersonalAccessToken", + } +} diff --git a/service/workmail/api_op_DescribeIdentityProviderConfiguration.go b/service/workmail/api_op_DescribeIdentityProviderConfiguration.go new file mode 100644 index 00000000000..47336a862e0 --- /dev/null +++ b/service/workmail/api_op_DescribeIdentityProviderConfiguration.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package workmail + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/workmail/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns detailed information on the current IdC setup for the WorkMail +// +// organization. +func (c *Client) DescribeIdentityProviderConfiguration(ctx context.Context, params *DescribeIdentityProviderConfigurationInput, optFns ...func(*Options)) (*DescribeIdentityProviderConfigurationOutput, error) { + if params == nil { + params = &DescribeIdentityProviderConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeIdentityProviderConfiguration", params, optFns, c.addOperationDescribeIdentityProviderConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeIdentityProviderConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeIdentityProviderConfigurationInput struct { + + // The Organization ID. + // + // This member is required. + OrganizationId *string + + noSmithyDocumentSerde +} + +type DescribeIdentityProviderConfigurationOutput struct { + + // The authentication mode used in WorkMail. + AuthenticationMode types.IdentityProviderAuthenticationMode + + // The details of the IAM Identity Center configuration. + IdentityCenterConfiguration *types.IdentityCenterConfiguration + + // The details of the Personal Access Token configuration. + PersonalAccessTokenConfiguration *types.PersonalAccessTokenConfiguration + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeIdentityProviderConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeIdentityProviderConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeIdentityProviderConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeIdentityProviderConfiguration"); 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 = addSpanRetryLoop(stack, options); 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 = addOpDescribeIdentityProviderConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIdentityProviderConfiguration(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeIdentityProviderConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeIdentityProviderConfiguration", + } +} diff --git a/service/workmail/api_op_DescribeUser.go b/service/workmail/api_op_DescribeUser.go index 65ddbc8eb03..fe1f36de2d6 100644 --- a/service/workmail/api_op_DescribeUser.go +++ b/service/workmail/api_op_DescribeUser.go @@ -87,6 +87,16 @@ type DescribeUserOutput struct { // If enabled, the user is hidden from the global address list. HiddenFromGlobalAddressList bool + // Identity Store ID from the IAM Identity Center. If this parameter is empty it + // will be updated automatically when the user logs in for the first time to the + // mailbox associated with WorkMail. + IdentityProviderIdentityStoreId *string + + // User ID from the IAM Identity Center. If this parameter is empty it will be + // updated automatically when the user logs in for the first time to the mailbox + // associated with WorkMail. + IdentityProviderUserId *string + // Initials of the user. Initials *string diff --git a/service/workmail/api_op_GetPersonalAccessTokenMetadata.go b/service/workmail/api_op_GetPersonalAccessTokenMetadata.go new file mode 100644 index 00000000000..31962e18f92 --- /dev/null +++ b/service/workmail/api_op_GetPersonalAccessTokenMetadata.go @@ -0,0 +1,182 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package workmail + +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" +) + +// Requests details of a specific Personal Access Token within the WorkMail +// +// organization. +func (c *Client) GetPersonalAccessTokenMetadata(ctx context.Context, params *GetPersonalAccessTokenMetadataInput, optFns ...func(*Options)) (*GetPersonalAccessTokenMetadataOutput, error) { + if params == nil { + params = &GetPersonalAccessTokenMetadataInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetPersonalAccessTokenMetadata", params, optFns, c.addOperationGetPersonalAccessTokenMetadataMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetPersonalAccessTokenMetadataOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetPersonalAccessTokenMetadataInput struct { + + // The Organization ID. + // + // This member is required. + OrganizationId *string + + // The Personal Access Token ID. + // + // This member is required. + PersonalAccessTokenId *string + + noSmithyDocumentSerde +} + +type GetPersonalAccessTokenMetadataOutput struct { + + // The date when the Personal Access Token ID was created. + DateCreated *time.Time + + // The date when the Personal Access Token ID was last used. + DateLastUsed *time.Time + + // The time when the Personal Access Token ID will expire. + ExpiresTime *time.Time + + // The Personal Access Token name. + Name *string + + // The Personal Access Token ID. + PersonalAccessTokenId *string + + // Lists all the Personal Access Token permissions for a mailbox. + Scopes []string + + // The WorkMail User ID. + UserId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetPersonalAccessTokenMetadataMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetPersonalAccessTokenMetadata{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetPersonalAccessTokenMetadata{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetPersonalAccessTokenMetadata"); 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 = addSpanRetryLoop(stack, options); 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 = addOpGetPersonalAccessTokenMetadataValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPersonalAccessTokenMetadata(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetPersonalAccessTokenMetadata(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetPersonalAccessTokenMetadata", + } +} diff --git a/service/workmail/api_op_ListPersonalAccessTokens.go b/service/workmail/api_op_ListPersonalAccessTokens.go new file mode 100644 index 00000000000..fccdc5aa21b --- /dev/null +++ b/service/workmail/api_op_ListPersonalAccessTokens.go @@ -0,0 +1,265 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package workmail + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/workmail/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a summary of your Personal Access Tokens. +func (c *Client) ListPersonalAccessTokens(ctx context.Context, params *ListPersonalAccessTokensInput, optFns ...func(*Options)) (*ListPersonalAccessTokensOutput, error) { + if params == nil { + params = &ListPersonalAccessTokensInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListPersonalAccessTokens", params, optFns, c.addOperationListPersonalAccessTokensMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListPersonalAccessTokensOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListPersonalAccessTokensInput struct { + + // The Organization ID. + // + // This member is required. + OrganizationId *string + + // The maximum amount of items that should be returned in a response. + MaxResults *int32 + + // The token from the previous response to query the next page. + NextToken *string + + // The WorkMail User ID. + UserId *string + + noSmithyDocumentSerde +} + +type ListPersonalAccessTokensOutput struct { + + // The token from the previous response to query the next page. + NextToken *string + + // Lists all the personal tokens in an organization or user, if user ID is + // provided. + PersonalAccessTokenSummaries []types.PersonalAccessTokenSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListPersonalAccessTokensMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListPersonalAccessTokens{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListPersonalAccessTokens{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListPersonalAccessTokens"); 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 = addSpanRetryLoop(stack, options); 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 = addOpListPersonalAccessTokensValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPersonalAccessTokens(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListPersonalAccessTokensPaginatorOptions is the paginator options for +// ListPersonalAccessTokens +type ListPersonalAccessTokensPaginatorOptions struct { + // The maximum amount of items that should be returned in a response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListPersonalAccessTokensPaginator is a paginator for ListPersonalAccessTokens +type ListPersonalAccessTokensPaginator struct { + options ListPersonalAccessTokensPaginatorOptions + client ListPersonalAccessTokensAPIClient + params *ListPersonalAccessTokensInput + nextToken *string + firstPage bool +} + +// NewListPersonalAccessTokensPaginator returns a new +// ListPersonalAccessTokensPaginator +func NewListPersonalAccessTokensPaginator(client ListPersonalAccessTokensAPIClient, params *ListPersonalAccessTokensInput, optFns ...func(*ListPersonalAccessTokensPaginatorOptions)) *ListPersonalAccessTokensPaginator { + if params == nil { + params = &ListPersonalAccessTokensInput{} + } + + options := ListPersonalAccessTokensPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListPersonalAccessTokensPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListPersonalAccessTokensPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListPersonalAccessTokens page. +func (p *ListPersonalAccessTokensPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPersonalAccessTokensOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListPersonalAccessTokens(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListPersonalAccessTokensAPIClient is a client that implements the +// ListPersonalAccessTokens operation. +type ListPersonalAccessTokensAPIClient interface { + ListPersonalAccessTokens(context.Context, *ListPersonalAccessTokensInput, ...func(*Options)) (*ListPersonalAccessTokensOutput, error) +} + +var _ ListPersonalAccessTokensAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListPersonalAccessTokens(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListPersonalAccessTokens", + } +} diff --git a/service/workmail/api_op_PutIdentityProviderConfiguration.go b/service/workmail/api_op_PutIdentityProviderConfiguration.go new file mode 100644 index 00000000000..3c6ffb2cfc8 --- /dev/null +++ b/service/workmail/api_op_PutIdentityProviderConfiguration.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package workmail + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/workmail/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Enables integration between IAM Identity Center (IdC) and WorkMail to proxy +// +// authentication requests for mailbox users. You can connect your IdC directory or +// your external directory to WorkMail through IdC and manage access to WorkMail +// mailboxes in a single place. For enhanced protection, you could enable +// Multifactor Authentication (MFA) and Personal Access Tokens. +func (c *Client) PutIdentityProviderConfiguration(ctx context.Context, params *PutIdentityProviderConfigurationInput, optFns ...func(*Options)) (*PutIdentityProviderConfigurationOutput, error) { + if params == nil { + params = &PutIdentityProviderConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutIdentityProviderConfiguration", params, optFns, c.addOperationPutIdentityProviderConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutIdentityProviderConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutIdentityProviderConfigurationInput struct { + + // The authentication mode used in WorkMail. + // + // This member is required. + AuthenticationMode types.IdentityProviderAuthenticationMode + + // The details of the IAM Identity Center configuration. + // + // This member is required. + IdentityCenterConfiguration *types.IdentityCenterConfiguration + + // The ID of the WorkMail Organization. + // + // This member is required. + OrganizationId *string + + // The details of the Personal Access Token configuration. + // + // This member is required. + PersonalAccessTokenConfiguration *types.PersonalAccessTokenConfiguration + + noSmithyDocumentSerde +} + +type PutIdentityProviderConfigurationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutIdentityProviderConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutIdentityProviderConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutIdentityProviderConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutIdentityProviderConfiguration"); 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 = addSpanRetryLoop(stack, options); 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 = addOpPutIdentityProviderConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutIdentityProviderConfiguration(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutIdentityProviderConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutIdentityProviderConfiguration", + } +} diff --git a/service/workmail/api_op_UpdateGroup.go b/service/workmail/api_op_UpdateGroup.go index c04ce6866d5..b390ef34dde 100644 --- a/service/workmail/api_op_UpdateGroup.go +++ b/service/workmail/api_op_UpdateGroup.go @@ -10,7 +10,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates attibutes in a group. +// Updates attributes in a group. func (c *Client) UpdateGroup(ctx context.Context, params *UpdateGroupInput, optFns ...func(*Options)) (*UpdateGroupOutput, error) { if params == nil { params = &UpdateGroupInput{} diff --git a/service/workmail/api_op_UpdateUser.go b/service/workmail/api_op_UpdateUser.go index 04d78b836aa..2e1dd60b98c 100644 --- a/service/workmail/api_op_UpdateUser.go +++ b/service/workmail/api_op_UpdateUser.go @@ -72,6 +72,11 @@ type UpdateUserInput struct { // If enabled, the user is hidden from the global address list. HiddenFromGlobalAddressList *bool + // User ID from the IAM Identity Center. If this parameter is empty it will be + // updated automatically when the user logs in for the first time to the mailbox + // associated with WorkMail. + IdentityProviderUserId *string + // Updates the user's initials. Initials *string @@ -95,7 +100,7 @@ type UpdateUserInput struct { // Updates the user's contact details. Telephone *string - // Updates the user's zipcode. + // Updates the user's zip code. ZipCode *string noSmithyDocumentSerde diff --git a/service/workmail/deserializers.go b/service/workmail/deserializers.go index 357b3b83bef..621f5e65da5 100644 --- a/service/workmail/deserializers.go +++ b/service/workmail/deserializers.go @@ -918,6 +918,117 @@ func awsAwsjson11_deserializeOpErrorCreateGroup(response *smithyhttp.Response, m } } +type awsAwsjson11_deserializeOpCreateIdentityCenterApplication struct { +} + +func (*awsAwsjson11_deserializeOpCreateIdentityCenterApplication) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateIdentityCenterApplication) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorCreateIdentityCenterApplication(response, &metadata) + } + output := &CreateIdentityCenterApplicationOutput{} + 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_deserializeOpDocumentCreateIdentityCenterApplicationOutput(&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_deserializeOpErrorCreateIdentityCenterApplication(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("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpCreateImpersonationRole struct { } @@ -2151,14 +2262,14 @@ func awsAwsjson11_deserializeOpErrorDeleteGroup(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpDeleteImpersonationRole struct { +type awsAwsjson11_deserializeOpDeleteIdentityCenterApplication struct { } -func (*awsAwsjson11_deserializeOpDeleteImpersonationRole) ID() string { +func (*awsAwsjson11_deserializeOpDeleteIdentityCenterApplication) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteImpersonationRole) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteIdentityCenterApplication) 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) @@ -2176,9 +2287,9 @@ func (m *awsAwsjson11_deserializeOpDeleteImpersonationRole) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteImpersonationRole(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteIdentityCenterApplication(response, &metadata) } - output := &DeleteImpersonationRoleOutput{} + output := &DeleteIdentityCenterApplicationOutput{} out.Result = output var buff [1024]byte @@ -2198,7 +2309,7 @@ func (m *awsAwsjson11_deserializeOpDeleteImpersonationRole) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteImpersonationRoleOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteIdentityCenterApplicationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2212,7 +2323,7 @@ func (m *awsAwsjson11_deserializeOpDeleteImpersonationRole) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteImpersonationRole(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteIdentityCenterApplication(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)} @@ -2252,9 +2363,6 @@ func awsAwsjson11_deserializeOpErrorDeleteImpersonationRole(response *smithyhttp case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("OrganizationNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) - case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) @@ -2268,14 +2376,14 @@ func awsAwsjson11_deserializeOpErrorDeleteImpersonationRole(response *smithyhttp } } -type awsAwsjson11_deserializeOpDeleteMailboxPermissions struct { +type awsAwsjson11_deserializeOpDeleteIdentityProviderConfiguration struct { } -func (*awsAwsjson11_deserializeOpDeleteMailboxPermissions) ID() string { +func (*awsAwsjson11_deserializeOpDeleteIdentityProviderConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteMailboxPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteIdentityProviderConfiguration) 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) @@ -2293,9 +2401,9 @@ func (m *awsAwsjson11_deserializeOpDeleteMailboxPermissions) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteMailboxPermissions(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteIdentityProviderConfiguration(response, &metadata) } - output := &DeleteMailboxPermissionsOutput{} + output := &DeleteIdentityProviderConfigurationOutput{} out.Result = output var buff [1024]byte @@ -2315,7 +2423,7 @@ func (m *awsAwsjson11_deserializeOpDeleteMailboxPermissions) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteMailboxPermissionsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteIdentityProviderConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2329,7 +2437,7 @@ func (m *awsAwsjson11_deserializeOpDeleteMailboxPermissions) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteMailboxPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteIdentityProviderConfiguration(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)} @@ -2366,12 +2474,6 @@ func awsAwsjson11_deserializeOpErrorDeleteMailboxPermissions(response *smithyhtt errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - - case strings.EqualFold("EntityStateException", errorCode): - return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -2391,14 +2493,14 @@ func awsAwsjson11_deserializeOpErrorDeleteMailboxPermissions(response *smithyhtt } } -type awsAwsjson11_deserializeOpDeleteMobileDeviceAccessOverride struct { +type awsAwsjson11_deserializeOpDeleteImpersonationRole struct { } -func (*awsAwsjson11_deserializeOpDeleteMobileDeviceAccessOverride) ID() string { +func (*awsAwsjson11_deserializeOpDeleteImpersonationRole) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteMobileDeviceAccessOverride) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteImpersonationRole) 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) @@ -2416,9 +2518,9 @@ func (m *awsAwsjson11_deserializeOpDeleteMobileDeviceAccessOverride) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteMobileDeviceAccessOverride(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteImpersonationRole(response, &metadata) } - output := &DeleteMobileDeviceAccessOverrideOutput{} + output := &DeleteImpersonationRoleOutput{} out.Result = output var buff [1024]byte @@ -2438,7 +2540,7 @@ func (m *awsAwsjson11_deserializeOpDeleteMobileDeviceAccessOverride) HandleDeser return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteMobileDeviceAccessOverrideOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteImpersonationRoleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2452,7 +2554,7 @@ func (m *awsAwsjson11_deserializeOpDeleteMobileDeviceAccessOverride) HandleDeser return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteMobileDeviceAccessOverride(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteImpersonationRole(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)} @@ -2489,9 +2591,6 @@ func awsAwsjson11_deserializeOpErrorDeleteMobileDeviceAccessOverride(response *s errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -2511,14 +2610,14 @@ func awsAwsjson11_deserializeOpErrorDeleteMobileDeviceAccessOverride(response *s } } -type awsAwsjson11_deserializeOpDeleteMobileDeviceAccessRule struct { +type awsAwsjson11_deserializeOpDeleteMailboxPermissions struct { } -func (*awsAwsjson11_deserializeOpDeleteMobileDeviceAccessRule) ID() string { +func (*awsAwsjson11_deserializeOpDeleteMailboxPermissions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteMobileDeviceAccessRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteMailboxPermissions) 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) @@ -2536,9 +2635,9 @@ func (m *awsAwsjson11_deserializeOpDeleteMobileDeviceAccessRule) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteMobileDeviceAccessRule(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteMailboxPermissions(response, &metadata) } - output := &DeleteMobileDeviceAccessRuleOutput{} + output := &DeleteMailboxPermissionsOutput{} out.Result = output var buff [1024]byte @@ -2558,7 +2657,7 @@ func (m *awsAwsjson11_deserializeOpDeleteMobileDeviceAccessRule) HandleDeseriali return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteMobileDeviceAccessRuleOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteMailboxPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2572,7 +2671,7 @@ func (m *awsAwsjson11_deserializeOpDeleteMobileDeviceAccessRule) HandleDeseriali return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteMobileDeviceAccessRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteMailboxPermissions(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)} @@ -2609,6 +2708,12 @@ func awsAwsjson11_deserializeOpErrorDeleteMobileDeviceAccessRule(response *smith errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("EntityStateException", errorCode): + return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -2628,14 +2733,14 @@ func awsAwsjson11_deserializeOpErrorDeleteMobileDeviceAccessRule(response *smith } } -type awsAwsjson11_deserializeOpDeleteOrganization struct { +type awsAwsjson11_deserializeOpDeleteMobileDeviceAccessOverride struct { } -func (*awsAwsjson11_deserializeOpDeleteOrganization) ID() string { +func (*awsAwsjson11_deserializeOpDeleteMobileDeviceAccessOverride) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteOrganization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteMobileDeviceAccessOverride) 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) @@ -2653,9 +2758,9 @@ func (m *awsAwsjson11_deserializeOpDeleteOrganization) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteOrganization(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteMobileDeviceAccessOverride(response, &metadata) } - output := &DeleteOrganizationOutput{} + output := &DeleteMobileDeviceAccessOverrideOutput{} out.Result = output var buff [1024]byte @@ -2675,7 +2780,7 @@ func (m *awsAwsjson11_deserializeOpDeleteOrganization) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteOrganizationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteMobileDeviceAccessOverrideOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2689,7 +2794,7 @@ func (m *awsAwsjson11_deserializeOpDeleteOrganization) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteOrganization(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteMobileDeviceAccessOverride(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)} @@ -2726,6 +2831,9 @@ func awsAwsjson11_deserializeOpErrorDeleteOrganization(response *smithyhttp.Resp errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -2745,14 +2853,14 @@ func awsAwsjson11_deserializeOpErrorDeleteOrganization(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpDeleteResource struct { +type awsAwsjson11_deserializeOpDeleteMobileDeviceAccessRule struct { } -func (*awsAwsjson11_deserializeOpDeleteResource) ID() string { +func (*awsAwsjson11_deserializeOpDeleteMobileDeviceAccessRule) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteMobileDeviceAccessRule) 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) @@ -2770,9 +2878,9 @@ func (m *awsAwsjson11_deserializeOpDeleteResource) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteMobileDeviceAccessRule(response, &metadata) } - output := &DeleteResourceOutput{} + output := &DeleteMobileDeviceAccessRuleOutput{} out.Result = output var buff [1024]byte @@ -2792,7 +2900,7 @@ func (m *awsAwsjson11_deserializeOpDeleteResource) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteMobileDeviceAccessRuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2806,7 +2914,7 @@ func (m *awsAwsjson11_deserializeOpDeleteResource) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteMobileDeviceAccessRule(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)} @@ -2843,9 +2951,6 @@ func awsAwsjson11_deserializeOpErrorDeleteResource(response *smithyhttp.Response errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("EntityStateException", errorCode): - return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -2855,9 +2960,6 @@ func awsAwsjson11_deserializeOpErrorDeleteResource(response *smithyhttp.Response case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) - case strings.EqualFold("UnsupportedOperationException", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2868,14 +2970,14 @@ func awsAwsjson11_deserializeOpErrorDeleteResource(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpDeleteRetentionPolicy struct { +type awsAwsjson11_deserializeOpDeleteOrganization struct { } -func (*awsAwsjson11_deserializeOpDeleteRetentionPolicy) ID() string { +func (*awsAwsjson11_deserializeOpDeleteOrganization) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteRetentionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteOrganization) 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) @@ -2893,9 +2995,9 @@ func (m *awsAwsjson11_deserializeOpDeleteRetentionPolicy) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRetentionPolicy(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteOrganization(response, &metadata) } - output := &DeleteRetentionPolicyOutput{} + output := &DeleteOrganizationOutput{} out.Result = output var buff [1024]byte @@ -2915,7 +3017,7 @@ func (m *awsAwsjson11_deserializeOpDeleteRetentionPolicy) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteRetentionPolicyOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteOrganizationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2929,7 +3031,7 @@ func (m *awsAwsjson11_deserializeOpDeleteRetentionPolicy) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteRetentionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteOrganization(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)} @@ -2985,14 +3087,14 @@ func awsAwsjson11_deserializeOpErrorDeleteRetentionPolicy(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpDeleteUser struct { +type awsAwsjson11_deserializeOpDeletePersonalAccessToken struct { } -func (*awsAwsjson11_deserializeOpDeleteUser) ID() string { +func (*awsAwsjson11_deserializeOpDeletePersonalAccessToken) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeletePersonalAccessToken) 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) @@ -3010,9 +3112,9 @@ func (m *awsAwsjson11_deserializeOpDeleteUser) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteUser(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeletePersonalAccessToken(response, &metadata) } - output := &DeleteUserOutput{} + output := &DeletePersonalAccessTokenOutput{} out.Result = output var buff [1024]byte @@ -3032,7 +3134,7 @@ func (m *awsAwsjson11_deserializeOpDeleteUser) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteUserOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeletePersonalAccessTokenOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3046,7 +3148,7 @@ func (m *awsAwsjson11_deserializeOpDeleteUser) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeletePersonalAccessToken(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)} @@ -3083,15 +3185,6 @@ func awsAwsjson11_deserializeOpErrorDeleteUser(response *smithyhttp.Response, me errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("DirectoryServiceAuthenticationFailedException", errorCode): - return awsAwsjson11_deserializeErrorDirectoryServiceAuthenticationFailedException(response, errorBody) - - case strings.EqualFold("DirectoryUnavailableException", errorCode): - return awsAwsjson11_deserializeErrorDirectoryUnavailableException(response, errorBody) - - case strings.EqualFold("EntityStateException", errorCode): - return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -3101,9 +3194,6 @@ func awsAwsjson11_deserializeOpErrorDeleteUser(response *smithyhttp.Response, me case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) - case strings.EqualFold("UnsupportedOperationException", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3114,14 +3204,14 @@ func awsAwsjson11_deserializeOpErrorDeleteUser(response *smithyhttp.Response, me } } -type awsAwsjson11_deserializeOpDeregisterFromWorkMail struct { +type awsAwsjson11_deserializeOpDeleteResource struct { } -func (*awsAwsjson11_deserializeOpDeregisterFromWorkMail) ID() string { +func (*awsAwsjson11_deserializeOpDeleteResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeregisterFromWorkMail) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteResource) 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) @@ -3139,9 +3229,9 @@ func (m *awsAwsjson11_deserializeOpDeregisterFromWorkMail) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeregisterFromWorkMail(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteResource(response, &metadata) } - output := &DeregisterFromWorkMailOutput{} + output := &DeleteResourceOutput{} out.Result = output var buff [1024]byte @@ -3161,7 +3251,7 @@ func (m *awsAwsjson11_deserializeOpDeregisterFromWorkMail) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeregisterFromWorkMailOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3175,7 +3265,7 @@ func (m *awsAwsjson11_deserializeOpDeregisterFromWorkMail) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeregisterFromWorkMail(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteResource(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)} @@ -3212,9 +3302,6 @@ func awsAwsjson11_deserializeOpErrorDeregisterFromWorkMail(response *smithyhttp. errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("EntityStateException", errorCode): return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) @@ -3227,6 +3314,9 @@ func awsAwsjson11_deserializeOpErrorDeregisterFromWorkMail(response *smithyhttp. case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3237,14 +3327,14 @@ func awsAwsjson11_deserializeOpErrorDeregisterFromWorkMail(response *smithyhttp. } } -type awsAwsjson11_deserializeOpDeregisterMailDomain struct { +type awsAwsjson11_deserializeOpDeleteRetentionPolicy struct { } -func (*awsAwsjson11_deserializeOpDeregisterMailDomain) ID() string { +func (*awsAwsjson11_deserializeOpDeleteRetentionPolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeregisterMailDomain) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteRetentionPolicy) 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) @@ -3262,9 +3352,9 @@ func (m *awsAwsjson11_deserializeOpDeregisterMailDomain) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeregisterMailDomain(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRetentionPolicy(response, &metadata) } - output := &DeregisterMailDomainOutput{} + output := &DeleteRetentionPolicyOutput{} out.Result = output var buff [1024]byte @@ -3284,7 +3374,7 @@ func (m *awsAwsjson11_deserializeOpDeregisterMailDomain) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeregisterMailDomainOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteRetentionPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3298,7 +3388,7 @@ func (m *awsAwsjson11_deserializeOpDeregisterMailDomain) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeregisterMailDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteRetentionPolicy(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)} @@ -3335,15 +3425,9 @@ func awsAwsjson11_deserializeOpErrorDeregisterMailDomain(response *smithyhttp.Re errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("InvalidCustomSesConfigurationException", errorCode): - return awsAwsjson11_deserializeErrorInvalidCustomSesConfigurationException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("MailDomainInUseException", errorCode): - return awsAwsjson11_deserializeErrorMailDomainInUseException(response, errorBody) - case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) @@ -3360,14 +3444,14 @@ func awsAwsjson11_deserializeOpErrorDeregisterMailDomain(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpDescribeEmailMonitoringConfiguration struct { +type awsAwsjson11_deserializeOpDeleteUser struct { } -func (*awsAwsjson11_deserializeOpDescribeEmailMonitoringConfiguration) ID() string { +func (*awsAwsjson11_deserializeOpDeleteUser) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeEmailMonitoringConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteUser) 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) @@ -3385,9 +3469,9 @@ func (m *awsAwsjson11_deserializeOpDescribeEmailMonitoringConfiguration) HandleD } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeEmailMonitoringConfiguration(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteUser(response, &metadata) } - output := &DescribeEmailMonitoringConfigurationOutput{} + output := &DeleteUserOutput{} out.Result = output var buff [1024]byte @@ -3407,7 +3491,7 @@ func (m *awsAwsjson11_deserializeOpDescribeEmailMonitoringConfiguration) HandleD return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeEmailMonitoringConfigurationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3421,7 +3505,7 @@ func (m *awsAwsjson11_deserializeOpDescribeEmailMonitoringConfiguration) HandleD return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeEmailMonitoringConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteUser(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)} @@ -3458,6 +3542,15 @@ func awsAwsjson11_deserializeOpErrorDescribeEmailMonitoringConfiguration(respons errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("DirectoryServiceAuthenticationFailedException", errorCode): + return awsAwsjson11_deserializeErrorDirectoryServiceAuthenticationFailedException(response, errorBody) + + case strings.EqualFold("DirectoryUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorDirectoryUnavailableException(response, errorBody) + + case strings.EqualFold("EntityStateException", errorCode): + return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -3467,8 +3560,8 @@ func awsAwsjson11_deserializeOpErrorDescribeEmailMonitoringConfiguration(respons case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -3480,14 +3573,14 @@ func awsAwsjson11_deserializeOpErrorDescribeEmailMonitoringConfiguration(respons } } -type awsAwsjson11_deserializeOpDescribeEntity struct { +type awsAwsjson11_deserializeOpDeregisterFromWorkMail struct { } -func (*awsAwsjson11_deserializeOpDescribeEntity) ID() string { +func (*awsAwsjson11_deserializeOpDeregisterFromWorkMail) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeEntity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeregisterFromWorkMail) 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) @@ -3505,9 +3598,9 @@ func (m *awsAwsjson11_deserializeOpDescribeEntity) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeEntity(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeregisterFromWorkMail(response, &metadata) } - output := &DescribeEntityOutput{} + output := &DeregisterFromWorkMailOutput{} out.Result = output var buff [1024]byte @@ -3527,7 +3620,7 @@ func (m *awsAwsjson11_deserializeOpDescribeEntity) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeEntityOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeregisterFromWorkMailOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3541,7 +3634,7 @@ func (m *awsAwsjson11_deserializeOpDescribeEntity) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeEntity(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeregisterFromWorkMail(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)} @@ -3581,6 +3674,9 @@ func awsAwsjson11_deserializeOpErrorDescribeEntity(response *smithyhttp.Response case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("EntityStateException", errorCode): + return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -3600,14 +3696,14 @@ func awsAwsjson11_deserializeOpErrorDescribeEntity(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpDescribeGroup struct { +type awsAwsjson11_deserializeOpDeregisterMailDomain struct { } -func (*awsAwsjson11_deserializeOpDescribeGroup) ID() string { +func (*awsAwsjson11_deserializeOpDeregisterMailDomain) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeregisterMailDomain) 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) @@ -3625,9 +3721,9 @@ func (m *awsAwsjson11_deserializeOpDescribeGroup) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeGroup(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeregisterMailDomain(response, &metadata) } - output := &DescribeGroupOutput{} + output := &DeregisterMailDomainOutput{} out.Result = output var buff [1024]byte @@ -3647,7 +3743,7 @@ func (m *awsAwsjson11_deserializeOpDescribeGroup) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeGroupOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeregisterMailDomainOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3661,7 +3757,7 @@ func (m *awsAwsjson11_deserializeOpDescribeGroup) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeregisterMailDomain(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)} @@ -3698,12 +3794,15 @@ func awsAwsjson11_deserializeOpErrorDescribeGroup(response *smithyhttp.Response, errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("InvalidCustomSesConfigurationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidCustomSesConfigurationException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("MailDomainInUseException", errorCode): + return awsAwsjson11_deserializeErrorMailDomainInUseException(response, errorBody) + case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) @@ -3720,14 +3819,14 @@ func awsAwsjson11_deserializeOpErrorDescribeGroup(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpDescribeInboundDmarcSettings struct { +type awsAwsjson11_deserializeOpDescribeEmailMonitoringConfiguration struct { } -func (*awsAwsjson11_deserializeOpDescribeInboundDmarcSettings) ID() string { +func (*awsAwsjson11_deserializeOpDescribeEmailMonitoringConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeInboundDmarcSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeEmailMonitoringConfiguration) 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) @@ -3745,9 +3844,9 @@ func (m *awsAwsjson11_deserializeOpDescribeInboundDmarcSettings) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeInboundDmarcSettings(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeEmailMonitoringConfiguration(response, &metadata) } - output := &DescribeInboundDmarcSettingsOutput{} + output := &DescribeEmailMonitoringConfigurationOutput{} out.Result = output var buff [1024]byte @@ -3767,7 +3866,7 @@ func (m *awsAwsjson11_deserializeOpDescribeInboundDmarcSettings) HandleDeseriali return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeInboundDmarcSettingsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeEmailMonitoringConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3781,7 +3880,7 @@ func (m *awsAwsjson11_deserializeOpDescribeInboundDmarcSettings) HandleDeseriali return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeInboundDmarcSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeEmailMonitoringConfiguration(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)} @@ -3818,12 +3917,18 @@ func awsAwsjson11_deserializeOpErrorDescribeInboundDmarcSettings(response *smith errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3834,14 +3939,14 @@ func awsAwsjson11_deserializeOpErrorDescribeInboundDmarcSettings(response *smith } } -type awsAwsjson11_deserializeOpDescribeMailboxExportJob struct { +type awsAwsjson11_deserializeOpDescribeEntity struct { } -func (*awsAwsjson11_deserializeOpDescribeMailboxExportJob) ID() string { +func (*awsAwsjson11_deserializeOpDescribeEntity) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeMailboxExportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeEntity) 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) @@ -3859,9 +3964,9 @@ func (m *awsAwsjson11_deserializeOpDescribeMailboxExportJob) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMailboxExportJob(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeEntity(response, &metadata) } - output := &DescribeMailboxExportJobOutput{} + output := &DescribeEntityOutput{} out.Result = output var buff [1024]byte @@ -3881,7 +3986,7 @@ func (m *awsAwsjson11_deserializeOpDescribeMailboxExportJob) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeMailboxExportJobOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeEntityOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3895,7 +4000,7 @@ func (m *awsAwsjson11_deserializeOpDescribeMailboxExportJob) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeMailboxExportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeEntity(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3954,14 +4059,14 @@ func awsAwsjson11_deserializeOpErrorDescribeMailboxExportJob(response *smithyhtt } } -type awsAwsjson11_deserializeOpDescribeOrganization struct { +type awsAwsjson11_deserializeOpDescribeGroup struct { } -func (*awsAwsjson11_deserializeOpDescribeOrganization) ID() string { +func (*awsAwsjson11_deserializeOpDescribeGroup) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeOrganization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeGroup) 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) @@ -3979,9 +4084,9 @@ func (m *awsAwsjson11_deserializeOpDescribeOrganization) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeOrganization(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeGroup(response, &metadata) } - output := &DescribeOrganizationOutput{} + output := &DescribeGroupOutput{} out.Result = output var buff [1024]byte @@ -4001,7 +4106,7 @@ func (m *awsAwsjson11_deserializeOpDescribeOrganization) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeOrganizationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4015,7 +4120,7 @@ func (m *awsAwsjson11_deserializeOpDescribeOrganization) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeOrganization(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeGroup(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)} @@ -4052,12 +4157,18 @@ func awsAwsjson11_deserializeOpErrorDescribeOrganization(response *smithyhttp.Re errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) + case strings.EqualFold("OrganizationStateException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4068,14 +4179,14 @@ func awsAwsjson11_deserializeOpErrorDescribeOrganization(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpDescribeResource struct { +type awsAwsjson11_deserializeOpDescribeIdentityProviderConfiguration struct { } -func (*awsAwsjson11_deserializeOpDescribeResource) ID() string { +func (*awsAwsjson11_deserializeOpDescribeIdentityProviderConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeIdentityProviderConfiguration) 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) @@ -4093,9 +4204,9 @@ func (m *awsAwsjson11_deserializeOpDescribeResource) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeIdentityProviderConfiguration(response, &metadata) } - output := &DescribeResourceOutput{} + output := &DescribeIdentityProviderConfigurationOutput{} out.Result = output var buff [1024]byte @@ -4115,7 +4226,7 @@ func (m *awsAwsjson11_deserializeOpDescribeResource) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeIdentityProviderConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4129,7 +4240,7 @@ func (m *awsAwsjson11_deserializeOpDescribeResource) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeIdentityProviderConfiguration(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)} @@ -4166,9 +4277,6 @@ func awsAwsjson11_deserializeOpErrorDescribeResource(response *smithyhttp.Respon errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -4178,8 +4286,8 @@ func awsAwsjson11_deserializeOpErrorDescribeResource(response *smithyhttp.Respon case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) - case strings.EqualFold("UnsupportedOperationException", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -4191,14 +4299,14 @@ func awsAwsjson11_deserializeOpErrorDescribeResource(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpDescribeUser struct { +type awsAwsjson11_deserializeOpDescribeInboundDmarcSettings struct { } -func (*awsAwsjson11_deserializeOpDescribeUser) ID() string { +func (*awsAwsjson11_deserializeOpDescribeInboundDmarcSettings) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeInboundDmarcSettings) 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) @@ -4216,9 +4324,9 @@ func (m *awsAwsjson11_deserializeOpDescribeUser) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeUser(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeInboundDmarcSettings(response, &metadata) } - output := &DescribeUserOutput{} + output := &DescribeInboundDmarcSettingsOutput{} out.Result = output var buff [1024]byte @@ -4238,7 +4346,7 @@ func (m *awsAwsjson11_deserializeOpDescribeUser) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeUserOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeInboundDmarcSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4252,7 +4360,7 @@ func (m *awsAwsjson11_deserializeOpDescribeUser) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeInboundDmarcSettings(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)} @@ -4289,12 +4397,6 @@ func awsAwsjson11_deserializeOpErrorDescribeUser(response *smithyhttp.Response, errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) @@ -4311,14 +4413,14 @@ func awsAwsjson11_deserializeOpErrorDescribeUser(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpDisassociateDelegateFromResource struct { +type awsAwsjson11_deserializeOpDescribeMailboxExportJob struct { } -func (*awsAwsjson11_deserializeOpDisassociateDelegateFromResource) ID() string { +func (*awsAwsjson11_deserializeOpDescribeMailboxExportJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDisassociateDelegateFromResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeMailboxExportJob) 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) @@ -4336,9 +4438,9 @@ func (m *awsAwsjson11_deserializeOpDisassociateDelegateFromResource) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDisassociateDelegateFromResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMailboxExportJob(response, &metadata) } - output := &DisassociateDelegateFromResourceOutput{} + output := &DescribeMailboxExportJobOutput{} out.Result = output var buff [1024]byte @@ -4358,7 +4460,7 @@ func (m *awsAwsjson11_deserializeOpDisassociateDelegateFromResource) HandleDeser return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDisassociateDelegateFromResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeMailboxExportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4372,7 +4474,7 @@ func (m *awsAwsjson11_deserializeOpDisassociateDelegateFromResource) HandleDeser return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDisassociateDelegateFromResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeMailboxExportJob(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)} @@ -4412,9 +4514,6 @@ func awsAwsjson11_deserializeOpErrorDisassociateDelegateFromResource(response *s case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("EntityStateException", errorCode): - return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -4424,9 +4523,6 @@ func awsAwsjson11_deserializeOpErrorDisassociateDelegateFromResource(response *s case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) - case strings.EqualFold("UnsupportedOperationException", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4437,14 +4533,14 @@ func awsAwsjson11_deserializeOpErrorDisassociateDelegateFromResource(response *s } } -type awsAwsjson11_deserializeOpDisassociateMemberFromGroup struct { +type awsAwsjson11_deserializeOpDescribeOrganization struct { } -func (*awsAwsjson11_deserializeOpDisassociateMemberFromGroup) ID() string { +func (*awsAwsjson11_deserializeOpDescribeOrganization) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDisassociateMemberFromGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeOrganization) 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) @@ -4462,9 +4558,9 @@ func (m *awsAwsjson11_deserializeOpDisassociateMemberFromGroup) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDisassociateMemberFromGroup(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeOrganization(response, &metadata) } - output := &DisassociateMemberFromGroupOutput{} + output := &DescribeOrganizationOutput{} out.Result = output var buff [1024]byte @@ -4484,7 +4580,7 @@ func (m *awsAwsjson11_deserializeOpDisassociateMemberFromGroup) HandleDeserializ return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDisassociateMemberFromGroupOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeOrganizationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4498,7 +4594,7 @@ func (m *awsAwsjson11_deserializeOpDisassociateMemberFromGroup) HandleDeserializ return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDisassociateMemberFromGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeOrganization(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)} @@ -4535,30 +4631,12 @@ func awsAwsjson11_deserializeOpErrorDisassociateMemberFromGroup(response *smithy errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("DirectoryServiceAuthenticationFailedException", errorCode): - return awsAwsjson11_deserializeErrorDirectoryServiceAuthenticationFailedException(response, errorBody) - - case strings.EqualFold("DirectoryUnavailableException", errorCode): - return awsAwsjson11_deserializeErrorDirectoryUnavailableException(response, errorBody) - - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - - case strings.EqualFold("EntityStateException", errorCode): - return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) - case strings.EqualFold("OrganizationStateException", errorCode): - return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) - - case strings.EqualFold("UnsupportedOperationException", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4569,14 +4647,14 @@ func awsAwsjson11_deserializeOpErrorDisassociateMemberFromGroup(response *smithy } } -type awsAwsjson11_deserializeOpGetAccessControlEffect struct { +type awsAwsjson11_deserializeOpDescribeResource struct { } -func (*awsAwsjson11_deserializeOpGetAccessControlEffect) ID() string { +func (*awsAwsjson11_deserializeOpDescribeResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetAccessControlEffect) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeResource) 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) @@ -4594,9 +4672,9 @@ func (m *awsAwsjson11_deserializeOpGetAccessControlEffect) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetAccessControlEffect(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeResource(response, &metadata) } - output := &GetAccessControlEffectOutput{} + output := &DescribeResourceOutput{} out.Result = output var buff [1024]byte @@ -4616,7 +4694,7 @@ func (m *awsAwsjson11_deserializeOpGetAccessControlEffect) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetAccessControlEffectOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4630,7 +4708,7 @@ func (m *awsAwsjson11_deserializeOpGetAccessControlEffect) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetAccessControlEffect(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeResource(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)} @@ -4679,8 +4757,8 @@ func awsAwsjson11_deserializeOpErrorGetAccessControlEffect(response *smithyhttp. case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -4692,14 +4770,14 @@ func awsAwsjson11_deserializeOpErrorGetAccessControlEffect(response *smithyhttp. } } -type awsAwsjson11_deserializeOpGetDefaultRetentionPolicy struct { +type awsAwsjson11_deserializeOpDescribeUser struct { } -func (*awsAwsjson11_deserializeOpGetDefaultRetentionPolicy) ID() string { +func (*awsAwsjson11_deserializeOpDescribeUser) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetDefaultRetentionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeUser) 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) @@ -4717,9 +4795,9 @@ func (m *awsAwsjson11_deserializeOpGetDefaultRetentionPolicy) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetDefaultRetentionPolicy(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeUser(response, &metadata) } - output := &GetDefaultRetentionPolicyOutput{} + output := &DescribeUserOutput{} out.Result = output var buff [1024]byte @@ -4739,7 +4817,7 @@ func (m *awsAwsjson11_deserializeOpGetDefaultRetentionPolicy) HandleDeserialize( return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetDefaultRetentionPolicyOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4753,7 +4831,7 @@ func (m *awsAwsjson11_deserializeOpGetDefaultRetentionPolicy) HandleDeserialize( return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetDefaultRetentionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeUser(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)} @@ -4790,7 +4868,13 @@ func awsAwsjson11_deserializeOpErrorGetDefaultRetentionPolicy(response *smithyht errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("EntityNotFoundException", errorCode): + case strings.EqualFold("DirectoryServiceAuthenticationFailedException", errorCode): + return awsAwsjson11_deserializeErrorDirectoryServiceAuthenticationFailedException(response, errorBody) + + case strings.EqualFold("DirectoryUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorDirectoryUnavailableException(response, errorBody) + + case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): @@ -4812,14 +4896,14 @@ func awsAwsjson11_deserializeOpErrorGetDefaultRetentionPolicy(response *smithyht } } -type awsAwsjson11_deserializeOpGetImpersonationRole struct { +type awsAwsjson11_deserializeOpDisassociateDelegateFromResource struct { } -func (*awsAwsjson11_deserializeOpGetImpersonationRole) ID() string { +func (*awsAwsjson11_deserializeOpDisassociateDelegateFromResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetImpersonationRole) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDisassociateDelegateFromResource) 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) @@ -4837,9 +4921,9 @@ func (m *awsAwsjson11_deserializeOpGetImpersonationRole) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetImpersonationRole(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDisassociateDelegateFromResource(response, &metadata) } - output := &GetImpersonationRoleOutput{} + output := &DisassociateDelegateFromResourceOutput{} out.Result = output var buff [1024]byte @@ -4859,7 +4943,7 @@ func (m *awsAwsjson11_deserializeOpGetImpersonationRole) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetImpersonationRoleOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDisassociateDelegateFromResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4873,7 +4957,7 @@ func (m *awsAwsjson11_deserializeOpGetImpersonationRole) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetImpersonationRole(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDisassociateDelegateFromResource(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)} @@ -4910,6 +4994,12 @@ func awsAwsjson11_deserializeOpErrorGetImpersonationRole(response *smithyhttp.Re errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("EntityStateException", errorCode): + return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -4919,8 +5009,8 @@ func awsAwsjson11_deserializeOpErrorGetImpersonationRole(response *smithyhttp.Re case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -4932,14 +5022,14 @@ func awsAwsjson11_deserializeOpErrorGetImpersonationRole(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpGetImpersonationRoleEffect struct { +type awsAwsjson11_deserializeOpDisassociateMemberFromGroup struct { } -func (*awsAwsjson11_deserializeOpGetImpersonationRoleEffect) ID() string { +func (*awsAwsjson11_deserializeOpDisassociateMemberFromGroup) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetImpersonationRoleEffect) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDisassociateMemberFromGroup) 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) @@ -4957,9 +5047,9 @@ func (m *awsAwsjson11_deserializeOpGetImpersonationRoleEffect) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetImpersonationRoleEffect(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDisassociateMemberFromGroup(response, &metadata) } - output := &GetImpersonationRoleEffectOutput{} + output := &DisassociateMemberFromGroupOutput{} out.Result = output var buff [1024]byte @@ -4979,7 +5069,7 @@ func (m *awsAwsjson11_deserializeOpGetImpersonationRoleEffect) HandleDeserialize return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetImpersonationRoleEffectOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDisassociateMemberFromGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4993,7 +5083,7 @@ func (m *awsAwsjson11_deserializeOpGetImpersonationRoleEffect) HandleDeserialize return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetImpersonationRoleEffect(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDisassociateMemberFromGroup(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)} @@ -5030,6 +5120,12 @@ func awsAwsjson11_deserializeOpErrorGetImpersonationRoleEffect(response *smithyh errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("DirectoryServiceAuthenticationFailedException", errorCode): + return awsAwsjson11_deserializeErrorDirectoryServiceAuthenticationFailedException(response, errorBody) + + case strings.EqualFold("DirectoryUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorDirectoryUnavailableException(response, errorBody) + case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) @@ -5045,8 +5141,8 @@ func awsAwsjson11_deserializeOpErrorGetImpersonationRoleEffect(response *smithyh case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -5058,14 +5154,14 @@ func awsAwsjson11_deserializeOpErrorGetImpersonationRoleEffect(response *smithyh } } -type awsAwsjson11_deserializeOpGetMailboxDetails struct { +type awsAwsjson11_deserializeOpGetAccessControlEffect struct { } -func (*awsAwsjson11_deserializeOpGetMailboxDetails) ID() string { +func (*awsAwsjson11_deserializeOpGetAccessControlEffect) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetMailboxDetails) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetAccessControlEffect) 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) @@ -5083,9 +5179,9 @@ func (m *awsAwsjson11_deserializeOpGetMailboxDetails) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetMailboxDetails(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetAccessControlEffect(response, &metadata) } - output := &GetMailboxDetailsOutput{} + output := &GetAccessControlEffectOutput{} out.Result = output var buff [1024]byte @@ -5105,7 +5201,7 @@ func (m *awsAwsjson11_deserializeOpGetMailboxDetails) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetMailboxDetailsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetAccessControlEffectOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5119,7 +5215,7 @@ func (m *awsAwsjson11_deserializeOpGetMailboxDetails) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetMailboxDetails(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetAccessControlEffect(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)} @@ -5168,6 +5264,9 @@ func awsAwsjson11_deserializeOpErrorGetMailboxDetails(response *smithyhttp.Respo case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -5178,14 +5277,14 @@ func awsAwsjson11_deserializeOpErrorGetMailboxDetails(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpGetMailDomain struct { +type awsAwsjson11_deserializeOpGetDefaultRetentionPolicy struct { } -func (*awsAwsjson11_deserializeOpGetMailDomain) ID() string { +func (*awsAwsjson11_deserializeOpGetDefaultRetentionPolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetMailDomain) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetDefaultRetentionPolicy) 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) @@ -5203,9 +5302,9 @@ func (m *awsAwsjson11_deserializeOpGetMailDomain) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetMailDomain(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetDefaultRetentionPolicy(response, &metadata) } - output := &GetMailDomainOutput{} + output := &GetDefaultRetentionPolicyOutput{} out.Result = output var buff [1024]byte @@ -5225,7 +5324,7 @@ func (m *awsAwsjson11_deserializeOpGetMailDomain) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetMailDomainOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetDefaultRetentionPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5239,7 +5338,7 @@ func (m *awsAwsjson11_deserializeOpGetMailDomain) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetMailDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetDefaultRetentionPolicy(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)} @@ -5276,12 +5375,12 @@ func awsAwsjson11_deserializeOpErrorGetMailDomain(response *smithyhttp.Response, errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("MailDomainNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorMailDomainNotFoundException(response, errorBody) - case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) @@ -5298,14 +5397,14 @@ func awsAwsjson11_deserializeOpErrorGetMailDomain(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpGetMobileDeviceAccessEffect struct { +type awsAwsjson11_deserializeOpGetImpersonationRole struct { } -func (*awsAwsjson11_deserializeOpGetMobileDeviceAccessEffect) ID() string { +func (*awsAwsjson11_deserializeOpGetImpersonationRole) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetMobileDeviceAccessEffect) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetImpersonationRole) 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) @@ -5323,9 +5422,9 @@ func (m *awsAwsjson11_deserializeOpGetMobileDeviceAccessEffect) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetMobileDeviceAccessEffect(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetImpersonationRole(response, &metadata) } - output := &GetMobileDeviceAccessEffectOutput{} + output := &GetImpersonationRoleOutput{} out.Result = output var buff [1024]byte @@ -5345,7 +5444,7 @@ func (m *awsAwsjson11_deserializeOpGetMobileDeviceAccessEffect) HandleDeserializ return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetMobileDeviceAccessEffectOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetImpersonationRoleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5359,7 +5458,7 @@ func (m *awsAwsjson11_deserializeOpGetMobileDeviceAccessEffect) HandleDeserializ return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetMobileDeviceAccessEffect(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetImpersonationRole(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)} @@ -5405,6 +5504,9 @@ func awsAwsjson11_deserializeOpErrorGetMobileDeviceAccessEffect(response *smithy case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -5415,14 +5517,14 @@ func awsAwsjson11_deserializeOpErrorGetMobileDeviceAccessEffect(response *smithy } } -type awsAwsjson11_deserializeOpGetMobileDeviceAccessOverride struct { +type awsAwsjson11_deserializeOpGetImpersonationRoleEffect struct { } -func (*awsAwsjson11_deserializeOpGetMobileDeviceAccessOverride) ID() string { +func (*awsAwsjson11_deserializeOpGetImpersonationRoleEffect) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetMobileDeviceAccessOverride) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetImpersonationRoleEffect) 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) @@ -5440,9 +5542,9 @@ func (m *awsAwsjson11_deserializeOpGetMobileDeviceAccessOverride) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetMobileDeviceAccessOverride(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetImpersonationRoleEffect(response, &metadata) } - output := &GetMobileDeviceAccessOverrideOutput{} + output := &GetImpersonationRoleEffectOutput{} out.Result = output var buff [1024]byte @@ -5462,7 +5564,7 @@ func (m *awsAwsjson11_deserializeOpGetMobileDeviceAccessOverride) HandleDeserial return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetMobileDeviceAccessOverrideOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetImpersonationRoleEffectOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5476,7 +5578,7 @@ func (m *awsAwsjson11_deserializeOpGetMobileDeviceAccessOverride) HandleDeserial return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetMobileDeviceAccessOverride(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetImpersonationRoleEffect(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)} @@ -5516,6 +5618,9 @@ func awsAwsjson11_deserializeOpErrorGetMobileDeviceAccessOverride(response *smit case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("EntityStateException", errorCode): + return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -5538,14 +5643,14 @@ func awsAwsjson11_deserializeOpErrorGetMobileDeviceAccessOverride(response *smit } } -type awsAwsjson11_deserializeOpListAccessControlRules struct { +type awsAwsjson11_deserializeOpGetMailboxDetails struct { } -func (*awsAwsjson11_deserializeOpListAccessControlRules) ID() string { +func (*awsAwsjson11_deserializeOpGetMailboxDetails) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListAccessControlRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetMailboxDetails) 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) @@ -5563,9 +5668,9 @@ func (m *awsAwsjson11_deserializeOpListAccessControlRules) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListAccessControlRules(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetMailboxDetails(response, &metadata) } - output := &ListAccessControlRulesOutput{} + output := &GetMailboxDetailsOutput{} out.Result = output var buff [1024]byte @@ -5585,7 +5690,7 @@ func (m *awsAwsjson11_deserializeOpListAccessControlRules) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListAccessControlRulesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetMailboxDetailsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5599,7 +5704,7 @@ func (m *awsAwsjson11_deserializeOpListAccessControlRules) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListAccessControlRules(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetMailboxDetails(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)} @@ -5636,6 +5741,12 @@ func awsAwsjson11_deserializeOpErrorListAccessControlRules(response *smithyhttp. errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) @@ -5652,14 +5763,14 @@ func awsAwsjson11_deserializeOpErrorListAccessControlRules(response *smithyhttp. } } -type awsAwsjson11_deserializeOpListAliases struct { +type awsAwsjson11_deserializeOpGetMailDomain struct { } -func (*awsAwsjson11_deserializeOpListAliases) ID() string { +func (*awsAwsjson11_deserializeOpGetMailDomain) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListAliases) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetMailDomain) 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) @@ -5677,9 +5788,9 @@ func (m *awsAwsjson11_deserializeOpListAliases) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListAliases(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetMailDomain(response, &metadata) } - output := &ListAliasesOutput{} + output := &GetMailDomainOutput{} out.Result = output var buff [1024]byte @@ -5699,7 +5810,7 @@ func (m *awsAwsjson11_deserializeOpListAliases) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListAliasesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetMailDomainOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5713,7 +5824,7 @@ func (m *awsAwsjson11_deserializeOpListAliases) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListAliases(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetMailDomain(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)} @@ -5750,15 +5861,12 @@ func awsAwsjson11_deserializeOpErrorListAliases(response *smithyhttp.Response, m errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - - case strings.EqualFold("EntityStateException", errorCode): - return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("MailDomainNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorMailDomainNotFoundException(response, errorBody) + case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) @@ -5775,14 +5883,14 @@ func awsAwsjson11_deserializeOpErrorListAliases(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpListAvailabilityConfigurations struct { +type awsAwsjson11_deserializeOpGetMobileDeviceAccessEffect struct { } -func (*awsAwsjson11_deserializeOpListAvailabilityConfigurations) ID() string { +func (*awsAwsjson11_deserializeOpGetMobileDeviceAccessEffect) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListAvailabilityConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetMobileDeviceAccessEffect) 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) @@ -5800,9 +5908,9 @@ func (m *awsAwsjson11_deserializeOpListAvailabilityConfigurations) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListAvailabilityConfigurations(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetMobileDeviceAccessEffect(response, &metadata) } - output := &ListAvailabilityConfigurationsOutput{} + output := &GetMobileDeviceAccessEffectOutput{} out.Result = output var buff [1024]byte @@ -5822,7 +5930,7 @@ func (m *awsAwsjson11_deserializeOpListAvailabilityConfigurations) HandleDeseria return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListAvailabilityConfigurationsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetMobileDeviceAccessEffectOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5836,7 +5944,7 @@ func (m *awsAwsjson11_deserializeOpListAvailabilityConfigurations) HandleDeseria return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListAvailabilityConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetMobileDeviceAccessEffect(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)} @@ -5873,6 +5981,9 @@ func awsAwsjson11_deserializeOpErrorListAvailabilityConfigurations(response *smi errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) @@ -5889,14 +6000,14 @@ func awsAwsjson11_deserializeOpErrorListAvailabilityConfigurations(response *smi } } -type awsAwsjson11_deserializeOpListGroupMembers struct { +type awsAwsjson11_deserializeOpGetMobileDeviceAccessOverride struct { } -func (*awsAwsjson11_deserializeOpListGroupMembers) ID() string { +func (*awsAwsjson11_deserializeOpGetMobileDeviceAccessOverride) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListGroupMembers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetMobileDeviceAccessOverride) 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) @@ -5914,9 +6025,9 @@ func (m *awsAwsjson11_deserializeOpListGroupMembers) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListGroupMembers(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetMobileDeviceAccessOverride(response, &metadata) } - output := &ListGroupMembersOutput{} + output := &GetMobileDeviceAccessOverrideOutput{} out.Result = output var buff [1024]byte @@ -5936,7 +6047,7 @@ func (m *awsAwsjson11_deserializeOpListGroupMembers) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListGroupMembersOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetMobileDeviceAccessOverrideOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5950,7 +6061,7 @@ func (m *awsAwsjson11_deserializeOpListGroupMembers) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListGroupMembers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetMobileDeviceAccessOverride(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)} @@ -5990,9 +6101,6 @@ func awsAwsjson11_deserializeOpErrorListGroupMembers(response *smithyhttp.Respon case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("EntityStateException", errorCode): - return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -6002,6 +6110,9 @@ func awsAwsjson11_deserializeOpErrorListGroupMembers(response *smithyhttp.Respon case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6012,14 +6123,14 @@ func awsAwsjson11_deserializeOpErrorListGroupMembers(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpListGroups struct { +type awsAwsjson11_deserializeOpGetPersonalAccessTokenMetadata struct { } -func (*awsAwsjson11_deserializeOpListGroups) ID() string { +func (*awsAwsjson11_deserializeOpGetPersonalAccessTokenMetadata) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetPersonalAccessTokenMetadata) 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) @@ -6037,9 +6148,9 @@ func (m *awsAwsjson11_deserializeOpListGroups) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListGroups(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetPersonalAccessTokenMetadata(response, &metadata) } - output := &ListGroupsOutput{} + output := &GetPersonalAccessTokenMetadataOutput{} out.Result = output var buff [1024]byte @@ -6059,7 +6170,7 @@ func (m *awsAwsjson11_deserializeOpListGroups) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListGroupsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetPersonalAccessTokenMetadataOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6073,7 +6184,7 @@ func (m *awsAwsjson11_deserializeOpListGroups) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetPersonalAccessTokenMetadata(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)} @@ -6110,9 +6221,6 @@ func awsAwsjson11_deserializeOpErrorListGroups(response *smithyhttp.Response, me errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -6122,6 +6230,9 @@ func awsAwsjson11_deserializeOpErrorListGroups(response *smithyhttp.Response, me case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6132,14 +6243,14 @@ func awsAwsjson11_deserializeOpErrorListGroups(response *smithyhttp.Response, me } } -type awsAwsjson11_deserializeOpListGroupsForEntity struct { +type awsAwsjson11_deserializeOpListAccessControlRules struct { } -func (*awsAwsjson11_deserializeOpListGroupsForEntity) ID() string { +func (*awsAwsjson11_deserializeOpListAccessControlRules) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListGroupsForEntity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListAccessControlRules) 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) @@ -6157,9 +6268,9 @@ func (m *awsAwsjson11_deserializeOpListGroupsForEntity) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListGroupsForEntity(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListAccessControlRules(response, &metadata) } - output := &ListGroupsForEntityOutput{} + output := &ListAccessControlRulesOutput{} out.Result = output var buff [1024]byte @@ -6179,7 +6290,7 @@ func (m *awsAwsjson11_deserializeOpListGroupsForEntity) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListGroupsForEntityOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListAccessControlRulesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6193,7 +6304,7 @@ func (m *awsAwsjson11_deserializeOpListGroupsForEntity) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListGroupsForEntity(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListAccessControlRules(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)} @@ -6230,15 +6341,6 @@ func awsAwsjson11_deserializeOpErrorListGroupsForEntity(response *smithyhttp.Res errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - - case strings.EqualFold("EntityStateException", errorCode): - return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) @@ -6255,14 +6357,14 @@ func awsAwsjson11_deserializeOpErrorListGroupsForEntity(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpListImpersonationRoles struct { +type awsAwsjson11_deserializeOpListAliases struct { } -func (*awsAwsjson11_deserializeOpListImpersonationRoles) ID() string { +func (*awsAwsjson11_deserializeOpListAliases) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListImpersonationRoles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListAliases) 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) @@ -6280,9 +6382,9 @@ func (m *awsAwsjson11_deserializeOpListImpersonationRoles) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListImpersonationRoles(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListAliases(response, &metadata) } - output := &ListImpersonationRolesOutput{} + output := &ListAliasesOutput{} out.Result = output var buff [1024]byte @@ -6302,7 +6404,7 @@ func (m *awsAwsjson11_deserializeOpListImpersonationRoles) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListImpersonationRolesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListAliasesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6316,7 +6418,7 @@ func (m *awsAwsjson11_deserializeOpListImpersonationRoles) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListImpersonationRoles(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListAliases(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)} @@ -6353,6 +6455,12 @@ func awsAwsjson11_deserializeOpErrorListImpersonationRoles(response *smithyhttp. errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("EntityStateException", errorCode): + return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -6372,14 +6480,14 @@ func awsAwsjson11_deserializeOpErrorListImpersonationRoles(response *smithyhttp. } } -type awsAwsjson11_deserializeOpListMailboxExportJobs struct { +type awsAwsjson11_deserializeOpListAvailabilityConfigurations struct { } -func (*awsAwsjson11_deserializeOpListMailboxExportJobs) ID() string { +func (*awsAwsjson11_deserializeOpListAvailabilityConfigurations) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListMailboxExportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListAvailabilityConfigurations) 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) @@ -6397,9 +6505,9 @@ func (m *awsAwsjson11_deserializeOpListMailboxExportJobs) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListMailboxExportJobs(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListAvailabilityConfigurations(response, &metadata) } - output := &ListMailboxExportJobsOutput{} + output := &ListAvailabilityConfigurationsOutput{} out.Result = output var buff [1024]byte @@ -6419,7 +6527,7 @@ func (m *awsAwsjson11_deserializeOpListMailboxExportJobs) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListMailboxExportJobsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListAvailabilityConfigurationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6433,7 +6541,7 @@ func (m *awsAwsjson11_deserializeOpListMailboxExportJobs) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListMailboxExportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListAvailabilityConfigurations(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)} @@ -6489,14 +6597,14 @@ func awsAwsjson11_deserializeOpErrorListMailboxExportJobs(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpListMailboxPermissions struct { +type awsAwsjson11_deserializeOpListGroupMembers struct { } -func (*awsAwsjson11_deserializeOpListMailboxPermissions) ID() string { +func (*awsAwsjson11_deserializeOpListGroupMembers) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListMailboxPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListGroupMembers) 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) @@ -6514,9 +6622,9 @@ func (m *awsAwsjson11_deserializeOpListMailboxPermissions) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListMailboxPermissions(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListGroupMembers(response, &metadata) } - output := &ListMailboxPermissionsOutput{} + output := &ListGroupMembersOutput{} out.Result = output var buff [1024]byte @@ -6536,7 +6644,7 @@ func (m *awsAwsjson11_deserializeOpListMailboxPermissions) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListMailboxPermissionsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListGroupMembersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6550,7 +6658,7 @@ func (m *awsAwsjson11_deserializeOpListMailboxPermissions) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListMailboxPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListGroupMembers(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)} @@ -6590,6 +6698,9 @@ func awsAwsjson11_deserializeOpErrorListMailboxPermissions(response *smithyhttp. case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("EntityStateException", errorCode): + return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -6609,14 +6720,14 @@ func awsAwsjson11_deserializeOpErrorListMailboxPermissions(response *smithyhttp. } } -type awsAwsjson11_deserializeOpListMailDomains struct { +type awsAwsjson11_deserializeOpListGroups struct { } -func (*awsAwsjson11_deserializeOpListMailDomains) ID() string { +func (*awsAwsjson11_deserializeOpListGroups) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListMailDomains) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListGroups) 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) @@ -6634,9 +6745,9 @@ func (m *awsAwsjson11_deserializeOpListMailDomains) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListMailDomains(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListGroups(response, &metadata) } - output := &ListMailDomainsOutput{} + output := &ListGroupsOutput{} out.Result = output var buff [1024]byte @@ -6656,7 +6767,7 @@ func (m *awsAwsjson11_deserializeOpListMailDomains) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListMailDomainsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6670,7 +6781,7 @@ func (m *awsAwsjson11_deserializeOpListMailDomains) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListMailDomains(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListGroups(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)} @@ -6707,6 +6818,9 @@ func awsAwsjson11_deserializeOpErrorListMailDomains(response *smithyhttp.Respons errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -6726,14 +6840,14 @@ func awsAwsjson11_deserializeOpErrorListMailDomains(response *smithyhttp.Respons } } -type awsAwsjson11_deserializeOpListMobileDeviceAccessOverrides struct { +type awsAwsjson11_deserializeOpListGroupsForEntity struct { } -func (*awsAwsjson11_deserializeOpListMobileDeviceAccessOverrides) ID() string { +func (*awsAwsjson11_deserializeOpListGroupsForEntity) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListMobileDeviceAccessOverrides) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListGroupsForEntity) 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) @@ -6751,9 +6865,9 @@ func (m *awsAwsjson11_deserializeOpListMobileDeviceAccessOverrides) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListMobileDeviceAccessOverrides(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListGroupsForEntity(response, &metadata) } - output := &ListMobileDeviceAccessOverridesOutput{} + output := &ListGroupsForEntityOutput{} out.Result = output var buff [1024]byte @@ -6773,7 +6887,7 @@ func (m *awsAwsjson11_deserializeOpListMobileDeviceAccessOverrides) HandleDeseri return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListMobileDeviceAccessOverridesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListGroupsForEntityOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6787,7 +6901,7 @@ func (m *awsAwsjson11_deserializeOpListMobileDeviceAccessOverrides) HandleDeseri return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListMobileDeviceAccessOverrides(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListGroupsForEntity(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)} @@ -6827,6 +6941,9 @@ func awsAwsjson11_deserializeOpErrorListMobileDeviceAccessOverrides(response *sm case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("EntityStateException", errorCode): + return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -6846,14 +6963,14 @@ func awsAwsjson11_deserializeOpErrorListMobileDeviceAccessOverrides(response *sm } } -type awsAwsjson11_deserializeOpListMobileDeviceAccessRules struct { +type awsAwsjson11_deserializeOpListImpersonationRoles struct { } -func (*awsAwsjson11_deserializeOpListMobileDeviceAccessRules) ID() string { +func (*awsAwsjson11_deserializeOpListImpersonationRoles) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListMobileDeviceAccessRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListImpersonationRoles) 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) @@ -6871,9 +6988,9 @@ func (m *awsAwsjson11_deserializeOpListMobileDeviceAccessRules) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListMobileDeviceAccessRules(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListImpersonationRoles(response, &metadata) } - output := &ListMobileDeviceAccessRulesOutput{} + output := &ListImpersonationRolesOutput{} out.Result = output var buff [1024]byte @@ -6893,7 +7010,7 @@ func (m *awsAwsjson11_deserializeOpListMobileDeviceAccessRules) HandleDeserializ return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListMobileDeviceAccessRulesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListImpersonationRolesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6907,7 +7024,7 @@ func (m *awsAwsjson11_deserializeOpListMobileDeviceAccessRules) HandleDeserializ return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListMobileDeviceAccessRules(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListImpersonationRoles(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)} @@ -6963,14 +7080,14 @@ func awsAwsjson11_deserializeOpErrorListMobileDeviceAccessRules(response *smithy } } -type awsAwsjson11_deserializeOpListOrganizations struct { +type awsAwsjson11_deserializeOpListMailboxExportJobs struct { } -func (*awsAwsjson11_deserializeOpListOrganizations) ID() string { +func (*awsAwsjson11_deserializeOpListMailboxExportJobs) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListOrganizations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListMailboxExportJobs) 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) @@ -6988,9 +7105,9 @@ func (m *awsAwsjson11_deserializeOpListOrganizations) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListOrganizations(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListMailboxExportJobs(response, &metadata) } - output := &ListOrganizationsOutput{} + output := &ListMailboxExportJobsOutput{} out.Result = output var buff [1024]byte @@ -7010,7 +7127,7 @@ func (m *awsAwsjson11_deserializeOpListOrganizations) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListOrganizationsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListMailboxExportJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7024,7 +7141,7 @@ func (m *awsAwsjson11_deserializeOpListOrganizations) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListOrganizations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListMailboxExportJobs(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)} @@ -7064,6 +7181,12 @@ func awsAwsjson11_deserializeOpErrorListOrganizations(response *smithyhttp.Respo case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("OrganizationNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) + + case strings.EqualFold("OrganizationStateException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7074,14 +7197,14 @@ func awsAwsjson11_deserializeOpErrorListOrganizations(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpListResourceDelegates struct { +type awsAwsjson11_deserializeOpListMailboxPermissions struct { } -func (*awsAwsjson11_deserializeOpListResourceDelegates) ID() string { +func (*awsAwsjson11_deserializeOpListMailboxPermissions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListResourceDelegates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListMailboxPermissions) 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) @@ -7099,9 +7222,9 @@ func (m *awsAwsjson11_deserializeOpListResourceDelegates) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListResourceDelegates(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListMailboxPermissions(response, &metadata) } - output := &ListResourceDelegatesOutput{} + output := &ListMailboxPermissionsOutput{} out.Result = output var buff [1024]byte @@ -7121,7 +7244,7 @@ func (m *awsAwsjson11_deserializeOpListResourceDelegates) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListResourceDelegatesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListMailboxPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7135,7 +7258,7 @@ func (m *awsAwsjson11_deserializeOpListResourceDelegates) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListResourceDelegates(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListMailboxPermissions(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)} @@ -7175,9 +7298,6 @@ func awsAwsjson11_deserializeOpErrorListResourceDelegates(response *smithyhttp.R case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("EntityStateException", errorCode): - return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -7187,9 +7307,6 @@ func awsAwsjson11_deserializeOpErrorListResourceDelegates(response *smithyhttp.R case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) - case strings.EqualFold("UnsupportedOperationException", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7200,14 +7317,14 @@ func awsAwsjson11_deserializeOpErrorListResourceDelegates(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpListResources struct { +type awsAwsjson11_deserializeOpListMailDomains struct { } -func (*awsAwsjson11_deserializeOpListResources) ID() string { +func (*awsAwsjson11_deserializeOpListMailDomains) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListMailDomains) 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) @@ -7225,9 +7342,9 @@ func (m *awsAwsjson11_deserializeOpListResources) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListResources(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListMailDomains(response, &metadata) } - output := &ListResourcesOutput{} + output := &ListMailDomainsOutput{} out.Result = output var buff [1024]byte @@ -7247,7 +7364,7 @@ func (m *awsAwsjson11_deserializeOpListResources) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListResourcesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListMailDomainsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7261,7 +7378,7 @@ func (m *awsAwsjson11_deserializeOpListResources) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListMailDomains(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)} @@ -7307,9 +7424,6 @@ func awsAwsjson11_deserializeOpErrorListResources(response *smithyhttp.Response, case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) - case strings.EqualFold("UnsupportedOperationException", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7320,14 +7434,14 @@ func awsAwsjson11_deserializeOpErrorListResources(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpListTagsForResource struct { +type awsAwsjson11_deserializeOpListMobileDeviceAccessOverrides struct { } -func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { +func (*awsAwsjson11_deserializeOpListMobileDeviceAccessOverrides) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListMobileDeviceAccessOverrides) 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) @@ -7345,9 +7459,9 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListMobileDeviceAccessOverrides(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListMobileDeviceAccessOverridesOutput{} out.Result = output var buff [1024]byte @@ -7367,7 +7481,7 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListMobileDeviceAccessOverridesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7381,7 +7495,7 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListMobileDeviceAccessOverrides(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)} @@ -7418,8 +7532,17 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OrganizationNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) + + case strings.EqualFold("OrganizationStateException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -7431,14 +7554,14 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpListUsers struct { +type awsAwsjson11_deserializeOpListMobileDeviceAccessRules struct { } -func (*awsAwsjson11_deserializeOpListUsers) ID() string { +func (*awsAwsjson11_deserializeOpListMobileDeviceAccessRules) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListUsers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListMobileDeviceAccessRules) 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) @@ -7456,9 +7579,9 @@ func (m *awsAwsjson11_deserializeOpListUsers) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListUsers(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListMobileDeviceAccessRules(response, &metadata) } - output := &ListUsersOutput{} + output := &ListMobileDeviceAccessRulesOutput{} out.Result = output var buff [1024]byte @@ -7478,7 +7601,7 @@ func (m *awsAwsjson11_deserializeOpListUsers) HandleDeserialize(ctx context.Cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListUsersOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListMobileDeviceAccessRulesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7492,7 +7615,7 @@ func (m *awsAwsjson11_deserializeOpListUsers) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListUsers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListMobileDeviceAccessRules(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)} @@ -7548,14 +7671,14 @@ func awsAwsjson11_deserializeOpErrorListUsers(response *smithyhttp.Response, met } } -type awsAwsjson11_deserializeOpPutAccessControlRule struct { +type awsAwsjson11_deserializeOpListOrganizations struct { } -func (*awsAwsjson11_deserializeOpPutAccessControlRule) ID() string { +func (*awsAwsjson11_deserializeOpListOrganizations) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutAccessControlRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListOrganizations) 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) @@ -7573,9 +7696,9 @@ func (m *awsAwsjson11_deserializeOpPutAccessControlRule) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutAccessControlRule(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListOrganizations(response, &metadata) } - output := &PutAccessControlRuleOutput{} + output := &ListOrganizationsOutput{} out.Result = output var buff [1024]byte @@ -7595,7 +7718,7 @@ func (m *awsAwsjson11_deserializeOpPutAccessControlRule) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutAccessControlRuleOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListOrganizationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7609,7 +7732,7 @@ func (m *awsAwsjson11_deserializeOpPutAccessControlRule) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutAccessControlRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListOrganizations(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)} @@ -7646,24 +7769,9 @@ func awsAwsjson11_deserializeOpErrorPutAccessControlRule(response *smithyhttp.Re errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("OrganizationNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) - - case strings.EqualFold("OrganizationStateException", errorCode): - return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7674,14 +7782,14 @@ func awsAwsjson11_deserializeOpErrorPutAccessControlRule(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpPutEmailMonitoringConfiguration struct { +type awsAwsjson11_deserializeOpListPersonalAccessTokens struct { } -func (*awsAwsjson11_deserializeOpPutEmailMonitoringConfiguration) ID() string { +func (*awsAwsjson11_deserializeOpListPersonalAccessTokens) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutEmailMonitoringConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListPersonalAccessTokens) 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) @@ -7699,9 +7807,9 @@ func (m *awsAwsjson11_deserializeOpPutEmailMonitoringConfiguration) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutEmailMonitoringConfiguration(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListPersonalAccessTokens(response, &metadata) } - output := &PutEmailMonitoringConfigurationOutput{} + output := &ListPersonalAccessTokensOutput{} out.Result = output var buff [1024]byte @@ -7721,7 +7829,7 @@ func (m *awsAwsjson11_deserializeOpPutEmailMonitoringConfiguration) HandleDeseri return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutEmailMonitoringConfigurationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListPersonalAccessTokensOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7735,7 +7843,7 @@ func (m *awsAwsjson11_deserializeOpPutEmailMonitoringConfiguration) HandleDeseri return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutEmailMonitoringConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListPersonalAccessTokens(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)} @@ -7772,6 +7880,12 @@ func awsAwsjson11_deserializeOpErrorPutEmailMonitoringConfiguration(response *sm errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("EntityStateException", errorCode): + return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -7781,9 +7895,6 @@ func awsAwsjson11_deserializeOpErrorPutEmailMonitoringConfiguration(response *sm case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7794,14 +7905,14 @@ func awsAwsjson11_deserializeOpErrorPutEmailMonitoringConfiguration(response *sm } } -type awsAwsjson11_deserializeOpPutInboundDmarcSettings struct { +type awsAwsjson11_deserializeOpListResourceDelegates struct { } -func (*awsAwsjson11_deserializeOpPutInboundDmarcSettings) ID() string { +func (*awsAwsjson11_deserializeOpListResourceDelegates) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutInboundDmarcSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListResourceDelegates) 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) @@ -7819,9 +7930,9 @@ func (m *awsAwsjson11_deserializeOpPutInboundDmarcSettings) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutInboundDmarcSettings(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListResourceDelegates(response, &metadata) } - output := &PutInboundDmarcSettingsOutput{} + output := &ListResourceDelegatesOutput{} out.Result = output var buff [1024]byte @@ -7841,7 +7952,7 @@ func (m *awsAwsjson11_deserializeOpPutInboundDmarcSettings) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutInboundDmarcSettingsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListResourceDelegatesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7855,7 +7966,7 @@ func (m *awsAwsjson11_deserializeOpPutInboundDmarcSettings) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutInboundDmarcSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListResourceDelegates(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)} @@ -7892,12 +8003,24 @@ func awsAwsjson11_deserializeOpErrorPutInboundDmarcSettings(response *smithyhttp errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("EntityStateException", errorCode): + return awsAwsjson11_deserializeErrorEntityStateException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("OrganizationNotFoundException", errorCode): return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) case strings.EqualFold("OrganizationStateException", errorCode): return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7908,7 +8031,835 @@ func awsAwsjson11_deserializeOpErrorPutInboundDmarcSettings(response *smithyhttp } } -type awsAwsjson11_deserializeOpPutMailboxPermissions struct { +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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OrganizationNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) + + case strings.EqualFold("OrganizationStateException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) + + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListTagsForResource struct { +} + +func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&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_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + 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("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListUsers struct { +} + +func (*awsAwsjson11_deserializeOpListUsers) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListUsers) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorListUsers(response, &metadata) + } + output := &ListUsersOutput{} + 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_deserializeOpDocumentListUsersOutput(&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_deserializeOpErrorListUsers(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("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OrganizationNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) + + case strings.EqualFold("OrganizationStateException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutAccessControlRule struct { +} + +func (*awsAwsjson11_deserializeOpPutAccessControlRule) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutAccessControlRule) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorPutAccessControlRule(response, &metadata) + } + output := &PutAccessControlRuleOutput{} + 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_deserializeOpDocumentPutAccessControlRuleOutput(&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_deserializeOpErrorPutAccessControlRule(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("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("OrganizationNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) + + case strings.EqualFold("OrganizationStateException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutEmailMonitoringConfiguration struct { +} + +func (*awsAwsjson11_deserializeOpPutEmailMonitoringConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutEmailMonitoringConfiguration) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorPutEmailMonitoringConfiguration(response, &metadata) + } + output := &PutEmailMonitoringConfigurationOutput{} + 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_deserializeOpDocumentPutEmailMonitoringConfigurationOutput(&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_deserializeOpErrorPutEmailMonitoringConfiguration(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("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OrganizationNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) + + case strings.EqualFold("OrganizationStateException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutIdentityProviderConfiguration struct { +} + +func (*awsAwsjson11_deserializeOpPutIdentityProviderConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutIdentityProviderConfiguration) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorPutIdentityProviderConfiguration(response, &metadata) + } + output := &PutIdentityProviderConfigurationOutput{} + 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_deserializeOpDocumentPutIdentityProviderConfigurationOutput(&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_deserializeOpErrorPutIdentityProviderConfiguration(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("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OrganizationNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) + + case strings.EqualFold("OrganizationStateException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutInboundDmarcSettings struct { +} + +func (*awsAwsjson11_deserializeOpPutInboundDmarcSettings) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutInboundDmarcSettings) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorPutInboundDmarcSettings(response, &metadata) + } + output := &PutInboundDmarcSettingsOutput{} + 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_deserializeOpDocumentPutInboundDmarcSettingsOutput(&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_deserializeOpErrorPutInboundDmarcSettings(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("OrganizationNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationNotFoundException(response, errorBody) + + case strings.EqualFold("OrganizationStateException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationStateException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutMailboxPermissions struct { } func (*awsAwsjson11_deserializeOpPutMailboxPermissions) ID() string { @@ -12407,6 +13358,55 @@ func awsAwsjson11_deserializeDocumentGroups(v *[]types.Group, value interface{}) return nil } +func awsAwsjson11_deserializeDocumentIdentityCenterConfiguration(v **types.IdentityCenterConfiguration, 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.IdentityCenterConfiguration + if *v == nil { + sv = &types.IdentityCenterConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationArn to be of type string, got %T instead", value) + } + sv.ApplicationArn = ptr.String(jtv) + } + + case "InstanceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceArn to be of type string, got %T instead", value) + } + sv.InstanceArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentImpersonationMatchedRule(v **types.ImpersonationMatchedRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -14156,7 +15156,131 @@ func awsAwsjson11_deserializeDocumentOrganizationSummary(v **types.OrganizationS return nil } -func awsAwsjson11_deserializeDocumentPermission(v **types.Permission, value interface{}) error { +func awsAwsjson11_deserializeDocumentPermission(v **types.Permission, 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.Permission + if *v == nil { + sv = &types.Permission{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "GranteeId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkMailIdentifier to be of type string, got %T instead", value) + } + sv.GranteeId = ptr.String(jtv) + } + + case "GranteeType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MemberType to be of type string, got %T instead", value) + } + sv.GranteeType = types.MemberType(jtv) + } + + case "PermissionValues": + if err := awsAwsjson11_deserializeDocumentPermissionValues(&sv.PermissionValues, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPermissions(v *[]types.Permission, 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.Permission + if *v == nil { + cv = []types.Permission{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Permission + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPermission(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPermissionValues(v *[]types.PermissionType, 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.PermissionType + if *v == nil { + cv = []types.PermissionType{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PermissionType + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PermissionType to be of type string, got %T instead", value) + } + col = types.PermissionType(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPersonalAccessTokenConfiguration(v **types.PersonalAccessTokenConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14169,36 +15293,35 @@ func awsAwsjson11_deserializeDocumentPermission(v **types.Permission, value inte return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Permission + var sv *types.PersonalAccessTokenConfiguration if *v == nil { - sv = &types.Permission{} + sv = &types.PersonalAccessTokenConfiguration{} } else { sv = *v } for key, value := range shape { switch key { - case "GranteeId": + case "LifetimeInDays": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected WorkMailIdentifier to be of type string, got %T instead", value) + return fmt.Errorf("expected PersonalAccessTokenLifetimeInDays to be json.Number, got %T instead", value) } - sv.GranteeId = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LifetimeInDays = ptr.Int32(int32(i64)) } - case "GranteeType": + case "Status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MemberType to be of type string, got %T instead", value) + return fmt.Errorf("expected PersonalAccessTokenConfigurationStatus to be of type string, got %T instead", value) } - sv.GranteeType = types.MemberType(jtv) - } - - case "PermissionValues": - if err := awsAwsjson11_deserializeDocumentPermissionValues(&sv.PermissionValues, value); err != nil { - return err + sv.Status = types.PersonalAccessTokenConfigurationStatus(jtv) } default: @@ -14210,7 +15333,7 @@ func awsAwsjson11_deserializeDocumentPermission(v **types.Permission, value inte return nil } -func awsAwsjson11_deserializeDocumentPermissions(v *[]types.Permission, value interface{}) error { +func awsAwsjson11_deserializeDocumentPersonalAccessTokenScopeList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14223,20 +15346,22 @@ func awsAwsjson11_deserializeDocumentPermissions(v *[]types.Permission, value in return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.Permission + var cv []string if *v == nil { - cv = []types.Permission{} + cv = []string{} } else { cv = *v } for _, value := range shape { - var col types.Permission - destAddr := &col - if err := awsAwsjson11_deserializeDocumentPermission(&destAddr, value); err != nil { - return err + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PersonalAccessTokenScope to be of type string, got %T instead", value) + } + col = jtv } - col = *destAddr cv = append(cv, col) } @@ -14244,7 +15369,118 @@ func awsAwsjson11_deserializeDocumentPermissions(v *[]types.Permission, value in return nil } -func awsAwsjson11_deserializeDocumentPermissionValues(v *[]types.PermissionType, value interface{}) error { +func awsAwsjson11_deserializeDocumentPersonalAccessTokenSummary(v **types.PersonalAccessTokenSummary, 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.PersonalAccessTokenSummary + if *v == nil { + sv = &types.PersonalAccessTokenSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DateCreated": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DateCreated = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "DateLastUsed": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DateLastUsed = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "ExpiresTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiresTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PersonalAccessTokenName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "PersonalAccessTokenId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PersonalAccessTokenId to be of type string, got %T instead", value) + } + sv.PersonalAccessTokenId = ptr.String(jtv) + } + + case "Scopes": + if err := awsAwsjson11_deserializeDocumentPersonalAccessTokenScopeList(&sv.Scopes, value); err != nil { + return err + } + + case "UserId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkMailIdentifier to be of type string, got %T instead", value) + } + sv.UserId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPersonalAccessTokenSummaryList(v *[]types.PersonalAccessTokenSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14257,22 +15493,20 @@ func awsAwsjson11_deserializeDocumentPermissionValues(v *[]types.PermissionType, return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.PermissionType + var cv []types.PersonalAccessTokenSummary if *v == nil { - cv = []types.PermissionType{} + cv = []types.PersonalAccessTokenSummary{} } else { cv = *v } for _, value := range shape { - var col types.PermissionType - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PermissionType to be of type string, got %T instead", value) - } - col = types.PermissionType(jtv) + var col types.PersonalAccessTokenSummary + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPersonalAccessTokenSummary(&destAddr, value); err != nil { + return err } + col = *destAddr cv = append(cv, col) } @@ -14874,6 +16108,24 @@ func awsAwsjson11_deserializeDocumentUser(v **types.User, value interface{}) err sv.Id = ptr.String(jtv) } + case "IdentityProviderIdentityStoreId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdentityProviderIdentityStoreId to be of type string, got %T instead", value) + } + sv.IdentityProviderIdentityStoreId = ptr.String(jtv) + } + + case "IdentityProviderUserId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdentityProviderUserId to be of type string, got %T instead", value) + } + sv.IdentityProviderUserId = ptr.String(jtv) + } + case "Name": if value != nil { jtv, ok := value.(string) @@ -15228,6 +16480,46 @@ func awsAwsjson11_deserializeOpDocumentCreateGroupOutput(v **CreateGroupOutput, return nil } +func awsAwsjson11_deserializeOpDocumentCreateIdentityCenterApplicationOutput(v **CreateIdentityCenterApplicationOutput, 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 *CreateIdentityCenterApplicationOutput + if *v == nil { + sv = &CreateIdentityCenterApplicationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationArn to be of type string, got %T instead", value) + } + sv.ApplicationArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentCreateImpersonationRoleOutput(v **CreateImpersonationRoleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15503,9 +16795,71 @@ func awsAwsjson11_deserializeOpDocumentDeleteAvailabilityConfigurationOutput(v * return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteAvailabilityConfigurationOutput + var sv *DeleteAvailabilityConfigurationOutput + if *v == nil { + sv = &DeleteAvailabilityConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteEmailMonitoringConfigurationOutput(v **DeleteEmailMonitoringConfigurationOutput, 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 *DeleteEmailMonitoringConfigurationOutput + if *v == nil { + sv = &DeleteEmailMonitoringConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteGroupOutput(v **DeleteGroupOutput, 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 *DeleteGroupOutput if *v == nil { - sv = &DeleteAvailabilityConfigurationOutput{} + sv = &DeleteGroupOutput{} } else { sv = *v } @@ -15521,7 +16875,7 @@ func awsAwsjson11_deserializeOpDocumentDeleteAvailabilityConfigurationOutput(v * return nil } -func awsAwsjson11_deserializeOpDocumentDeleteEmailMonitoringConfigurationOutput(v **DeleteEmailMonitoringConfigurationOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentDeleteIdentityCenterApplicationOutput(v **DeleteIdentityCenterApplicationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15534,9 +16888,9 @@ func awsAwsjson11_deserializeOpDocumentDeleteEmailMonitoringConfigurationOutput( return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteEmailMonitoringConfigurationOutput + var sv *DeleteIdentityCenterApplicationOutput if *v == nil { - sv = &DeleteEmailMonitoringConfigurationOutput{} + sv = &DeleteIdentityCenterApplicationOutput{} } else { sv = *v } @@ -15552,7 +16906,7 @@ func awsAwsjson11_deserializeOpDocumentDeleteEmailMonitoringConfigurationOutput( return nil } -func awsAwsjson11_deserializeOpDocumentDeleteGroupOutput(v **DeleteGroupOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentDeleteIdentityProviderConfigurationOutput(v **DeleteIdentityProviderConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15565,9 +16919,9 @@ func awsAwsjson11_deserializeOpDocumentDeleteGroupOutput(v **DeleteGroupOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteGroupOutput + var sv *DeleteIdentityProviderConfigurationOutput if *v == nil { - sv = &DeleteGroupOutput{} + sv = &DeleteIdentityProviderConfigurationOutput{} } else { sv = *v } @@ -15756,6 +17110,37 @@ func awsAwsjson11_deserializeOpDocumentDeleteOrganizationOutput(v **DeleteOrgani return nil } +func awsAwsjson11_deserializeOpDocumentDeletePersonalAccessTokenOutput(v **DeletePersonalAccessTokenOutput, 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 *DeletePersonalAccessTokenOutput + if *v == nil { + sv = &DeletePersonalAccessTokenOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDeleteResourceOutput(v **DeleteResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -16126,6 +17511,56 @@ func awsAwsjson11_deserializeOpDocumentDescribeGroupOutput(v **DescribeGroupOutp return nil } +func awsAwsjson11_deserializeOpDocumentDescribeIdentityProviderConfigurationOutput(v **DescribeIdentityProviderConfigurationOutput, 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 *DescribeIdentityProviderConfigurationOutput + if *v == nil { + sv = &DescribeIdentityProviderConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AuthenticationMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdentityProviderAuthenticationMode to be of type string, got %T instead", value) + } + sv.AuthenticationMode = types.IdentityProviderAuthenticationMode(jtv) + } + + case "IdentityCenterConfiguration": + if err := awsAwsjson11_deserializeDocumentIdentityCenterConfiguration(&sv.IdentityCenterConfiguration, value); err != nil { + return err + } + + case "PersonalAccessTokenConfiguration": + if err := awsAwsjson11_deserializeDocumentPersonalAccessTokenConfiguration(&sv.PersonalAccessTokenConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDescribeInboundDmarcSettingsOutput(v **DescribeInboundDmarcSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -16717,6 +18152,24 @@ func awsAwsjson11_deserializeOpDocumentDescribeUserOutput(v **DescribeUserOutput sv.HiddenFromGlobalAddressList = jtv } + case "IdentityProviderIdentityStoreId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdentityProviderIdentityStoreId to be of type string, got %T instead", value) + } + sv.IdentityProviderIdentityStoreId = ptr.String(jtv) + } + + case "IdentityProviderUserId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdentityProviderUserId to be of type string, got %T instead", value) + } + sv.IdentityProviderUserId = ptr.String(jtv) + } + case "Initials": if value != nil { jtv, ok := value.(string) @@ -17479,6 +18932,117 @@ func awsAwsjson11_deserializeOpDocumentGetMobileDeviceAccessOverrideOutput(v **G return nil } +func awsAwsjson11_deserializeOpDocumentGetPersonalAccessTokenMetadataOutput(v **GetPersonalAccessTokenMetadataOutput, 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 *GetPersonalAccessTokenMetadataOutput + if *v == nil { + sv = &GetPersonalAccessTokenMetadataOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DateCreated": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DateCreated = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "DateLastUsed": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DateLastUsed = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "ExpiresTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiresTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PersonalAccessTokenName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "PersonalAccessTokenId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PersonalAccessTokenId to be of type string, got %T instead", value) + } + sv.PersonalAccessTokenId = ptr.String(jtv) + } + + case "Scopes": + if err := awsAwsjson11_deserializeDocumentPersonalAccessTokenScopeList(&sv.Scopes, value); err != nil { + return err + } + + case "UserId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkMailIdentifier to be of type string, got %T instead", value) + } + sv.UserId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListAccessControlRulesOutput(v **ListAccessControlRulesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -18046,6 +19610,51 @@ func awsAwsjson11_deserializeOpDocumentListOrganizationsOutput(v **ListOrganizat return nil } +func awsAwsjson11_deserializeOpDocumentListPersonalAccessTokensOutput(v **ListPersonalAccessTokensOutput, 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 *ListPersonalAccessTokensOutput + if *v == nil { + sv = &ListPersonalAccessTokensOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "PersonalAccessTokenSummaries": + if err := awsAwsjson11_deserializeDocumentPersonalAccessTokenSummaryList(&sv.PersonalAccessTokenSummaries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListResourceDelegatesOutput(v **ListResourceDelegatesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -18279,6 +19888,37 @@ func awsAwsjson11_deserializeOpDocumentPutEmailMonitoringConfigurationOutput(v * return nil } +func awsAwsjson11_deserializeOpDocumentPutIdentityProviderConfigurationOutput(v **PutIdentityProviderConfigurationOutput, 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 *PutIdentityProviderConfigurationOutput + if *v == nil { + sv = &PutIdentityProviderConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentPutInboundDmarcSettingsOutput(v **PutInboundDmarcSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/workmail/endpoints.go b/service/workmail/endpoints.go index 26864ece41d..8362d5225e3 100644 --- a/service/workmail/endpoints.go +++ b/service/workmail/endpoints.go @@ -385,7 +385,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://workmail-fips.") diff --git a/service/workmail/generated.json b/service/workmail/generated.json index a03a6e8c607..f99053326e4 100644 --- a/service/workmail/generated.json +++ b/service/workmail/generated.json @@ -15,6 +15,7 @@ "api_op_CreateAlias.go", "api_op_CreateAvailabilityConfiguration.go", "api_op_CreateGroup.go", + "api_op_CreateIdentityCenterApplication.go", "api_op_CreateImpersonationRole.go", "api_op_CreateMobileDeviceAccessRule.go", "api_op_CreateOrganization.go", @@ -25,11 +26,14 @@ "api_op_DeleteAvailabilityConfiguration.go", "api_op_DeleteEmailMonitoringConfiguration.go", "api_op_DeleteGroup.go", + "api_op_DeleteIdentityCenterApplication.go", + "api_op_DeleteIdentityProviderConfiguration.go", "api_op_DeleteImpersonationRole.go", "api_op_DeleteMailboxPermissions.go", "api_op_DeleteMobileDeviceAccessOverride.go", "api_op_DeleteMobileDeviceAccessRule.go", "api_op_DeleteOrganization.go", + "api_op_DeletePersonalAccessToken.go", "api_op_DeleteResource.go", "api_op_DeleteRetentionPolicy.go", "api_op_DeleteUser.go", @@ -38,6 +42,7 @@ "api_op_DescribeEmailMonitoringConfiguration.go", "api_op_DescribeEntity.go", "api_op_DescribeGroup.go", + "api_op_DescribeIdentityProviderConfiguration.go", "api_op_DescribeInboundDmarcSettings.go", "api_op_DescribeMailboxExportJob.go", "api_op_DescribeOrganization.go", @@ -53,6 +58,7 @@ "api_op_GetMailboxDetails.go", "api_op_GetMobileDeviceAccessEffect.go", "api_op_GetMobileDeviceAccessOverride.go", + "api_op_GetPersonalAccessTokenMetadata.go", "api_op_ListAccessControlRules.go", "api_op_ListAliases.go", "api_op_ListAvailabilityConfigurations.go", @@ -66,12 +72,14 @@ "api_op_ListMobileDeviceAccessOverrides.go", "api_op_ListMobileDeviceAccessRules.go", "api_op_ListOrganizations.go", + "api_op_ListPersonalAccessTokens.go", "api_op_ListResourceDelegates.go", "api_op_ListResources.go", "api_op_ListTagsForResource.go", "api_op_ListUsers.go", "api_op_PutAccessControlRule.go", "api_op_PutEmailMonitoringConfiguration.go", + "api_op_PutIdentityProviderConfiguration.go", "api_op_PutInboundDmarcSettings.go", "api_op_PutMailboxPermissions.go", "api_op_PutMobileDeviceAccessOverride.go", diff --git a/service/workmail/serializers.go b/service/workmail/serializers.go index d21345762e9..5cfc4f2a441 100644 --- a/service/workmail/serializers.go +++ b/service/workmail/serializers.go @@ -443,6 +443,67 @@ func (m *awsAwsjson11_serializeOpCreateGroup) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpCreateIdentityCenterApplication struct { +} + +func (*awsAwsjson11_serializeOpCreateIdentityCenterApplication) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateIdentityCenterApplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CreateIdentityCenterApplicationInput) + _ = 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("WorkMailService.CreateIdentityCenterApplication") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateIdentityCenterApplicationInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpCreateImpersonationRole struct { } @@ -1053,6 +1114,128 @@ func (m *awsAwsjson11_serializeOpDeleteGroup) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDeleteIdentityCenterApplication struct { +} + +func (*awsAwsjson11_serializeOpDeleteIdentityCenterApplication) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteIdentityCenterApplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteIdentityCenterApplicationInput) + _ = 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("WorkMailService.DeleteIdentityCenterApplication") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteIdentityCenterApplicationInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteIdentityProviderConfiguration struct { +} + +func (*awsAwsjson11_serializeOpDeleteIdentityProviderConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteIdentityProviderConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteIdentityProviderConfigurationInput) + _ = 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("WorkMailService.DeleteIdentityProviderConfiguration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteIdentityProviderConfigurationInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDeleteImpersonationRole struct { } @@ -1358,6 +1541,67 @@ func (m *awsAwsjson11_serializeOpDeleteOrganization) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDeletePersonalAccessToken struct { +} + +func (*awsAwsjson11_serializeOpDeletePersonalAccessToken) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeletePersonalAccessToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeletePersonalAccessTokenInput) + _ = 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("WorkMailService.DeletePersonalAccessToken") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeletePersonalAccessTokenInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDeleteResource struct { } @@ -1846,6 +2090,67 @@ func (m *awsAwsjson11_serializeOpDescribeGroup) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDescribeIdentityProviderConfiguration struct { +} + +func (*awsAwsjson11_serializeOpDescribeIdentityProviderConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeIdentityProviderConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DescribeIdentityProviderConfigurationInput) + _ = 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("WorkMailService.DescribeIdentityProviderConfiguration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeIdentityProviderConfigurationInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDescribeInboundDmarcSettings struct { } @@ -2761,6 +3066,67 @@ func (m *awsAwsjson11_serializeOpGetMobileDeviceAccessOverride) HandleSerialize( return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpGetPersonalAccessTokenMetadata struct { +} + +func (*awsAwsjson11_serializeOpGetPersonalAccessTokenMetadata) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetPersonalAccessTokenMetadata) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetPersonalAccessTokenMetadataInput) + _ = 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("WorkMailService.GetPersonalAccessTokenMetadata") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetPersonalAccessTokenMetadataInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpListAccessControlRules struct { } @@ -3252,11 +3618,72 @@ func (m *awsAwsjson11_serializeOpListMailboxExportJobs) HandleSerialize(ctx cont type awsAwsjson11_serializeOpListMailboxPermissions struct { } -func (*awsAwsjson11_serializeOpListMailboxPermissions) ID() string { +func (*awsAwsjson11_serializeOpListMailboxPermissions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListMailboxPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListMailboxPermissionsInput) + _ = 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("WorkMailService.ListMailboxPermissions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListMailboxPermissionsInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListMailDomains struct { +} + +func (*awsAwsjson11_serializeOpListMailDomains) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpListMailboxPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpListMailDomains) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3268,7 +3695,7 @@ func (m *awsAwsjson11_serializeOpListMailboxPermissions) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListMailboxPermissionsInput) + input, ok := in.Parameters.(*ListMailDomainsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -3289,10 +3716,10 @@ func (m *awsAwsjson11_serializeOpListMailboxPermissions) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListMailboxPermissions") + httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListMailDomains") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentListMailboxPermissionsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentListMailDomainsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3310,14 +3737,14 @@ func (m *awsAwsjson11_serializeOpListMailboxPermissions) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpListMailDomains struct { +type awsAwsjson11_serializeOpListMobileDeviceAccessOverrides struct { } -func (*awsAwsjson11_serializeOpListMailDomains) ID() string { +func (*awsAwsjson11_serializeOpListMobileDeviceAccessOverrides) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpListMailDomains) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpListMobileDeviceAccessOverrides) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3329,7 +3756,7 @@ func (m *awsAwsjson11_serializeOpListMailDomains) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListMailDomainsInput) + input, ok := in.Parameters.(*ListMobileDeviceAccessOverridesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -3350,10 +3777,10 @@ func (m *awsAwsjson11_serializeOpListMailDomains) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListMailDomains") + httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListMobileDeviceAccessOverrides") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentListMailDomainsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentListMobileDeviceAccessOverridesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3371,14 +3798,14 @@ func (m *awsAwsjson11_serializeOpListMailDomains) HandleSerialize(ctx context.Co return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpListMobileDeviceAccessOverrides struct { +type awsAwsjson11_serializeOpListMobileDeviceAccessRules struct { } -func (*awsAwsjson11_serializeOpListMobileDeviceAccessOverrides) ID() string { +func (*awsAwsjson11_serializeOpListMobileDeviceAccessRules) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpListMobileDeviceAccessOverrides) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpListMobileDeviceAccessRules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3390,7 +3817,7 @@ func (m *awsAwsjson11_serializeOpListMobileDeviceAccessOverrides) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListMobileDeviceAccessOverridesInput) + input, ok := in.Parameters.(*ListMobileDeviceAccessRulesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -3411,10 +3838,10 @@ func (m *awsAwsjson11_serializeOpListMobileDeviceAccessOverrides) HandleSerializ return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListMobileDeviceAccessOverrides") + httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListMobileDeviceAccessRules") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentListMobileDeviceAccessOverridesInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentListMobileDeviceAccessRulesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3432,14 +3859,14 @@ func (m *awsAwsjson11_serializeOpListMobileDeviceAccessOverrides) HandleSerializ return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpListMobileDeviceAccessRules struct { +type awsAwsjson11_serializeOpListOrganizations struct { } -func (*awsAwsjson11_serializeOpListMobileDeviceAccessRules) ID() string { +func (*awsAwsjson11_serializeOpListOrganizations) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpListMobileDeviceAccessRules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpListOrganizations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3451,7 +3878,7 @@ func (m *awsAwsjson11_serializeOpListMobileDeviceAccessRules) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListMobileDeviceAccessRulesInput) + input, ok := in.Parameters.(*ListOrganizationsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -3472,10 +3899,10 @@ func (m *awsAwsjson11_serializeOpListMobileDeviceAccessRules) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListMobileDeviceAccessRules") + httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListOrganizations") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentListMobileDeviceAccessRulesInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentListOrganizationsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3493,14 +3920,14 @@ func (m *awsAwsjson11_serializeOpListMobileDeviceAccessRules) HandleSerialize(ct return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpListOrganizations struct { +type awsAwsjson11_serializeOpListPersonalAccessTokens struct { } -func (*awsAwsjson11_serializeOpListOrganizations) ID() string { +func (*awsAwsjson11_serializeOpListPersonalAccessTokens) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpListOrganizations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpListPersonalAccessTokens) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3512,7 +3939,7 @@ func (m *awsAwsjson11_serializeOpListOrganizations) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListOrganizationsInput) + input, ok := in.Parameters.(*ListPersonalAccessTokensInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -3533,10 +3960,10 @@ func (m *awsAwsjson11_serializeOpListOrganizations) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListOrganizations") + httpBindingEncoder.SetHeader("X-Amz-Target").String("WorkMailService.ListPersonalAccessTokens") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentListOrganizationsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentListPersonalAccessTokensInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3920,6 +4347,67 @@ func (m *awsAwsjson11_serializeOpPutEmailMonitoringConfiguration) HandleSerializ return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpPutIdentityProviderConfiguration struct { +} + +func (*awsAwsjson11_serializeOpPutIdentityProviderConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutIdentityProviderConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*PutIdentityProviderConfigurationInput) + _ = 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("WorkMailService.PutIdentityProviderConfiguration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutIdentityProviderConfigurationInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpPutInboundDmarcSettings struct { } @@ -5303,6 +5791,23 @@ func awsAwsjson11_serializeDocumentFolderConfigurations(v []types.FolderConfigur return nil } +func awsAwsjson11_serializeDocumentIdentityCenterConfiguration(v *types.IdentityCenterConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApplicationArn != nil { + ok := object.Key("ApplicationArn") + ok.String(*v.ApplicationArn) + } + + if v.InstanceArn != nil { + ok := object.Key("InstanceArn") + ok.String(*v.InstanceArn) + } + + return nil +} + func awsAwsjson11_serializeDocumentImpersonationRoleIdList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -5456,6 +5961,11 @@ func awsAwsjson11_serializeDocumentListUsersFilters(v *types.ListUsersFilters, v ok.String(*v.DisplayNamePrefix) } + if v.IdentityProviderUserIdPrefix != nil { + ok := object.Key("IdentityProviderUserIdPrefix") + ok.String(*v.IdentityProviderUserIdPrefix) + } + if v.PrimaryEmailPrefix != nil { ok := object.Key("PrimaryEmailPrefix") ok.String(*v.PrimaryEmailPrefix) @@ -5485,6 +5995,23 @@ func awsAwsjson11_serializeDocumentPermissionValues(v []types.PermissionType, va return nil } +func awsAwsjson11_serializeDocumentPersonalAccessTokenConfiguration(v *types.PersonalAccessTokenConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LifetimeInDays != nil { + ok := object.Key("LifetimeInDays") + ok.Integer(*v.LifetimeInDays) + } + + if len(v.Status) > 0 { + ok := object.Key("Status") + ok.String(string(v.Status)) + } + + return nil +} + func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5711,6 +6238,28 @@ func awsAwsjson11_serializeOpDocumentCreateGroupInput(v *CreateGroupInput, value return nil } +func awsAwsjson11_serializeOpDocumentCreateIdentityCenterApplicationInput(v *CreateIdentityCenterApplicationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.InstanceArn != nil { + ok := object.Key("InstanceArn") + ok.String(*v.InstanceArn) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentCreateImpersonationRoleInput(v *CreateImpersonationRoleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5928,6 +6477,11 @@ func awsAwsjson11_serializeOpDocumentCreateUserInput(v *CreateUserInput, value s ok.Boolean(v.HiddenFromGlobalAddressList) } + if v.IdentityProviderUserId != nil { + ok := object.Key("IdentityProviderUserId") + ok.String(*v.IdentityProviderUserId) + } + if v.LastName != nil { ok := object.Key("LastName") ok.String(*v.LastName) @@ -6041,6 +6595,30 @@ func awsAwsjson11_serializeOpDocumentDeleteGroupInput(v *DeleteGroupInput, value return nil } +func awsAwsjson11_serializeOpDocumentDeleteIdentityCenterApplicationInput(v *DeleteIdentityCenterApplicationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApplicationArn != nil { + ok := object.Key("ApplicationArn") + ok.String(*v.ApplicationArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteIdentityProviderConfigurationInput(v *DeleteIdentityProviderConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OrganizationId != nil { + ok := object.Key("OrganizationId") + ok.String(*v.OrganizationId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDeleteImpersonationRoleInput(v *DeleteImpersonationRoleInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6133,6 +6711,11 @@ func awsAwsjson11_serializeOpDocumentDeleteOrganizationInput(v *DeleteOrganizati ok.Boolean(v.DeleteDirectory) } + if v.DeleteIdentityCenterApplication { + ok := object.Key("DeleteIdentityCenterApplication") + ok.Boolean(v.DeleteIdentityCenterApplication) + } + if v.ForceDelete { ok := object.Key("ForceDelete") ok.Boolean(v.ForceDelete) @@ -6146,6 +6729,23 @@ func awsAwsjson11_serializeOpDocumentDeleteOrganizationInput(v *DeleteOrganizati return nil } +func awsAwsjson11_serializeOpDocumentDeletePersonalAccessTokenInput(v *DeletePersonalAccessTokenInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OrganizationId != nil { + ok := object.Key("OrganizationId") + ok.String(*v.OrganizationId) + } + + if v.PersonalAccessTokenId != nil { + ok := object.Key("PersonalAccessTokenId") + ok.String(*v.PersonalAccessTokenId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDeleteResourceInput(v *DeleteResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6277,6 +6877,18 @@ func awsAwsjson11_serializeOpDocumentDescribeGroupInput(v *DescribeGroupInput, v return nil } +func awsAwsjson11_serializeOpDocumentDescribeIdentityProviderConfigurationInput(v *DescribeIdentityProviderConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OrganizationId != nil { + ok := object.Key("OrganizationId") + ok.String(*v.OrganizationId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDescribeInboundDmarcSettingsInput(v *DescribeInboundDmarcSettingsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6567,6 +7179,23 @@ func awsAwsjson11_serializeOpDocumentGetMobileDeviceAccessOverrideInput(v *GetMo return nil } +func awsAwsjson11_serializeOpDocumentGetPersonalAccessTokenMetadataInput(v *GetPersonalAccessTokenMetadataInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OrganizationId != nil { + ok := object.Key("OrganizationId") + ok.String(*v.OrganizationId) + } + + if v.PersonalAccessTokenId != nil { + ok := object.Key("PersonalAccessTokenId") + ok.String(*v.PersonalAccessTokenId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListAccessControlRulesInput(v *ListAccessControlRulesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6872,6 +7501,33 @@ func awsAwsjson11_serializeOpDocumentListOrganizationsInput(v *ListOrganizations return nil } +func awsAwsjson11_serializeOpDocumentListPersonalAccessTokensInput(v *ListPersonalAccessTokensInput, 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.OrganizationId != nil { + ok := object.Key("OrganizationId") + ok.String(*v.OrganizationId) + } + + if v.UserId != nil { + ok := object.Key("UserId") + ok.String(*v.UserId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListResourceDelegatesInput(v *ListResourceDelegatesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -7074,6 +7730,37 @@ func awsAwsjson11_serializeOpDocumentPutEmailMonitoringConfigurationInput(v *Put return nil } +func awsAwsjson11_serializeOpDocumentPutIdentityProviderConfigurationInput(v *PutIdentityProviderConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.AuthenticationMode) > 0 { + ok := object.Key("AuthenticationMode") + ok.String(string(v.AuthenticationMode)) + } + + if v.IdentityCenterConfiguration != nil { + ok := object.Key("IdentityCenterConfiguration") + if err := awsAwsjson11_serializeDocumentIdentityCenterConfiguration(v.IdentityCenterConfiguration, ok); err != nil { + return err + } + } + + if v.OrganizationId != nil { + ok := object.Key("OrganizationId") + ok.String(*v.OrganizationId) + } + + if v.PersonalAccessTokenConfiguration != nil { + ok := object.Key("PersonalAccessTokenConfiguration") + if err := awsAwsjson11_serializeDocumentPersonalAccessTokenConfiguration(v.PersonalAccessTokenConfiguration, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentPutInboundDmarcSettingsInput(v *PutInboundDmarcSettingsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -7692,6 +8379,11 @@ func awsAwsjson11_serializeOpDocumentUpdateUserInput(v *UpdateUserInput, value s ok.Boolean(*v.HiddenFromGlobalAddressList) } + if v.IdentityProviderUserId != nil { + ok := object.Key("IdentityProviderUserId") + ok.String(*v.IdentityProviderUserId) + } + if v.Initials != nil { ok := object.Key("Initials") ok.String(*v.Initials) diff --git a/service/workmail/snapshot/api_op_CreateIdentityCenterApplication.go.snap b/service/workmail/snapshot/api_op_CreateIdentityCenterApplication.go.snap new file mode 100644 index 00000000000..a294e1b639b --- /dev/null +++ b/service/workmail/snapshot/api_op_CreateIdentityCenterApplication.go.snap @@ -0,0 +1,42 @@ +CreateIdentityCenterApplication + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/workmail/snapshot/api_op_DeleteIdentityCenterApplication.go.snap b/service/workmail/snapshot/api_op_DeleteIdentityCenterApplication.go.snap new file mode 100644 index 00000000000..880d628298e --- /dev/null +++ b/service/workmail/snapshot/api_op_DeleteIdentityCenterApplication.go.snap @@ -0,0 +1,41 @@ +DeleteIdentityCenterApplication + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/workmail/snapshot/api_op_DeleteIdentityProviderConfiguration.go.snap b/service/workmail/snapshot/api_op_DeleteIdentityProviderConfiguration.go.snap new file mode 100644 index 00000000000..5d78446bfed --- /dev/null +++ b/service/workmail/snapshot/api_op_DeleteIdentityProviderConfiguration.go.snap @@ -0,0 +1,41 @@ +DeleteIdentityProviderConfiguration + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/workmail/snapshot/api_op_DeletePersonalAccessToken.go.snap b/service/workmail/snapshot/api_op_DeletePersonalAccessToken.go.snap new file mode 100644 index 00000000000..0f961e1591b --- /dev/null +++ b/service/workmail/snapshot/api_op_DeletePersonalAccessToken.go.snap @@ -0,0 +1,41 @@ +DeletePersonalAccessToken + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/workmail/snapshot/api_op_DescribeIdentityProviderConfiguration.go.snap b/service/workmail/snapshot/api_op_DescribeIdentityProviderConfiguration.go.snap new file mode 100644 index 00000000000..2883d4e670a --- /dev/null +++ b/service/workmail/snapshot/api_op_DescribeIdentityProviderConfiguration.go.snap @@ -0,0 +1,41 @@ +DescribeIdentityProviderConfiguration + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/workmail/snapshot/api_op_GetPersonalAccessTokenMetadata.go.snap b/service/workmail/snapshot/api_op_GetPersonalAccessTokenMetadata.go.snap new file mode 100644 index 00000000000..a7c57b8ea7b --- /dev/null +++ b/service/workmail/snapshot/api_op_GetPersonalAccessTokenMetadata.go.snap @@ -0,0 +1,41 @@ +GetPersonalAccessTokenMetadata + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/workmail/snapshot/api_op_ListPersonalAccessTokens.go.snap b/service/workmail/snapshot/api_op_ListPersonalAccessTokens.go.snap new file mode 100644 index 00000000000..ef132930f15 --- /dev/null +++ b/service/workmail/snapshot/api_op_ListPersonalAccessTokens.go.snap @@ -0,0 +1,41 @@ +ListPersonalAccessTokens + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/workmail/snapshot/api_op_PutIdentityProviderConfiguration.go.snap b/service/workmail/snapshot/api_op_PutIdentityProviderConfiguration.go.snap new file mode 100644 index 00000000000..2d981b90d6c --- /dev/null +++ b/service/workmail/snapshot/api_op_PutIdentityProviderConfiguration.go.snap @@ -0,0 +1,41 @@ +PutIdentityProviderConfiguration + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/workmail/snapshot_test.go b/service/workmail/snapshot_test.go index 68e095833fd..67541d02a6d 100644 --- a/service/workmail/snapshot_test.go +++ b/service/workmail/snapshot_test.go @@ -146,6 +146,18 @@ func TestCheckSnapshot_CreateGroup(t *testing.T) { } } +func TestCheckSnapshot_CreateIdentityCenterApplication(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateIdentityCenterApplication(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateIdentityCenterApplication") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateImpersonationRole(t *testing.T) { svc := New(Options{}) _, err := svc.CreateImpersonationRole(context.Background(), nil, func(o *Options) { @@ -266,6 +278,30 @@ func TestCheckSnapshot_DeleteGroup(t *testing.T) { } } +func TestCheckSnapshot_DeleteIdentityCenterApplication(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteIdentityCenterApplication(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteIdentityCenterApplication") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_DeleteIdentityProviderConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteIdentityProviderConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteIdentityProviderConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteImpersonationRole(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteImpersonationRole(context.Background(), nil, func(o *Options) { @@ -326,6 +362,18 @@ func TestCheckSnapshot_DeleteOrganization(t *testing.T) { } } +func TestCheckSnapshot_DeletePersonalAccessToken(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeletePersonalAccessToken(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeletePersonalAccessToken") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteResource(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteResource(context.Background(), nil, func(o *Options) { @@ -422,6 +470,18 @@ func TestCheckSnapshot_DescribeGroup(t *testing.T) { } } +func TestCheckSnapshot_DescribeIdentityProviderConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeIdentityProviderConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeIdentityProviderConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribeInboundDmarcSettings(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeInboundDmarcSettings(context.Background(), nil, func(o *Options) { @@ -602,6 +662,18 @@ func TestCheckSnapshot_GetMobileDeviceAccessOverride(t *testing.T) { } } +func TestCheckSnapshot_GetPersonalAccessTokenMetadata(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetPersonalAccessTokenMetadata(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetPersonalAccessTokenMetadata") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListAccessControlRules(t *testing.T) { svc := New(Options{}) _, err := svc.ListAccessControlRules(context.Background(), nil, func(o *Options) { @@ -758,6 +830,18 @@ func TestCheckSnapshot_ListOrganizations(t *testing.T) { } } +func TestCheckSnapshot_ListPersonalAccessTokens(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListPersonalAccessTokens(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListPersonalAccessTokens") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListResourceDelegates(t *testing.T) { svc := New(Options{}) _, err := svc.ListResourceDelegates(context.Background(), nil, func(o *Options) { @@ -830,6 +914,18 @@ func TestCheckSnapshot_PutEmailMonitoringConfiguration(t *testing.T) { } } +func TestCheckSnapshot_PutIdentityProviderConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.PutIdentityProviderConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "PutIdentityProviderConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_PutInboundDmarcSettings(t *testing.T) { svc := New(Options{}) _, err := svc.PutInboundDmarcSettings(context.Background(), nil, func(o *Options) { @@ -1153,6 +1249,18 @@ func TestUpdateSnapshot_CreateGroup(t *testing.T) { } } +func TestUpdateSnapshot_CreateIdentityCenterApplication(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateIdentityCenterApplication(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateIdentityCenterApplication") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateImpersonationRole(t *testing.T) { svc := New(Options{}) _, err := svc.CreateImpersonationRole(context.Background(), nil, func(o *Options) { @@ -1273,6 +1381,30 @@ func TestUpdateSnapshot_DeleteGroup(t *testing.T) { } } +func TestUpdateSnapshot_DeleteIdentityCenterApplication(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteIdentityCenterApplication(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteIdentityCenterApplication") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_DeleteIdentityProviderConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteIdentityProviderConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteIdentityProviderConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteImpersonationRole(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteImpersonationRole(context.Background(), nil, func(o *Options) { @@ -1333,6 +1465,18 @@ func TestUpdateSnapshot_DeleteOrganization(t *testing.T) { } } +func TestUpdateSnapshot_DeletePersonalAccessToken(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeletePersonalAccessToken(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeletePersonalAccessToken") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteResource(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteResource(context.Background(), nil, func(o *Options) { @@ -1429,6 +1573,18 @@ func TestUpdateSnapshot_DescribeGroup(t *testing.T) { } } +func TestUpdateSnapshot_DescribeIdentityProviderConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeIdentityProviderConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeIdentityProviderConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribeInboundDmarcSettings(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeInboundDmarcSettings(context.Background(), nil, func(o *Options) { @@ -1609,6 +1765,18 @@ func TestUpdateSnapshot_GetMobileDeviceAccessOverride(t *testing.T) { } } +func TestUpdateSnapshot_GetPersonalAccessTokenMetadata(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetPersonalAccessTokenMetadata(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetPersonalAccessTokenMetadata") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListAccessControlRules(t *testing.T) { svc := New(Options{}) _, err := svc.ListAccessControlRules(context.Background(), nil, func(o *Options) { @@ -1765,6 +1933,18 @@ func TestUpdateSnapshot_ListOrganizations(t *testing.T) { } } +func TestUpdateSnapshot_ListPersonalAccessTokens(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListPersonalAccessTokens(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListPersonalAccessTokens") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListResourceDelegates(t *testing.T) { svc := New(Options{}) _, err := svc.ListResourceDelegates(context.Background(), nil, func(o *Options) { @@ -1837,6 +2017,18 @@ func TestUpdateSnapshot_PutEmailMonitoringConfiguration(t *testing.T) { } } +func TestUpdateSnapshot_PutIdentityProviderConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.PutIdentityProviderConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "PutIdentityProviderConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_PutInboundDmarcSettings(t *testing.T) { svc := New(Options{}) _, err := svc.PutInboundDmarcSettings(context.Background(), nil, func(o *Options) { diff --git a/service/workmail/types/enums.go b/service/workmail/types/enums.go index af3f6a5340d..c415c179e92 100644 --- a/service/workmail/types/enums.go +++ b/service/workmail/types/enums.go @@ -147,6 +147,26 @@ func (FolderName) Values() []FolderName { } } +type IdentityProviderAuthenticationMode string + +// Enum values for IdentityProviderAuthenticationMode +const ( + IdentityProviderAuthenticationModeIdentityProviderOnly IdentityProviderAuthenticationMode = "IDENTITY_PROVIDER_ONLY" + IdentityProviderAuthenticationModeIdentityProviderAndDirectory IdentityProviderAuthenticationMode = "IDENTITY_PROVIDER_AND_DIRECTORY" +) + +// Values returns all known values for IdentityProviderAuthenticationMode. Note +// that this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (IdentityProviderAuthenticationMode) Values() []IdentityProviderAuthenticationMode { + return []IdentityProviderAuthenticationMode{ + "IDENTITY_PROVIDER_ONLY", + "IDENTITY_PROVIDER_AND_DIRECTORY", + } +} + type ImpersonationRoleType string // Enum values for ImpersonationRoleType @@ -249,6 +269,26 @@ func (PermissionType) Values() []PermissionType { } } +type PersonalAccessTokenConfigurationStatus string + +// Enum values for PersonalAccessTokenConfigurationStatus +const ( + PersonalAccessTokenConfigurationStatusActive PersonalAccessTokenConfigurationStatus = "ACTIVE" + PersonalAccessTokenConfigurationStatusInactive PersonalAccessTokenConfigurationStatus = "INACTIVE" +) + +// Values returns all known values for PersonalAccessTokenConfigurationStatus. +// Note that this can be expanded in the future, and so it is only as up to date as +// the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PersonalAccessTokenConfigurationStatus) Values() []PersonalAccessTokenConfigurationStatus { + return []PersonalAccessTokenConfigurationStatus{ + "ACTIVE", + "INACTIVE", + } +} + type ResourceType string // Enum values for ResourceType diff --git a/service/workmail/types/types.go b/service/workmail/types/types.go index efd4a8ecaac..46d3d76eb81 100644 --- a/service/workmail/types/types.go +++ b/service/workmail/types/types.go @@ -228,6 +228,24 @@ type GroupIdentifier struct { noSmithyDocumentSerde } +// The IAM Identity Center configuration. +type IdentityCenterConfiguration struct { + + // The Amazon Resource Name (ARN) of IAMIdentity Center Application for WorkMail. + // Must be created by the WorkMail API, see CreateIdentityCenterApplication. + // + // This member is required. + ApplicationArn *string + + // The Amazon Resource Name (ARN) of the of IAM Identity Center instance. Must be + // in the same AWS account and region as WorkMail organization. + // + // This member is required. + InstanceArn *string + + noSmithyDocumentSerde +} + // The impersonation rule that matched the input. type ImpersonationMatchedRule struct { @@ -354,6 +372,9 @@ type ListUsersFilters struct { // Filters only users with the provided display name prefix. DisplayNamePrefix *string + // Filters only users with the ID from the IAM Identity Center. + IdentityProviderUserIdPrefix *string + // Filters only users with the provided email prefix. PrimaryEmailPrefix *string @@ -574,6 +595,56 @@ type Permission struct { noSmithyDocumentSerde } +// Displays the Personal Access Token status. +type PersonalAccessTokenConfiguration struct { + + // The status of the Personal Access Token allowed for the organization. + // + // - Active - Mailbox users can login to the web application and choose Settings + // to see the new Personal Access Tokens page to create and delete the Personal + // Access Tokens. Mailbox users can use the Personal Access Tokens to set up + // mailbox connection from desktop or mobile email clients. + // + // - Inactive - Personal Access Tokens are disabled for your organization. + // Mailbox users can’t create, list, or delete Personal Access Tokens and can’t use + // them to connect to their mailboxes from desktop or mobile email clients. + // + // This member is required. + Status PersonalAccessTokenConfigurationStatus + + // The validity of the Personal Access Token status in days. + LifetimeInDays *int32 + + noSmithyDocumentSerde +} + +// The summary of the Personal Access Token. +type PersonalAccessTokenSummary struct { + + // The date when the Personal Access Token was created. + DateCreated *time.Time + + // The date when the Personal Access Token was last used. + DateLastUsed *time.Time + + // The date when the Personal Access Token will expire. + ExpiresTime *time.Time + + // The name of the Personal Access Token. + Name *string + + // The ID of the Personal Access Token. + PersonalAccessTokenId *string + + // Lists all the Personal Access Token permissions for a mailbox. + Scopes []string + + // The user ID of the WorkMail user associated with the Personal Access Token. + UserId *string + + noSmithyDocumentSerde +} + // Describes an EWS based availability provider when returned from the service. It // does not contain the password of the endpoint. type RedactedEwsAvailabilityProvider struct { @@ -651,6 +722,16 @@ type User struct { // The identifier of the user. Id *string + // Identity store ID from the IAM Identity Center. If this parameter is empty it + // will be updated automatically when the user logs in for the first time to the + // mailbox associated with WorkMail. + IdentityProviderIdentityStoreId *string + + // User ID from the IAM Identity Center. If this parameter is empty it will be + // updated automatically when the user logs in for the first time to the mailbox + // associated with WorkMail. + IdentityProviderUserId *string + // The name of the user. Name *string diff --git a/service/workmail/validators.go b/service/workmail/validators.go index 238d8c0f0d9..31c1b1194a3 100644 --- a/service/workmail/validators.go +++ b/service/workmail/validators.go @@ -150,6 +150,26 @@ func (m *validateOpCreateGroup) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpCreateIdentityCenterApplication struct { +} + +func (*validateOpCreateIdentityCenterApplication) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateIdentityCenterApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateIdentityCenterApplicationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateIdentityCenterApplicationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateImpersonationRole struct { } @@ -350,6 +370,46 @@ func (m *validateOpDeleteGroup) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpDeleteIdentityCenterApplication struct { +} + +func (*validateOpDeleteIdentityCenterApplication) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteIdentityCenterApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteIdentityCenterApplicationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteIdentityCenterApplicationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteIdentityProviderConfiguration struct { +} + +func (*validateOpDeleteIdentityProviderConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteIdentityProviderConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteIdentityProviderConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteIdentityProviderConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteImpersonationRole struct { } @@ -450,6 +510,26 @@ func (m *validateOpDeleteOrganization) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpDeletePersonalAccessToken struct { +} + +func (*validateOpDeletePersonalAccessToken) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeletePersonalAccessToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeletePersonalAccessTokenInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeletePersonalAccessTokenInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteResource struct { } @@ -610,6 +690,26 @@ func (m *validateOpDescribeGroup) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpDescribeIdentityProviderConfiguration struct { +} + +func (*validateOpDescribeIdentityProviderConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeIdentityProviderConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeIdentityProviderConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeIdentityProviderConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeInboundDmarcSettings struct { } @@ -910,6 +1010,26 @@ func (m *validateOpGetMobileDeviceAccessOverride) HandleInitialize(ctx context.C return next.HandleInitialize(ctx, in) } +type validateOpGetPersonalAccessTokenMetadata struct { +} + +func (*validateOpGetPersonalAccessTokenMetadata) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetPersonalAccessTokenMetadata) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetPersonalAccessTokenMetadataInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetPersonalAccessTokenMetadataInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListAccessControlRules struct { } @@ -1150,6 +1270,26 @@ func (m *validateOpListMobileDeviceAccessRules) HandleInitialize(ctx context.Con return next.HandleInitialize(ctx, in) } +type validateOpListPersonalAccessTokens struct { +} + +func (*validateOpListPersonalAccessTokens) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListPersonalAccessTokens) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListPersonalAccessTokensInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListPersonalAccessTokensInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListResourceDelegates struct { } @@ -1270,6 +1410,26 @@ func (m *validateOpPutEmailMonitoringConfiguration) HandleInitialize(ctx context return next.HandleInitialize(ctx, in) } +type validateOpPutIdentityProviderConfiguration struct { +} + +func (*validateOpPutIdentityProviderConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutIdentityProviderConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutIdentityProviderConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutIdentityProviderConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpPutInboundDmarcSettings struct { } @@ -1698,6 +1858,10 @@ func addOpCreateGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateGroup{}, middleware.After) } +func addOpCreateIdentityCenterApplicationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateIdentityCenterApplication{}, middleware.After) +} + func addOpCreateImpersonationRoleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateImpersonationRole{}, middleware.After) } @@ -1738,6 +1902,14 @@ func addOpDeleteGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteGroup{}, middleware.After) } +func addOpDeleteIdentityCenterApplicationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteIdentityCenterApplication{}, middleware.After) +} + +func addOpDeleteIdentityProviderConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteIdentityProviderConfiguration{}, middleware.After) +} + func addOpDeleteImpersonationRoleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteImpersonationRole{}, middleware.After) } @@ -1758,6 +1930,10 @@ func addOpDeleteOrganizationValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpDeleteOrganization{}, middleware.After) } +func addOpDeletePersonalAccessTokenValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeletePersonalAccessToken{}, middleware.After) +} + func addOpDeleteResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteResource{}, middleware.After) } @@ -1790,6 +1966,10 @@ func addOpDescribeGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeGroup{}, middleware.After) } +func addOpDescribeIdentityProviderConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeIdentityProviderConfiguration{}, middleware.After) +} + func addOpDescribeInboundDmarcSettingsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeInboundDmarcSettings{}, middleware.After) } @@ -1850,6 +2030,10 @@ func addOpGetMobileDeviceAccessOverrideValidationMiddleware(stack *middleware.St return stack.Initialize.Add(&validateOpGetMobileDeviceAccessOverride{}, middleware.After) } +func addOpGetPersonalAccessTokenMetadataValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetPersonalAccessTokenMetadata{}, middleware.After) +} + func addOpListAccessControlRulesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListAccessControlRules{}, middleware.After) } @@ -1898,6 +2082,10 @@ func addOpListMobileDeviceAccessRulesValidationMiddleware(stack *middleware.Stac return stack.Initialize.Add(&validateOpListMobileDeviceAccessRules{}, middleware.After) } +func addOpListPersonalAccessTokensValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListPersonalAccessTokens{}, middleware.After) +} + func addOpListResourceDelegatesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListResourceDelegates{}, middleware.After) } @@ -1922,6 +2110,10 @@ func addOpPutEmailMonitoringConfigurationValidationMiddleware(stack *middleware. return stack.Initialize.Add(&validateOpPutEmailMonitoringConfiguration{}, middleware.After) } +func addOpPutIdentityProviderConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutIdentityProviderConfiguration{}, middleware.After) +} + func addOpPutInboundDmarcSettingsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutInboundDmarcSettings{}, middleware.After) } @@ -2090,6 +2282,24 @@ func validateFolderConfigurations(v []types.FolderConfiguration) error { } } +func validateIdentityCenterConfiguration(v *types.IdentityCenterConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IdentityCenterConfiguration"} + if v.InstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceArn")) + } + if v.ApplicationArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateImpersonationRule(v *types.ImpersonationRule) error { if v == nil { return nil @@ -2140,6 +2350,21 @@ func validateLambdaAvailabilityProvider(v *types.LambdaAvailabilityProvider) err } } +func validatePersonalAccessTokenConfiguration(v *types.PersonalAccessTokenConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PersonalAccessTokenConfiguration"} + if len(v.Status) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Status")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateTag(v *types.Tag) error { if v == nil { return nil @@ -2323,6 +2548,24 @@ func validateOpCreateGroupInput(v *CreateGroupInput) error { } } +func validateOpCreateIdentityCenterApplicationInput(v *CreateIdentityCenterApplicationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateIdentityCenterApplicationInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.InstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateImpersonationRoleInput(v *CreateImpersonationRoleInput) error { if v == nil { return nil @@ -2524,6 +2767,36 @@ func validateOpDeleteGroupInput(v *DeleteGroupInput) error { } } +func validateOpDeleteIdentityCenterApplicationInput(v *DeleteIdentityCenterApplicationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteIdentityCenterApplicationInput"} + if v.ApplicationArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteIdentityProviderConfigurationInput(v *DeleteIdentityProviderConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteIdentityProviderConfigurationInput"} + if v.OrganizationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteImpersonationRoleInput(v *DeleteImpersonationRoleInput) error { if v == nil { return nil @@ -2617,6 +2890,24 @@ func validateOpDeleteOrganizationInput(v *DeleteOrganizationInput) error { } } +func validateOpDeletePersonalAccessTokenInput(v *DeletePersonalAccessTokenInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeletePersonalAccessTokenInput"} + if v.OrganizationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) + } + if v.PersonalAccessTokenId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PersonalAccessTokenId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteResourceInput(v *DeleteResourceInput) error { if v == nil { return nil @@ -2758,6 +3049,21 @@ func validateOpDescribeGroupInput(v *DescribeGroupInput) error { } } +func validateOpDescribeIdentityProviderConfigurationInput(v *DescribeIdentityProviderConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeIdentityProviderConfigurationInput"} + if v.OrganizationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeInboundDmarcSettingsInput(v *DescribeInboundDmarcSettingsInput) error { if v == nil { return nil @@ -3031,6 +3337,24 @@ func validateOpGetMobileDeviceAccessOverrideInput(v *GetMobileDeviceAccessOverri } } +func validateOpGetPersonalAccessTokenMetadataInput(v *GetPersonalAccessTokenMetadataInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetPersonalAccessTokenMetadataInput"} + if v.OrganizationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) + } + if v.PersonalAccessTokenId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PersonalAccessTokenId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListAccessControlRulesInput(v *ListAccessControlRulesInput) error { if v == nil { return nil @@ -3223,6 +3547,21 @@ func validateOpListMobileDeviceAccessRulesInput(v *ListMobileDeviceAccessRulesIn } } +func validateOpListPersonalAccessTokensInput(v *ListPersonalAccessTokensInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListPersonalAccessTokensInput"} + if v.OrganizationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListResourceDelegatesInput(v *ListResourceDelegatesInput) error { if v == nil { return nil @@ -3331,6 +3670,38 @@ func validateOpPutEmailMonitoringConfigurationInput(v *PutEmailMonitoringConfigu } } +func validateOpPutIdentityProviderConfigurationInput(v *PutIdentityProviderConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutIdentityProviderConfigurationInput"} + if v.OrganizationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) + } + if len(v.AuthenticationMode) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("AuthenticationMode")) + } + if v.IdentityCenterConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("IdentityCenterConfiguration")) + } else if v.IdentityCenterConfiguration != nil { + if err := validateIdentityCenterConfiguration(v.IdentityCenterConfiguration); err != nil { + invalidParams.AddNested("IdentityCenterConfiguration", err.(smithy.InvalidParamsError)) + } + } + if v.PersonalAccessTokenConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("PersonalAccessTokenConfiguration")) + } else if v.PersonalAccessTokenConfiguration != nil { + if err := validatePersonalAccessTokenConfiguration(v.PersonalAccessTokenConfiguration); err != nil { + invalidParams.AddNested("PersonalAccessTokenConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpPutInboundDmarcSettingsInput(v *PutInboundDmarcSettingsInput) error { if v == nil { return nil From afdb7851e1728df729436e90a5caec8671a13f6d Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Wed, 30 Oct 2024 18:30:48 +0000 Subject: [PATCH 9/9] Release 2024-10-30 --- .../07276b2f174548288189b6e70ea1da72.json | 8 ---- .../0ca78f87247d48e1809b75d2c574349a.json | 8 ---- .../24a9ea866b694eaebcfee3f4a6a55d8b.json | 8 ---- .../41575353444b40ffbf474f4155544f00.json | 10 ----- .../49c02c9c096549e987e4a093dc950820.json | 8 ---- .../60382073c4c947cd9700acdcdec81fad.json | 8 ---- .../69e55b9752c645a4adc0bacc5ef30913.json | 8 ---- .../9a64f03491324848a391306721e3ce4a.json | 8 ---- .../a078a7b84fb04122b666ee0d2d0a383f.json | 8 ---- .../accfb1ecff6549ceb46d1adba3e85595.json | 8 ---- .../b19af23f9bfb44028e0c1a16cf400e8a.json | 8 ---- .../b3fdaf9818da4d229146b744ec30a8a0.json | 8 ---- .../bbcdb2cb47da4a23bd0adaed6937b057.json | 8 ---- .../be705c9d73c64c88af65d015dcc71285.json | 8 ---- .../cf2a79e28f904882a8c59a5d7c29aa6f.json | 8 ---- .../d5bb2186ba7f49698f4073622ae7a019.json | 8 ---- .../d5bd7876a09e4bafa8a7750e83dca271.json | 8 ---- .../ea67cb4153e541b9b977dcdf5d077ab2.json | 8 ---- CHANGELOG.md | 41 +++++++++++++++++++ .../attributevalue/CHANGELOG.md | 4 ++ .../attributevalue/go_module_metadata.go | 2 +- service/appsync/CHANGELOG.md | 4 ++ service/appsync/go_module_metadata.go | 2 +- service/connect/CHANGELOG.md | 4 ++ service/connect/go_module_metadata.go | 2 +- service/datasync/CHANGELOG.md | 4 ++ service/datasync/go_module_metadata.go | 2 +- service/ec2/CHANGELOG.md | 4 ++ service/ec2/go_module_metadata.go | 2 +- service/ecs/CHANGELOG.md | 4 ++ service/ecs/go_module_metadata.go | 2 +- service/geomaps/CHANGELOG.md | 5 +++ service/geomaps/go_module_metadata.go | 2 +- service/geoplaces/CHANGELOG.md | 5 +++ service/geoplaces/go_module_metadata.go | 2 +- service/georoutes/CHANGELOG.md | 5 +++ service/georoutes/go_module_metadata.go | 2 +- service/internal/integrationtest/go.mod | 8 ++-- service/keyspaces/CHANGELOG.md | 4 ++ service/keyspaces/go_module_metadata.go | 2 +- service/memorydb/CHANGELOG.md | 4 ++ service/memorydb/go_module_metadata.go | 2 +- service/networkfirewall/CHANGELOG.md | 4 ++ service/networkfirewall/go_module_metadata.go | 2 +- service/opensearch/CHANGELOG.md | 4 ++ service/opensearch/go_module_metadata.go | 2 +- service/opensearchserverless/CHANGELOG.md | 4 ++ .../go_module_metadata.go | 2 +- service/redshift/CHANGELOG.md | 4 ++ service/redshift/go_module_metadata.go | 2 +- service/redshiftserverless/CHANGELOG.md | 4 ++ .../redshiftserverless/go_module_metadata.go | 2 +- service/route53/CHANGELOG.md | 4 ++ service/route53/go_module_metadata.go | 2 +- service/sagemaker/CHANGELOG.md | 4 ++ service/sagemaker/go_module_metadata.go | 2 +- service/workmail/CHANGELOG.md | 4 ++ service/workmail/go_module_metadata.go | 2 +- 58 files changed, 143 insertions(+), 169 deletions(-) delete mode 100644 .changelog/07276b2f174548288189b6e70ea1da72.json delete mode 100644 .changelog/0ca78f87247d48e1809b75d2c574349a.json delete mode 100644 .changelog/24a9ea866b694eaebcfee3f4a6a55d8b.json delete mode 100644 .changelog/41575353444b40ffbf474f4155544f00.json delete mode 100644 .changelog/49c02c9c096549e987e4a093dc950820.json delete mode 100644 .changelog/60382073c4c947cd9700acdcdec81fad.json delete mode 100644 .changelog/69e55b9752c645a4adc0bacc5ef30913.json delete mode 100644 .changelog/9a64f03491324848a391306721e3ce4a.json delete mode 100644 .changelog/a078a7b84fb04122b666ee0d2d0a383f.json delete mode 100644 .changelog/accfb1ecff6549ceb46d1adba3e85595.json delete mode 100644 .changelog/b19af23f9bfb44028e0c1a16cf400e8a.json delete mode 100644 .changelog/b3fdaf9818da4d229146b744ec30a8a0.json delete mode 100644 .changelog/bbcdb2cb47da4a23bd0adaed6937b057.json delete mode 100644 .changelog/be705c9d73c64c88af65d015dcc71285.json delete mode 100644 .changelog/cf2a79e28f904882a8c59a5d7c29aa6f.json delete mode 100644 .changelog/d5bb2186ba7f49698f4073622ae7a019.json delete mode 100644 .changelog/d5bd7876a09e4bafa8a7750e83dca271.json delete mode 100644 .changelog/ea67cb4153e541b9b977dcdf5d077ab2.json create mode 100644 service/geomaps/CHANGELOG.md create mode 100644 service/geoplaces/CHANGELOG.md create mode 100644 service/georoutes/CHANGELOG.md diff --git a/.changelog/07276b2f174548288189b6e70ea1da72.json b/.changelog/07276b2f174548288189b6e70ea1da72.json deleted file mode 100644 index 9ea8386559b..00000000000 --- a/.changelog/07276b2f174548288189b6e70ea1da72.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "07276b2f-1745-4828-8189-b6e70ea1da72", - "type": "feature", - "description": "Neo Integration via IAM Identity Center (IdC)", - "modules": [ - "service/opensearchserverless" - ] -} \ No newline at end of file diff --git a/.changelog/0ca78f87247d48e1809b75d2c574349a.json b/.changelog/0ca78f87247d48e1809b75d2c574349a.json deleted file mode 100644 index f328b3f470f..00000000000 --- a/.changelog/0ca78f87247d48e1809b75d2c574349a.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "0ca78f87-247d-48e1-809b-75d2c574349a", - "type": "feature", - "description": "Release of Amazon Location Maps API. Maps enables you to build digital maps that showcase your locations, visualize your data, and unlock insights to drive your business", - "modules": [ - "service/geomaps" - ] -} \ No newline at end of file diff --git a/.changelog/24a9ea866b694eaebcfee3f4a6a55d8b.json b/.changelog/24a9ea866b694eaebcfee3f4a6a55d8b.json deleted file mode 100644 index a2258dc2658..00000000000 --- a/.changelog/24a9ea866b694eaebcfee3f4a6a55d8b.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "24a9ea86-6b69-4eae-bcfe-e3f4a6a55d8b", - "type": "feature", - "description": "This release adds support for TLSA, SSHFP, SVCB, and HTTPS record types.", - "modules": [ - "service/route53" - ] -} \ No newline at end of file diff --git a/.changelog/41575353444b40ffbf474f4155544f00.json b/.changelog/41575353444b40ffbf474f4155544f00.json deleted file mode 100644 index 30f577bdcb1..00000000000 --- a/.changelog/41575353444b40ffbf474f4155544f00.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "41575353-444b-40ff-bf47-4f4155544f00", - "type": "release", - "description": "New AWS service client module", - "modules": [ - "service/geomaps", - "service/geoplaces", - "service/georoutes" - ] -} \ No newline at end of file diff --git a/.changelog/49c02c9c096549e987e4a093dc950820.json b/.changelog/49c02c9c096549e987e4a093dc950820.json deleted file mode 100644 index 6ee79ccd638..00000000000 --- a/.changelog/49c02c9c096549e987e4a093dc950820.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "49c02c9c-0965-49e9-87e4-a093dc950820", - "type": "feature", - "description": "Adds and updates API members for the Redshift Serverless AI-driven scaling and optimization feature using the price-performance target setting.", - "modules": [ - "service/redshiftserverless" - ] -} \ No newline at end of file diff --git a/.changelog/60382073c4c947cd9700acdcdec81fad.json b/.changelog/60382073c4c947cd9700acdcdec81fad.json deleted file mode 100644 index 4de8a228f1f..00000000000 --- a/.changelog/60382073c4c947cd9700acdcdec81fad.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "60382073-c4c9-47cd-9700-acdcdec81fad", - "type": "feature", - "description": "This release adds two new capabilities to VPC Security Groups: Security Group VPC Associations and Shared Security Groups.", - "modules": [ - "service/ec2" - ] -} \ No newline at end of file diff --git a/.changelog/69e55b9752c645a4adc0bacc5ef30913.json b/.changelog/69e55b9752c645a4adc0bacc5ef30913.json deleted file mode 100644 index 5b5c45c4301..00000000000 --- a/.changelog/69e55b9752c645a4adc0bacc5ef30913.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "69e55b97-52c6-45a4-adc0-bacc5ef30913", - "type": "feature", - "description": "Release of Amazon Location Places API. Places enables you to quickly search, display, and filter places, businesses, and locations based on proximity, category, and name", - "modules": [ - "service/geoplaces" - ] -} \ No newline at end of file diff --git a/.changelog/9a64f03491324848a391306721e3ce4a.json b/.changelog/9a64f03491324848a391306721e3ce4a.json deleted file mode 100644 index 6e017a60543..00000000000 --- a/.changelog/9a64f03491324848a391306721e3ce4a.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "9a64f034-9132-4848-a391-306721e3ce4a", - "type": "feature", - "description": "Release of Amazon Location Routes API. Routes enables you to plan efficient routes and streamline deliveries by leveraging real-time traffic, vehicle restrictions, and turn-by-turn directions.", - "modules": [ - "service/georoutes" - ] -} \ No newline at end of file diff --git a/.changelog/a078a7b84fb04122b666ee0d2d0a383f.json b/.changelog/a078a7b84fb04122b666ee0d2d0a383f.json deleted file mode 100644 index a1ad31e4072..00000000000 --- a/.changelog/a078a7b84fb04122b666ee0d2d0a383f.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "a078a7b8-4fb0-4122-b666-ee0d2d0a383f", - "type": "feature", - "description": "Adds support for interacting with user-defined types (UDTs) through the following new operations: Create-Type, Delete-Type, List-Types, Get-Type.", - "modules": [ - "service/keyspaces" - ] -} \ No newline at end of file diff --git a/.changelog/accfb1ecff6549ceb46d1adba3e85595.json b/.changelog/accfb1ecff6549ceb46d1adba3e85595.json deleted file mode 100644 index 988c0ab17de..00000000000 --- a/.changelog/accfb1ecff6549ceb46d1adba3e85595.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "accfb1ec-ff65-49ce-b46d-1adba3e85595", - "type": "feature", - "description": "AWS DataSync now supports Enhanced mode tasks. This task mode supports transfer of virtually unlimited numbers of objects with enhanced metrics, more detailed logs, and higher performance than Basic mode. This mode currently supports transfers between Amazon S3 locations.", - "modules": [ - "service/datasync" - ] -} \ No newline at end of file diff --git a/.changelog/b19af23f9bfb44028e0c1a16cf400e8a.json b/.changelog/b19af23f9bfb44028e0c1a16cf400e8a.json deleted file mode 100644 index 9c29a79c8d8..00000000000 --- a/.changelog/b19af23f9bfb44028e0c1a16cf400e8a.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "b19af23f-9bfb-4402-8e0c-1a16cf400e8a", - "type": "feature", - "description": "This release supports service deployments and service revisions which provide a comprehensive view of your Amazon ECS service history.", - "modules": [ - "service/ecs" - ] -} \ No newline at end of file diff --git a/.changelog/b3fdaf9818da4d229146b744ec30a8a0.json b/.changelog/b3fdaf9818da4d229146b744ec30a8a0.json deleted file mode 100644 index 8b651a0e5cf..00000000000 --- a/.changelog/b3fdaf9818da4d229146b744ec30a8a0.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "b3fdaf98-18da-4d22-9146-b744ec30a8a0", - "type": "feature", - "description": "Updated the public documentation for the UserIdentityInfo object to accurately reflect the character limits for the FirstName and LastName fields, which were previously listed as 1-100 characters.", - "modules": [ - "service/connect" - ] -} \ No newline at end of file diff --git a/.changelog/bbcdb2cb47da4a23bd0adaed6937b057.json b/.changelog/bbcdb2cb47da4a23bd0adaed6937b057.json deleted file mode 100644 index 6d038cf5203..00000000000 --- a/.changelog/bbcdb2cb47da4a23bd0adaed6937b057.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "bbcdb2cb-47da-4a23-bd0a-daed6937b057", - "type": "feature", - "description": "AWS Network Firewall now supports configuring TCP idle timeout", - "modules": [ - "service/networkfirewall" - ] -} \ No newline at end of file diff --git a/.changelog/be705c9d73c64c88af65d015dcc71285.json b/.changelog/be705c9d73c64c88af65d015dcc71285.json deleted file mode 100644 index 352f8e3826f..00000000000 --- a/.changelog/be705c9d73c64c88af65d015dcc71285.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "be705c9d-73c6-4c88-af65-d015dcc71285", - "type": "feature", - "description": "This release adds support for Multi-Factor Authentication (MFA) and Personal Access Tokens through integration with AWS IAM Identity Center.", - "modules": [ - "service/workmail" - ] -} \ No newline at end of file diff --git a/.changelog/cf2a79e28f904882a8c59a5d7c29aa6f.json b/.changelog/cf2a79e28f904882a8c59a5d7c29aa6f.json deleted file mode 100644 index d50ff90fd00..00000000000 --- a/.changelog/cf2a79e28f904882a8c59a5d7c29aa6f.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "cf2a79e2-8f90-4882-a8c5-9a5d7c29aa6f", - "type": "feature", - "description": "Added support for Model Registry Staging construct. Users can define series of stages that models can progress through for model workflows and lifecycle. This simplifies tracking and managing models as they transition through development, testing, and production stages.", - "modules": [ - "service/sagemaker" - ] -} \ No newline at end of file diff --git a/.changelog/d5bb2186ba7f49698f4073622ae7a019.json b/.changelog/d5bb2186ba7f49698f4073622ae7a019.json deleted file mode 100644 index 641d410e777..00000000000 --- a/.changelog/d5bb2186ba7f49698f4073622ae7a019.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "d5bb2186-ba7f-4969-8f40-73622ae7a019", - "type": "feature", - "description": "This release launches S3 event integrations to create and manage integrations from an Amazon S3 source into an Amazon Redshift database.", - "modules": [ - "service/redshift" - ] -} \ No newline at end of file diff --git a/.changelog/d5bd7876a09e4bafa8a7750e83dca271.json b/.changelog/d5bd7876a09e4bafa8a7750e83dca271.json deleted file mode 100644 index 7bc6e7b0d39..00000000000 --- a/.changelog/d5bd7876a09e4bafa8a7750e83dca271.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "d5bd7876-a09e-4baf-a8a7-750e83dca271", - "type": "feature", - "description": "This release introduces the new OpenSearch user interface (Dashboards), a new web-based application that can be associated with multiple data sources across OpenSearch managed clusters, serverless collections, and Amazon S3, so that users can gain a comprehensive insights in an unified interface.", - "modules": [ - "service/opensearch" - ] -} \ No newline at end of file diff --git a/.changelog/ea67cb4153e541b9b977dcdf5d077ab2.json b/.changelog/ea67cb4153e541b9b977dcdf5d077ab2.json deleted file mode 100644 index 46ea328aa94..00000000000 --- a/.changelog/ea67cb4153e541b9b977dcdf5d077ab2.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "ea67cb41-53e5-41b9-b977-dcdf5d077ab2", - "type": "feature", - "description": "This release adds support for AppSync Event APIs.", - "modules": [ - "service/appsync" - ] -} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 937f2e9908d..a1479b58f5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,44 @@ +# Release (2024-10-30) + +## Module Highlights +* `github.com/aws/aws-sdk-go-v2/service/appsync`: [v1.39.0](service/appsync/CHANGELOG.md#v1390-2024-10-30) + * **Feature**: This release adds support for AppSync Event APIs. +* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.115.0](service/connect/CHANGELOG.md#v11150-2024-10-30) + * **Feature**: Updated the public documentation for the UserIdentityInfo object to accurately reflect the character limits for the FirstName and LastName fields, which were previously listed as 1-100 characters. +* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.43.0](service/datasync/CHANGELOG.md#v1430-2024-10-30) + * **Feature**: AWS DataSync now supports Enhanced mode tasks. This task mode supports transfer of virtually unlimited numbers of objects with enhanced metrics, more detailed logs, and higher performance than Basic mode. This mode currently supports transfers between Amazon S3 locations. +* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.187.0](service/ec2/CHANGELOG.md#v11870-2024-10-30) + * **Feature**: This release adds two new capabilities to VPC Security Groups: Security Group VPC Associations and Shared Security Groups. +* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.49.0](service/ecs/CHANGELOG.md#v1490-2024-10-30) + * **Feature**: This release supports service deployments and service revisions which provide a comprehensive view of your Amazon ECS service history. +* `github.com/aws/aws-sdk-go-v2/service/geomaps`: [v1.0.0](service/geomaps/CHANGELOG.md#v100-2024-10-30) + * **Release**: New AWS service client module + * **Feature**: Release of Amazon Location Maps API. Maps enables you to build digital maps that showcase your locations, visualize your data, and unlock insights to drive your business +* `github.com/aws/aws-sdk-go-v2/service/geoplaces`: [v1.0.0](service/geoplaces/CHANGELOG.md#v100-2024-10-30) + * **Release**: New AWS service client module + * **Feature**: Release of Amazon Location Places API. Places enables you to quickly search, display, and filter places, businesses, and locations based on proximity, category, and name +* `github.com/aws/aws-sdk-go-v2/service/georoutes`: [v1.0.0](service/georoutes/CHANGELOG.md#v100-2024-10-30) + * **Release**: New AWS service client module + * **Feature**: Release of Amazon Location Routes API. Routes enables you to plan efficient routes and streamline deliveries by leveraging real-time traffic, vehicle restrictions, and turn-by-turn directions. +* `github.com/aws/aws-sdk-go-v2/service/keyspaces`: [v1.15.0](service/keyspaces/CHANGELOG.md#v1150-2024-10-30) + * **Feature**: Adds support for interacting with user-defined types (UDTs) through the following new operations: Create-Type, Delete-Type, List-Types, Get-Type. +* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.44.0](service/networkfirewall/CHANGELOG.md#v1440-2024-10-30) + * **Feature**: AWS Network Firewall now supports configuring TCP idle timeout +* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.43.0](service/opensearch/CHANGELOG.md#v1430-2024-10-30) + * **Feature**: This release introduces the new OpenSearch user interface (Dashboards), a new web-based application that can be associated with multiple data sources across OpenSearch managed clusters, serverless collections, and Amazon S3, so that users can gain a comprehensive insights in an unified interface. +* `github.com/aws/aws-sdk-go-v2/service/opensearchserverless`: [v1.17.0](service/opensearchserverless/CHANGELOG.md#v1170-2024-10-30) + * **Feature**: Neo Integration via IAM Identity Center (IdC) +* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.51.0](service/redshift/CHANGELOG.md#v1510-2024-10-30) + * **Feature**: This release launches S3 event integrations to create and manage integrations from an Amazon S3 source into an Amazon Redshift database. +* `github.com/aws/aws-sdk-go-v2/service/redshiftserverless`: [v1.24.0](service/redshiftserverless/CHANGELOG.md#v1240-2024-10-30) + * **Feature**: Adds and updates API members for the Redshift Serverless AI-driven scaling and optimization feature using the price-performance target setting. +* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.46.0](service/route53/CHANGELOG.md#v1460-2024-10-30) + * **Feature**: This release adds support for TLSA, SSHFP, SVCB, and HTTPS record types. +* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.165.0](service/sagemaker/CHANGELOG.md#v11650-2024-10-30) + * **Feature**: Added support for Model Registry Staging construct. Users can define series of stages that models can progress through for model workflows and lifecycle. This simplifies tracking and managing models as they transition through development, testing, and production stages. +* `github.com/aws/aws-sdk-go-v2/service/workmail`: [v1.30.0](service/workmail/CHANGELOG.md#v1300-2024-10-30) + * **Feature**: This release adds support for Multi-Factor Authentication (MFA) and Personal Access Tokens through integration with AWS IAM Identity Center. + # Release (2024-10-29) ## Module Highlights diff --git a/feature/dynamodbstreams/attributevalue/CHANGELOG.md b/feature/dynamodbstreams/attributevalue/CHANGELOG.md index 2ba3e00a04f..b128de609ce 100644 --- a/feature/dynamodbstreams/attributevalue/CHANGELOG.md +++ b/feature/dynamodbstreams/attributevalue/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.14.46 (2024-10-30) + +* No change notes available for this release. + # v1.14.45 (2024-10-29) * No change notes available for this release. diff --git a/feature/dynamodbstreams/attributevalue/go_module_metadata.go b/feature/dynamodbstreams/attributevalue/go_module_metadata.go index 04358c081d7..efe4243cb7a 100644 --- a/feature/dynamodbstreams/attributevalue/go_module_metadata.go +++ b/feature/dynamodbstreams/attributevalue/go_module_metadata.go @@ -3,4 +3,4 @@ package attributevalue // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.15.13" +const goModuleVersion = "1.14.46" diff --git a/service/appsync/CHANGELOG.md b/service/appsync/CHANGELOG.md index 7b544464829..64c1e4e671c 100644 --- a/service/appsync/CHANGELOG.md +++ b/service/appsync/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.39.0 (2024-10-30) + +* **Feature**: This release adds support for AppSync Event APIs. + # v1.38.3 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/appsync/go_module_metadata.go b/service/appsync/go_module_metadata.go index d17def01468..8a6f7b66f16 100644 --- a/service/appsync/go_module_metadata.go +++ b/service/appsync/go_module_metadata.go @@ -3,4 +3,4 @@ package appsync // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.38.3" +const goModuleVersion = "1.39.0" diff --git a/service/connect/CHANGELOG.md b/service/connect/CHANGELOG.md index a164bb9b867..10264ad0f80 100644 --- a/service/connect/CHANGELOG.md +++ b/service/connect/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.115.0 (2024-10-30) + +* **Feature**: Updated the public documentation for the UserIdentityInfo object to accurately reflect the character limits for the FirstName and LastName fields, which were previously listed as 1-100 characters. + # v1.114.1 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/connect/go_module_metadata.go b/service/connect/go_module_metadata.go index e3915550719..1802595ef0e 100644 --- a/service/connect/go_module_metadata.go +++ b/service/connect/go_module_metadata.go @@ -3,4 +3,4 @@ package connect // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.114.1" +const goModuleVersion = "1.115.0" diff --git a/service/datasync/CHANGELOG.md b/service/datasync/CHANGELOG.md index 720d0efa5ed..426b0765a49 100644 --- a/service/datasync/CHANGELOG.md +++ b/service/datasync/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.43.0 (2024-10-30) + +* **Feature**: AWS DataSync now supports Enhanced mode tasks. This task mode supports transfer of virtually unlimited numbers of objects with enhanced metrics, more detailed logs, and higher performance than Basic mode. This mode currently supports transfers between Amazon S3 locations. + # v1.42.3 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/datasync/go_module_metadata.go b/service/datasync/go_module_metadata.go index 4e83375bdc6..1b6376fb8f7 100644 --- a/service/datasync/go_module_metadata.go +++ b/service/datasync/go_module_metadata.go @@ -3,4 +3,4 @@ package datasync // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.42.3" +const goModuleVersion = "1.43.0" diff --git a/service/ec2/CHANGELOG.md b/service/ec2/CHANGELOG.md index b2b5de93c45..1e3ea8d6169 100644 --- a/service/ec2/CHANGELOG.md +++ b/service/ec2/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.187.0 (2024-10-30) + +* **Feature**: This release adds two new capabilities to VPC Security Groups: Security Group VPC Associations and Shared Security Groups. + # v1.186.1 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/ec2/go_module_metadata.go b/service/ec2/go_module_metadata.go index 62445285a74..5776cbbdce0 100644 --- a/service/ec2/go_module_metadata.go +++ b/service/ec2/go_module_metadata.go @@ -3,4 +3,4 @@ package ec2 // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.186.1" +const goModuleVersion = "1.187.0" diff --git a/service/ecs/CHANGELOG.md b/service/ecs/CHANGELOG.md index 4baf6baf230..2df456c5bf0 100644 --- a/service/ecs/CHANGELOG.md +++ b/service/ecs/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.49.0 (2024-10-30) + +* **Feature**: This release supports service deployments and service revisions which provide a comprehensive view of your Amazon ECS service history. + # v1.48.1 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/ecs/go_module_metadata.go b/service/ecs/go_module_metadata.go index 903a82b4722..8393a431ebe 100644 --- a/service/ecs/go_module_metadata.go +++ b/service/ecs/go_module_metadata.go @@ -3,4 +3,4 @@ package ecs // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.48.1" +const goModuleVersion = "1.49.0" diff --git a/service/geomaps/CHANGELOG.md b/service/geomaps/CHANGELOG.md new file mode 100644 index 00000000000..e166a2eff3b --- /dev/null +++ b/service/geomaps/CHANGELOG.md @@ -0,0 +1,5 @@ +# v1.0.0 (2024-10-30) + +* **Release**: New AWS service client module +* **Feature**: Release of Amazon Location Maps API. Maps enables you to build digital maps that showcase your locations, visualize your data, and unlock insights to drive your business + diff --git a/service/geomaps/go_module_metadata.go b/service/geomaps/go_module_metadata.go index e025513811c..238c5c5bb6a 100644 --- a/service/geomaps/go_module_metadata.go +++ b/service/geomaps/go_module_metadata.go @@ -3,4 +3,4 @@ package geomaps // goModuleVersion is the tagged release for this module -const goModuleVersion = "tip" +const goModuleVersion = "1.0.0" diff --git a/service/geoplaces/CHANGELOG.md b/service/geoplaces/CHANGELOG.md new file mode 100644 index 00000000000..a50011542ae --- /dev/null +++ b/service/geoplaces/CHANGELOG.md @@ -0,0 +1,5 @@ +# v1.0.0 (2024-10-30) + +* **Release**: New AWS service client module +* **Feature**: Release of Amazon Location Places API. Places enables you to quickly search, display, and filter places, businesses, and locations based on proximity, category, and name + diff --git a/service/geoplaces/go_module_metadata.go b/service/geoplaces/go_module_metadata.go index 2c33a86d19d..5f4a16be5e1 100644 --- a/service/geoplaces/go_module_metadata.go +++ b/service/geoplaces/go_module_metadata.go @@ -3,4 +3,4 @@ package geoplaces // goModuleVersion is the tagged release for this module -const goModuleVersion = "tip" +const goModuleVersion = "1.0.0" diff --git a/service/georoutes/CHANGELOG.md b/service/georoutes/CHANGELOG.md new file mode 100644 index 00000000000..44823fc45eb --- /dev/null +++ b/service/georoutes/CHANGELOG.md @@ -0,0 +1,5 @@ +# v1.0.0 (2024-10-30) + +* **Release**: New AWS service client module +* **Feature**: Release of Amazon Location Routes API. Routes enables you to plan efficient routes and streamline deliveries by leveraging real-time traffic, vehicle restrictions, and turn-by-turn directions. + diff --git a/service/georoutes/go_module_metadata.go b/service/georoutes/go_module_metadata.go index 301cd59a6c3..d446676a980 100644 --- a/service/georoutes/go_module_metadata.go +++ b/service/georoutes/go_module_metadata.go @@ -3,4 +3,4 @@ package georoutes // goModuleVersion is the tagged release for this module -const goModuleVersion = "tip" +const goModuleVersion = "1.0.0" diff --git a/service/internal/integrationtest/go.mod b/service/internal/integrationtest/go.mod index 907bdf2d1c5..87c5b3b83bb 100644 --- a/service/internal/integrationtest/go.mod +++ b/service/internal/integrationtest/go.mod @@ -29,9 +29,9 @@ require ( github.com/aws/aws-sdk-go-v2/service/directoryservice v1.30.3 github.com/aws/aws-sdk-go-v2/service/docdb v1.39.3 github.com/aws/aws-sdk-go-v2/service/dynamodb v1.36.3 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.186.1 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.187.0 github.com/aws/aws-sdk-go-v2/service/ecr v1.36.3 - github.com/aws/aws-sdk-go-v2/service/ecs v1.48.1 + github.com/aws/aws-sdk-go-v2/service/ecs v1.49.0 github.com/aws/aws-sdk-go-v2/service/efs v1.33.3 github.com/aws/aws-sdk-go-v2/service/elasticache v1.43.1 github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk v1.28.3 @@ -58,9 +58,9 @@ require ( github.com/aws/aws-sdk-go-v2/service/pinpointemail v1.23.3 github.com/aws/aws-sdk-go-v2/service/polly v1.45.3 github.com/aws/aws-sdk-go-v2/service/rds v1.89.0 - github.com/aws/aws-sdk-go-v2/service/redshift v1.50.1 + github.com/aws/aws-sdk-go-v2/service/redshift v1.51.0 github.com/aws/aws-sdk-go-v2/service/rekognition v1.45.3 - github.com/aws/aws-sdk-go-v2/service/route53 v1.45.3 + github.com/aws/aws-sdk-go-v2/service/route53 v1.46.0 github.com/aws/aws-sdk-go-v2/service/route53domains v1.27.3 github.com/aws/aws-sdk-go-v2/service/route53resolver v1.33.1 github.com/aws/aws-sdk-go-v2/service/s3 v1.66.2 diff --git a/service/keyspaces/CHANGELOG.md b/service/keyspaces/CHANGELOG.md index e7e79c1f121..8866c2c0217 100644 --- a/service/keyspaces/CHANGELOG.md +++ b/service/keyspaces/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.15.0 (2024-10-30) + +* **Feature**: Adds support for interacting with user-defined types (UDTs) through the following new operations: Create-Type, Delete-Type, List-Types, Get-Type. + # v1.14.3 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/keyspaces/go_module_metadata.go b/service/keyspaces/go_module_metadata.go index e731aa48a34..391ccadaa4f 100644 --- a/service/keyspaces/go_module_metadata.go +++ b/service/keyspaces/go_module_metadata.go @@ -3,4 +3,4 @@ package keyspaces // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.14.3" +const goModuleVersion = "1.15.0" diff --git a/service/memorydb/CHANGELOG.md b/service/memorydb/CHANGELOG.md index 9e65e858fc3..a731c8cea15 100644 --- a/service/memorydb/CHANGELOG.md +++ b/service/memorydb/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.24.2 (2024-10-30) + +* No change notes available for this release. + # v1.24.1 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/memorydb/go_module_metadata.go b/service/memorydb/go_module_metadata.go index 6171e1d35bf..c3c7a1d3604 100644 --- a/service/memorydb/go_module_metadata.go +++ b/service/memorydb/go_module_metadata.go @@ -3,4 +3,4 @@ package memorydb // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.24.1" +const goModuleVersion = "1.24.2" diff --git a/service/networkfirewall/CHANGELOG.md b/service/networkfirewall/CHANGELOG.md index e3d039263cc..fbea4477607 100644 --- a/service/networkfirewall/CHANGELOG.md +++ b/service/networkfirewall/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.44.0 (2024-10-30) + +* **Feature**: AWS Network Firewall now supports configuring TCP idle timeout + # v1.43.3 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/networkfirewall/go_module_metadata.go b/service/networkfirewall/go_module_metadata.go index 051e4119e00..91a3d864271 100644 --- a/service/networkfirewall/go_module_metadata.go +++ b/service/networkfirewall/go_module_metadata.go @@ -3,4 +3,4 @@ package networkfirewall // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.43.3" +const goModuleVersion = "1.44.0" diff --git a/service/opensearch/CHANGELOG.md b/service/opensearch/CHANGELOG.md index 2eb279eb97e..e32485f78da 100644 --- a/service/opensearch/CHANGELOG.md +++ b/service/opensearch/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.43.0 (2024-10-30) + +* **Feature**: This release introduces the new OpenSearch user interface (Dashboards), a new web-based application that can be associated with multiple data sources across OpenSearch managed clusters, serverless collections, and Amazon S3, so that users can gain a comprehensive insights in an unified interface. + # v1.42.0 (2024-10-28) * **Feature**: Adds support for provisioning dedicated coordinator nodes. Coordinator nodes can be specified using the new NodeOptions parameter in ClusterConfig. diff --git a/service/opensearch/go_module_metadata.go b/service/opensearch/go_module_metadata.go index d4820b31c26..301daa6c07f 100644 --- a/service/opensearch/go_module_metadata.go +++ b/service/opensearch/go_module_metadata.go @@ -3,4 +3,4 @@ package opensearch // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.42.0" +const goModuleVersion = "1.43.0" diff --git a/service/opensearchserverless/CHANGELOG.md b/service/opensearchserverless/CHANGELOG.md index 35a83354944..4b3960e3aab 100644 --- a/service/opensearchserverless/CHANGELOG.md +++ b/service/opensearchserverless/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.17.0 (2024-10-30) + +* **Feature**: Neo Integration via IAM Identity Center (IdC) + # v1.16.3 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/opensearchserverless/go_module_metadata.go b/service/opensearchserverless/go_module_metadata.go index e7a3d90ceb2..3f304d5322c 100644 --- a/service/opensearchserverless/go_module_metadata.go +++ b/service/opensearchserverless/go_module_metadata.go @@ -3,4 +3,4 @@ package opensearchserverless // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.16.3" +const goModuleVersion = "1.17.0" diff --git a/service/redshift/CHANGELOG.md b/service/redshift/CHANGELOG.md index b557a7ec353..89f75cc555f 100644 --- a/service/redshift/CHANGELOG.md +++ b/service/redshift/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.51.0 (2024-10-30) + +* **Feature**: This release launches S3 event integrations to create and manage integrations from an Amazon S3 source into an Amazon Redshift database. + # v1.50.1 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/redshift/go_module_metadata.go b/service/redshift/go_module_metadata.go index 1e1b63f4d4e..c8f0e6b5683 100644 --- a/service/redshift/go_module_metadata.go +++ b/service/redshift/go_module_metadata.go @@ -3,4 +3,4 @@ package redshift // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.50.1" +const goModuleVersion = "1.51.0" diff --git a/service/redshiftserverless/CHANGELOG.md b/service/redshiftserverless/CHANGELOG.md index e92de2c54a9..2e08ee65049 100644 --- a/service/redshiftserverless/CHANGELOG.md +++ b/service/redshiftserverless/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.24.0 (2024-10-30) + +* **Feature**: Adds and updates API members for the Redshift Serverless AI-driven scaling and optimization feature using the price-performance target setting. + # v1.23.4 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/redshiftserverless/go_module_metadata.go b/service/redshiftserverless/go_module_metadata.go index 5263684f1c8..463e061b5b6 100644 --- a/service/redshiftserverless/go_module_metadata.go +++ b/service/redshiftserverless/go_module_metadata.go @@ -3,4 +3,4 @@ package redshiftserverless // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.23.4" +const goModuleVersion = "1.24.0" diff --git a/service/route53/CHANGELOG.md b/service/route53/CHANGELOG.md index a16076ff2d4..d3f0417d749 100644 --- a/service/route53/CHANGELOG.md +++ b/service/route53/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.46.0 (2024-10-30) + +* **Feature**: This release adds support for TLSA, SSHFP, SVCB, and HTTPS record types. + # v1.45.3 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/route53/go_module_metadata.go b/service/route53/go_module_metadata.go index 36949b00d95..cc9fff37f27 100644 --- a/service/route53/go_module_metadata.go +++ b/service/route53/go_module_metadata.go @@ -3,4 +3,4 @@ package route53 // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.45.3" +const goModuleVersion = "1.46.0" diff --git a/service/sagemaker/CHANGELOG.md b/service/sagemaker/CHANGELOG.md index 2d3a6fa4fd0..5587400490c 100644 --- a/service/sagemaker/CHANGELOG.md +++ b/service/sagemaker/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.165.0 (2024-10-30) + +* **Feature**: Added support for Model Registry Staging construct. Users can define series of stages that models can progress through for model workflows and lifecycle. This simplifies tracking and managing models as they transition through development, testing, and production stages. + # v1.164.0 (2024-10-29) * **Feature**: Adding `notebook-al2-v3` as allowed value to SageMaker NotebookInstance PlatformIdentifier attribute diff --git a/service/sagemaker/go_module_metadata.go b/service/sagemaker/go_module_metadata.go index 023a48008a1..5fa4c61e139 100644 --- a/service/sagemaker/go_module_metadata.go +++ b/service/sagemaker/go_module_metadata.go @@ -3,4 +3,4 @@ package sagemaker // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.164.0" +const goModuleVersion = "1.165.0" diff --git a/service/workmail/CHANGELOG.md b/service/workmail/CHANGELOG.md index a633ade79d6..661cee16aca 100644 --- a/service/workmail/CHANGELOG.md +++ b/service/workmail/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.30.0 (2024-10-30) + +* **Feature**: This release adds support for Multi-Factor Authentication (MFA) and Personal Access Tokens through integration with AWS IAM Identity Center. + # v1.29.3 (2024-10-28) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/service/workmail/go_module_metadata.go b/service/workmail/go_module_metadata.go index 25692044048..3c30b96a52d 100644 --- a/service/workmail/go_module_metadata.go +++ b/service/workmail/go_module_metadata.go @@ -3,4 +3,4 @@ package workmail // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.29.3" +const goModuleVersion = "1.30.0"