From 40ddb76e611944643404e79a6b92ac335f2921f2 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Wed, 29 Jan 2025 20:00:20 +0000 Subject: [PATCH] Regenerated Clients --- .../00ac81b1d0cd402397bc27c4f8e37710.json | 8 + .../2e4dd529d6124aae824925eae8503164.json | 8 + .../3830f79a691e43d69188bfa3cb3edc63.json | 8 + .../9a2c60342de54dd295a09296c9d86098.json | 8 + .../d6fbd7f4860b4ea091c90868ce81e0ff.json | 8 + .../fd18d03cb07e4b76a70a1549dec956af.json | 8 + ...reateBillScenarioCommitmentModification.go | 5 + ...atchCreateBillScenarioUsageModification.go | 5 + ...api_op_BatchCreateWorkloadEstimateUsage.go | 5 + ...eleteBillScenarioCommitmentModification.go | 5 + ...atchDeleteBillScenarioUsageModification.go | 5 + ...api_op_BatchDeleteWorkloadEstimateUsage.go | 5 + ...pdateBillScenarioCommitmentModification.go | 5 + ...atchUpdateBillScenarioUsageModification.go | 5 + ...api_op_BatchUpdateWorkloadEstimateUsage.go | 5 + .../api_op_ListBillEstimates.go | 4 +- .../api_op_ListBillScenarios.go | 4 +- .../api_op_ListWorkloadEstimates.go | 4 +- service/bcmpricingcalculator/deserializers.go | 15 + service/ecr/endpoints.go | 95 + service/ecr/endpoints_test.go | 1977 +++++++- service/ecrpublic/endpoints.go | 19 + service/ecrpublic/endpoints_test.go | 109 +- .../mailmanager/api_op_CreateAddressList.go | 203 + .../api_op_CreateAddressListImportJob.go | 214 + .../mailmanager/api_op_DeleteAddressList.go | 152 + .../api_op_DeregisterMemberFromAddressList.go | 157 + service/mailmanager/api_op_GetAddressList.go | 179 + .../api_op_GetAddressListImportJob.go | 205 + .../api_op_GetMemberOfAddressList.go | 169 + .../api_op_ListAddressListImportJobs.go | 268 ++ .../mailmanager/api_op_ListAddressLists.go | 258 ++ .../api_op_ListMembersOfAddressList.go | 271 ++ .../api_op_RegisterMemberToAddressList.go | 157 + .../api_op_StartAddressListImportJob.go | 152 + .../api_op_StopAddressListImportJob.go | 152 + service/mailmanager/deserializers.go | 3982 ++++++++++++++--- service/mailmanager/generated.json | 13 + service/mailmanager/serializers.go | 1441 +++++- .../snapshot/api_op_CreateAddressList.go.snap | 42 + .../api_op_CreateAddressListImportJob.go.snap | 42 + .../snapshot/api_op_DeleteAddressList.go.snap | 41 + ...op_DeregisterMemberFromAddressList.go.snap | 41 + .../snapshot/api_op_GetAddressList.go.snap | 41 + .../api_op_GetAddressListImportJob.go.snap | 41 + .../api_op_GetMemberOfAddressList.go.snap | 41 + .../api_op_ListAddressListImportJobs.go.snap | 41 + .../snapshot/api_op_ListAddressLists.go.snap | 40 + .../api_op_ListMembersOfAddressList.go.snap | 41 + ...api_op_RegisterMemberToAddressList.go.snap | 41 + .../api_op_StartAddressListImportJob.go.snap | 41 + .../api_op_StopAddressListImportJob.go.snap | 41 + service/mailmanager/snapshot_test.go | 312 ++ service/mailmanager/types/enums.go | 90 + service/mailmanager/types/types.go | 185 + .../mailmanager/types/types_exported_test.go | 8 + service/mailmanager/validators.go | 571 +++ service/s3/api_op_CompleteMultipartUpload.go | 2 +- service/s3/serializers.go | 2 +- .../api_op_GetMedicalScribeStream.go | 160 + .../api_op_StartMedicalScribeStream.go | 396 ++ service/transcribestreaming/deserializers.go | 3129 +++++++++---- service/transcribestreaming/doc.go | 8 +- service/transcribestreaming/eventstream.go | 500 +++ service/transcribestreaming/generated.json | 2 + service/transcribestreaming/serializers.go | 367 ++ .../api_op_GetMedicalScribeStream.go.snap | 41 + .../api_op_StartMedicalScribeStream.go.snap | 42 + service/transcribestreaming/snapshot_test.go | 48 + service/transcribestreaming/types/enums.go | 163 + service/transcribestreaming/types/errors.go | 26 + service/transcribestreaming/types/types.go | 514 ++- .../types/types_exported_test.go | 44 + service/transcribestreaming/validators.go | 256 ++ 74 files changed, 15912 insertions(+), 1781 deletions(-) create mode 100644 .changelog/00ac81b1d0cd402397bc27c4f8e37710.json create mode 100644 .changelog/2e4dd529d6124aae824925eae8503164.json create mode 100644 .changelog/3830f79a691e43d69188bfa3cb3edc63.json create mode 100644 .changelog/9a2c60342de54dd295a09296c9d86098.json create mode 100644 .changelog/d6fbd7f4860b4ea091c90868ce81e0ff.json create mode 100644 .changelog/fd18d03cb07e4b76a70a1549dec956af.json create mode 100644 service/mailmanager/api_op_CreateAddressList.go create mode 100644 service/mailmanager/api_op_CreateAddressListImportJob.go create mode 100644 service/mailmanager/api_op_DeleteAddressList.go create mode 100644 service/mailmanager/api_op_DeregisterMemberFromAddressList.go create mode 100644 service/mailmanager/api_op_GetAddressList.go create mode 100644 service/mailmanager/api_op_GetAddressListImportJob.go create mode 100644 service/mailmanager/api_op_GetMemberOfAddressList.go create mode 100644 service/mailmanager/api_op_ListAddressListImportJobs.go create mode 100644 service/mailmanager/api_op_ListAddressLists.go create mode 100644 service/mailmanager/api_op_ListMembersOfAddressList.go create mode 100644 service/mailmanager/api_op_RegisterMemberToAddressList.go create mode 100644 service/mailmanager/api_op_StartAddressListImportJob.go create mode 100644 service/mailmanager/api_op_StopAddressListImportJob.go create mode 100644 service/mailmanager/snapshot/api_op_CreateAddressList.go.snap create mode 100644 service/mailmanager/snapshot/api_op_CreateAddressListImportJob.go.snap create mode 100644 service/mailmanager/snapshot/api_op_DeleteAddressList.go.snap create mode 100644 service/mailmanager/snapshot/api_op_DeregisterMemberFromAddressList.go.snap create mode 100644 service/mailmanager/snapshot/api_op_GetAddressList.go.snap create mode 100644 service/mailmanager/snapshot/api_op_GetAddressListImportJob.go.snap create mode 100644 service/mailmanager/snapshot/api_op_GetMemberOfAddressList.go.snap create mode 100644 service/mailmanager/snapshot/api_op_ListAddressListImportJobs.go.snap create mode 100644 service/mailmanager/snapshot/api_op_ListAddressLists.go.snap create mode 100644 service/mailmanager/snapshot/api_op_ListMembersOfAddressList.go.snap create mode 100644 service/mailmanager/snapshot/api_op_RegisterMemberToAddressList.go.snap create mode 100644 service/mailmanager/snapshot/api_op_StartAddressListImportJob.go.snap create mode 100644 service/mailmanager/snapshot/api_op_StopAddressListImportJob.go.snap create mode 100644 service/transcribestreaming/api_op_GetMedicalScribeStream.go create mode 100644 service/transcribestreaming/api_op_StartMedicalScribeStream.go create mode 100644 service/transcribestreaming/snapshot/api_op_GetMedicalScribeStream.go.snap create mode 100644 service/transcribestreaming/snapshot/api_op_StartMedicalScribeStream.go.snap diff --git a/.changelog/00ac81b1d0cd402397bc27c4f8e37710.json b/.changelog/00ac81b1d0cd402397bc27c4f8e37710.json new file mode 100644 index 00000000000..d90ef107dc6 --- /dev/null +++ b/.changelog/00ac81b1d0cd402397bc27c4f8e37710.json @@ -0,0 +1,8 @@ +{ + "id": "00ac81b1-d0cd-4023-97bc-27c4f8e37710", + "type": "feature", + "description": "Add support for Dualstack Endpoints", + "modules": [ + "service/ecrpublic" + ] +} \ No newline at end of file diff --git a/.changelog/2e4dd529d6124aae824925eae8503164.json b/.changelog/2e4dd529d6124aae824925eae8503164.json new file mode 100644 index 00000000000..23b30a868ee --- /dev/null +++ b/.changelog/2e4dd529d6124aae824925eae8503164.json @@ -0,0 +1,8 @@ +{ + "id": "2e4dd529-d612-4aae-8249-25eae8503164", + "type": "feature", + "description": "This release adds support for AWS HealthScribe Streaming APIs within Amazon Transcribe.", + "modules": [ + "service/transcribestreaming" + ] +} \ No newline at end of file diff --git a/.changelog/3830f79a691e43d69188bfa3cb3edc63.json b/.changelog/3830f79a691e43d69188bfa3cb3edc63.json new file mode 100644 index 00000000000..d075e70e06a --- /dev/null +++ b/.changelog/3830f79a691e43d69188bfa3cb3edc63.json @@ -0,0 +1,8 @@ +{ + "id": "3830f79a-691e-43d6-9188-bfa3cb3edc63", + "type": "feature", + "description": "Change the type of MpuObjectSize in CompleteMultipartUploadRequest from int to long.", + "modules": [ + "service/s3" + ] +} \ No newline at end of file diff --git a/.changelog/9a2c60342de54dd295a09296c9d86098.json b/.changelog/9a2c60342de54dd295a09296c9d86098.json new file mode 100644 index 00000000000..e14291349d5 --- /dev/null +++ b/.changelog/9a2c60342de54dd295a09296c9d86098.json @@ -0,0 +1,8 @@ +{ + "id": "9a2c6034-2de5-4dd2-95a0-9296c9d86098", + "type": "feature", + "description": "Add support for Dualstack and Dualstack-with-FIPS Endpoints", + "modules": [ + "service/ecr" + ] +} \ No newline at end of file diff --git a/.changelog/d6fbd7f4860b4ea091c90868ce81e0ff.json b/.changelog/d6fbd7f4860b4ea091c90868ce81e0ff.json new file mode 100644 index 00000000000..671c9ac94b7 --- /dev/null +++ b/.changelog/d6fbd7f4860b4ea091c90868ce81e0ff.json @@ -0,0 +1,8 @@ +{ + "id": "d6fbd7f4-860b-4ea0-91c9-0868ce81e0ff", + "type": "feature", + "description": "Added ConflictException error type in DeleteBillScenario, BatchDeleteBillScenarioCommitmentModification, BatchDeleteBillScenarioUsageModification, BatchUpdateBillScenarioUsageModification, and BatchUpdateBillScenarioCommitmentModification API operations.", + "modules": [ + "service/bcmpricingcalculator" + ] +} \ No newline at end of file diff --git a/.changelog/fd18d03cb07e4b76a70a1549dec956af.json b/.changelog/fd18d03cb07e4b76a70a1549dec956af.json new file mode 100644 index 00000000000..81ab90763bc --- /dev/null +++ b/.changelog/fd18d03cb07e4b76a70a1549dec956af.json @@ -0,0 +1,8 @@ +{ + "id": "fd18d03c-b07e-4b76-a70a-1549dec956af", + "type": "feature", + "description": "This release includes a new feature for Amazon SES Mail Manager which allows customers to specify known addresses and domains and make use of those in traffic policies and rules actions to distinguish between known and unknown entries.", + "modules": [ + "service/mailmanager" + ] +} \ No newline at end of file diff --git a/service/bcmpricingcalculator/api_op_BatchCreateBillScenarioCommitmentModification.go b/service/bcmpricingcalculator/api_op_BatchCreateBillScenarioCommitmentModification.go index 655d6579b1b..a27beb4614c 100644 --- a/service/bcmpricingcalculator/api_op_BatchCreateBillScenarioCommitmentModification.go +++ b/service/bcmpricingcalculator/api_op_BatchCreateBillScenarioCommitmentModification.go @@ -14,6 +14,11 @@ import ( // Create Compute Savings Plans, EC2 Instance Savings Plans, or EC2 Reserved // // Instances commitments that you want to model in a Bill Scenario. +// +// The BatchCreateBillScenarioCommitmentModification operation doesn't have its +// own IAM permission. To authorize this operation for Amazon Web Services +// principals, include the permission +// bcm-pricing-calculator:CreateBillScenarioCommitmentModification in your policies. func (c *Client) BatchCreateBillScenarioCommitmentModification(ctx context.Context, params *BatchCreateBillScenarioCommitmentModificationInput, optFns ...func(*Options)) (*BatchCreateBillScenarioCommitmentModificationOutput, error) { if params == nil { params = &BatchCreateBillScenarioCommitmentModificationInput{} diff --git a/service/bcmpricingcalculator/api_op_BatchCreateBillScenarioUsageModification.go b/service/bcmpricingcalculator/api_op_BatchCreateBillScenarioUsageModification.go index 1f94c4562ad..bf80bd501e1 100644 --- a/service/bcmpricingcalculator/api_op_BatchCreateBillScenarioUsageModification.go +++ b/service/bcmpricingcalculator/api_op_BatchCreateBillScenarioUsageModification.go @@ -14,6 +14,11 @@ import ( // Create Amazon Web Services service usage that you want to model in a Bill // // Scenario. +// +// The BatchCreateBillScenarioUsageModification operation doesn't have its own IAM +// permission. To authorize this operation for Amazon Web Services principals, +// include the permission +// bcm-pricing-calculator:CreateBillScenarioUsageModification in your policies. func (c *Client) BatchCreateBillScenarioUsageModification(ctx context.Context, params *BatchCreateBillScenarioUsageModificationInput, optFns ...func(*Options)) (*BatchCreateBillScenarioUsageModificationOutput, error) { if params == nil { params = &BatchCreateBillScenarioUsageModificationInput{} diff --git a/service/bcmpricingcalculator/api_op_BatchCreateWorkloadEstimateUsage.go b/service/bcmpricingcalculator/api_op_BatchCreateWorkloadEstimateUsage.go index c0240f90194..997d4bd8f5c 100644 --- a/service/bcmpricingcalculator/api_op_BatchCreateWorkloadEstimateUsage.go +++ b/service/bcmpricingcalculator/api_op_BatchCreateWorkloadEstimateUsage.go @@ -14,6 +14,11 @@ import ( // Create Amazon Web Services service usage that you want to model in a Workload // // Estimate. +// +// The BatchCreateWorkloadEstimateUsage operation doesn't have its own IAM +// permission. To authorize this operation for Amazon Web Services principals, +// include the permission bcm-pricing-calculator:CreateWorkloadEstimateUsage in +// your policies. func (c *Client) BatchCreateWorkloadEstimateUsage(ctx context.Context, params *BatchCreateWorkloadEstimateUsageInput, optFns ...func(*Options)) (*BatchCreateWorkloadEstimateUsageOutput, error) { if params == nil { params = &BatchCreateWorkloadEstimateUsageInput{} diff --git a/service/bcmpricingcalculator/api_op_BatchDeleteBillScenarioCommitmentModification.go b/service/bcmpricingcalculator/api_op_BatchDeleteBillScenarioCommitmentModification.go index cd346528ece..b1408d9c2dc 100644 --- a/service/bcmpricingcalculator/api_op_BatchDeleteBillScenarioCommitmentModification.go +++ b/service/bcmpricingcalculator/api_op_BatchDeleteBillScenarioCommitmentModification.go @@ -17,6 +17,11 @@ import ( // a existing commitment. If you want model deletion of an existing commitment, see // the negate [BillScenarioCommitmentModificationAction]of [BatchCreateBillScenarioCommitmentModification] operation. // +// The BatchDeleteBillScenarioCommitmentModification operation doesn't have its +// own IAM permission. To authorize this operation for Amazon Web Services +// principals, include the permission +// bcm-pricing-calculator:DeleteBillScenarioCommitmentModification in your policies. +// // [BillScenarioCommitmentModificationAction]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_AWSBCMPricingCalculator_BillScenarioCommitmentModificationAction.html // [BatchCreateBillScenarioCommitmentModification]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_AWSBCMPricingCalculator_BatchCreateBillScenarioUsageModification.html func (c *Client) BatchDeleteBillScenarioCommitmentModification(ctx context.Context, params *BatchDeleteBillScenarioCommitmentModificationInput, optFns ...func(*Options)) (*BatchDeleteBillScenarioCommitmentModificationOutput, error) { diff --git a/service/bcmpricingcalculator/api_op_BatchDeleteBillScenarioUsageModification.go b/service/bcmpricingcalculator/api_op_BatchDeleteBillScenarioUsageModification.go index 64d1d85ca2b..cd983e63ece 100644 --- a/service/bcmpricingcalculator/api_op_BatchDeleteBillScenarioUsageModification.go +++ b/service/bcmpricingcalculator/api_op_BatchDeleteBillScenarioUsageModification.go @@ -16,6 +16,11 @@ import ( // usage that you had added and cannot model deletion (or removal) of a existing // usage. If you want model removal of an existing usage, see [BatchUpdateBillScenarioUsageModification]. // +// The BatchDeleteBillScenarioUsageModification operation doesn't have its own IAM +// permission. To authorize this operation for Amazon Web Services principals, +// include the permission +// bcm-pricing-calculator:DeleteBillScenarioUsageModification in your policies. +// // [BatchUpdateBillScenarioUsageModification]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_AWSBCMPricingCalculator_BatchUpdateBillScenarioUsageModification.html func (c *Client) BatchDeleteBillScenarioUsageModification(ctx context.Context, params *BatchDeleteBillScenarioUsageModificationInput, optFns ...func(*Options)) (*BatchDeleteBillScenarioUsageModificationOutput, error) { if params == nil { diff --git a/service/bcmpricingcalculator/api_op_BatchDeleteWorkloadEstimateUsage.go b/service/bcmpricingcalculator/api_op_BatchDeleteWorkloadEstimateUsage.go index a698faf9aaf..d14642b5028 100644 --- a/service/bcmpricingcalculator/api_op_BatchDeleteWorkloadEstimateUsage.go +++ b/service/bcmpricingcalculator/api_op_BatchDeleteWorkloadEstimateUsage.go @@ -16,6 +16,11 @@ import ( // usage that you had added and cannot model deletion (or removal) of a existing // usage. If you want model removal of an existing usage, see [BatchUpdateWorkloadEstimateUsage]. // +// The BatchDeleteWorkloadEstimateUsage operation doesn't have its own IAM +// permission. To authorize this operation for Amazon Web Services principals, +// include the permission bcm-pricing-calculator:DeleteWorkloadEstimateUsage in +// your policies. +// // [BatchUpdateWorkloadEstimateUsage]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_AWSBCMPricingCalculator_BatchUpdateWorkloadEstimateUsage.html func (c *Client) BatchDeleteWorkloadEstimateUsage(ctx context.Context, params *BatchDeleteWorkloadEstimateUsageInput, optFns ...func(*Options)) (*BatchDeleteWorkloadEstimateUsageOutput, error) { if params == nil { diff --git a/service/bcmpricingcalculator/api_op_BatchUpdateBillScenarioCommitmentModification.go b/service/bcmpricingcalculator/api_op_BatchUpdateBillScenarioCommitmentModification.go index 756e096c39c..0c59ee1fa8e 100644 --- a/service/bcmpricingcalculator/api_op_BatchUpdateBillScenarioCommitmentModification.go +++ b/service/bcmpricingcalculator/api_op_BatchUpdateBillScenarioCommitmentModification.go @@ -14,6 +14,11 @@ import ( // Update a newly added or existing commitment. You can update the commitment // // group based on a commitment ID and a Bill scenario ID. +// +// The BatchUpdateBillScenarioCommitmentModification operation doesn't have its +// own IAM permission. To authorize this operation for Amazon Web Services +// principals, include the permission +// bcm-pricing-calculator:UpdateBillScenarioCommitmentModification in your policies. func (c *Client) BatchUpdateBillScenarioCommitmentModification(ctx context.Context, params *BatchUpdateBillScenarioCommitmentModificationInput, optFns ...func(*Options)) (*BatchUpdateBillScenarioCommitmentModificationOutput, error) { if params == nil { params = &BatchUpdateBillScenarioCommitmentModificationInput{} diff --git a/service/bcmpricingcalculator/api_op_BatchUpdateBillScenarioUsageModification.go b/service/bcmpricingcalculator/api_op_BatchUpdateBillScenarioUsageModification.go index 66259fbffb6..29f6107a615 100644 --- a/service/bcmpricingcalculator/api_op_BatchUpdateBillScenarioUsageModification.go +++ b/service/bcmpricingcalculator/api_op_BatchUpdateBillScenarioUsageModification.go @@ -14,6 +14,11 @@ import ( // Update a newly added or existing usage lines. You can update the usage // // amounts, usage hour, and usage group based on a usage ID and a Bill scenario ID. +// +// The BatchUpdateBillScenarioUsageModification operation doesn't have its own IAM +// permission. To authorize this operation for Amazon Web Services principals, +// include the permission +// bcm-pricing-calculator:UpdateBillScenarioUsageModification in your policies. func (c *Client) BatchUpdateBillScenarioUsageModification(ctx context.Context, params *BatchUpdateBillScenarioUsageModificationInput, optFns ...func(*Options)) (*BatchUpdateBillScenarioUsageModificationOutput, error) { if params == nil { params = &BatchUpdateBillScenarioUsageModificationInput{} diff --git a/service/bcmpricingcalculator/api_op_BatchUpdateWorkloadEstimateUsage.go b/service/bcmpricingcalculator/api_op_BatchUpdateWorkloadEstimateUsage.go index d2a32d73cc0..5263e6ee076 100644 --- a/service/bcmpricingcalculator/api_op_BatchUpdateWorkloadEstimateUsage.go +++ b/service/bcmpricingcalculator/api_op_BatchUpdateWorkloadEstimateUsage.go @@ -14,6 +14,11 @@ import ( // Update a newly added or existing usage lines. You can update the usage amounts // // and usage group based on a usage ID and a Workload estimate ID. +// +// The BatchUpdateWorkloadEstimateUsage operation doesn't have its own IAM +// permission. To authorize this operation for Amazon Web Services principals, +// include the permission bcm-pricing-calculator:UpdateWorkloadEstimateUsage in +// your policies. func (c *Client) BatchUpdateWorkloadEstimateUsage(ctx context.Context, params *BatchUpdateWorkloadEstimateUsageInput, optFns ...func(*Options)) (*BatchUpdateWorkloadEstimateUsageOutput, error) { if params == nil { params = &BatchUpdateWorkloadEstimateUsageInput{} diff --git a/service/bcmpricingcalculator/api_op_ListBillEstimates.go b/service/bcmpricingcalculator/api_op_ListBillEstimates.go index 5cc85d4d28c..7e033e0a245 100644 --- a/service/bcmpricingcalculator/api_op_ListBillEstimates.go +++ b/service/bcmpricingcalculator/api_op_ListBillEstimates.go @@ -29,10 +29,10 @@ func (c *Client) ListBillEstimates(ctx context.Context, params *ListBillEstimate type ListBillEstimatesInput struct { - // Filter bill estimates based on their creation date. + // Filter bill estimates based on the creation date. CreatedAtFilter *types.FilterTimestamp - // Filter bill estimates based on their expiration date. + // Filter bill estimates based on the expiration date. ExpiresAtFilter *types.FilterTimestamp // Filters to apply to the list of bill estimates. diff --git a/service/bcmpricingcalculator/api_op_ListBillScenarios.go b/service/bcmpricingcalculator/api_op_ListBillScenarios.go index e2e8a636140..5674f9ccba1 100644 --- a/service/bcmpricingcalculator/api_op_ListBillScenarios.go +++ b/service/bcmpricingcalculator/api_op_ListBillScenarios.go @@ -29,10 +29,10 @@ func (c *Client) ListBillScenarios(ctx context.Context, params *ListBillScenario type ListBillScenariosInput struct { - // Filter bill scenarios based on their creation date. + // Filter bill scenarios based on the creation date. CreatedAtFilter *types.FilterTimestamp - // Filter bill scenarios based on their expiration date. + // Filter bill scenarios based on the expiration date. ExpiresAtFilter *types.FilterTimestamp // Filters to apply to the list of bill scenarios. diff --git a/service/bcmpricingcalculator/api_op_ListWorkloadEstimates.go b/service/bcmpricingcalculator/api_op_ListWorkloadEstimates.go index db87ef71e4d..430eabea05b 100644 --- a/service/bcmpricingcalculator/api_op_ListWorkloadEstimates.go +++ b/service/bcmpricingcalculator/api_op_ListWorkloadEstimates.go @@ -29,10 +29,10 @@ func (c *Client) ListWorkloadEstimates(ctx context.Context, params *ListWorkload type ListWorkloadEstimatesInput struct { - // Filter workload estimates based on their creation date. + // Filter workload estimates based on the creation date. CreatedAtFilter *types.FilterTimestamp - // Filter workload estimates based on their expiration date. + // Filter workload estimates based on the expiration date. ExpiresAtFilter *types.FilterTimestamp // Filters to apply to the list of workload estimates. diff --git a/service/bcmpricingcalculator/deserializers.go b/service/bcmpricingcalculator/deserializers.go index 2d0d0fa83ab..f6062b03a5d 100644 --- a/service/bcmpricingcalculator/deserializers.go +++ b/service/bcmpricingcalculator/deserializers.go @@ -524,6 +524,9 @@ func awsAwsjson10_deserializeOpErrorBatchDeleteBillScenarioCommitmentModificatio case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("DataUnavailableException", errorCode): return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) @@ -650,6 +653,9 @@ func awsAwsjson10_deserializeOpErrorBatchDeleteBillScenarioUsageModification(res case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("DataUnavailableException", errorCode): return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) @@ -908,6 +914,9 @@ func awsAwsjson10_deserializeOpErrorBatchUpdateBillScenarioCommitmentModificatio case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("DataUnavailableException", errorCode): return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) @@ -1034,6 +1043,9 @@ func awsAwsjson10_deserializeOpErrorBatchUpdateBillScenarioUsageModification(res case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("DataUnavailableException", errorCode): return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) @@ -1805,6 +1817,9 @@ func awsAwsjson10_deserializeOpErrorDeleteBillScenario(response *smithyhttp.Resp case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("DataUnavailableException", errorCode): return awsAwsjson10_deserializeErrorDataUnavailableException(response, errorBody) diff --git a/service/ecr/endpoints.go b/service/ecr/endpoints.go index c593447cd6f..e61e54695cd 100644 --- a/service/ecr/endpoints.go +++ b/service/ecr/endpoints.go @@ -361,6 +361,44 @@ func (r *resolver) ResolveEndpoint( if _UseDualStack == true { if true == _PartitionResult.SupportsFIPS { if true == _PartitionResult.SupportsDualStack { + if "aws" == _PartitionResult.Name { + uriString := func() string { + var out strings.Builder + out.WriteString("https://ecr-fips.") + out.WriteString(_Region) + out.WriteString(".api.aws") + 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 "aws-us-gov" == _PartitionResult.Name { + uriString := func() string { + var out strings.Builder + out.WriteString("https://ecr-fips.") + out.WriteString(_Region) + out.WriteString(".api.aws") + 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 + } uriString := func() string { var out strings.Builder out.WriteString("https://api.ecr-fips.") @@ -447,6 +485,63 @@ func (r *resolver) ResolveEndpoint( } if _UseDualStack == true { if true == _PartitionResult.SupportsDualStack { + if "aws" == _PartitionResult.Name { + uriString := func() string { + var out strings.Builder + out.WriteString("https://ecr.") + out.WriteString(_Region) + out.WriteString(".api.aws") + 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 "aws-cn" == _PartitionResult.Name { + uriString := func() string { + var out strings.Builder + out.WriteString("https://ecr.") + out.WriteString(_Region) + out.WriteString(".api.amazonwebservices.com.cn") + 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 "aws-us-gov" == _PartitionResult.Name { + uriString := func() string { + var out strings.Builder + out.WriteString("https://ecr.") + out.WriteString(_Region) + out.WriteString(".api.aws") + 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 + } uriString := func() string { var out strings.Builder out.WriteString("https://api.ecr.") diff --git a/service/ecr/endpoints_test.go b/service/ecr/endpoints_test.go index febabd8fcf4..84d9ec3267f 100644 --- a/service/ecr/endpoints_test.go +++ b/service/ecr/endpoints_test.go @@ -51,8 +51,45 @@ func TestEndpointCase0(t *testing.T) { } } -// For region ap-east-1 with FIPS disabled and DualStack disabled +// For region af-south-1 with FIPS disabled and DualStack enabled func TestEndpointCase1(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("af-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 no error, got %v", err) + } + + uri, _ := url.Parse("https://ecr.af-south-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region ap-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), UseFIPS: ptr.Bool(false), @@ -88,8 +125,45 @@ func TestEndpointCase1(t *testing.T) { } } +// For region ap-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase3(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ap-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://ecr.ap-east-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + // For region ap-northeast-1 with FIPS disabled and DualStack disabled -func TestEndpointCase2(t *testing.T) { +func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), UseFIPS: ptr.Bool(false), @@ -125,8 +199,45 @@ func TestEndpointCase2(t *testing.T) { } } +// For region ap-northeast-1 with FIPS disabled and DualStack enabled +func TestEndpointCase5(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ap-northeast-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://ecr.ap-northeast-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + // For region ap-northeast-2 with FIPS disabled and DualStack disabled -func TestEndpointCase3(t *testing.T) { +func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), UseFIPS: ptr.Bool(false), @@ -162,8 +273,45 @@ func TestEndpointCase3(t *testing.T) { } } +// For region ap-northeast-2 with FIPS disabled and DualStack enabled +func TestEndpointCase7(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ap-northeast-2"), + 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://ecr.ap-northeast-2.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + // For region ap-northeast-3 with FIPS disabled and DualStack disabled -func TestEndpointCase4(t *testing.T) { +func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), UseFIPS: ptr.Bool(false), @@ -199,8 +347,45 @@ func TestEndpointCase4(t *testing.T) { } } +// For region ap-northeast-3 with FIPS disabled and DualStack enabled +func TestEndpointCase9(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ap-northeast-3"), + 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://ecr.ap-northeast-3.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + // For region ap-south-1 with FIPS disabled and DualStack disabled -func TestEndpointCase5(t *testing.T) { +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), UseFIPS: ptr.Bool(false), @@ -236,10 +421,1453 @@ func TestEndpointCase5(t *testing.T) { } } -// For region ap-southeast-1 with FIPS disabled and DualStack disabled -func TestEndpointCase6(t *testing.T) { +// For region ap-south-1 with FIPS disabled and DualStack enabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("ap-southeast-1"), + Region: ptr.String("ap-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 no error, got %v", err) + } + + uri, _ := url.Parse("https://ecr.ap-south-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region ap-south-2 with FIPS disabled and DualStack disabled +func TestEndpointCase12(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ap-south-2"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://api.ecr.ap-south-2.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region ap-south-2 with FIPS disabled and DualStack enabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ap-south-2"), + 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://ecr.ap-south-2.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region ap-southeast-1 with FIPS disabled and DualStack disabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ap-southeast-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://api.ecr.ap-southeast-1.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region ap-southeast-1 with FIPS disabled and DualStack enabled +func TestEndpointCase15(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ap-southeast-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://ecr.ap-southeast-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region ap-southeast-2 with FIPS disabled and DualStack disabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ap-southeast-2"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://api.ecr.ap-southeast-2.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region ap-southeast-2 with FIPS disabled and DualStack enabled +func TestEndpointCase17(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ap-southeast-2"), + 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://ecr.ap-southeast-2.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region ap-southeast-3 with FIPS disabled and DualStack disabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ap-southeast-3"), + 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://api.ecr.ap-southeast-3.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region ap-southeast-3 with FIPS disabled and DualStack enabled +func TestEndpointCase19(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ap-southeast-3"), + 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://ecr.ap-southeast-3.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region ap-southeast-4 with FIPS disabled and DualStack disabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ap-southeast-4"), + 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://api.ecr.ap-southeast-4.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region ap-southeast-4 with FIPS disabled and DualStack enabled +func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ap-southeast-4"), + 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://ecr.ap-southeast-4.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region ap-southeast-5 with FIPS disabled and DualStack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ap-southeast-5"), + 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://api.ecr.ap-southeast-5.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region ap-southeast-5 with FIPS disabled and DualStack enabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ap-southeast-5"), + 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://ecr.ap-southeast-5.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region ap-southeast-7 with FIPS disabled and DualStack disabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ap-southeast-7"), + 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://api.ecr.ap-southeast-7.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region ap-southeast-7 with FIPS disabled and DualStack enabled +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ap-southeast-7"), + 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://ecr.ap-southeast-7.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region ca-central-1 with FIPS disabled and DualStack disabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ca-central-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://api.ecr.ca-central-1.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region ca-central-1 with FIPS disabled and DualStack enabled +func TestEndpointCase27(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ca-central-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://ecr.ca-central-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region ca-west-1 with FIPS disabled and DualStack disabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ca-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://api.ecr.ca-west-1.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region ca-west-1 with FIPS disabled and DualStack enabled +func TestEndpointCase29(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("ca-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://ecr.ca-west-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region eu-central-1 with FIPS disabled and DualStack disabled +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-central-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://api.ecr.eu-central-1.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region eu-central-1 with FIPS disabled and DualStack enabled +func TestEndpointCase31(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-central-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://ecr.eu-central-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region eu-central-2 with FIPS disabled and DualStack disabled +func TestEndpointCase32(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-central-2"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://api.ecr.eu-central-2.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region eu-central-2 with FIPS disabled and DualStack enabled +func TestEndpointCase33(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-central-2"), + 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://ecr.eu-central-2.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region eu-north-1 with FIPS disabled and DualStack disabled +func TestEndpointCase34(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://api.ecr.eu-north-1.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region eu-north-1 with FIPS disabled and DualStack enabled +func TestEndpointCase35(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://ecr.eu-north-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region eu-south-1 with FIPS disabled and DualStack disabled +func TestEndpointCase36(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-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://api.ecr.eu-south-1.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region eu-south-1 with FIPS disabled and DualStack enabled +func TestEndpointCase37(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-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 no error, got %v", err) + } + + uri, _ := url.Parse("https://ecr.eu-south-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region eu-south-2 with FIPS disabled and DualStack disabled +func TestEndpointCase38(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-south-2"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://api.ecr.eu-south-2.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region eu-south-2 with FIPS disabled and DualStack enabled +func TestEndpointCase39(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-south-2"), + 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://ecr.eu-south-2.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region eu-west-1 with FIPS disabled and DualStack disabled +func TestEndpointCase40(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-west-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://api.ecr.eu-west-1.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region eu-west-1 with FIPS disabled and DualStack enabled +func TestEndpointCase41(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-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://ecr.eu-west-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region eu-west-2 with FIPS disabled and DualStack disabled +func TestEndpointCase42(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-west-2"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://api.ecr.eu-west-2.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region eu-west-2 with FIPS disabled and DualStack enabled +func TestEndpointCase43(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-west-2"), + 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://ecr.eu-west-2.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region eu-west-3 with FIPS disabled and DualStack disabled +func TestEndpointCase44(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-west-3"), + 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://api.ecr.eu-west-3.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region eu-west-3 with FIPS disabled and DualStack enabled +func TestEndpointCase45(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("eu-west-3"), + 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://ecr.eu-west-3.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region il-central-1 with FIPS disabled and DualStack disabled +func TestEndpointCase46(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("il-central-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://api.ecr.il-central-1.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region il-central-1 with FIPS disabled and DualStack enabled +func TestEndpointCase47(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("il-central-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://ecr.il-central-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region me-central-1 with FIPS disabled and DualStack disabled +func TestEndpointCase48(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("me-central-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://api.ecr.me-central-1.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region me-central-1 with FIPS disabled and DualStack enabled +func TestEndpointCase49(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("me-central-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://ecr.me-central-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region me-south-1 with FIPS disabled and DualStack disabled +func TestEndpointCase50(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("me-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -252,7 +1880,7 @@ func TestEndpointCase6(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.ap-southeast-1.amazonaws.com") + uri, _ := url.Parse("https://api.ecr.me-south-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -273,12 +1901,12 @@ func TestEndpointCase6(t *testing.T) { } } -// For region ap-southeast-2 with FIPS disabled and DualStack disabled -func TestEndpointCase7(t *testing.T) { +// For region me-south-1 with FIPS disabled and DualStack enabled +func TestEndpointCase51(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("ap-southeast-2"), + Region: ptr.String("me-south-1"), UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -289,7 +1917,7 @@ func TestEndpointCase7(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.ap-southeast-2.amazonaws.com") + uri, _ := url.Parse("https://ecr.me-south-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -310,10 +1938,10 @@ func TestEndpointCase7(t *testing.T) { } } -// For region ap-southeast-3 with FIPS disabled and DualStack disabled -func TestEndpointCase8(t *testing.T) { +// For region sa-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase52(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("ap-southeast-3"), + Region: ptr.String("sa-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -326,7 +1954,7 @@ func TestEndpointCase8(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.ap-southeast-3.amazonaws.com") + uri, _ := url.Parse("https://api.ecr.sa-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -347,12 +1975,12 @@ func TestEndpointCase8(t *testing.T) { } } -// For region ca-central-1 with FIPS disabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { +// For region sa-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase53(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("ca-central-1"), + Region: ptr.String("sa-east-1"), UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -363,7 +1991,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.ca-central-1.amazonaws.com") + uri, _ := url.Parse("https://ecr.sa-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -384,10 +2012,10 @@ func TestEndpointCase9(t *testing.T) { } } -// For region eu-central-1 with FIPS disabled and DualStack disabled -func TestEndpointCase10(t *testing.T) { +// For region us-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase54(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("eu-central-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -400,7 +2028,7 @@ func TestEndpointCase10(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.eu-central-1.amazonaws.com") + uri, _ := url.Parse("https://api.ecr.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -421,11 +2049,11 @@ func TestEndpointCase10(t *testing.T) { } } -// For region eu-north-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase55(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("eu-north-1"), - UseFIPS: ptr.Bool(false), + Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -437,7 +2065,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.eu-north-1.amazonaws.com") + uri, _ := url.Parse("https://ecr-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -458,12 +2086,12 @@ func TestEndpointCase11(t *testing.T) { } } -// For region eu-south-1 with FIPS disabled and DualStack disabled -func TestEndpointCase12(t *testing.T) { +// For region us-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase56(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("eu-south-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -474,7 +2102,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.eu-south-1.amazonaws.com") + uri, _ := url.Parse("https://ecr.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -495,12 +2123,12 @@ func TestEndpointCase12(t *testing.T) { } } -// For region eu-west-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase57(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("eu-west-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -511,7 +2139,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.eu-west-1.amazonaws.com") + uri, _ := url.Parse("https://ecr-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -532,10 +2160,10 @@ func TestEndpointCase13(t *testing.T) { } } -// For region eu-west-2 with FIPS disabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +// For region us-east-2 with FIPS disabled and DualStack disabled +func TestEndpointCase58(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("eu-west-2"), + Region: ptr.String("us-east-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -548,7 +2176,7 @@ func TestEndpointCase14(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.eu-west-2.amazonaws.com") + uri, _ := url.Parse("https://api.ecr.us-east-2.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -569,11 +2197,11 @@ func TestEndpointCase14(t *testing.T) { } } -// For region eu-west-3 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +// For region us-east-2 with FIPS enabled and DualStack disabled +func TestEndpointCase59(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("eu-west-3"), - UseFIPS: ptr.Bool(false), + Region: ptr.String("us-east-2"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -585,7 +2213,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.eu-west-3.amazonaws.com") + uri, _ := url.Parse("https://ecr-fips.us-east-2.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -606,12 +2234,12 @@ func TestEndpointCase15(t *testing.T) { } } -// For region me-south-1 with FIPS disabled and DualStack disabled -func TestEndpointCase16(t *testing.T) { +// For region us-east-2 with FIPS disabled and DualStack enabled +func TestEndpointCase60(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("me-south-1"), + Region: ptr.String("us-east-2"), UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -622,7 +2250,7 @@ func TestEndpointCase16(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.me-south-1.amazonaws.com") + uri, _ := url.Parse("https://ecr.us-east-2.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -643,12 +2271,12 @@ func TestEndpointCase16(t *testing.T) { } } -// For region sa-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase17(t *testing.T) { +// For region us-east-2 with FIPS enabled and DualStack enabled +func TestEndpointCase61(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("sa-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-2"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -659,7 +2287,7 @@ func TestEndpointCase17(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.sa-east-1.amazonaws.com") + uri, _ := url.Parse("https://ecr-fips.us-east-2.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -680,10 +2308,10 @@ func TestEndpointCase17(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase18(t *testing.T) { +// For region us-west-1 with FIPS disabled and DualStack disabled +func TestEndpointCase62(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), + Region: ptr.String("us-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -696,7 +2324,7 @@ func TestEndpointCase18(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://api.ecr.us-west-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -717,10 +2345,10 @@ func TestEndpointCase18(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase19(t *testing.T) { +// For region us-west-1 with FIPS enabled and DualStack disabled +func TestEndpointCase63(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), + Region: ptr.String("us-west-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -733,7 +2361,7 @@ func TestEndpointCase19(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://ecr-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://ecr-fips.us-west-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -754,12 +2382,12 @@ func TestEndpointCase19(t *testing.T) { } } -// For region us-east-2 with FIPS disabled and DualStack disabled -func TestEndpointCase20(t *testing.T) { +// For region us-west-1 with FIPS disabled and DualStack enabled +func TestEndpointCase64(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-2"), + Region: ptr.String("us-west-1"), UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -770,7 +2398,7 @@ func TestEndpointCase20(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.us-east-2.amazonaws.com") + uri, _ := url.Parse("https://ecr.us-west-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -791,12 +2419,12 @@ func TestEndpointCase20(t *testing.T) { } } -// For region us-east-2 with FIPS enabled and DualStack disabled -func TestEndpointCase21(t *testing.T) { +// For region us-west-1 with FIPS enabled and DualStack enabled +func TestEndpointCase65(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-2"), + Region: ptr.String("us-west-1"), UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -807,7 +2435,7 @@ func TestEndpointCase21(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://ecr-fips.us-east-2.amazonaws.com") + uri, _ := url.Parse("https://ecr-fips.us-west-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -828,10 +2456,10 @@ func TestEndpointCase21(t *testing.T) { } } -// For region us-west-1 with FIPS disabled and DualStack disabled -func TestEndpointCase22(t *testing.T) { +// For region us-west-2 with FIPS disabled and DualStack disabled +func TestEndpointCase66(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-west-1"), + Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -844,7 +2472,7 @@ func TestEndpointCase22(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.us-west-1.amazonaws.com") + uri, _ := url.Parse("https://api.ecr.us-west-2.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -865,10 +2493,10 @@ func TestEndpointCase22(t *testing.T) { } } -// For region us-west-1 with FIPS enabled and DualStack disabled -func TestEndpointCase23(t *testing.T) { +// For region us-west-2 with FIPS enabled and DualStack disabled +func TestEndpointCase67(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-west-1"), + Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -881,7 +2509,7 @@ func TestEndpointCase23(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://ecr-fips.us-west-1.amazonaws.com") + uri, _ := url.Parse("https://ecr-fips.us-west-2.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -902,12 +2530,12 @@ func TestEndpointCase23(t *testing.T) { } } -// For region us-west-2 with FIPS disabled and DualStack disabled -func TestEndpointCase24(t *testing.T) { +// For region us-west-2 with FIPS disabled and DualStack enabled +func TestEndpointCase68(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -918,7 +2546,7 @@ func TestEndpointCase24(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.us-west-2.amazonaws.com") + uri, _ := url.Parse("https://ecr.us-west-2.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -939,12 +2567,12 @@ func TestEndpointCase24(t *testing.T) { } } -// For region us-west-2 with FIPS enabled and DualStack disabled -func TestEndpointCase25(t *testing.T) { +// For region us-west-2 with FIPS enabled and DualStack enabled +func TestEndpointCase69(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -955,7 +2583,7 @@ func TestEndpointCase25(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://ecr-fips.us-west-2.amazonaws.com") + uri, _ := url.Parse("https://ecr-fips.us-west-2.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -976,12 +2604,12 @@ func TestEndpointCase25(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase26(t *testing.T) { +// For region cn-north-1 with FIPS disabled and DualStack disabled +func TestEndpointCase70(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), + Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -992,7 +2620,7 @@ func TestEndpointCase26(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://api.ecr.cn-north-1.amazonaws.com.cn") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1013,10 +2641,10 @@ func TestEndpointCase26(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase27(t *testing.T) { +// For region cn-north-1 with FIPS disabled and DualStack enabled +func TestEndpointCase71(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -1029,7 +2657,7 @@ func TestEndpointCase27(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.us-east-1.api.aws") + uri, _ := url.Parse("https://ecr.cn-north-1.api.amazonwebservices.com.cn") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1050,10 +2678,10 @@ func TestEndpointCase27(t *testing.T) { } } -// For region cn-north-1 with FIPS disabled and DualStack disabled -func TestEndpointCase28(t *testing.T) { +// For region cn-northwest-1 with FIPS disabled and DualStack disabled +func TestEndpointCase72(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("cn-north-1"), + Region: ptr.String("cn-northwest-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -1066,7 +2694,7 @@ func TestEndpointCase28(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.cn-north-1.amazonaws.com.cn") + uri, _ := url.Parse("https://api.ecr.cn-northwest-1.amazonaws.com.cn") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1087,12 +2715,12 @@ func TestEndpointCase28(t *testing.T) { } } -// For region cn-northwest-1 with FIPS disabled and DualStack disabled -func TestEndpointCase29(t *testing.T) { +// For region cn-northwest-1 with FIPS disabled and DualStack enabled +func TestEndpointCase73(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1103,7 +2731,7 @@ func TestEndpointCase29(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.cn-northwest-1.amazonaws.com.cn") + uri, _ := url.Parse("https://ecr.cn-northwest-1.api.amazonwebservices.com.cn") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1125,7 +2753,7 @@ func TestEndpointCase29(t *testing.T) { } // For region cn-north-1 with FIPS enabled and DualStack enabled -func TestEndpointCase30(t *testing.T) { +func TestEndpointCase74(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), @@ -1162,7 +2790,7 @@ func TestEndpointCase30(t *testing.T) { } // For region cn-north-1 with FIPS enabled and DualStack disabled -func TestEndpointCase31(t *testing.T) { +func TestEndpointCase75(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), @@ -1198,12 +2826,12 @@ func TestEndpointCase31(t *testing.T) { } } -// For region cn-north-1 with FIPS disabled and DualStack enabled -func TestEndpointCase32(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase76(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("cn-north-1"), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1214,7 +2842,7 @@ func TestEndpointCase32(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.cn-north-1.api.amazonwebservices.com.cn") + uri, _ := url.Parse("https://api.ecr.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1235,11 +2863,11 @@ func TestEndpointCase32(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase33(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase77(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseFIPS: ptr.Bool(false), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -1251,7 +2879,7 @@ func TestEndpointCase33(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://ecr-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1272,12 +2900,49 @@ func TestEndpointCase33(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase34(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase78(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://ecr.us-gov-east-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-gov-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase79(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1288,7 +2953,7 @@ func TestEndpointCase34(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://ecr-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://ecr-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1310,7 +2975,7 @@ func TestEndpointCase34(t *testing.T) { } // For region us-gov-west-1 with FIPS disabled and DualStack disabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase80(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), UseFIPS: ptr.Bool(false), @@ -1347,7 +3012,7 @@ func TestEndpointCase35(t *testing.T) { } // For region us-gov-west-1 with FIPS enabled and DualStack disabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase81(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), UseFIPS: ptr.Bool(true), @@ -1383,11 +3048,11 @@ func TestEndpointCase36(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase37(t *testing.T) { +// For region us-gov-west-1 with FIPS disabled and DualStack enabled +func TestEndpointCase82(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseFIPS: ptr.Bool(true), + Region: ptr.String("us-gov-west-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -1399,7 +3064,7 @@ func TestEndpointCase37(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://ecr.us-gov-west-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1420,11 +3085,11 @@ func TestEndpointCase37(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase38(t *testing.T) { +// For region us-gov-west-1 with FIPS enabled and DualStack enabled +func TestEndpointCase83(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseFIPS: ptr.Bool(false), + Region: ptr.String("us-gov-west-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -1436,7 +3101,7 @@ func TestEndpointCase38(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://ecr-fips.us-gov-west-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1458,7 +3123,7 @@ func TestEndpointCase38(t *testing.T) { } // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase84(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -1495,7 +3160,7 @@ func TestEndpointCase39(t *testing.T) { } // For region us-iso-west-1 with FIPS disabled and DualStack disabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase85(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-west-1"), UseFIPS: ptr.Bool(false), @@ -1532,7 +3197,7 @@ func TestEndpointCase40(t *testing.T) { } // For region us-iso-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase86(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -1552,7 +3217,7 @@ func TestEndpointCase41(t *testing.T) { } // For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase87(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -1589,7 +3254,7 @@ func TestEndpointCase42(t *testing.T) { } // For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase88(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -1609,7 +3274,7 @@ func TestEndpointCase43(t *testing.T) { } // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase44(t *testing.T) { +func TestEndpointCase89(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -1646,7 +3311,7 @@ func TestEndpointCase44(t *testing.T) { } // For region us-isob-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase45(t *testing.T) { +func TestEndpointCase90(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -1666,7 +3331,7 @@ func TestEndpointCase45(t *testing.T) { } // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase46(t *testing.T) { +func TestEndpointCase91(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -1703,7 +3368,7 @@ func TestEndpointCase46(t *testing.T) { } // For region us-isob-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase47(t *testing.T) { +func TestEndpointCase92(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -1723,7 +3388,7 @@ func TestEndpointCase47(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase48(t *testing.T) { +func TestEndpointCase93(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1761,7 +3426,7 @@ func TestEndpointCase48(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase49(t *testing.T) { +func TestEndpointCase94(t *testing.T) { var params = EndpointParameters{ UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), @@ -1798,7 +3463,7 @@ func TestEndpointCase49(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase50(t *testing.T) { +func TestEndpointCase95(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -1819,7 +3484,7 @@ func TestEndpointCase50(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase51(t *testing.T) { +func TestEndpointCase96(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1840,7 +3505,7 @@ func TestEndpointCase51(t *testing.T) { } // Missing region -func TestEndpointCase52(t *testing.T) { +func TestEndpointCase97(t *testing.T) { var params = EndpointParameters{} resolver := NewDefaultEndpointResolverV2() diff --git a/service/ecrpublic/endpoints.go b/service/ecrpublic/endpoints.go index 39d8005662d..4af6f113882 100644 --- a/service/ecrpublic/endpoints.go +++ b/service/ecrpublic/endpoints.go @@ -409,6 +409,25 @@ func (r *resolver) ResolveEndpoint( } if _UseDualStack == true { if true == _PartitionResult.SupportsDualStack { + if "aws" == _PartitionResult.Name { + uriString := func() string { + var out strings.Builder + out.WriteString("https://ecr-public.") + out.WriteString(_Region) + out.WriteString(".api.aws") + 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 + } uriString := func() string { var out strings.Builder out.WriteString("https://api.ecr-public.") diff --git a/service/ecrpublic/endpoints_test.go b/service/ecrpublic/endpoints_test.go index 2dcaefb30df..5c813f5e240 100644 --- a/service/ecrpublic/endpoints_test.go +++ b/service/ecrpublic/endpoints_test.go @@ -14,12 +14,12 @@ import ( "testing" ) -// For region us-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr-public-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://api.ecr-public.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -51,12 +51,12 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -67,7 +67,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr-public-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://ecr-public.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -88,12 +88,12 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled +// For region us-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), + Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -104,7 +104,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr-public.us-east-1.api.aws") + uri, _ := url.Parse("https://api.ecr-public.us-west-2.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -125,11 +125,48 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// 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(false), + 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://api.ecr-public-fips.us-east-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase4(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -141,7 +178,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://api.ecr-public.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://api.ecr-public-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -163,7 +200,7 @@ func TestEndpointCase3(t *testing.T) { } // For region cn-north-1 with FIPS enabled and DualStack enabled -func TestEndpointCase4(t *testing.T) { +func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), @@ -200,7 +237,7 @@ func TestEndpointCase4(t *testing.T) { } // For region cn-north-1 with FIPS enabled and DualStack disabled -func TestEndpointCase5(t *testing.T) { +func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), @@ -237,7 +274,7 @@ func TestEndpointCase5(t *testing.T) { } // For region cn-north-1 with FIPS disabled and DualStack enabled -func TestEndpointCase6(t *testing.T) { +func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), @@ -274,7 +311,7 @@ func TestEndpointCase6(t *testing.T) { } // For region cn-north-1 with FIPS disabled and DualStack disabled -func TestEndpointCase7(t *testing.T) { +func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), @@ -311,7 +348,7 @@ func TestEndpointCase7(t *testing.T) { } // For region us-gov-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase8(t *testing.T) { +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), @@ -348,7 +385,7 @@ func TestEndpointCase8(t *testing.T) { } // For region us-gov-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), @@ -385,7 +422,7 @@ func TestEndpointCase9(t *testing.T) { } // For region us-gov-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), @@ -422,7 +459,7 @@ func TestEndpointCase10(t *testing.T) { } // For region us-gov-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), @@ -459,7 +496,7 @@ func TestEndpointCase11(t *testing.T) { } // For region us-iso-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -479,7 +516,7 @@ func TestEndpointCase12(t *testing.T) { } // For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -516,7 +553,7 @@ func TestEndpointCase13(t *testing.T) { } // For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -536,7 +573,7 @@ func TestEndpointCase14(t *testing.T) { } // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -573,7 +610,7 @@ func TestEndpointCase15(t *testing.T) { } // For region us-isob-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -593,7 +630,7 @@ func TestEndpointCase16(t *testing.T) { } // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -630,7 +667,7 @@ func TestEndpointCase17(t *testing.T) { } // For region us-isob-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -650,7 +687,7 @@ func TestEndpointCase18(t *testing.T) { } // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -687,7 +724,7 @@ func TestEndpointCase19(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -725,7 +762,7 @@ func TestEndpointCase20(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), @@ -762,7 +799,7 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -783,7 +820,7 @@ func TestEndpointCase22(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -804,7 +841,7 @@ func TestEndpointCase23(t *testing.T) { } // Missing region -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{} resolver := NewDefaultEndpointResolverV2() diff --git a/service/mailmanager/api_op_CreateAddressList.go b/service/mailmanager/api_op_CreateAddressList.go new file mode 100644 index 00000000000..627dede0b48 --- /dev/null +++ b/service/mailmanager/api_op_CreateAddressList.go @@ -0,0 +1,203 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mailmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/mailmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new address list. +func (c *Client) CreateAddressList(ctx context.Context, params *CreateAddressListInput, optFns ...func(*Options)) (*CreateAddressListOutput, error) { + if params == nil { + params = &CreateAddressListInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateAddressList", params, optFns, c.addOperationCreateAddressListMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateAddressListOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateAddressListInput struct { + + // A user-friendly name for the address list. + // + // This member is required. + AddressListName *string + + // A unique token that Amazon SES uses to recognize subsequent retries of the same + // request. + ClientToken *string + + // The tags used to organize, track, or control access for the resource. For + // example, { "tags": {"key1":"value1", "key2":"value2"} }. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateAddressListOutput struct { + + // The identifier of the created address list. + // + // This member is required. + AddressListId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateAddressListMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateAddressList{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateAddressList{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAddressList"); 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_opCreateAddressListMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateAddressListValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAddressList(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_initializeOpCreateAddressList struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateAddressList) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateAddressList) 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.(*CreateAddressListInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateAddressListInput ") + } + + 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_opCreateAddressListMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateAddressList{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateAddressList(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateAddressList", + } +} diff --git a/service/mailmanager/api_op_CreateAddressListImportJob.go b/service/mailmanager/api_op_CreateAddressListImportJob.go new file mode 100644 index 00000000000..24736adcd01 --- /dev/null +++ b/service/mailmanager/api_op_CreateAddressListImportJob.go @@ -0,0 +1,214 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mailmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/mailmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an import job for an address list. +func (c *Client) CreateAddressListImportJob(ctx context.Context, params *CreateAddressListImportJobInput, optFns ...func(*Options)) (*CreateAddressListImportJobOutput, error) { + if params == nil { + params = &CreateAddressListImportJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateAddressListImportJob", params, optFns, c.addOperationCreateAddressListImportJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateAddressListImportJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateAddressListImportJobInput struct { + + // The unique identifier of the address list for importing addresses to. + // + // This member is required. + AddressListId *string + + // The format of the input for an import job. + // + // This member is required. + ImportDataFormat *types.ImportDataFormat + + // A user-friendly name for the import job. + // + // This member is required. + Name *string + + // A unique token that Amazon SES uses to recognize subsequent retries of the same + // request. + ClientToken *string + + noSmithyDocumentSerde +} + +type CreateAddressListImportJobOutput struct { + + // The identifier of the created import job. + // + // This member is required. + JobId *string + + // The pre-signed URL target for uploading the input file. + // + // This member is required. + PreSignedUrl *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateAddressListImportJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateAddressListImportJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateAddressListImportJob{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAddressListImportJob"); 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_opCreateAddressListImportJobMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateAddressListImportJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAddressListImportJob(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_initializeOpCreateAddressListImportJob struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateAddressListImportJob) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateAddressListImportJob) 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.(*CreateAddressListImportJobInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateAddressListImportJobInput ") + } + + 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_opCreateAddressListImportJobMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateAddressListImportJob{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateAddressListImportJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateAddressListImportJob", + } +} diff --git a/service/mailmanager/api_op_DeleteAddressList.go b/service/mailmanager/api_op_DeleteAddressList.go new file mode 100644 index 00000000000..511ef51e6b4 --- /dev/null +++ b/service/mailmanager/api_op_DeleteAddressList.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mailmanager + +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 address list. +func (c *Client) DeleteAddressList(ctx context.Context, params *DeleteAddressListInput, optFns ...func(*Options)) (*DeleteAddressListOutput, error) { + if params == nil { + params = &DeleteAddressListInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteAddressList", params, optFns, c.addOperationDeleteAddressListMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteAddressListOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteAddressListInput struct { + + // The identifier of an existing address list resource to delete. + // + // This member is required. + AddressListId *string + + noSmithyDocumentSerde +} + +type DeleteAddressListOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteAddressListMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteAddressList{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteAddressList{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAddressList"); 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 = addOpDeleteAddressListValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAddressList(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_opDeleteAddressList(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteAddressList", + } +} diff --git a/service/mailmanager/api_op_DeregisterMemberFromAddressList.go b/service/mailmanager/api_op_DeregisterMemberFromAddressList.go new file mode 100644 index 00000000000..1c3dc8ca09b --- /dev/null +++ b/service/mailmanager/api_op_DeregisterMemberFromAddressList.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mailmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes a member from an address list. +func (c *Client) DeregisterMemberFromAddressList(ctx context.Context, params *DeregisterMemberFromAddressListInput, optFns ...func(*Options)) (*DeregisterMemberFromAddressListOutput, error) { + if params == nil { + params = &DeregisterMemberFromAddressListInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeregisterMemberFromAddressList", params, optFns, c.addOperationDeregisterMemberFromAddressListMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeregisterMemberFromAddressListOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeregisterMemberFromAddressListInput struct { + + // The address to be removed from the address list. + // + // This member is required. + Address *string + + // The unique identifier of the address list to remove the address from. + // + // This member is required. + AddressListId *string + + noSmithyDocumentSerde +} + +type DeregisterMemberFromAddressListOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeregisterMemberFromAddressListMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeregisterMemberFromAddressList{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeregisterMemberFromAddressList{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeregisterMemberFromAddressList"); 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 = addOpDeregisterMemberFromAddressListValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterMemberFromAddressList(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_opDeregisterMemberFromAddressList(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeregisterMemberFromAddressList", + } +} diff --git a/service/mailmanager/api_op_GetAddressList.go b/service/mailmanager/api_op_GetAddressList.go new file mode 100644 index 00000000000..754324eb921 --- /dev/null +++ b/service/mailmanager/api_op_GetAddressList.go @@ -0,0 +1,179 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mailmanager + +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" +) + +// Fetch attributes of an address list. +func (c *Client) GetAddressList(ctx context.Context, params *GetAddressListInput, optFns ...func(*Options)) (*GetAddressListOutput, error) { + if params == nil { + params = &GetAddressListInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAddressList", params, optFns, c.addOperationGetAddressListMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAddressListOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAddressListInput struct { + + // The identifier of an existing address list resource to be retrieved. + // + // This member is required. + AddressListId *string + + noSmithyDocumentSerde +} + +type GetAddressListOutput struct { + + // The Amazon Resource Name (ARN) of the address list resource. + // + // This member is required. + AddressListArn *string + + // The identifier of the address list resource. + // + // This member is required. + AddressListId *string + + // A user-friendly name for the address list resource. + // + // This member is required. + AddressListName *string + + // The date of when then address list was created. + // + // This member is required. + CreatedTimestamp *time.Time + + // The date of when the address list was last updated. + // + // This member is required. + LastUpdatedTimestamp *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAddressListMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetAddressList{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetAddressList{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetAddressList"); 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 = addOpGetAddressListValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAddressList(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_opGetAddressList(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetAddressList", + } +} diff --git a/service/mailmanager/api_op_GetAddressListImportJob.go b/service/mailmanager/api_op_GetAddressListImportJob.go new file mode 100644 index 00000000000..c75b1662c30 --- /dev/null +++ b/service/mailmanager/api_op_GetAddressListImportJob.go @@ -0,0 +1,205 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mailmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/mailmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Fetch attributes of an import job. +func (c *Client) GetAddressListImportJob(ctx context.Context, params *GetAddressListImportJobInput, optFns ...func(*Options)) (*GetAddressListImportJobOutput, error) { + if params == nil { + params = &GetAddressListImportJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAddressListImportJob", params, optFns, c.addOperationGetAddressListImportJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAddressListImportJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAddressListImportJobInput struct { + + // The identifier of the import job that needs to be retrieved. + // + // This member is required. + JobId *string + + noSmithyDocumentSerde +} + +type GetAddressListImportJobOutput struct { + + // The unique identifier of the address list the import job was created for. + // + // This member is required. + AddressListId *string + + // The timestamp of when the import job was created. + // + // This member is required. + CreatedTimestamp *time.Time + + // The format of the input for an import job. + // + // This member is required. + ImportDataFormat *types.ImportDataFormat + + // The identifier of the import job. + // + // This member is required. + JobId *string + + // A user-friendly name for the import job. + // + // This member is required. + Name *string + + // The pre-signed URL target for uploading the input file. + // + // This member is required. + PreSignedUrl *string + + // The status of the import job. + // + // This member is required. + Status types.ImportJobStatus + + // The timestamp of when the import job was completed. + CompletedTimestamp *time.Time + + // The reason for failure of an import job. + Error *string + + // The number of input addresses that failed to be imported into the address list. + FailedItemsCount *int32 + + // The number of input addresses successfully imported into the address list. + ImportedItemsCount *int32 + + // The timestamp of when the import job was started. + StartTimestamp *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAddressListImportJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetAddressListImportJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetAddressListImportJob{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetAddressListImportJob"); 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 = addOpGetAddressListImportJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAddressListImportJob(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_opGetAddressListImportJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetAddressListImportJob", + } +} diff --git a/service/mailmanager/api_op_GetMemberOfAddressList.go b/service/mailmanager/api_op_GetMemberOfAddressList.go new file mode 100644 index 00000000000..906cb66e1bd --- /dev/null +++ b/service/mailmanager/api_op_GetMemberOfAddressList.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mailmanager + +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" +) + +// Fetch attributes of a member in an address list. +func (c *Client) GetMemberOfAddressList(ctx context.Context, params *GetMemberOfAddressListInput, optFns ...func(*Options)) (*GetMemberOfAddressListOutput, error) { + if params == nil { + params = &GetMemberOfAddressListInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetMemberOfAddressList", params, optFns, c.addOperationGetMemberOfAddressListMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetMemberOfAddressListOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetMemberOfAddressListInput struct { + + // The address to be retrieved from the address list. + // + // This member is required. + Address *string + + // The unique identifier of the address list to retrieve the address from. + // + // This member is required. + AddressListId *string + + noSmithyDocumentSerde +} + +type GetMemberOfAddressListOutput struct { + + // The address retrieved from the address list. + // + // This member is required. + Address *string + + // The timestamp of when the address was created. + // + // This member is required. + CreatedTimestamp *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetMemberOfAddressListMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetMemberOfAddressList{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetMemberOfAddressList{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetMemberOfAddressList"); 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 = addOpGetMemberOfAddressListValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMemberOfAddressList(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_opGetMemberOfAddressList(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetMemberOfAddressList", + } +} diff --git a/service/mailmanager/api_op_ListAddressListImportJobs.go b/service/mailmanager/api_op_ListAddressListImportJobs.go new file mode 100644 index 00000000000..0e469d0a164 --- /dev/null +++ b/service/mailmanager/api_op_ListAddressListImportJobs.go @@ -0,0 +1,268 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mailmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/mailmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists jobs for an address list. +func (c *Client) ListAddressListImportJobs(ctx context.Context, params *ListAddressListImportJobsInput, optFns ...func(*Options)) (*ListAddressListImportJobsOutput, error) { + if params == nil { + params = &ListAddressListImportJobsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAddressListImportJobs", params, optFns, c.addOperationListAddressListImportJobsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAddressListImportJobsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAddressListImportJobsInput struct { + + // The unique identifier of the address list for listing import jobs. + // + // This member is required. + AddressListId *string + + // If you received a pagination token from a previous call to this API, you can + // provide it here to continue paginating through the next page of results. + NextToken *string + + // The maximum number of import jobs that are returned per call. You can use + // NextToken to retrieve the next page of jobs. + PageSize *int32 + + noSmithyDocumentSerde +} + +type ListAddressListImportJobsOutput struct { + + // The list of import jobs. + // + // This member is required. + ImportJobs []types.ImportJob + + // If NextToken is returned, there are more results available. The value of + // NextToken is a unique pagination token for each page. Make the call 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) addOperationListAddressListImportJobsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListAddressListImportJobs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListAddressListImportJobs{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListAddressListImportJobs"); 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 = addOpListAddressListImportJobsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAddressListImportJobs(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 +} + +// ListAddressListImportJobsPaginatorOptions is the paginator options for +// ListAddressListImportJobs +type ListAddressListImportJobsPaginatorOptions struct { + // The maximum number of import jobs that are returned per call. You can use + // NextToken to retrieve the next page of jobs. + 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 +} + +// ListAddressListImportJobsPaginator is a paginator for ListAddressListImportJobs +type ListAddressListImportJobsPaginator struct { + options ListAddressListImportJobsPaginatorOptions + client ListAddressListImportJobsAPIClient + params *ListAddressListImportJobsInput + nextToken *string + firstPage bool +} + +// NewListAddressListImportJobsPaginator returns a new +// ListAddressListImportJobsPaginator +func NewListAddressListImportJobsPaginator(client ListAddressListImportJobsAPIClient, params *ListAddressListImportJobsInput, optFns ...func(*ListAddressListImportJobsPaginatorOptions)) *ListAddressListImportJobsPaginator { + if params == nil { + params = &ListAddressListImportJobsInput{} + } + + options := ListAddressListImportJobsPaginatorOptions{} + if params.PageSize != nil { + options.Limit = *params.PageSize + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAddressListImportJobsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAddressListImportJobsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAddressListImportJobs page. +func (p *ListAddressListImportJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAddressListImportJobsOutput, 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.PageSize = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListAddressListImportJobs(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 +} + +// ListAddressListImportJobsAPIClient is a client that implements the +// ListAddressListImportJobs operation. +type ListAddressListImportJobsAPIClient interface { + ListAddressListImportJobs(context.Context, *ListAddressListImportJobsInput, ...func(*Options)) (*ListAddressListImportJobsOutput, error) +} + +var _ ListAddressListImportJobsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListAddressListImportJobs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListAddressListImportJobs", + } +} diff --git a/service/mailmanager/api_op_ListAddressLists.go b/service/mailmanager/api_op_ListAddressLists.go new file mode 100644 index 00000000000..15a2db17b5a --- /dev/null +++ b/service/mailmanager/api_op_ListAddressLists.go @@ -0,0 +1,258 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mailmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/mailmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists address lists for this account. +func (c *Client) ListAddressLists(ctx context.Context, params *ListAddressListsInput, optFns ...func(*Options)) (*ListAddressListsOutput, error) { + if params == nil { + params = &ListAddressListsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAddressLists", params, optFns, c.addOperationListAddressListsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAddressListsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAddressListsInput struct { + + // If you received a pagination token from a previous call to this API, you can + // provide it here to continue paginating through the next page of results. + NextToken *string + + // The maximum number of address list resources that are returned per call. You + // can use NextToken to retrieve the next page of address lists. + PageSize *int32 + + noSmithyDocumentSerde +} + +type ListAddressListsOutput struct { + + // The list of address lists. + // + // This member is required. + AddressLists []types.AddressList + + // If NextToken is returned, there are more results available. The value of + // NextToken is a unique pagination token for each page. Make the call 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) addOperationListAddressListsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListAddressLists{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListAddressLists{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListAddressLists"); 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_opListAddressLists(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 +} + +// ListAddressListsPaginatorOptions is the paginator options for ListAddressLists +type ListAddressListsPaginatorOptions struct { + // The maximum number of address list resources that are returned per call. You + // can use NextToken to retrieve the next page of address lists. + 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 +} + +// ListAddressListsPaginator is a paginator for ListAddressLists +type ListAddressListsPaginator struct { + options ListAddressListsPaginatorOptions + client ListAddressListsAPIClient + params *ListAddressListsInput + nextToken *string + firstPage bool +} + +// NewListAddressListsPaginator returns a new ListAddressListsPaginator +func NewListAddressListsPaginator(client ListAddressListsAPIClient, params *ListAddressListsInput, optFns ...func(*ListAddressListsPaginatorOptions)) *ListAddressListsPaginator { + if params == nil { + params = &ListAddressListsInput{} + } + + options := ListAddressListsPaginatorOptions{} + if params.PageSize != nil { + options.Limit = *params.PageSize + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAddressListsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAddressListsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAddressLists page. +func (p *ListAddressListsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAddressListsOutput, 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.PageSize = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListAddressLists(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 +} + +// ListAddressListsAPIClient is a client that implements the ListAddressLists +// operation. +type ListAddressListsAPIClient interface { + ListAddressLists(context.Context, *ListAddressListsInput, ...func(*Options)) (*ListAddressListsOutput, error) +} + +var _ ListAddressListsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListAddressLists(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListAddressLists", + } +} diff --git a/service/mailmanager/api_op_ListMembersOfAddressList.go b/service/mailmanager/api_op_ListMembersOfAddressList.go new file mode 100644 index 00000000000..65fde7bfd8c --- /dev/null +++ b/service/mailmanager/api_op_ListMembersOfAddressList.go @@ -0,0 +1,271 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mailmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/mailmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists members of an address list. +func (c *Client) ListMembersOfAddressList(ctx context.Context, params *ListMembersOfAddressListInput, optFns ...func(*Options)) (*ListMembersOfAddressListOutput, error) { + if params == nil { + params = &ListMembersOfAddressListInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListMembersOfAddressList", params, optFns, c.addOperationListMembersOfAddressListMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListMembersOfAddressListOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListMembersOfAddressListInput struct { + + // The unique identifier of the address list to list the addresses from. + // + // This member is required. + AddressListId *string + + // Filter to be used to limit the results. + Filter *types.AddressFilter + + // If you received a pagination token from a previous call to this API, you can + // provide it here to continue paginating through the next page of results. + NextToken *string + + // The maximum number of address list members that are returned per call. You can + // use NextToken to retrieve the next page of members. + PageSize *int32 + + noSmithyDocumentSerde +} + +type ListMembersOfAddressListOutput struct { + + // The list of addresses. + // + // This member is required. + Addresses []types.SavedAddress + + // If NextToken is returned, there are more results available. The value of + // NextToken is a unique pagination token for each page. Make the call 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) addOperationListMembersOfAddressListMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListMembersOfAddressList{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListMembersOfAddressList{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListMembersOfAddressList"); 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 = addOpListMembersOfAddressListValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMembersOfAddressList(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 +} + +// ListMembersOfAddressListPaginatorOptions is the paginator options for +// ListMembersOfAddressList +type ListMembersOfAddressListPaginatorOptions struct { + // The maximum number of address list members that are returned per call. You can + // use NextToken to retrieve the next page of members. + 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 +} + +// ListMembersOfAddressListPaginator is a paginator for ListMembersOfAddressList +type ListMembersOfAddressListPaginator struct { + options ListMembersOfAddressListPaginatorOptions + client ListMembersOfAddressListAPIClient + params *ListMembersOfAddressListInput + nextToken *string + firstPage bool +} + +// NewListMembersOfAddressListPaginator returns a new +// ListMembersOfAddressListPaginator +func NewListMembersOfAddressListPaginator(client ListMembersOfAddressListAPIClient, params *ListMembersOfAddressListInput, optFns ...func(*ListMembersOfAddressListPaginatorOptions)) *ListMembersOfAddressListPaginator { + if params == nil { + params = &ListMembersOfAddressListInput{} + } + + options := ListMembersOfAddressListPaginatorOptions{} + if params.PageSize != nil { + options.Limit = *params.PageSize + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListMembersOfAddressListPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListMembersOfAddressListPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListMembersOfAddressList page. +func (p *ListMembersOfAddressListPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListMembersOfAddressListOutput, 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.PageSize = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListMembersOfAddressList(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 +} + +// ListMembersOfAddressListAPIClient is a client that implements the +// ListMembersOfAddressList operation. +type ListMembersOfAddressListAPIClient interface { + ListMembersOfAddressList(context.Context, *ListMembersOfAddressListInput, ...func(*Options)) (*ListMembersOfAddressListOutput, error) +} + +var _ ListMembersOfAddressListAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListMembersOfAddressList(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListMembersOfAddressList", + } +} diff --git a/service/mailmanager/api_op_RegisterMemberToAddressList.go b/service/mailmanager/api_op_RegisterMemberToAddressList.go new file mode 100644 index 00000000000..3b8beca022a --- /dev/null +++ b/service/mailmanager/api_op_RegisterMemberToAddressList.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mailmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds a member to an address list. +func (c *Client) RegisterMemberToAddressList(ctx context.Context, params *RegisterMemberToAddressListInput, optFns ...func(*Options)) (*RegisterMemberToAddressListOutput, error) { + if params == nil { + params = &RegisterMemberToAddressListInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RegisterMemberToAddressList", params, optFns, c.addOperationRegisterMemberToAddressListMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RegisterMemberToAddressListOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RegisterMemberToAddressListInput struct { + + // The address to be added to the address list. + // + // This member is required. + Address *string + + // The unique identifier of the address list where the address should be added. + // + // This member is required. + AddressListId *string + + noSmithyDocumentSerde +} + +type RegisterMemberToAddressListOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRegisterMemberToAddressListMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpRegisterMemberToAddressList{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpRegisterMemberToAddressList{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "RegisterMemberToAddressList"); 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 = addOpRegisterMemberToAddressListValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterMemberToAddressList(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_opRegisterMemberToAddressList(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "RegisterMemberToAddressList", + } +} diff --git a/service/mailmanager/api_op_StartAddressListImportJob.go b/service/mailmanager/api_op_StartAddressListImportJob.go new file mode 100644 index 00000000000..db8e487eaef --- /dev/null +++ b/service/mailmanager/api_op_StartAddressListImportJob.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mailmanager + +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" +) + +// Starts an import job for an address list. +func (c *Client) StartAddressListImportJob(ctx context.Context, params *StartAddressListImportJobInput, optFns ...func(*Options)) (*StartAddressListImportJobOutput, error) { + if params == nil { + params = &StartAddressListImportJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartAddressListImportJob", params, optFns, c.addOperationStartAddressListImportJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartAddressListImportJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartAddressListImportJobInput struct { + + // The identifier of the import job that needs to be started. + // + // This member is required. + JobId *string + + noSmithyDocumentSerde +} + +type StartAddressListImportJobOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartAddressListImportJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpStartAddressListImportJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpStartAddressListImportJob{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartAddressListImportJob"); 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 = addOpStartAddressListImportJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartAddressListImportJob(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_opStartAddressListImportJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartAddressListImportJob", + } +} diff --git a/service/mailmanager/api_op_StopAddressListImportJob.go b/service/mailmanager/api_op_StopAddressListImportJob.go new file mode 100644 index 00000000000..cd75d84e6a9 --- /dev/null +++ b/service/mailmanager/api_op_StopAddressListImportJob.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mailmanager + +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" +) + +// Stops an ongoing import job for an address list. +func (c *Client) StopAddressListImportJob(ctx context.Context, params *StopAddressListImportJobInput, optFns ...func(*Options)) (*StopAddressListImportJobOutput, error) { + if params == nil { + params = &StopAddressListImportJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StopAddressListImportJob", params, optFns, c.addOperationStopAddressListImportJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StopAddressListImportJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StopAddressListImportJobInput struct { + + // The identifier of the import job that needs to be stopped. + // + // This member is required. + JobId *string + + noSmithyDocumentSerde +} + +type StopAddressListImportJobOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStopAddressListImportJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpStopAddressListImportJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpStopAddressListImportJob{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StopAddressListImportJob"); 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 = addOpStopAddressListImportJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopAddressListImportJob(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_opStopAddressListImportJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StopAddressListImportJob", + } +} diff --git a/service/mailmanager/deserializers.go b/service/mailmanager/deserializers.go index d97776ef693..b5f5edf7be2 100644 --- a/service/mailmanager/deserializers.go +++ b/service/mailmanager/deserializers.go @@ -267,14 +267,14 @@ func awsAwsjson10_deserializeOpErrorCreateAddonSubscription(response *smithyhttp } } -type awsAwsjson10_deserializeOpCreateArchive struct { +type awsAwsjson10_deserializeOpCreateAddressList struct { } -func (*awsAwsjson10_deserializeOpCreateArchive) ID() string { +func (*awsAwsjson10_deserializeOpCreateAddressList) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateArchive) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateAddressList) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -292,9 +292,9 @@ func (m *awsAwsjson10_deserializeOpCreateArchive) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateArchive(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateAddressList(response, &metadata) } - output := &CreateArchiveOutput{} + output := &CreateAddressListOutput{} out.Result = output var buff [1024]byte @@ -314,7 +314,7 @@ func (m *awsAwsjson10_deserializeOpCreateArchive) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateArchiveOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateAddressListOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -328,7 +328,7 @@ func (m *awsAwsjson10_deserializeOpCreateArchive) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateArchive(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateAddressList(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -390,14 +390,14 @@ func awsAwsjson10_deserializeOpErrorCreateArchive(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpCreateIngressPoint struct { +type awsAwsjson10_deserializeOpCreateAddressListImportJob struct { } -func (*awsAwsjson10_deserializeOpCreateIngressPoint) ID() string { +func (*awsAwsjson10_deserializeOpCreateAddressListImportJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateIngressPoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateAddressListImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -415,9 +415,9 @@ func (m *awsAwsjson10_deserializeOpCreateIngressPoint) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateIngressPoint(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateAddressListImportJob(response, &metadata) } - output := &CreateIngressPointOutput{} + output := &CreateAddressListImportJobOutput{} out.Result = output var buff [1024]byte @@ -437,7 +437,7 @@ func (m *awsAwsjson10_deserializeOpCreateIngressPoint) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateIngressPointOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateAddressListImportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -451,7 +451,7 @@ func (m *awsAwsjson10_deserializeOpCreateIngressPoint) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateIngressPoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateAddressListImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -488,11 +488,14 @@ func awsAwsjson10_deserializeOpErrorCreateIngressPoint(response *smithyhttp.Resp errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -507,14 +510,14 @@ func awsAwsjson10_deserializeOpErrorCreateIngressPoint(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpCreateRelay struct { +type awsAwsjson10_deserializeOpCreateArchive struct { } -func (*awsAwsjson10_deserializeOpCreateRelay) ID() string { +func (*awsAwsjson10_deserializeOpCreateArchive) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateRelay) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateArchive) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -532,9 +535,9 @@ func (m *awsAwsjson10_deserializeOpCreateRelay) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateRelay(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateArchive(response, &metadata) } - output := &CreateRelayOutput{} + output := &CreateArchiveOutput{} out.Result = output var buff [1024]byte @@ -554,7 +557,7 @@ func (m *awsAwsjson10_deserializeOpCreateRelay) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateRelayOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateArchiveOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -568,7 +571,7 @@ func (m *awsAwsjson10_deserializeOpCreateRelay) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateRelay(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateArchive(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -605,12 +608,18 @@ func awsAwsjson10_deserializeOpErrorCreateRelay(response *smithyhttp.Response, m 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("ServiceQuotaExceededException", errorCode): return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -624,14 +633,14 @@ func awsAwsjson10_deserializeOpErrorCreateRelay(response *smithyhttp.Response, m } } -type awsAwsjson10_deserializeOpCreateRuleSet struct { +type awsAwsjson10_deserializeOpCreateIngressPoint struct { } -func (*awsAwsjson10_deserializeOpCreateRuleSet) ID() string { +func (*awsAwsjson10_deserializeOpCreateIngressPoint) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateRuleSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateIngressPoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -649,9 +658,9 @@ func (m *awsAwsjson10_deserializeOpCreateRuleSet) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateRuleSet(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateIngressPoint(response, &metadata) } - output := &CreateRuleSetOutput{} + output := &CreateIngressPointOutput{} out.Result = output var buff [1024]byte @@ -671,7 +680,7 @@ func (m *awsAwsjson10_deserializeOpCreateRuleSet) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateRuleSetOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateIngressPointOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -685,7 +694,7 @@ func (m *awsAwsjson10_deserializeOpCreateRuleSet) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateIngressPoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -741,14 +750,14 @@ func awsAwsjson10_deserializeOpErrorCreateRuleSet(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpCreateTrafficPolicy struct { +type awsAwsjson10_deserializeOpCreateRelay struct { } -func (*awsAwsjson10_deserializeOpCreateTrafficPolicy) ID() string { +func (*awsAwsjson10_deserializeOpCreateRelay) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateTrafficPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateRelay) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -766,9 +775,9 @@ func (m *awsAwsjson10_deserializeOpCreateTrafficPolicy) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateTrafficPolicy(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateRelay(response, &metadata) } - output := &CreateTrafficPolicyOutput{} + output := &CreateRelayOutput{} out.Result = output var buff [1024]byte @@ -788,7 +797,7 @@ func (m *awsAwsjson10_deserializeOpCreateTrafficPolicy) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateTrafficPolicyOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateRelayOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -802,7 +811,7 @@ func (m *awsAwsjson10_deserializeOpCreateTrafficPolicy) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateTrafficPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateRelay(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -858,14 +867,14 @@ func awsAwsjson10_deserializeOpErrorCreateTrafficPolicy(response *smithyhttp.Res } } -type awsAwsjson10_deserializeOpDeleteAddonInstance struct { +type awsAwsjson10_deserializeOpCreateRuleSet struct { } -func (*awsAwsjson10_deserializeOpDeleteAddonInstance) ID() string { +func (*awsAwsjson10_deserializeOpCreateRuleSet) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteAddonInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateRuleSet) HandleDeserialize(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 +892,9 @@ func (m *awsAwsjson10_deserializeOpDeleteAddonInstance) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteAddonInstance(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateRuleSet(response, &metadata) } - output := &DeleteAddonInstanceOutput{} + output := &CreateRuleSetOutput{} out.Result = output var buff [1024]byte @@ -905,7 +914,7 @@ func (m *awsAwsjson10_deserializeOpDeleteAddonInstance) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteAddonInstanceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateRuleSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -919,7 +928,7 @@ func (m *awsAwsjson10_deserializeOpDeleteAddonInstance) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteAddonInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -959,6 +968,9 @@ func awsAwsjson10_deserializeOpErrorDeleteAddonInstance(response *smithyhttp.Res case strings.EqualFold("ConflictException", errorCode): return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -972,14 +984,14 @@ func awsAwsjson10_deserializeOpErrorDeleteAddonInstance(response *smithyhttp.Res } } -type awsAwsjson10_deserializeOpDeleteAddonSubscription struct { +type awsAwsjson10_deserializeOpCreateTrafficPolicy struct { } -func (*awsAwsjson10_deserializeOpDeleteAddonSubscription) ID() string { +func (*awsAwsjson10_deserializeOpCreateTrafficPolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteAddonSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateTrafficPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -997,9 +1009,9 @@ func (m *awsAwsjson10_deserializeOpDeleteAddonSubscription) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteAddonSubscription(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateTrafficPolicy(response, &metadata) } - output := &DeleteAddonSubscriptionOutput{} + output := &CreateTrafficPolicyOutput{} out.Result = output var buff [1024]byte @@ -1019,7 +1031,7 @@ func (m *awsAwsjson10_deserializeOpDeleteAddonSubscription) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteAddonSubscriptionOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateTrafficPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1033,7 +1045,7 @@ func (m *awsAwsjson10_deserializeOpDeleteAddonSubscription) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteAddonSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateTrafficPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1073,6 +1085,9 @@ func awsAwsjson10_deserializeOpErrorDeleteAddonSubscription(response *smithyhttp case strings.EqualFold("ConflictException", errorCode): return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -1086,14 +1101,14 @@ func awsAwsjson10_deserializeOpErrorDeleteAddonSubscription(response *smithyhttp } } -type awsAwsjson10_deserializeOpDeleteArchive struct { +type awsAwsjson10_deserializeOpDeleteAddonInstance struct { } -func (*awsAwsjson10_deserializeOpDeleteArchive) ID() string { +func (*awsAwsjson10_deserializeOpDeleteAddonInstance) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteArchive) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteAddonInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1111,9 +1126,9 @@ func (m *awsAwsjson10_deserializeOpDeleteArchive) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteArchive(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteAddonInstance(response, &metadata) } - output := &DeleteArchiveOutput{} + output := &DeleteAddonInstanceOutput{} out.Result = output var buff [1024]byte @@ -1133,7 +1148,7 @@ func (m *awsAwsjson10_deserializeOpDeleteArchive) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteArchiveOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteAddonInstanceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1147,7 +1162,7 @@ func (m *awsAwsjson10_deserializeOpDeleteArchive) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteArchive(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteAddonInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1184,15 +1199,9 @@ func awsAwsjson10_deserializeOpErrorDeleteArchive(response *smithyhttp.Response, 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("ThrottlingException", errorCode): - return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -1206,14 +1215,14 @@ func awsAwsjson10_deserializeOpErrorDeleteArchive(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpDeleteIngressPoint struct { +type awsAwsjson10_deserializeOpDeleteAddonSubscription struct { } -func (*awsAwsjson10_deserializeOpDeleteIngressPoint) ID() string { +func (*awsAwsjson10_deserializeOpDeleteAddonSubscription) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteIngressPoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteAddonSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1231,9 +1240,9 @@ func (m *awsAwsjson10_deserializeOpDeleteIngressPoint) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteIngressPoint(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteAddonSubscription(response, &metadata) } - output := &DeleteIngressPointOutput{} + output := &DeleteAddonSubscriptionOutput{} out.Result = output var buff [1024]byte @@ -1253,7 +1262,7 @@ func (m *awsAwsjson10_deserializeOpDeleteIngressPoint) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteIngressPointOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteAddonSubscriptionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1267,7 +1276,7 @@ func (m *awsAwsjson10_deserializeOpDeleteIngressPoint) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteIngressPoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteAddonSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1307,9 +1316,6 @@ func awsAwsjson10_deserializeOpErrorDeleteIngressPoint(response *smithyhttp.Resp case strings.EqualFold("ConflictException", errorCode): return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -1323,14 +1329,14 @@ func awsAwsjson10_deserializeOpErrorDeleteIngressPoint(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpDeleteRelay struct { +type awsAwsjson10_deserializeOpDeleteAddressList struct { } -func (*awsAwsjson10_deserializeOpDeleteRelay) ID() string { +func (*awsAwsjson10_deserializeOpDeleteAddressList) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteRelay) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteAddressList) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1348,9 +1354,9 @@ func (m *awsAwsjson10_deserializeOpDeleteRelay) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteRelay(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteAddressList(response, &metadata) } - output := &DeleteRelayOutput{} + output := &DeleteAddressListOutput{} out.Result = output var buff [1024]byte @@ -1370,7 +1376,7 @@ func (m *awsAwsjson10_deserializeOpDeleteRelay) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteRelayOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteAddressListOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1384,7 +1390,7 @@ func (m *awsAwsjson10_deserializeOpDeleteRelay) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteRelay(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteAddressList(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1421,14 +1427,14 @@ func awsAwsjson10_deserializeOpErrorDeleteRelay(response *smithyhttp.Response, m 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("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -1440,14 +1446,14 @@ func awsAwsjson10_deserializeOpErrorDeleteRelay(response *smithyhttp.Response, m } } -type awsAwsjson10_deserializeOpDeleteRuleSet struct { +type awsAwsjson10_deserializeOpDeleteArchive struct { } -func (*awsAwsjson10_deserializeOpDeleteRuleSet) ID() string { +func (*awsAwsjson10_deserializeOpDeleteArchive) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteRuleSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteArchive) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1465,9 +1471,9 @@ func (m *awsAwsjson10_deserializeOpDeleteRuleSet) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteRuleSet(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteArchive(response, &metadata) } - output := &DeleteRuleSetOutput{} + output := &DeleteArchiveOutput{} out.Result = output var buff [1024]byte @@ -1487,7 +1493,7 @@ func (m *awsAwsjson10_deserializeOpDeleteRuleSet) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteRuleSetOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteArchiveOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1501,7 +1507,7 @@ func (m *awsAwsjson10_deserializeOpDeleteRuleSet) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteArchive(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1538,9 +1544,15 @@ func awsAwsjson10_deserializeOpErrorDeleteRuleSet(response *smithyhttp.Response, 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("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -1554,14 +1566,14 @@ func awsAwsjson10_deserializeOpErrorDeleteRuleSet(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpDeleteTrafficPolicy struct { +type awsAwsjson10_deserializeOpDeleteIngressPoint struct { } -func (*awsAwsjson10_deserializeOpDeleteTrafficPolicy) ID() string { +func (*awsAwsjson10_deserializeOpDeleteIngressPoint) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteTrafficPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteIngressPoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1579,9 +1591,9 @@ func (m *awsAwsjson10_deserializeOpDeleteTrafficPolicy) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteTrafficPolicy(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteIngressPoint(response, &metadata) } - output := &DeleteTrafficPolicyOutput{} + output := &DeleteIngressPointOutput{} out.Result = output var buff [1024]byte @@ -1601,7 +1613,7 @@ func (m *awsAwsjson10_deserializeOpDeleteTrafficPolicy) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteTrafficPolicyOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteIngressPointOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1615,7 +1627,7 @@ func (m *awsAwsjson10_deserializeOpDeleteTrafficPolicy) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteTrafficPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteIngressPoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1671,14 +1683,14 @@ func awsAwsjson10_deserializeOpErrorDeleteTrafficPolicy(response *smithyhttp.Res } } -type awsAwsjson10_deserializeOpGetAddonInstance struct { +type awsAwsjson10_deserializeOpDeleteRelay struct { } -func (*awsAwsjson10_deserializeOpGetAddonInstance) ID() string { +func (*awsAwsjson10_deserializeOpDeleteRelay) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetAddonInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteRelay) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1696,9 +1708,9 @@ func (m *awsAwsjson10_deserializeOpGetAddonInstance) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetAddonInstance(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteRelay(response, &metadata) } - output := &GetAddonInstanceOutput{} + output := &DeleteRelayOutput{} out.Result = output var buff [1024]byte @@ -1718,7 +1730,7 @@ func (m *awsAwsjson10_deserializeOpGetAddonInstance) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetAddonInstanceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteRelayOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1732,7 +1744,7 @@ func (m *awsAwsjson10_deserializeOpGetAddonInstance) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetAddonInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteRelay(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1769,6 +1781,9 @@ func awsAwsjson10_deserializeOpErrorGetAddonInstance(response *smithyhttp.Respon errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) @@ -1785,14 +1800,14 @@ func awsAwsjson10_deserializeOpErrorGetAddonInstance(response *smithyhttp.Respon } } -type awsAwsjson10_deserializeOpGetAddonSubscription struct { +type awsAwsjson10_deserializeOpDeleteRuleSet struct { } -func (*awsAwsjson10_deserializeOpGetAddonSubscription) ID() string { +func (*awsAwsjson10_deserializeOpDeleteRuleSet) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetAddonSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteRuleSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1810,9 +1825,9 @@ func (m *awsAwsjson10_deserializeOpGetAddonSubscription) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetAddonSubscription(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteRuleSet(response, &metadata) } - output := &GetAddonSubscriptionOutput{} + output := &DeleteRuleSetOutput{} out.Result = output var buff [1024]byte @@ -1832,7 +1847,7 @@ func (m *awsAwsjson10_deserializeOpGetAddonSubscription) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetAddonSubscriptionOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteRuleSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1846,7 +1861,7 @@ func (m *awsAwsjson10_deserializeOpGetAddonSubscription) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetAddonSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1883,8 +1898,8 @@ func awsAwsjson10_deserializeOpErrorGetAddonSubscription(response *smithyhttp.Re errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -1899,14 +1914,14 @@ func awsAwsjson10_deserializeOpErrorGetAddonSubscription(response *smithyhttp.Re } } -type awsAwsjson10_deserializeOpGetArchive struct { +type awsAwsjson10_deserializeOpDeleteTrafficPolicy struct { } -func (*awsAwsjson10_deserializeOpGetArchive) ID() string { +func (*awsAwsjson10_deserializeOpDeleteTrafficPolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetArchive) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteTrafficPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1924,9 +1939,9 @@ func (m *awsAwsjson10_deserializeOpGetArchive) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetArchive(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteTrafficPolicy(response, &metadata) } - output := &GetArchiveOutput{} + output := &DeleteTrafficPolicyOutput{} out.Result = output var buff [1024]byte @@ -1946,7 +1961,7 @@ func (m *awsAwsjson10_deserializeOpGetArchive) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetArchiveOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteTrafficPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1960,7 +1975,7 @@ func (m *awsAwsjson10_deserializeOpGetArchive) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetArchive(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteTrafficPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1997,15 +2012,12 @@ func awsAwsjson10_deserializeOpErrorGetArchive(response *smithyhttp.Response, me 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("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): - return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -2019,14 +2031,14 @@ func awsAwsjson10_deserializeOpErrorGetArchive(response *smithyhttp.Response, me } } -type awsAwsjson10_deserializeOpGetArchiveExport struct { +type awsAwsjson10_deserializeOpDeregisterMemberFromAddressList struct { } -func (*awsAwsjson10_deserializeOpGetArchiveExport) ID() string { +func (*awsAwsjson10_deserializeOpDeregisterMemberFromAddressList) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetArchiveExport) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeregisterMemberFromAddressList) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2044,9 +2056,9 @@ func (m *awsAwsjson10_deserializeOpGetArchiveExport) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetArchiveExport(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeregisterMemberFromAddressList(response, &metadata) } - output := &GetArchiveExportOutput{} + output := &DeregisterMemberFromAddressListOutput{} out.Result = output var buff [1024]byte @@ -2066,7 +2078,7 @@ func (m *awsAwsjson10_deserializeOpGetArchiveExport) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetArchiveExportOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeregisterMemberFromAddressListOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2080,7 +2092,7 @@ func (m *awsAwsjson10_deserializeOpGetArchiveExport) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetArchiveExport(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeregisterMemberFromAddressList(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2120,6 +2132,9 @@ func awsAwsjson10_deserializeOpErrorGetArchiveExport(response *smithyhttp.Respon case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -2136,14 +2151,14 @@ func awsAwsjson10_deserializeOpErrorGetArchiveExport(response *smithyhttp.Respon } } -type awsAwsjson10_deserializeOpGetArchiveMessage struct { +type awsAwsjson10_deserializeOpGetAddonInstance struct { } -func (*awsAwsjson10_deserializeOpGetArchiveMessage) ID() string { +func (*awsAwsjson10_deserializeOpGetAddonInstance) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetArchiveMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetAddonInstance) HandleDeserialize(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,9 +2176,9 @@ func (m *awsAwsjson10_deserializeOpGetArchiveMessage) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetArchiveMessage(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetAddonInstance(response, &metadata) } - output := &GetArchiveMessageOutput{} + output := &GetAddonInstanceOutput{} out.Result = output var buff [1024]byte @@ -2183,7 +2198,7 @@ func (m *awsAwsjson10_deserializeOpGetArchiveMessage) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetArchiveMessageOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetAddonInstanceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2197,7 +2212,7 @@ func (m *awsAwsjson10_deserializeOpGetArchiveMessage) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetArchiveMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetAddonInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2234,11 +2249,8 @@ func awsAwsjson10_deserializeOpErrorGetArchiveMessage(response *smithyhttp.Respo errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ThrottlingException", errorCode): - return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -2253,14 +2265,14 @@ func awsAwsjson10_deserializeOpErrorGetArchiveMessage(response *smithyhttp.Respo } } -type awsAwsjson10_deserializeOpGetArchiveMessageContent struct { +type awsAwsjson10_deserializeOpGetAddonSubscription struct { } -func (*awsAwsjson10_deserializeOpGetArchiveMessageContent) ID() string { +func (*awsAwsjson10_deserializeOpGetAddonSubscription) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetArchiveMessageContent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetAddonSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2278,9 +2290,9 @@ func (m *awsAwsjson10_deserializeOpGetArchiveMessageContent) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetArchiveMessageContent(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetAddonSubscription(response, &metadata) } - output := &GetArchiveMessageContentOutput{} + output := &GetAddonSubscriptionOutput{} out.Result = output var buff [1024]byte @@ -2300,7 +2312,7 @@ func (m *awsAwsjson10_deserializeOpGetArchiveMessageContent) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetArchiveMessageContentOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetAddonSubscriptionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2314,7 +2326,7 @@ func (m *awsAwsjson10_deserializeOpGetArchiveMessageContent) HandleDeserialize(c return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetArchiveMessageContent(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetAddonSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2351,11 +2363,8 @@ func awsAwsjson10_deserializeOpErrorGetArchiveMessageContent(response *smithyhtt errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ThrottlingException", errorCode): - return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -2370,14 +2379,14 @@ func awsAwsjson10_deserializeOpErrorGetArchiveMessageContent(response *smithyhtt } } -type awsAwsjson10_deserializeOpGetArchiveSearch struct { +type awsAwsjson10_deserializeOpGetAddressList struct { } -func (*awsAwsjson10_deserializeOpGetArchiveSearch) ID() string { +func (*awsAwsjson10_deserializeOpGetAddressList) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetArchiveSearch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetAddressList) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2395,9 +2404,9 @@ func (m *awsAwsjson10_deserializeOpGetArchiveSearch) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetArchiveSearch(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetAddressList(response, &metadata) } - output := &GetArchiveSearchOutput{} + output := &GetAddressListOutput{} out.Result = output var buff [1024]byte @@ -2417,7 +2426,7 @@ func (m *awsAwsjson10_deserializeOpGetArchiveSearch) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetArchiveSearchOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetAddressListOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2431,7 +2440,7 @@ func (m *awsAwsjson10_deserializeOpGetArchiveSearch) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetArchiveSearch(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetAddressList(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2471,6 +2480,9 @@ func awsAwsjson10_deserializeOpErrorGetArchiveSearch(response *smithyhttp.Respon case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -2487,14 +2499,14 @@ func awsAwsjson10_deserializeOpErrorGetArchiveSearch(response *smithyhttp.Respon } } -type awsAwsjson10_deserializeOpGetArchiveSearchResults struct { +type awsAwsjson10_deserializeOpGetAddressListImportJob struct { } -func (*awsAwsjson10_deserializeOpGetArchiveSearchResults) ID() string { +func (*awsAwsjson10_deserializeOpGetAddressListImportJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetArchiveSearchResults) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetAddressListImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2512,9 +2524,9 @@ func (m *awsAwsjson10_deserializeOpGetArchiveSearchResults) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetArchiveSearchResults(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetAddressListImportJob(response, &metadata) } - output := &GetArchiveSearchResultsOutput{} + output := &GetAddressListImportJobOutput{} out.Result = output var buff [1024]byte @@ -2534,7 +2546,7 @@ func (m *awsAwsjson10_deserializeOpGetArchiveSearchResults) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetArchiveSearchResultsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetAddressListImportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2548,7 +2560,7 @@ func (m *awsAwsjson10_deserializeOpGetArchiveSearchResults) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetArchiveSearchResults(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetAddressListImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2588,8 +2600,8 @@ func awsAwsjson10_deserializeOpErrorGetArchiveSearchResults(response *smithyhttp case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -2607,14 +2619,14 @@ func awsAwsjson10_deserializeOpErrorGetArchiveSearchResults(response *smithyhttp } } -type awsAwsjson10_deserializeOpGetIngressPoint struct { +type awsAwsjson10_deserializeOpGetArchive struct { } -func (*awsAwsjson10_deserializeOpGetIngressPoint) ID() string { +func (*awsAwsjson10_deserializeOpGetArchive) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetIngressPoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetArchive) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2632,9 +2644,9 @@ func (m *awsAwsjson10_deserializeOpGetIngressPoint) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetIngressPoint(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetArchive(response, &metadata) } - output := &GetIngressPointOutput{} + output := &GetArchiveOutput{} out.Result = output var buff [1024]byte @@ -2654,7 +2666,7 @@ func (m *awsAwsjson10_deserializeOpGetIngressPoint) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetIngressPointOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetArchiveOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2668,7 +2680,7 @@ func (m *awsAwsjson10_deserializeOpGetIngressPoint) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetIngressPoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetArchive(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2705,9 +2717,15 @@ func awsAwsjson10_deserializeOpErrorGetIngressPoint(response *smithyhttp.Respons errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -2721,14 +2739,14 @@ func awsAwsjson10_deserializeOpErrorGetIngressPoint(response *smithyhttp.Respons } } -type awsAwsjson10_deserializeOpGetRelay struct { +type awsAwsjson10_deserializeOpGetArchiveExport struct { } -func (*awsAwsjson10_deserializeOpGetRelay) ID() string { +func (*awsAwsjson10_deserializeOpGetArchiveExport) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetRelay) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetArchiveExport) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2746,9 +2764,9 @@ func (m *awsAwsjson10_deserializeOpGetRelay) HandleDeserialize(ctx context.Conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetRelay(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetArchiveExport(response, &metadata) } - output := &GetRelayOutput{} + output := &GetArchiveExportOutput{} out.Result = output var buff [1024]byte @@ -2768,7 +2786,7 @@ func (m *awsAwsjson10_deserializeOpGetRelay) HandleDeserialize(ctx context.Conte return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetRelayOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetArchiveExportOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2782,7 +2800,7 @@ func (m *awsAwsjson10_deserializeOpGetRelay) HandleDeserialize(ctx context.Conte return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetRelay(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetArchiveExport(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2819,8 +2837,11 @@ func awsAwsjson10_deserializeOpErrorGetRelay(response *smithyhttp.Response, meta errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -2835,14 +2856,14 @@ func awsAwsjson10_deserializeOpErrorGetRelay(response *smithyhttp.Response, meta } } -type awsAwsjson10_deserializeOpGetRuleSet struct { +type awsAwsjson10_deserializeOpGetArchiveMessage struct { } -func (*awsAwsjson10_deserializeOpGetRuleSet) ID() string { +func (*awsAwsjson10_deserializeOpGetArchiveMessage) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetRuleSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetArchiveMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2860,9 +2881,9 @@ func (m *awsAwsjson10_deserializeOpGetRuleSet) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetRuleSet(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetArchiveMessage(response, &metadata) } - output := &GetRuleSetOutput{} + output := &GetArchiveMessageOutput{} out.Result = output var buff [1024]byte @@ -2882,7 +2903,7 @@ func (m *awsAwsjson10_deserializeOpGetRuleSet) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetRuleSetOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetArchiveMessageOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2896,7 +2917,7 @@ func (m *awsAwsjson10_deserializeOpGetRuleSet) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetArchiveMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2933,8 +2954,11 @@ func awsAwsjson10_deserializeOpErrorGetRuleSet(response *smithyhttp.Response, me errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -2949,14 +2973,14 @@ func awsAwsjson10_deserializeOpErrorGetRuleSet(response *smithyhttp.Response, me } } -type awsAwsjson10_deserializeOpGetTrafficPolicy struct { +type awsAwsjson10_deserializeOpGetArchiveMessageContent struct { } -func (*awsAwsjson10_deserializeOpGetTrafficPolicy) ID() string { +func (*awsAwsjson10_deserializeOpGetArchiveMessageContent) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetTrafficPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetArchiveMessageContent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2974,9 +2998,9 @@ func (m *awsAwsjson10_deserializeOpGetTrafficPolicy) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetTrafficPolicy(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetArchiveMessageContent(response, &metadata) } - output := &GetTrafficPolicyOutput{} + output := &GetArchiveMessageContentOutput{} out.Result = output var buff [1024]byte @@ -2996,7 +3020,7 @@ func (m *awsAwsjson10_deserializeOpGetTrafficPolicy) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetTrafficPolicyOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetArchiveMessageContentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3010,7 +3034,7 @@ func (m *awsAwsjson10_deserializeOpGetTrafficPolicy) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetTrafficPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetArchiveMessageContent(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3047,8 +3071,11 @@ func awsAwsjson10_deserializeOpErrorGetTrafficPolicy(response *smithyhttp.Respon errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -3063,14 +3090,14 @@ func awsAwsjson10_deserializeOpErrorGetTrafficPolicy(response *smithyhttp.Respon } } -type awsAwsjson10_deserializeOpListAddonInstances struct { +type awsAwsjson10_deserializeOpGetArchiveSearch struct { } -func (*awsAwsjson10_deserializeOpListAddonInstances) ID() string { +func (*awsAwsjson10_deserializeOpGetArchiveSearch) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListAddonInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetArchiveSearch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3088,9 +3115,9 @@ func (m *awsAwsjson10_deserializeOpListAddonInstances) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListAddonInstances(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetArchiveSearch(response, &metadata) } - output := &ListAddonInstancesOutput{} + output := &GetArchiveSearchOutput{} out.Result = output var buff [1024]byte @@ -3110,7 +3137,7 @@ func (m *awsAwsjson10_deserializeOpListAddonInstances) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListAddonInstancesOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetArchiveSearchOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3124,7 +3151,7 @@ func (m *awsAwsjson10_deserializeOpListAddonInstances) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListAddonInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetArchiveSearch(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3161,6 +3188,12 @@ func awsAwsjson10_deserializeOpErrorListAddonInstances(response *smithyhttp.Resp errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -3174,14 +3207,14 @@ func awsAwsjson10_deserializeOpErrorListAddonInstances(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpListAddonSubscriptions struct { +type awsAwsjson10_deserializeOpGetArchiveSearchResults struct { } -func (*awsAwsjson10_deserializeOpListAddonSubscriptions) ID() string { +func (*awsAwsjson10_deserializeOpGetArchiveSearchResults) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListAddonSubscriptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetArchiveSearchResults) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3199,9 +3232,9 @@ func (m *awsAwsjson10_deserializeOpListAddonSubscriptions) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListAddonSubscriptions(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetArchiveSearchResults(response, &metadata) } - output := &ListAddonSubscriptionsOutput{} + output := &GetArchiveSearchResultsOutput{} out.Result = output var buff [1024]byte @@ -3221,7 +3254,7 @@ func (m *awsAwsjson10_deserializeOpListAddonSubscriptions) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListAddonSubscriptionsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetArchiveSearchResultsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3235,7 +3268,7 @@ func (m *awsAwsjson10_deserializeOpListAddonSubscriptions) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListAddonSubscriptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetArchiveSearchResults(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3272,6 +3305,15 @@ func awsAwsjson10_deserializeOpErrorListAddonSubscriptions(response *smithyhttp. 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("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -3285,14 +3327,14 @@ func awsAwsjson10_deserializeOpErrorListAddonSubscriptions(response *smithyhttp. } } -type awsAwsjson10_deserializeOpListArchiveExports struct { +type awsAwsjson10_deserializeOpGetIngressPoint struct { } -func (*awsAwsjson10_deserializeOpListArchiveExports) ID() string { +func (*awsAwsjson10_deserializeOpGetIngressPoint) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListArchiveExports) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetIngressPoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3310,9 +3352,9 @@ func (m *awsAwsjson10_deserializeOpListArchiveExports) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListArchiveExports(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetIngressPoint(response, &metadata) } - output := &ListArchiveExportsOutput{} + output := &GetIngressPointOutput{} out.Result = output var buff [1024]byte @@ -3332,7 +3374,7 @@ func (m *awsAwsjson10_deserializeOpListArchiveExports) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListArchiveExportsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetIngressPointOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3346,7 +3388,7 @@ func (m *awsAwsjson10_deserializeOpListArchiveExports) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListArchiveExports(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetIngressPoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3383,15 +3425,9 @@ func awsAwsjson10_deserializeOpErrorListArchiveExports(response *smithyhttp.Resp errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): - return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -3405,14 +3441,14 @@ func awsAwsjson10_deserializeOpErrorListArchiveExports(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpListArchives struct { +type awsAwsjson10_deserializeOpGetMemberOfAddressList struct { } -func (*awsAwsjson10_deserializeOpListArchives) ID() string { +func (*awsAwsjson10_deserializeOpGetMemberOfAddressList) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListArchives) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetMemberOfAddressList) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3430,9 +3466,9 @@ func (m *awsAwsjson10_deserializeOpListArchives) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListArchives(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetMemberOfAddressList(response, &metadata) } - output := &ListArchivesOutput{} + output := &GetMemberOfAddressListOutput{} out.Result = output var buff [1024]byte @@ -3452,7 +3488,7 @@ func (m *awsAwsjson10_deserializeOpListArchives) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListArchivesOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetMemberOfAddressListOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3466,7 +3502,7 @@ func (m *awsAwsjson10_deserializeOpListArchives) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListArchives(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetMemberOfAddressList(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3506,6 +3542,9 @@ func awsAwsjson10_deserializeOpErrorListArchives(response *smithyhttp.Response, case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -3522,14 +3561,14 @@ func awsAwsjson10_deserializeOpErrorListArchives(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpListArchiveSearches struct { +type awsAwsjson10_deserializeOpGetRelay struct { } -func (*awsAwsjson10_deserializeOpListArchiveSearches) ID() string { +func (*awsAwsjson10_deserializeOpGetRelay) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListArchiveSearches) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetRelay) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3547,9 +3586,9 @@ func (m *awsAwsjson10_deserializeOpListArchiveSearches) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListArchiveSearches(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetRelay(response, &metadata) } - output := &ListArchiveSearchesOutput{} + output := &GetRelayOutput{} out.Result = output var buff [1024]byte @@ -3569,7 +3608,7 @@ func (m *awsAwsjson10_deserializeOpListArchiveSearches) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListArchiveSearchesOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetRelayOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3583,7 +3622,7 @@ func (m *awsAwsjson10_deserializeOpListArchiveSearches) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListArchiveSearches(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetRelay(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3620,15 +3659,9 @@ func awsAwsjson10_deserializeOpErrorListArchiveSearches(response *smithyhttp.Res errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): - return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -3642,14 +3675,14 @@ func awsAwsjson10_deserializeOpErrorListArchiveSearches(response *smithyhttp.Res } } -type awsAwsjson10_deserializeOpListIngressPoints struct { +type awsAwsjson10_deserializeOpGetRuleSet struct { } -func (*awsAwsjson10_deserializeOpListIngressPoints) ID() string { +func (*awsAwsjson10_deserializeOpGetRuleSet) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListIngressPoints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetRuleSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3667,9 +3700,9 @@ func (m *awsAwsjson10_deserializeOpListIngressPoints) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListIngressPoints(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetRuleSet(response, &metadata) } - output := &ListIngressPointsOutput{} + output := &GetRuleSetOutput{} out.Result = output var buff [1024]byte @@ -3689,7 +3722,7 @@ func (m *awsAwsjson10_deserializeOpListIngressPoints) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListIngressPointsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetRuleSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3703,7 +3736,7 @@ func (m *awsAwsjson10_deserializeOpListIngressPoints) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListIngressPoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3740,6 +3773,9 @@ func awsAwsjson10_deserializeOpErrorListIngressPoints(response *smithyhttp.Respo errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -3753,14 +3789,14 @@ func awsAwsjson10_deserializeOpErrorListIngressPoints(response *smithyhttp.Respo } } -type awsAwsjson10_deserializeOpListRelays struct { +type awsAwsjson10_deserializeOpGetTrafficPolicy struct { } -func (*awsAwsjson10_deserializeOpListRelays) ID() string { +func (*awsAwsjson10_deserializeOpGetTrafficPolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListRelays) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetTrafficPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3778,9 +3814,9 @@ func (m *awsAwsjson10_deserializeOpListRelays) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListRelays(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetTrafficPolicy(response, &metadata) } - output := &ListRelaysOutput{} + output := &GetTrafficPolicyOutput{} out.Result = output var buff [1024]byte @@ -3800,7 +3836,7 @@ func (m *awsAwsjson10_deserializeOpListRelays) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListRelaysOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetTrafficPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3814,7 +3850,7 @@ func (m *awsAwsjson10_deserializeOpListRelays) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListRelays(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetTrafficPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3851,6 +3887,9 @@ func awsAwsjson10_deserializeOpErrorListRelays(response *smithyhttp.Response, me errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -3864,14 +3903,14 @@ func awsAwsjson10_deserializeOpErrorListRelays(response *smithyhttp.Response, me } } -type awsAwsjson10_deserializeOpListRuleSets struct { +type awsAwsjson10_deserializeOpListAddonInstances struct { } -func (*awsAwsjson10_deserializeOpListRuleSets) ID() string { +func (*awsAwsjson10_deserializeOpListAddonInstances) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListRuleSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListAddonInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3889,9 +3928,9 @@ func (m *awsAwsjson10_deserializeOpListRuleSets) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListRuleSets(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListAddonInstances(response, &metadata) } - output := &ListRuleSetsOutput{} + output := &ListAddonInstancesOutput{} out.Result = output var buff [1024]byte @@ -3911,7 +3950,7 @@ func (m *awsAwsjson10_deserializeOpListRuleSets) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListRuleSetsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListAddonInstancesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3925,7 +3964,7 @@ func (m *awsAwsjson10_deserializeOpListRuleSets) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListRuleSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListAddonInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3975,14 +4014,14 @@ func awsAwsjson10_deserializeOpErrorListRuleSets(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpListTagsForResource struct { +type awsAwsjson10_deserializeOpListAddonSubscriptions struct { } -func (*awsAwsjson10_deserializeOpListTagsForResource) ID() string { +func (*awsAwsjson10_deserializeOpListAddonSubscriptions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListAddonSubscriptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4000,9 +4039,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_deserializeOpErrorListAddonSubscriptions(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListAddonSubscriptionsOutput{} out.Result = output var buff [1024]byte @@ -4022,7 +4061,7 @@ func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListAddonSubscriptionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4036,7 +4075,7 @@ func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListAddonSubscriptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4073,9 +4112,6 @@ func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Res errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -4089,14 +4125,14 @@ func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -type awsAwsjson10_deserializeOpListTrafficPolicies struct { +type awsAwsjson10_deserializeOpListAddressListImportJobs struct { } -func (*awsAwsjson10_deserializeOpListTrafficPolicies) ID() string { +func (*awsAwsjson10_deserializeOpListAddressListImportJobs) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListTrafficPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListAddressListImportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4114,9 +4150,9 @@ func (m *awsAwsjson10_deserializeOpListTrafficPolicies) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListTrafficPolicies(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListAddressListImportJobs(response, &metadata) } - output := &ListTrafficPoliciesOutput{} + output := &ListAddressListImportJobsOutput{} out.Result = output var buff [1024]byte @@ -4136,7 +4172,7 @@ func (m *awsAwsjson10_deserializeOpListTrafficPolicies) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListTrafficPoliciesOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListAddressListImportJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4150,7 +4186,7 @@ func (m *awsAwsjson10_deserializeOpListTrafficPolicies) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListTrafficPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListAddressListImportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4187,6 +4223,15 @@ func awsAwsjson10_deserializeOpErrorListTrafficPolicies(response *smithyhttp.Res errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -4200,14 +4245,14 @@ func awsAwsjson10_deserializeOpErrorListTrafficPolicies(response *smithyhttp.Res } } -type awsAwsjson10_deserializeOpStartArchiveExport struct { +type awsAwsjson10_deserializeOpListAddressLists struct { } -func (*awsAwsjson10_deserializeOpStartArchiveExport) ID() string { +func (*awsAwsjson10_deserializeOpListAddressLists) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpStartArchiveExport) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListAddressLists) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4225,9 +4270,9 @@ func (m *awsAwsjson10_deserializeOpStartArchiveExport) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorStartArchiveExport(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListAddressLists(response, &metadata) } - output := &StartArchiveExportOutput{} + output := &ListAddressListsOutput{} out.Result = output var buff [1024]byte @@ -4247,7 +4292,7 @@ func (m *awsAwsjson10_deserializeOpStartArchiveExport) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentStartArchiveExportOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListAddressListsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4261,7 +4306,7 @@ func (m *awsAwsjson10_deserializeOpStartArchiveExport) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorStartArchiveExport(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListAddressLists(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4301,12 +4346,6 @@ func awsAwsjson10_deserializeOpErrorStartArchiveExport(response *smithyhttp.Resp case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(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("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -4323,14 +4362,14 @@ func awsAwsjson10_deserializeOpErrorStartArchiveExport(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpStartArchiveSearch struct { +type awsAwsjson10_deserializeOpListArchiveExports struct { } -func (*awsAwsjson10_deserializeOpStartArchiveSearch) ID() string { +func (*awsAwsjson10_deserializeOpListArchiveExports) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpStartArchiveSearch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListArchiveExports) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4348,9 +4387,9 @@ func (m *awsAwsjson10_deserializeOpStartArchiveSearch) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorStartArchiveSearch(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListArchiveExports(response, &metadata) } - output := &StartArchiveSearchOutput{} + output := &ListArchiveExportsOutput{} out.Result = output var buff [1024]byte @@ -4370,7 +4409,7 @@ func (m *awsAwsjson10_deserializeOpStartArchiveSearch) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentStartArchiveSearchOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListArchiveExportsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4384,7 +4423,7 @@ func (m *awsAwsjson10_deserializeOpStartArchiveSearch) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorStartArchiveSearch(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListArchiveExports(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4424,15 +4463,9 @@ func awsAwsjson10_deserializeOpErrorStartArchiveSearch(response *smithyhttp.Resp case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(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("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -4449,14 +4482,14 @@ func awsAwsjson10_deserializeOpErrorStartArchiveSearch(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpStopArchiveExport struct { +type awsAwsjson10_deserializeOpListArchives struct { } -func (*awsAwsjson10_deserializeOpStopArchiveExport) ID() string { +func (*awsAwsjson10_deserializeOpListArchives) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpStopArchiveExport) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListArchives) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4474,9 +4507,9 @@ func (m *awsAwsjson10_deserializeOpStopArchiveExport) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorStopArchiveExport(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListArchives(response, &metadata) } - output := &StopArchiveExportOutput{} + output := &ListArchivesOutput{} out.Result = output var buff [1024]byte @@ -4496,7 +4529,7 @@ func (m *awsAwsjson10_deserializeOpStopArchiveExport) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentStopArchiveExportOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListArchivesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4510,7 +4543,7 @@ func (m *awsAwsjson10_deserializeOpStopArchiveExport) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson10_deserializeOpErrorStopArchiveExport(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListArchives(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4566,14 +4599,14 @@ func awsAwsjson10_deserializeOpErrorStopArchiveExport(response *smithyhttp.Respo } } -type awsAwsjson10_deserializeOpStopArchiveSearch struct { +type awsAwsjson10_deserializeOpListArchiveSearches struct { } -func (*awsAwsjson10_deserializeOpStopArchiveSearch) ID() string { +func (*awsAwsjson10_deserializeOpListArchiveSearches) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpStopArchiveSearch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListArchiveSearches) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4591,9 +4624,9 @@ func (m *awsAwsjson10_deserializeOpStopArchiveSearch) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorStopArchiveSearch(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListArchiveSearches(response, &metadata) } - output := &StopArchiveSearchOutput{} + output := &ListArchiveSearchesOutput{} out.Result = output var buff [1024]byte @@ -4613,7 +4646,7 @@ func (m *awsAwsjson10_deserializeOpStopArchiveSearch) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentStopArchiveSearchOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListArchiveSearchesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4627,7 +4660,7 @@ func (m *awsAwsjson10_deserializeOpStopArchiveSearch) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson10_deserializeOpErrorStopArchiveSearch(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListArchiveSearches(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4667,6 +4700,9 @@ func awsAwsjson10_deserializeOpErrorStopArchiveSearch(response *smithyhttp.Respo case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -4683,14 +4719,14 @@ func awsAwsjson10_deserializeOpErrorStopArchiveSearch(response *smithyhttp.Respo } } -type awsAwsjson10_deserializeOpTagResource struct { +type awsAwsjson10_deserializeOpListIngressPoints struct { } -func (*awsAwsjson10_deserializeOpTagResource) ID() string { +func (*awsAwsjson10_deserializeOpListIngressPoints) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListIngressPoints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4708,9 +4744,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_deserializeOpErrorListIngressPoints(response, &metadata) } - output := &TagResourceOutput{} + output := &ListIngressPointsOutput{} out.Result = output var buff [1024]byte @@ -4730,7 +4766,7 @@ func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentTagResourceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListIngressPointsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4744,7 +4780,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_deserializeOpErrorListIngressPoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4781,15 +4817,6 @@ func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, m errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(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) @@ -4803,14 +4830,14 @@ func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsAwsjson10_deserializeOpUntagResource struct { +type awsAwsjson10_deserializeOpListMembersOfAddressList struct { } -func (*awsAwsjson10_deserializeOpUntagResource) ID() string { +func (*awsAwsjson10_deserializeOpListMembersOfAddressList) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListMembersOfAddressList) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4828,9 +4855,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_deserializeOpErrorListMembersOfAddressList(response, &metadata) } - output := &UntagResourceOutput{} + output := &ListMembersOfAddressListOutput{} out.Result = output var buff [1024]byte @@ -4850,7 +4877,7 @@ func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUntagResourceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListMembersOfAddressListOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4864,7 +4891,7 @@ func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListMembersOfAddressList(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4901,12 +4928,15 @@ func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -4920,14 +4950,14 @@ func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpUpdateArchive struct { +type awsAwsjson10_deserializeOpListRelays struct { } -func (*awsAwsjson10_deserializeOpUpdateArchive) ID() string { +func (*awsAwsjson10_deserializeOpListRelays) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateArchive) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListRelays) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4945,9 +4975,9 @@ func (m *awsAwsjson10_deserializeOpUpdateArchive) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateArchive(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListRelays(response, &metadata) } - output := &UpdateArchiveOutput{} + output := &ListRelaysOutput{} out.Result = output var buff [1024]byte @@ -4967,7 +4997,7 @@ func (m *awsAwsjson10_deserializeOpUpdateArchive) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateArchiveOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListRelaysOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4981,7 +5011,7 @@ func (m *awsAwsjson10_deserializeOpUpdateArchive) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateArchive(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListRelays(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5018,21 +5048,6 @@ func awsAwsjson10_deserializeOpErrorUpdateArchive(response *smithyhttp.Response, 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("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) - - case strings.EqualFold("ThrottlingException", errorCode): - return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -5046,14 +5061,14 @@ func awsAwsjson10_deserializeOpErrorUpdateArchive(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpUpdateIngressPoint struct { +type awsAwsjson10_deserializeOpListRuleSets struct { } -func (*awsAwsjson10_deserializeOpUpdateIngressPoint) ID() string { +func (*awsAwsjson10_deserializeOpListRuleSets) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateIngressPoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListRuleSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5071,9 +5086,9 @@ func (m *awsAwsjson10_deserializeOpUpdateIngressPoint) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateIngressPoint(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListRuleSets(response, &metadata) } - output := &UpdateIngressPointOutput{} + output := &ListRuleSetsOutput{} out.Result = output var buff [1024]byte @@ -5093,7 +5108,7 @@ func (m *awsAwsjson10_deserializeOpUpdateIngressPoint) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateIngressPointOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListRuleSetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5107,7 +5122,7 @@ func (m *awsAwsjson10_deserializeOpUpdateIngressPoint) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateIngressPoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListRuleSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5144,12 +5159,6 @@ func awsAwsjson10_deserializeOpErrorUpdateIngressPoint(response *smithyhttp.Resp errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -5163,14 +5172,14 @@ func awsAwsjson10_deserializeOpErrorUpdateIngressPoint(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpUpdateRelay struct { +type awsAwsjson10_deserializeOpListTagsForResource struct { } -func (*awsAwsjson10_deserializeOpUpdateRelay) ID() string { +func (*awsAwsjson10_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateRelay) 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) @@ -5188,9 +5197,9 @@ func (m *awsAwsjson10_deserializeOpUpdateRelay) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateRelay(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &UpdateRelayOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -5210,7 +5219,7 @@ func (m *awsAwsjson10_deserializeOpUpdateRelay) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateRelayOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5224,7 +5233,7 @@ func (m *awsAwsjson10_deserializeOpUpdateRelay) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateRelay(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)} @@ -5261,9 +5270,6 @@ func awsAwsjson10_deserializeOpErrorUpdateRelay(response *smithyhttp.Response, m errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) @@ -5280,14 +5286,14 @@ func awsAwsjson10_deserializeOpErrorUpdateRelay(response *smithyhttp.Response, m } } -type awsAwsjson10_deserializeOpUpdateRuleSet struct { +type awsAwsjson10_deserializeOpListTrafficPolicies struct { } -func (*awsAwsjson10_deserializeOpUpdateRuleSet) ID() string { +func (*awsAwsjson10_deserializeOpListTrafficPolicies) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateRuleSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListTrafficPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5305,9 +5311,9 @@ func (m *awsAwsjson10_deserializeOpUpdateRuleSet) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateRuleSet(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListTrafficPolicies(response, &metadata) } - output := &UpdateRuleSetOutput{} + output := &ListTrafficPoliciesOutput{} out.Result = output var buff [1024]byte @@ -5327,7 +5333,7 @@ func (m *awsAwsjson10_deserializeOpUpdateRuleSet) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateRuleSetOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListTrafficPoliciesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5341,7 +5347,7 @@ func (m *awsAwsjson10_deserializeOpUpdateRuleSet) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListTrafficPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5378,12 +5384,1575 @@ func awsAwsjson10_deserializeOpErrorUpdateRuleSet(response *smithyhttp.Response, errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpRegisterMemberToAddressList struct { +} + +func (*awsAwsjson10_deserializeOpRegisterMemberToAddressList) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpRegisterMemberToAddressList) HandleDeserialize(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_deserializeOpErrorRegisterMemberToAddressList(response, &metadata) + } + output := &RegisterMemberToAddressListOutput{} + 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_deserializeOpDocumentRegisterMemberToAddressListOutput(&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_deserializeOpErrorRegisterMemberToAddressList(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpStartAddressListImportJob struct { +} + +func (*awsAwsjson10_deserializeOpStartAddressListImportJob) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpStartAddressListImportJob) HandleDeserialize(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_deserializeOpErrorStartAddressListImportJob(response, &metadata) + } + output := &StartAddressListImportJobOutput{} + 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_deserializeOpDocumentStartAddressListImportJobOutput(&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_deserializeOpErrorStartAddressListImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpStartArchiveExport struct { +} + +func (*awsAwsjson10_deserializeOpStartArchiveExport) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpStartArchiveExport) HandleDeserialize(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_deserializeOpErrorStartArchiveExport(response, &metadata) + } + output := &StartArchiveExportOutput{} + 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_deserializeOpDocumentStartArchiveExportOutput(&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_deserializeOpErrorStartArchiveExport(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpStartArchiveSearch struct { +} + +func (*awsAwsjson10_deserializeOpStartArchiveSearch) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpStartArchiveSearch) HandleDeserialize(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_deserializeOpErrorStartArchiveSearch(response, &metadata) + } + output := &StartArchiveSearchOutput{} + 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_deserializeOpDocumentStartArchiveSearchOutput(&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_deserializeOpErrorStartArchiveSearch(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpStopAddressListImportJob struct { +} + +func (*awsAwsjson10_deserializeOpStopAddressListImportJob) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpStopAddressListImportJob) HandleDeserialize(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_deserializeOpErrorStopAddressListImportJob(response, &metadata) + } + output := &StopAddressListImportJobOutput{} + 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_deserializeOpDocumentStopAddressListImportJobOutput(&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_deserializeOpErrorStopAddressListImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpStopArchiveExport struct { +} + +func (*awsAwsjson10_deserializeOpStopArchiveExport) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpStopArchiveExport) HandleDeserialize(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_deserializeOpErrorStopArchiveExport(response, &metadata) + } + output := &StopArchiveExportOutput{} + 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_deserializeOpDocumentStopArchiveExportOutput(&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_deserializeOpErrorStopArchiveExport(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpStopArchiveSearch struct { +} + +func (*awsAwsjson10_deserializeOpStopArchiveSearch) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpStopArchiveSearch) HandleDeserialize(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_deserializeOpErrorStopArchiveSearch(response, &metadata) + } + output := &StopArchiveSearchOutput{} + 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_deserializeOpDocumentStopArchiveSearchOutput(&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_deserializeOpErrorStopArchiveSearch(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(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("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(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("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateArchive struct { +} + +func (*awsAwsjson10_deserializeOpUpdateArchive) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateArchive) HandleDeserialize(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_deserializeOpErrorUpdateArchive(response, &metadata) + } + output := &UpdateArchiveOutput{} + 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_deserializeOpDocumentUpdateArchiveOutput(&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_deserializeOpErrorUpdateArchive(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateIngressPoint struct { +} + +func (*awsAwsjson10_deserializeOpUpdateIngressPoint) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateIngressPoint) HandleDeserialize(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_deserializeOpErrorUpdateIngressPoint(response, &metadata) + } + output := &UpdateIngressPointOutput{} + 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_deserializeOpDocumentUpdateIngressPointOutput(&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_deserializeOpErrorUpdateIngressPoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateRelay struct { +} + +func (*awsAwsjson10_deserializeOpUpdateRelay) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateRelay) HandleDeserialize(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_deserializeOpErrorUpdateRelay(response, &metadata) + } + output := &UpdateRelayOutput{} + 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_deserializeOpDocumentUpdateRelayOutput(&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_deserializeOpErrorUpdateRelay(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateRuleSet struct { +} + +func (*awsAwsjson10_deserializeOpUpdateRuleSet) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateRuleSet) HandleDeserialize(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_deserializeOpErrorUpdateRuleSet(response, &metadata) + } + output := &UpdateRuleSetOutput{} + 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_deserializeOpDocumentUpdateRuleSetOutput(&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_deserializeOpErrorUpdateRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -6025,9 +7594,133 @@ func awsAwsjson10_deserializeDocumentAddonSubscriptions(v *[]types.AddonSubscrip } for _, value := range shape { - var col types.AddonSubscription + var col types.AddonSubscription + destAddr := &col + if err := awsAwsjson10_deserializeDocumentAddonSubscription(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentAddressList(v **types.AddressList, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.AddressList + if *v == nil { + sv = &types.AddressList{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AddressListArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressListArn to be of type string, got %T instead", value) + } + sv.AddressListArn = ptr.String(jtv) + } + + case "AddressListId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressListId to be of type string, got %T instead", value) + } + sv.AddressListId = ptr.String(jtv) + } + + case "AddressListName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressListName to be of type string, got %T instead", value) + } + sv.AddressListName = ptr.String(jtv) + } + + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "LastUpdatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAddressLists(v *[]types.AddressList, 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.AddressList + if *v == nil { + cv = []types.AddressList{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AddressList destAddr := &col - if err := awsAwsjson10_deserializeDocumentAddonSubscription(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentAddressList(&destAddr, value); err != nil { return err } col = *destAddr @@ -6773,8 +8466,264 @@ func awsAwsjson10_deserializeDocumentDropAction(v **types.DropAction, value inte sv = *v } - for key, value := range shape { - switch key { + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentEmailReceivedHeadersList(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 awsAwsjson10_deserializeDocumentEnvelope(v **types.Envelope, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.Envelope + if *v == nil { + sv = &types.Envelope{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "From": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.From = ptr.String(jtv) + } + + case "Helo": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Helo = ptr.String(jtv) + } + + case "To": + if err := awsAwsjson10_deserializeDocumentStringList(&sv.To, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentExportDestinationConfiguration(v *types.ExportDestinationConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %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.ExportDestinationConfiguration +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "S3": + var mv types.S3ExportDestinationConfiguration + destAddr := &mv + if err := awsAwsjson10_deserializeDocumentS3ExportDestinationConfiguration(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.ExportDestinationConfigurationMemberS3{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsAwsjson10_deserializeDocumentExportStatus(v **types.ExportStatus, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ExportStatus + if *v == nil { + sv = &types.ExportStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CompletionTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CompletionTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "ErrorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportState to be of type string, got %T instead", value) + } + sv.State = types.ExportState(jtv) + } + + case "SubmissionTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.SubmissionTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentExportSummary(v **types.ExportSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ExportSummary + if *v == nil { + sv = &types.ExportSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ExportId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportId to be of type string, got %T instead", value) + } + sv.ExportId = ptr.String(jtv) + } + + case "Status": + if err := awsAwsjson10_deserializeDocumentExportStatus(&sv.Status, value); err != nil { + return err + } + default: _, _ = key, value @@ -6784,7 +8733,7 @@ func awsAwsjson10_deserializeDocumentDropAction(v **types.DropAction, value inte return nil } -func awsAwsjson10_deserializeDocumentEmailReceivedHeadersList(v *[]string, value interface{}) error { +func awsAwsjson10_deserializeDocumentExportSummaryList(v *[]types.ExportSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6797,22 +8746,20 @@ func awsAwsjson10_deserializeDocumentEmailReceivedHeadersList(v *[]string, value return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var cv []types.ExportSummary if *v == nil { - cv = []string{} + cv = []types.ExportSummary{} } 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.ExportSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentExportSummary(&destAddr, value); err != nil { + return err } + col = *destAddr cv = append(cv, col) } @@ -6820,7 +8767,7 @@ func awsAwsjson10_deserializeDocumentEmailReceivedHeadersList(v *[]string, value return nil } -func awsAwsjson10_deserializeDocumentEnvelope(v **types.Envelope, value interface{}) error { +func awsAwsjson10_deserializeDocumentImportDataFormat(v **types.ImportDataFormat, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6833,36 +8780,22 @@ func awsAwsjson10_deserializeDocumentEnvelope(v **types.Envelope, value interfac return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Envelope + var sv *types.ImportDataFormat if *v == nil { - sv = &types.Envelope{} + sv = &types.ImportDataFormat{} } else { sv = *v } for key, value := range shape { switch key { - case "From": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.From = ptr.String(jtv) - } - - case "Helo": + case "ImportDataType": 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 ImportDataType to be of type string, got %T instead", value) } - sv.Helo = ptr.String(jtv) - } - - case "To": - if err := awsAwsjson10_deserializeDocumentStringList(&sv.To, value); err != nil { - return err + sv.ImportDataType = types.ImportDataType(jtv) } default: @@ -6874,47 +8807,7 @@ func awsAwsjson10_deserializeDocumentEnvelope(v **types.Envelope, value interfac return nil } -func awsAwsjson10_deserializeDocumentExportDestinationConfiguration(v *types.ExportDestinationConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %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.ExportDestinationConfiguration -loop: - for key, value := range shape { - if value == nil { - continue - } - switch key { - case "S3": - var mv types.S3ExportDestinationConfiguration - destAddr := &mv - if err := awsAwsjson10_deserializeDocumentS3ExportDestinationConfiguration(&destAddr, value); err != nil { - return err - } - mv = *destAddr - uv = &types.ExportDestinationConfigurationMemberS3{Value: mv} - break loop - - default: - uv = &types.UnknownUnionMember{Tag: key} - break loop - - } - } - *v = uv - return nil -} - -func awsAwsjson10_deserializeDocumentExportStatus(v **types.ExportStatus, value interface{}) error { +func awsAwsjson10_deserializeDocumentImportJob(v **types.ImportJob, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6927,16 +8820,25 @@ func awsAwsjson10_deserializeDocumentExportStatus(v **types.ExportStatus, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ExportStatus + var sv *types.ImportJob if *v == nil { - sv = &types.ExportStatus{} + sv = &types.ImportJob{} } else { sv = *v } for key, value := range shape { switch key { - case "CompletionTimestamp": + case "AddressListId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressListId to be of type string, got %T instead", value) + } + sv.AddressListId = ptr.String(jtv) + } + + case "CompletedTimestamp": if value != nil { switch jtv := value.(type) { case json.Number: @@ -6944,7 +8846,7 @@ func awsAwsjson10_deserializeDocumentExportStatus(v **types.ExportStatus, value if err != nil { return err } - sv.CompletionTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.CompletedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) @@ -6952,25 +8854,90 @@ func awsAwsjson10_deserializeDocumentExportStatus(v **types.ExportStatus, value } } - case "ErrorMessage": + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Error": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.ErrorMessage = ptr.String(jtv) + sv.Error = ptr.String(jtv) } - case "State": + case "FailedItemsCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected JobItemsCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FailedItemsCount = ptr.Int32(int32(i64)) + } + + case "ImportDataFormat": + if err := awsAwsjson10_deserializeDocumentImportDataFormat(&sv.ImportDataFormat, value); err != nil { + return err + } + + case "ImportedItemsCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected JobItemsCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ImportedItemsCount = ptr.Int32(int32(i64)) + } + + case "JobId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ExportState to be of type string, got %T instead", value) + return fmt.Errorf("expected JobId to be of type string, got %T instead", value) } - sv.State = types.ExportState(jtv) + sv.JobId = ptr.String(jtv) } - case "SubmissionTimestamp": + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "PreSignedUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PreSignedUrl to be of type string, got %T instead", value) + } + sv.PreSignedUrl = ptr.String(jtv) + } + + case "StartTimestamp": if value != nil { switch jtv := value.(type) { case json.Number: @@ -6978,7 +8945,7 @@ func awsAwsjson10_deserializeDocumentExportStatus(v **types.ExportStatus, value if err != nil { return err } - sv.SubmissionTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.StartTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) @@ -6986,6 +8953,15 @@ func awsAwsjson10_deserializeDocumentExportStatus(v **types.ExportStatus, value } } + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportJobStatus to be of type string, got %T instead", value) + } + sv.Status = types.ImportJobStatus(jtv) + } + default: _, _ = key, value @@ -6995,7 +8971,7 @@ func awsAwsjson10_deserializeDocumentExportStatus(v **types.ExportStatus, value return nil } -func awsAwsjson10_deserializeDocumentExportSummary(v **types.ExportSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentImportJobs(v *[]types.ImportJob, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7003,44 +8979,33 @@ func awsAwsjson10_deserializeDocumentExportSummary(v **types.ExportSummary, valu 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.ExportSummary + var cv []types.ImportJob if *v == nil { - sv = &types.ExportSummary{} + cv = []types.ImportJob{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "ExportId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ExportId to be of type string, got %T instead", value) - } - sv.ExportId = ptr.String(jtv) - } - - case "Status": - if err := awsAwsjson10_deserializeDocumentExportStatus(&sv.Status, value); err != nil { - return err - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.ImportJob + destAddr := &col + if err := awsAwsjson10_deserializeDocumentImportJob(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson10_deserializeDocumentExportSummaryList(v *[]types.ExportSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentIngressAddressListArnList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7053,20 +9018,22 @@ func awsAwsjson10_deserializeDocumentExportSummaryList(v *[]types.ExportSummary, return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ExportSummary + var cv []string if *v == nil { - cv = []types.ExportSummary{} + cv = []string{} } else { cv = *v } for _, value := range shape { - var col types.ExportSummary - destAddr := &col - if err := awsAwsjson10_deserializeDocumentExportSummary(&destAddr, value); err != nil { - return err + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressListArn to be of type string, got %T instead", value) + } + col = jtv } - col = *destAddr cv = append(cv, col) } @@ -7198,6 +9165,16 @@ loop: uv = &types.IngressBooleanToEvaluateMemberAnalysis{Value: mv} break loop + case "IsInAddressList": + var mv types.IngressIsInAddressList + destAddr := &mv + if err := awsAwsjson10_deserializeDocumentIngressIsInAddressList(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.IngressBooleanToEvaluateMemberIsInAddressList{Value: mv} + break loop + default: uv = &types.UnknownUnionMember{Tag: key} break loop @@ -7300,6 +9277,51 @@ func awsAwsjson10_deserializeDocumentIngressIpv4Expression(v **types.IngressIpv4 return nil } +func awsAwsjson10_deserializeDocumentIngressIsInAddressList(v **types.IngressIsInAddressList, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.IngressIsInAddressList + if *v == nil { + sv = &types.IngressIsInAddressList{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AddressLists": + if err := awsAwsjson10_deserializeDocumentIngressAddressListArnList(&sv.AddressLists, value); err != nil { + return err + } + + case "Attribute": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IngressAddressListEmailAttribute to be of type string, got %T instead", value) + } + sv.Attribute = types.IngressAddressListEmailAttribute(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentIngressPoint(v **types.IngressPoint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8878,6 +10900,42 @@ func awsAwsjson10_deserializeDocumentRuleActions(v *[]types.RuleAction, value in return nil } +func awsAwsjson10_deserializeDocumentRuleAddressListArnList(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 AddressListArn to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson10_deserializeDocumentRuleBooleanExpression(v **types.RuleBooleanExpression, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8955,6 +11013,16 @@ loop: uv = &types.RuleBooleanToEvaluateMemberAttribute{Value: mv} break loop + case "IsInAddressList": + var mv types.RuleIsInAddressList + destAddr := &mv + if err := awsAwsjson10_deserializeDocumentRuleIsInAddressList(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.RuleBooleanToEvaluateMemberIsInAddressList{Value: mv} + break loop + default: uv = &types.UnknownUnionMember{Tag: key} break loop @@ -9296,6 +11364,51 @@ func awsAwsjson10_deserializeDocumentRuleIpValueList(v *[]string, value interfac return nil } +func awsAwsjson10_deserializeDocumentRuleIsInAddressList(v **types.RuleIsInAddressList, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.RuleIsInAddressList + if *v == nil { + sv = &types.RuleIsInAddressList{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AddressLists": + if err := awsAwsjson10_deserializeDocumentRuleAddressListArnList(&sv.AddressLists, value); err != nil { + return err + } + + case "Attribute": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleAddressListEmailAttribute to be of type string, got %T instead", value) + } + sv.Attribute = types.RuleAddressListEmailAttribute(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentRuleNumberExpression(v **types.RuleNumberExpression, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -9944,6 +12057,96 @@ func awsAwsjson10_deserializeDocumentS3ExportDestinationConfiguration(v **types. return nil } +func awsAwsjson10_deserializeDocumentSavedAddress(v **types.SavedAddress, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.SavedAddress + if *v == nil { + sv = &types.SavedAddress{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Address": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Address to be of type string, got %T instead", value) + } + sv.Address = ptr.String(jtv) + } + + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentSavedAddresses(v *[]types.SavedAddress, 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.SavedAddress + if *v == nil { + cv = []types.SavedAddress{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SavedAddress + destAddr := &col + if err := awsAwsjson10_deserializeDocumentSavedAddress(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson10_deserializeDocumentSearchStatus(v **types.SearchStatus, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10600,6 +12803,95 @@ func awsAwsjson10_deserializeOpDocumentCreateAddonSubscriptionOutput(v **CreateA return nil } +func awsAwsjson10_deserializeOpDocumentCreateAddressListImportJobOutput(v **CreateAddressListImportJobOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateAddressListImportJobOutput + if *v == nil { + sv = &CreateAddressListImportJobOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "JobId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobId to be of type string, got %T instead", value) + } + sv.JobId = ptr.String(jtv) + } + + case "PreSignedUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PreSignedUrl to be of type string, got %T instead", value) + } + sv.PreSignedUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentCreateAddressListOutput(v **CreateAddressListOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateAddressListOutput + if *v == nil { + sv = &CreateAddressListOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AddressListId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressListId to be of type string, got %T instead", value) + } + sv.AddressListId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentCreateArchiveOutput(v **CreateArchiveOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10800,7 +13092,38 @@ func awsAwsjson10_deserializeOpDocumentCreateTrafficPolicyOutput(v **CreateTraff return nil } -func awsAwsjson10_deserializeOpDocumentDeleteAddonInstanceOutput(v **DeleteAddonInstanceOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentDeleteAddonInstanceOutput(v **DeleteAddonInstanceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteAddonInstanceOutput + if *v == nil { + sv = &DeleteAddonInstanceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentDeleteAddonSubscriptionOutput(v **DeleteAddonSubscriptionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10813,9 +13136,9 @@ func awsAwsjson10_deserializeOpDocumentDeleteAddonInstanceOutput(v **DeleteAddon return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteAddonInstanceOutput + var sv *DeleteAddonSubscriptionOutput if *v == nil { - sv = &DeleteAddonInstanceOutput{} + sv = &DeleteAddonSubscriptionOutput{} } else { sv = *v } @@ -10831,7 +13154,7 @@ func awsAwsjson10_deserializeOpDocumentDeleteAddonInstanceOutput(v **DeleteAddon return nil } -func awsAwsjson10_deserializeOpDocumentDeleteAddonSubscriptionOutput(v **DeleteAddonSubscriptionOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentDeleteAddressListOutput(v **DeleteAddressListOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10844,9 +13167,9 @@ func awsAwsjson10_deserializeOpDocumentDeleteAddonSubscriptionOutput(v **DeleteA return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteAddonSubscriptionOutput + var sv *DeleteAddressListOutput if *v == nil { - sv = &DeleteAddonSubscriptionOutput{} + sv = &DeleteAddressListOutput{} } else { sv = *v } @@ -11017,6 +13340,37 @@ func awsAwsjson10_deserializeOpDocumentDeleteTrafficPolicyOutput(v **DeleteTraff return nil } +func awsAwsjson10_deserializeOpDocumentDeregisterMemberFromAddressListOutput(v **DeregisterMemberFromAddressListOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeregisterMemberFromAddressListOutput + if *v == nil { + sv = &DeregisterMemberFromAddressListOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentGetAddonInstanceOutput(v **GetAddonInstanceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11139,7 +13493,261 @@ func awsAwsjson10_deserializeOpDocumentGetAddonSubscriptionOutput(v **GetAddonSu if err != nil { return err } - sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentGetAddressListImportJobOutput(v **GetAddressListImportJobOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetAddressListImportJobOutput + if *v == nil { + sv = &GetAddressListImportJobOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AddressListId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressListId to be of type string, got %T instead", value) + } + sv.AddressListId = ptr.String(jtv) + } + + case "CompletedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CompletedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Error": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Error = ptr.String(jtv) + } + + case "FailedItemsCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected JobItemsCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FailedItemsCount = ptr.Int32(int32(i64)) + } + + case "ImportDataFormat": + if err := awsAwsjson10_deserializeDocumentImportDataFormat(&sv.ImportDataFormat, value); err != nil { + return err + } + + case "ImportedItemsCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected JobItemsCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ImportedItemsCount = ptr.Int32(int32(i64)) + } + + case "JobId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobId to be of type string, got %T instead", value) + } + sv.JobId = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "PreSignedUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PreSignedUrl to be of type string, got %T instead", value) + } + sv.PreSignedUrl = ptr.String(jtv) + } + + case "StartTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTimestamp = 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 ImportJobStatus to be of type string, got %T instead", value) + } + sv.Status = types.ImportJobStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentGetAddressListOutput(v **GetAddressListOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetAddressListOutput + if *v == nil { + sv = &GetAddressListOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AddressListArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressListArn to be of type string, got %T instead", value) + } + sv.AddressListArn = ptr.String(jtv) + } + + case "AddressListId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressListId to be of type string, got %T instead", value) + } + sv.AddressListId = ptr.String(jtv) + } + + case "AddressListName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressListName to be of type string, got %T instead", value) + } + sv.AddressListName = ptr.String(jtv) + } + + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "LastUpdatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) @@ -11726,6 +14334,62 @@ func awsAwsjson10_deserializeOpDocumentGetIngressPointOutput(v **GetIngressPoint return nil } +func awsAwsjson10_deserializeOpDocumentGetMemberOfAddressListOutput(v **GetMemberOfAddressListOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetMemberOfAddressListOutput + if *v == nil { + sv = &GetMemberOfAddressListOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Address": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Address to be of type string, got %T instead", value) + } + sv.Address = ptr.String(jtv) + } + + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentGetRelayOutput(v **GetRelayOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12145,6 +14809,96 @@ func awsAwsjson10_deserializeOpDocumentListAddonSubscriptionsOutput(v **ListAddo return nil } +func awsAwsjson10_deserializeOpDocumentListAddressListImportJobsOutput(v **ListAddressListImportJobsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListAddressListImportJobsOutput + if *v == nil { + sv = &ListAddressListImportJobsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ImportJobs": + if err := awsAwsjson10_deserializeDocumentImportJobs(&sv.ImportJobs, 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 + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentListAddressListsOutput(v **ListAddressListsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListAddressListsOutput + if *v == nil { + sv = &ListAddressListsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AddressLists": + if err := awsAwsjson10_deserializeDocumentAddressLists(&sv.AddressLists, 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 + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentListArchiveExportsOutput(v **ListArchiveExportsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12325,6 +15079,51 @@ func awsAwsjson10_deserializeOpDocumentListIngressPointsOutput(v **ListIngressPo return nil } +func awsAwsjson10_deserializeOpDocumentListMembersOfAddressListOutput(v **ListMembersOfAddressListOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListMembersOfAddressListOutput + if *v == nil { + sv = &ListMembersOfAddressListOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Addresses": + if err := awsAwsjson10_deserializeDocumentSavedAddresses(&sv.Addresses, 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 + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentListRelaysOutput(v **ListRelaysOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12496,6 +15295,68 @@ func awsAwsjson10_deserializeOpDocumentListTrafficPoliciesOutput(v **ListTraffic return nil } +func awsAwsjson10_deserializeOpDocumentRegisterMemberToAddressListOutput(v **RegisterMemberToAddressListOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *RegisterMemberToAddressListOutput + if *v == nil { + sv = &RegisterMemberToAddressListOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentStartAddressListImportJobOutput(v **StartAddressListImportJobOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartAddressListImportJobOutput + if *v == nil { + sv = &StartAddressListImportJobOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentStartArchiveExportOutput(v **StartArchiveExportOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12576,6 +15437,37 @@ func awsAwsjson10_deserializeOpDocumentStartArchiveSearchOutput(v **StartArchive return nil } +func awsAwsjson10_deserializeOpDocumentStopAddressListImportJobOutput(v **StopAddressListImportJobOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StopAddressListImportJobOutput + if *v == nil { + sv = &StopAddressListImportJobOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentStopArchiveExportOutput(v **StopArchiveExportOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/mailmanager/generated.json b/service/mailmanager/generated.json index d015774332d..1d65ffab360 100644 --- a/service/mailmanager/generated.json +++ b/service/mailmanager/generated.json @@ -10,6 +10,8 @@ "api_client_test.go", "api_op_CreateAddonInstance.go", "api_op_CreateAddonSubscription.go", + "api_op_CreateAddressList.go", + "api_op_CreateAddressListImportJob.go", "api_op_CreateArchive.go", "api_op_CreateIngressPoint.go", "api_op_CreateRelay.go", @@ -17,13 +19,17 @@ "api_op_CreateTrafficPolicy.go", "api_op_DeleteAddonInstance.go", "api_op_DeleteAddonSubscription.go", + "api_op_DeleteAddressList.go", "api_op_DeleteArchive.go", "api_op_DeleteIngressPoint.go", "api_op_DeleteRelay.go", "api_op_DeleteRuleSet.go", "api_op_DeleteTrafficPolicy.go", + "api_op_DeregisterMemberFromAddressList.go", "api_op_GetAddonInstance.go", "api_op_GetAddonSubscription.go", + "api_op_GetAddressList.go", + "api_op_GetAddressListImportJob.go", "api_op_GetArchive.go", "api_op_GetArchiveExport.go", "api_op_GetArchiveMessage.go", @@ -31,21 +37,28 @@ "api_op_GetArchiveSearch.go", "api_op_GetArchiveSearchResults.go", "api_op_GetIngressPoint.go", + "api_op_GetMemberOfAddressList.go", "api_op_GetRelay.go", "api_op_GetRuleSet.go", "api_op_GetTrafficPolicy.go", "api_op_ListAddonInstances.go", "api_op_ListAddonSubscriptions.go", + "api_op_ListAddressListImportJobs.go", + "api_op_ListAddressLists.go", "api_op_ListArchiveExports.go", "api_op_ListArchiveSearches.go", "api_op_ListArchives.go", "api_op_ListIngressPoints.go", + "api_op_ListMembersOfAddressList.go", "api_op_ListRelays.go", "api_op_ListRuleSets.go", "api_op_ListTagsForResource.go", "api_op_ListTrafficPolicies.go", + "api_op_RegisterMemberToAddressList.go", + "api_op_StartAddressListImportJob.go", "api_op_StartArchiveExport.go", "api_op_StartArchiveSearch.go", + "api_op_StopAddressListImportJob.go", "api_op_StopArchiveExport.go", "api_op_StopArchiveSearch.go", "api_op_TagResource.go", diff --git a/service/mailmanager/serializers.go b/service/mailmanager/serializers.go index 4b9d191100a..5dd462c7ef8 100644 --- a/service/mailmanager/serializers.go +++ b/service/mailmanager/serializers.go @@ -140,6 +140,128 @@ func (m *awsAwsjson10_serializeOpCreateAddonSubscription) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpCreateAddressList struct { +} + +func (*awsAwsjson10_serializeOpCreateAddressList) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpCreateAddressList) 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.(*CreateAddressListInput) + _ = 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("MailManagerSvc.CreateAddressList") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentCreateAddressListInput(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_serializeOpCreateAddressListImportJob struct { +} + +func (*awsAwsjson10_serializeOpCreateAddressListImportJob) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpCreateAddressListImportJob) 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.(*CreateAddressListImportJobInput) + _ = 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("MailManagerSvc.CreateAddressListImportJob") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentCreateAddressListImportJobInput(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_serializeOpCreateArchive struct { } @@ -567,6 +689,67 @@ func (m *awsAwsjson10_serializeOpDeleteAddonSubscription) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpDeleteAddressList struct { +} + +func (*awsAwsjson10_serializeOpDeleteAddressList) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpDeleteAddressList) 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.(*DeleteAddressListInput) + _ = 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("MailManagerSvc.DeleteAddressList") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentDeleteAddressListInput(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_serializeOpDeleteArchive struct { } @@ -696,7 +879,617 @@ func (*awsAwsjson10_serializeOpDeleteRelay) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpDeleteRelay) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpDeleteRelay) 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.(*DeleteRelayInput) + _ = 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("MailManagerSvc.DeleteRelay") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentDeleteRelayInput(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_serializeOpDeleteRuleSet struct { +} + +func (*awsAwsjson10_serializeOpDeleteRuleSet) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpDeleteRuleSet) 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.(*DeleteRuleSetInput) + _ = 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("MailManagerSvc.DeleteRuleSet") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentDeleteRuleSetInput(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_serializeOpDeleteTrafficPolicy struct { +} + +func (*awsAwsjson10_serializeOpDeleteTrafficPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpDeleteTrafficPolicy) 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.(*DeleteTrafficPolicyInput) + _ = 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("MailManagerSvc.DeleteTrafficPolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentDeleteTrafficPolicyInput(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_serializeOpDeregisterMemberFromAddressList struct { +} + +func (*awsAwsjson10_serializeOpDeregisterMemberFromAddressList) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpDeregisterMemberFromAddressList) 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.(*DeregisterMemberFromAddressListInput) + _ = 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("MailManagerSvc.DeregisterMemberFromAddressList") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentDeregisterMemberFromAddressListInput(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_serializeOpGetAddonInstance struct { +} + +func (*awsAwsjson10_serializeOpGetAddonInstance) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetAddonInstance) 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.(*GetAddonInstanceInput) + _ = 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("MailManagerSvc.GetAddonInstance") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetAddonInstanceInput(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_serializeOpGetAddonSubscription struct { +} + +func (*awsAwsjson10_serializeOpGetAddonSubscription) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetAddonSubscription) 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.(*GetAddonSubscriptionInput) + _ = 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("MailManagerSvc.GetAddonSubscription") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetAddonSubscriptionInput(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_serializeOpGetAddressList struct { +} + +func (*awsAwsjson10_serializeOpGetAddressList) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetAddressList) 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.(*GetAddressListInput) + _ = 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("MailManagerSvc.GetAddressList") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetAddressListInput(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_serializeOpGetAddressListImportJob struct { +} + +func (*awsAwsjson10_serializeOpGetAddressListImportJob) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetAddressListImportJob) 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.(*GetAddressListImportJobInput) + _ = 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("MailManagerSvc.GetAddressListImportJob") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetAddressListImportJobInput(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_serializeOpGetArchive struct { +} + +func (*awsAwsjson10_serializeOpGetArchive) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetArchive) 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.(*GetArchiveInput) + _ = 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("MailManagerSvc.GetArchive") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetArchiveInput(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_serializeOpGetArchiveExport struct { +} + +func (*awsAwsjson10_serializeOpGetArchiveExport) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetArchiveExport) 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.(*GetArchiveExportInput) + _ = 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("MailManagerSvc.GetArchiveExport") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetArchiveExportInput(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_serializeOpGetArchiveMessage struct { +} + +func (*awsAwsjson10_serializeOpGetArchiveMessage) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetArchiveMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -708,7 +1501,7 @@ func (m *awsAwsjson10_serializeOpDeleteRelay) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteRelayInput) + input, ok := in.Parameters.(*GetArchiveMessageInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -729,10 +1522,10 @@ func (m *awsAwsjson10_serializeOpDeleteRelay) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.DeleteRelay") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetArchiveMessage") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentDeleteRelayInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetArchiveMessageInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -750,14 +1543,14 @@ func (m *awsAwsjson10_serializeOpDeleteRelay) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpDeleteRuleSet struct { +type awsAwsjson10_serializeOpGetArchiveMessageContent struct { } -func (*awsAwsjson10_serializeOpDeleteRuleSet) ID() string { +func (*awsAwsjson10_serializeOpGetArchiveMessageContent) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpDeleteRuleSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetArchiveMessageContent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -769,7 +1562,7 @@ func (m *awsAwsjson10_serializeOpDeleteRuleSet) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteRuleSetInput) + input, ok := in.Parameters.(*GetArchiveMessageContentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -790,10 +1583,10 @@ func (m *awsAwsjson10_serializeOpDeleteRuleSet) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.DeleteRuleSet") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetArchiveMessageContent") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentDeleteRuleSetInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetArchiveMessageContentInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -811,14 +1604,14 @@ func (m *awsAwsjson10_serializeOpDeleteRuleSet) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpDeleteTrafficPolicy struct { +type awsAwsjson10_serializeOpGetArchiveSearch struct { } -func (*awsAwsjson10_serializeOpDeleteTrafficPolicy) ID() string { +func (*awsAwsjson10_serializeOpGetArchiveSearch) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpDeleteTrafficPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetArchiveSearch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -830,7 +1623,7 @@ func (m *awsAwsjson10_serializeOpDeleteTrafficPolicy) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteTrafficPolicyInput) + input, ok := in.Parameters.(*GetArchiveSearchInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -851,10 +1644,10 @@ func (m *awsAwsjson10_serializeOpDeleteTrafficPolicy) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.DeleteTrafficPolicy") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetArchiveSearch") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentDeleteTrafficPolicyInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetArchiveSearchInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -872,14 +1665,14 @@ func (m *awsAwsjson10_serializeOpDeleteTrafficPolicy) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetAddonInstance struct { +type awsAwsjson10_serializeOpGetArchiveSearchResults struct { } -func (*awsAwsjson10_serializeOpGetAddonInstance) ID() string { +func (*awsAwsjson10_serializeOpGetArchiveSearchResults) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetAddonInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetArchiveSearchResults) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -891,7 +1684,7 @@ func (m *awsAwsjson10_serializeOpGetAddonInstance) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetAddonInstanceInput) + input, ok := in.Parameters.(*GetArchiveSearchResultsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -912,10 +1705,10 @@ func (m *awsAwsjson10_serializeOpGetAddonInstance) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetAddonInstance") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetArchiveSearchResults") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetAddonInstanceInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetArchiveSearchResultsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -933,14 +1726,14 @@ func (m *awsAwsjson10_serializeOpGetAddonInstance) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetAddonSubscription struct { +type awsAwsjson10_serializeOpGetIngressPoint struct { } -func (*awsAwsjson10_serializeOpGetAddonSubscription) ID() string { +func (*awsAwsjson10_serializeOpGetIngressPoint) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetAddonSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetIngressPoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -952,7 +1745,7 @@ func (m *awsAwsjson10_serializeOpGetAddonSubscription) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetAddonSubscriptionInput) + input, ok := in.Parameters.(*GetIngressPointInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -973,10 +1766,10 @@ func (m *awsAwsjson10_serializeOpGetAddonSubscription) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetAddonSubscription") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetIngressPoint") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetAddonSubscriptionInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetIngressPointInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -994,14 +1787,14 @@ func (m *awsAwsjson10_serializeOpGetAddonSubscription) HandleSerialize(ctx conte return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetArchive struct { +type awsAwsjson10_serializeOpGetMemberOfAddressList struct { } -func (*awsAwsjson10_serializeOpGetArchive) ID() string { +func (*awsAwsjson10_serializeOpGetMemberOfAddressList) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetArchive) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetMemberOfAddressList) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1013,7 +1806,7 @@ func (m *awsAwsjson10_serializeOpGetArchive) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetArchiveInput) + input, ok := in.Parameters.(*GetMemberOfAddressListInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1034,10 +1827,10 @@ func (m *awsAwsjson10_serializeOpGetArchive) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetArchive") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetMemberOfAddressList") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetArchiveInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetMemberOfAddressListInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1055,14 +1848,14 @@ func (m *awsAwsjson10_serializeOpGetArchive) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetArchiveExport struct { +type awsAwsjson10_serializeOpGetRelay struct { } -func (*awsAwsjson10_serializeOpGetArchiveExport) ID() string { +func (*awsAwsjson10_serializeOpGetRelay) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetArchiveExport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetRelay) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1074,7 +1867,7 @@ func (m *awsAwsjson10_serializeOpGetArchiveExport) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetArchiveExportInput) + input, ok := in.Parameters.(*GetRelayInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1095,10 +1888,10 @@ func (m *awsAwsjson10_serializeOpGetArchiveExport) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetArchiveExport") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetRelay") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetArchiveExportInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetRelayInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1116,14 +1909,14 @@ func (m *awsAwsjson10_serializeOpGetArchiveExport) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetArchiveMessage struct { +type awsAwsjson10_serializeOpGetRuleSet struct { } -func (*awsAwsjson10_serializeOpGetArchiveMessage) ID() string { +func (*awsAwsjson10_serializeOpGetRuleSet) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetArchiveMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetRuleSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1135,7 +1928,7 @@ func (m *awsAwsjson10_serializeOpGetArchiveMessage) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetArchiveMessageInput) + input, ok := in.Parameters.(*GetRuleSetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1156,10 +1949,10 @@ func (m *awsAwsjson10_serializeOpGetArchiveMessage) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetArchiveMessage") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetRuleSet") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetArchiveMessageInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetRuleSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1177,14 +1970,14 @@ func (m *awsAwsjson10_serializeOpGetArchiveMessage) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetArchiveMessageContent struct { +type awsAwsjson10_serializeOpGetTrafficPolicy struct { } -func (*awsAwsjson10_serializeOpGetArchiveMessageContent) ID() string { +func (*awsAwsjson10_serializeOpGetTrafficPolicy) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetArchiveMessageContent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetTrafficPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1196,7 +1989,7 @@ func (m *awsAwsjson10_serializeOpGetArchiveMessageContent) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetArchiveMessageContentInput) + input, ok := in.Parameters.(*GetTrafficPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1217,10 +2010,10 @@ func (m *awsAwsjson10_serializeOpGetArchiveMessageContent) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetArchiveMessageContent") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetTrafficPolicy") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetArchiveMessageContentInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetTrafficPolicyInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1238,14 +2031,14 @@ func (m *awsAwsjson10_serializeOpGetArchiveMessageContent) HandleSerialize(ctx c return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetArchiveSearch struct { +type awsAwsjson10_serializeOpListAddonInstances struct { } -func (*awsAwsjson10_serializeOpGetArchiveSearch) ID() string { +func (*awsAwsjson10_serializeOpListAddonInstances) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetArchiveSearch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListAddonInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1257,7 +2050,7 @@ func (m *awsAwsjson10_serializeOpGetArchiveSearch) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetArchiveSearchInput) + input, ok := in.Parameters.(*ListAddonInstancesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1278,10 +2071,10 @@ func (m *awsAwsjson10_serializeOpGetArchiveSearch) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetArchiveSearch") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListAddonInstances") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetArchiveSearchInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListAddonInstancesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1299,14 +2092,14 @@ func (m *awsAwsjson10_serializeOpGetArchiveSearch) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetArchiveSearchResults struct { +type awsAwsjson10_serializeOpListAddonSubscriptions struct { } -func (*awsAwsjson10_serializeOpGetArchiveSearchResults) ID() string { +func (*awsAwsjson10_serializeOpListAddonSubscriptions) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetArchiveSearchResults) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListAddonSubscriptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1318,7 +2111,7 @@ func (m *awsAwsjson10_serializeOpGetArchiveSearchResults) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetArchiveSearchResultsInput) + input, ok := in.Parameters.(*ListAddonSubscriptionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1339,10 +2132,10 @@ func (m *awsAwsjson10_serializeOpGetArchiveSearchResults) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetArchiveSearchResults") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListAddonSubscriptions") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetArchiveSearchResultsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListAddonSubscriptionsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1360,14 +2153,14 @@ func (m *awsAwsjson10_serializeOpGetArchiveSearchResults) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetIngressPoint struct { +type awsAwsjson10_serializeOpListAddressListImportJobs struct { } -func (*awsAwsjson10_serializeOpGetIngressPoint) ID() string { +func (*awsAwsjson10_serializeOpListAddressListImportJobs) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetIngressPoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListAddressListImportJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1379,7 +2172,7 @@ func (m *awsAwsjson10_serializeOpGetIngressPoint) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetIngressPointInput) + input, ok := in.Parameters.(*ListAddressListImportJobsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1400,10 +2193,10 @@ func (m *awsAwsjson10_serializeOpGetIngressPoint) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetIngressPoint") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListAddressListImportJobs") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetIngressPointInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListAddressListImportJobsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1421,14 +2214,14 @@ func (m *awsAwsjson10_serializeOpGetIngressPoint) HandleSerialize(ctx context.Co return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetRelay struct { +type awsAwsjson10_serializeOpListAddressLists struct { } -func (*awsAwsjson10_serializeOpGetRelay) ID() string { +func (*awsAwsjson10_serializeOpListAddressLists) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetRelay) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListAddressLists) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1440,7 +2233,7 @@ func (m *awsAwsjson10_serializeOpGetRelay) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetRelayInput) + input, ok := in.Parameters.(*ListAddressListsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1461,10 +2254,10 @@ func (m *awsAwsjson10_serializeOpGetRelay) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetRelay") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListAddressLists") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetRelayInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListAddressListsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1482,14 +2275,14 @@ func (m *awsAwsjson10_serializeOpGetRelay) HandleSerialize(ctx context.Context, return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetRuleSet struct { +type awsAwsjson10_serializeOpListArchiveExports struct { } -func (*awsAwsjson10_serializeOpGetRuleSet) ID() string { +func (*awsAwsjson10_serializeOpListArchiveExports) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetRuleSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListArchiveExports) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1501,7 +2294,7 @@ func (m *awsAwsjson10_serializeOpGetRuleSet) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetRuleSetInput) + input, ok := in.Parameters.(*ListArchiveExportsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1522,10 +2315,10 @@ func (m *awsAwsjson10_serializeOpGetRuleSet) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetRuleSet") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListArchiveExports") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetRuleSetInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListArchiveExportsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1543,14 +2336,14 @@ func (m *awsAwsjson10_serializeOpGetRuleSet) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetTrafficPolicy struct { +type awsAwsjson10_serializeOpListArchives struct { } -func (*awsAwsjson10_serializeOpGetTrafficPolicy) ID() string { +func (*awsAwsjson10_serializeOpListArchives) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetTrafficPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListArchives) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1562,7 +2355,7 @@ func (m *awsAwsjson10_serializeOpGetTrafficPolicy) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetTrafficPolicyInput) + input, ok := in.Parameters.(*ListArchivesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1583,10 +2376,10 @@ func (m *awsAwsjson10_serializeOpGetTrafficPolicy) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.GetTrafficPolicy") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListArchives") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetTrafficPolicyInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListArchivesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1604,14 +2397,14 @@ func (m *awsAwsjson10_serializeOpGetTrafficPolicy) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListAddonInstances struct { +type awsAwsjson10_serializeOpListArchiveSearches struct { } -func (*awsAwsjson10_serializeOpListAddonInstances) ID() string { +func (*awsAwsjson10_serializeOpListArchiveSearches) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListAddonInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListArchiveSearches) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1623,7 +2416,7 @@ func (m *awsAwsjson10_serializeOpListAddonInstances) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListAddonInstancesInput) + input, ok := in.Parameters.(*ListArchiveSearchesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1644,10 +2437,10 @@ func (m *awsAwsjson10_serializeOpListAddonInstances) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListAddonInstances") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListArchiveSearches") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListAddonInstancesInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListArchiveSearchesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1665,14 +2458,14 @@ func (m *awsAwsjson10_serializeOpListAddonInstances) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListAddonSubscriptions struct { +type awsAwsjson10_serializeOpListIngressPoints struct { } -func (*awsAwsjson10_serializeOpListAddonSubscriptions) ID() string { +func (*awsAwsjson10_serializeOpListIngressPoints) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListAddonSubscriptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListIngressPoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1684,7 +2477,7 @@ func (m *awsAwsjson10_serializeOpListAddonSubscriptions) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListAddonSubscriptionsInput) + input, ok := in.Parameters.(*ListIngressPointsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1705,10 +2498,10 @@ func (m *awsAwsjson10_serializeOpListAddonSubscriptions) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListAddonSubscriptions") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListIngressPoints") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListAddonSubscriptionsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListIngressPointsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1726,14 +2519,14 @@ func (m *awsAwsjson10_serializeOpListAddonSubscriptions) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListArchiveExports struct { +type awsAwsjson10_serializeOpListMembersOfAddressList struct { } -func (*awsAwsjson10_serializeOpListArchiveExports) ID() string { +func (*awsAwsjson10_serializeOpListMembersOfAddressList) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListArchiveExports) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListMembersOfAddressList) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1745,7 +2538,7 @@ func (m *awsAwsjson10_serializeOpListArchiveExports) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListArchiveExportsInput) + input, ok := in.Parameters.(*ListMembersOfAddressListInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1766,10 +2559,10 @@ func (m *awsAwsjson10_serializeOpListArchiveExports) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListArchiveExports") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListMembersOfAddressList") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListArchiveExportsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListMembersOfAddressListInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1787,14 +2580,14 @@ func (m *awsAwsjson10_serializeOpListArchiveExports) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListArchives struct { +type awsAwsjson10_serializeOpListRelays struct { } -func (*awsAwsjson10_serializeOpListArchives) ID() string { +func (*awsAwsjson10_serializeOpListRelays) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListArchives) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListRelays) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1806,7 +2599,7 @@ func (m *awsAwsjson10_serializeOpListArchives) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListArchivesInput) + input, ok := in.Parameters.(*ListRelaysInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1827,10 +2620,10 @@ func (m *awsAwsjson10_serializeOpListArchives) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListArchives") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListRelays") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListArchivesInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListRelaysInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1848,14 +2641,14 @@ func (m *awsAwsjson10_serializeOpListArchives) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListArchiveSearches struct { +type awsAwsjson10_serializeOpListRuleSets struct { } -func (*awsAwsjson10_serializeOpListArchiveSearches) ID() string { +func (*awsAwsjson10_serializeOpListRuleSets) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListArchiveSearches) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListRuleSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1867,7 +2660,7 @@ func (m *awsAwsjson10_serializeOpListArchiveSearches) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListArchiveSearchesInput) + input, ok := in.Parameters.(*ListRuleSetsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1888,10 +2681,10 @@ func (m *awsAwsjson10_serializeOpListArchiveSearches) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListArchiveSearches") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListRuleSets") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListArchiveSearchesInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListRuleSetsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1909,14 +2702,14 @@ func (m *awsAwsjson10_serializeOpListArchiveSearches) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListIngressPoints struct { +type awsAwsjson10_serializeOpListTagsForResource struct { } -func (*awsAwsjson10_serializeOpListIngressPoints) ID() string { +func (*awsAwsjson10_serializeOpListTagsForResource) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListIngressPoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1928,7 +2721,7 @@ func (m *awsAwsjson10_serializeOpListIngressPoints) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListIngressPointsInput) + input, ok := in.Parameters.(*ListTagsForResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1949,10 +2742,10 @@ func (m *awsAwsjson10_serializeOpListIngressPoints) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListIngressPoints") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListTagsForResource") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListIngressPointsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1970,14 +2763,14 @@ func (m *awsAwsjson10_serializeOpListIngressPoints) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListRelays struct { +type awsAwsjson10_serializeOpListTrafficPolicies struct { } -func (*awsAwsjson10_serializeOpListRelays) ID() string { +func (*awsAwsjson10_serializeOpListTrafficPolicies) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListRelays) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListTrafficPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1989,7 +2782,7 @@ func (m *awsAwsjson10_serializeOpListRelays) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListRelaysInput) + input, ok := in.Parameters.(*ListTrafficPoliciesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2010,10 +2803,10 @@ func (m *awsAwsjson10_serializeOpListRelays) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListRelays") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListTrafficPolicies") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListRelaysInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListTrafficPoliciesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2031,14 +2824,14 @@ func (m *awsAwsjson10_serializeOpListRelays) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListRuleSets struct { +type awsAwsjson10_serializeOpRegisterMemberToAddressList struct { } -func (*awsAwsjson10_serializeOpListRuleSets) ID() string { +func (*awsAwsjson10_serializeOpRegisterMemberToAddressList) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListRuleSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpRegisterMemberToAddressList) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2050,7 +2843,7 @@ func (m *awsAwsjson10_serializeOpListRuleSets) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListRuleSetsInput) + input, ok := in.Parameters.(*RegisterMemberToAddressListInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2071,10 +2864,10 @@ func (m *awsAwsjson10_serializeOpListRuleSets) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListRuleSets") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.RegisterMemberToAddressList") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListRuleSetsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentRegisterMemberToAddressListInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2092,14 +2885,14 @@ func (m *awsAwsjson10_serializeOpListRuleSets) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListTagsForResource struct { +type awsAwsjson10_serializeOpStartAddressListImportJob struct { } -func (*awsAwsjson10_serializeOpListTagsForResource) ID() string { +func (*awsAwsjson10_serializeOpStartAddressListImportJob) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpStartAddressListImportJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2111,7 +2904,7 @@ func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListTagsForResourceInput) + input, ok := in.Parameters.(*StartAddressListImportJobInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2132,10 +2925,10 @@ func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListTagsForResource") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.StartAddressListImportJob") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentStartAddressListImportJobInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2153,14 +2946,14 @@ func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListTrafficPolicies struct { +type awsAwsjson10_serializeOpStartArchiveExport struct { } -func (*awsAwsjson10_serializeOpListTrafficPolicies) ID() string { +func (*awsAwsjson10_serializeOpStartArchiveExport) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListTrafficPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpStartArchiveExport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2172,7 +2965,7 @@ func (m *awsAwsjson10_serializeOpListTrafficPolicies) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListTrafficPoliciesInput) + input, ok := in.Parameters.(*StartArchiveExportInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2193,10 +2986,10 @@ func (m *awsAwsjson10_serializeOpListTrafficPolicies) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.ListTrafficPolicies") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.StartArchiveExport") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListTrafficPoliciesInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentStartArchiveExportInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2214,14 +3007,14 @@ func (m *awsAwsjson10_serializeOpListTrafficPolicies) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpStartArchiveExport struct { +type awsAwsjson10_serializeOpStartArchiveSearch struct { } -func (*awsAwsjson10_serializeOpStartArchiveExport) ID() string { +func (*awsAwsjson10_serializeOpStartArchiveSearch) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpStartArchiveExport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpStartArchiveSearch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2233,7 +3026,7 @@ func (m *awsAwsjson10_serializeOpStartArchiveExport) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StartArchiveExportInput) + input, ok := in.Parameters.(*StartArchiveSearchInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2254,10 +3047,10 @@ func (m *awsAwsjson10_serializeOpStartArchiveExport) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.StartArchiveExport") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.StartArchiveSearch") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentStartArchiveExportInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentStartArchiveSearchInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2275,14 +3068,14 @@ func (m *awsAwsjson10_serializeOpStartArchiveExport) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpStartArchiveSearch struct { +type awsAwsjson10_serializeOpStopAddressListImportJob struct { } -func (*awsAwsjson10_serializeOpStartArchiveSearch) ID() string { +func (*awsAwsjson10_serializeOpStopAddressListImportJob) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpStartArchiveSearch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpStopAddressListImportJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2294,7 +3087,7 @@ func (m *awsAwsjson10_serializeOpStartArchiveSearch) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StartArchiveSearchInput) + input, ok := in.Parameters.(*StopAddressListImportJobInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2315,10 +3108,10 @@ func (m *awsAwsjson10_serializeOpStartArchiveSearch) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.StartArchiveSearch") + httpBindingEncoder.SetHeader("X-Amz-Target").String("MailManagerSvc.StopAddressListImportJob") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentStartArchiveSearchInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentStopAddressListImportJobInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2901,6 +3694,18 @@ func awsAwsjson10_serializeDocumentAddHeaderAction(v *types.AddHeaderAction, val return nil } +func awsAwsjson10_serializeDocumentAddressFilter(v *types.AddressFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AddressPrefix != nil { + ok := object.Key("AddressPrefix") + ok.String(*v.AddressPrefix) + } + + return nil +} + func awsAwsjson10_serializeDocumentAnalysis(v *types.Analysis, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3163,6 +3968,29 @@ func awsAwsjson10_serializeDocumentExportDestinationConfiguration(v types.Export return nil } +func awsAwsjson10_serializeDocumentImportDataFormat(v *types.ImportDataFormat, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ImportDataType) > 0 { + ok := object.Key("ImportDataType") + ok.String(string(v.ImportDataType)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentIngressAddressListArnList(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 awsAwsjson10_serializeDocumentIngressAnalysis(v *types.IngressAnalysis, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3210,6 +4038,12 @@ func awsAwsjson10_serializeDocumentIngressBooleanToEvaluate(v types.IngressBoole return err } + case *types.IngressBooleanToEvaluateMemberIsInAddressList: + av := object.Key("IsInAddressList") + if err := awsAwsjson10_serializeDocumentIngressIsInAddressList(&uv.Value, av); err != nil { + return err + } + default: return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) @@ -3259,6 +4093,25 @@ func awsAwsjson10_serializeDocumentIngressIpv4Expression(v *types.IngressIpv4Exp return nil } +func awsAwsjson10_serializeDocumentIngressIsInAddressList(v *types.IngressIsInAddressList, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AddressLists != nil { + ok := object.Key("AddressLists") + if err := awsAwsjson10_serializeDocumentIngressAddressListArnList(v.AddressLists, ok); err != nil { + return err + } + } + + if len(v.Attribute) > 0 { + ok := object.Key("Attribute") + ok.String(string(v.Attribute)) + } + + return nil +} + func awsAwsjson10_serializeDocumentIngressPointConfiguration(v types.IngressPointConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3647,6 +4500,17 @@ func awsAwsjson10_serializeDocumentRuleActions(v []types.RuleAction, value smith return nil } +func awsAwsjson10_serializeDocumentRuleAddressListArnList(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 awsAwsjson10_serializeDocumentRuleBooleanExpression(v *types.RuleBooleanExpression, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3675,6 +4539,12 @@ func awsAwsjson10_serializeDocumentRuleBooleanToEvaluate(v types.RuleBooleanToEv av := object.Key("Attribute") av.String(string(uv.Value)) + case *types.RuleBooleanToEvaluateMemberIsInAddressList: + av := object.Key("IsInAddressList") + if err := awsAwsjson10_serializeDocumentRuleIsInAddressList(&uv.Value, av); err != nil { + return err + } + default: return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) @@ -3829,6 +4699,25 @@ func awsAwsjson10_serializeDocumentRuleIpValueList(v []string, value smithyjson. return nil } +func awsAwsjson10_serializeDocumentRuleIsInAddressList(v *types.RuleIsInAddressList, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AddressLists != nil { + ok := object.Key("AddressLists") + if err := awsAwsjson10_serializeDocumentRuleAddressListArnList(v.AddressLists, ok); err != nil { + return err + } + } + + if len(v.Attribute) > 0 { + ok := object.Key("Attribute") + ok.String(string(v.Attribute)) + } + + return nil +} + func awsAwsjson10_serializeDocumentRuleNumberExpression(v *types.RuleNumberExpression, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4183,6 +5072,59 @@ func awsAwsjson10_serializeOpDocumentCreateAddonSubscriptionInput(v *CreateAddon return nil } +func awsAwsjson10_serializeOpDocumentCreateAddressListImportJobInput(v *CreateAddressListImportJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AddressListId != nil { + ok := object.Key("AddressListId") + ok.String(*v.AddressListId) + } + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.ImportDataFormat != nil { + ok := object.Key("ImportDataFormat") + if err := awsAwsjson10_serializeDocumentImportDataFormat(v.ImportDataFormat, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentCreateAddressListInput(v *CreateAddressListInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AddressListName != nil { + ok := object.Key("AddressListName") + ok.String(*v.AddressListName) + } + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson10_serializeOpDocumentCreateArchiveInput(v *CreateArchiveInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4402,6 +5344,18 @@ func awsAwsjson10_serializeOpDocumentDeleteAddonSubscriptionInput(v *DeleteAddon return nil } +func awsAwsjson10_serializeOpDocumentDeleteAddressListInput(v *DeleteAddressListInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AddressListId != nil { + ok := object.Key("AddressListId") + ok.String(*v.AddressListId) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentDeleteArchiveInput(v *DeleteArchiveInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4462,6 +5416,23 @@ func awsAwsjson10_serializeOpDocumentDeleteTrafficPolicyInput(v *DeleteTrafficPo return nil } +func awsAwsjson10_serializeOpDocumentDeregisterMemberFromAddressListInput(v *DeregisterMemberFromAddressListInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Address != nil { + ok := object.Key("Address") + ok.String(*v.Address) + } + + if v.AddressListId != nil { + ok := object.Key("AddressListId") + ok.String(*v.AddressListId) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentGetAddonInstanceInput(v *GetAddonInstanceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4486,6 +5457,30 @@ func awsAwsjson10_serializeOpDocumentGetAddonSubscriptionInput(v *GetAddonSubscr return nil } +func awsAwsjson10_serializeOpDocumentGetAddressListImportJobInput(v *GetAddressListImportJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.JobId != nil { + ok := object.Key("JobId") + ok.String(*v.JobId) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentGetAddressListInput(v *GetAddressListInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AddressListId != nil { + ok := object.Key("AddressListId") + ok.String(*v.AddressListId) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentGetArchiveExportInput(v *GetArchiveExportInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4570,6 +5565,23 @@ func awsAwsjson10_serializeOpDocumentGetIngressPointInput(v *GetIngressPointInpu return nil } +func awsAwsjson10_serializeOpDocumentGetMemberOfAddressListInput(v *GetMemberOfAddressListInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Address != nil { + ok := object.Key("Address") + ok.String(*v.Address) + } + + if v.AddressListId != nil { + ok := object.Key("AddressListId") + ok.String(*v.AddressListId) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentGetRelayInput(v *GetRelayInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4640,6 +5652,45 @@ func awsAwsjson10_serializeOpDocumentListAddonSubscriptionsInput(v *ListAddonSub return nil } +func awsAwsjson10_serializeOpDocumentListAddressListImportJobsInput(v *ListAddressListImportJobsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AddressListId != nil { + ok := object.Key("AddressListId") + ok.String(*v.AddressListId) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.PageSize != nil { + ok := object.Key("PageSize") + ok.Integer(*v.PageSize) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListAddressListsInput(v *ListAddressListsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.PageSize != nil { + ok := object.Key("PageSize") + ok.Integer(*v.PageSize) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentListArchiveExportsInput(v *ListArchiveExportsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4718,6 +5769,35 @@ func awsAwsjson10_serializeOpDocumentListIngressPointsInput(v *ListIngressPoints return nil } +func awsAwsjson10_serializeOpDocumentListMembersOfAddressListInput(v *ListMembersOfAddressListInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AddressListId != nil { + ok := object.Key("AddressListId") + ok.String(*v.AddressListId) + } + + if v.Filter != nil { + ok := object.Key("Filter") + if err := awsAwsjson10_serializeDocumentAddressFilter(v.Filter, ok); err != nil { + return err + } + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.PageSize != nil { + ok := object.Key("PageSize") + ok.Integer(*v.PageSize) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentListRelaysInput(v *ListRelaysInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4781,6 +5861,35 @@ func awsAwsjson10_serializeOpDocumentListTrafficPoliciesInput(v *ListTrafficPoli return nil } +func awsAwsjson10_serializeOpDocumentRegisterMemberToAddressListInput(v *RegisterMemberToAddressListInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Address != nil { + ok := object.Key("Address") + ok.String(*v.Address) + } + + if v.AddressListId != nil { + ok := object.Key("AddressListId") + ok.String(*v.AddressListId) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentStartAddressListImportJobInput(v *StartAddressListImportJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.JobId != nil { + ok := object.Key("JobId") + ok.String(*v.JobId) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentStartArchiveExportInput(v *StartArchiveExportInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4861,6 +5970,18 @@ func awsAwsjson10_serializeOpDocumentStartArchiveSearchInput(v *StartArchiveSear return nil } +func awsAwsjson10_serializeOpDocumentStopAddressListImportJobInput(v *StopAddressListImportJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.JobId != nil { + ok := object.Key("JobId") + ok.String(*v.JobId) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentStopArchiveExportInput(v *StopArchiveExportInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/mailmanager/snapshot/api_op_CreateAddressList.go.snap b/service/mailmanager/snapshot/api_op_CreateAddressList.go.snap new file mode 100644 index 00000000000..30c348ab83f --- /dev/null +++ b/service/mailmanager/snapshot/api_op_CreateAddressList.go.snap @@ -0,0 +1,42 @@ +CreateAddressList + 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 + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/mailmanager/snapshot/api_op_CreateAddressListImportJob.go.snap b/service/mailmanager/snapshot/api_op_CreateAddressListImportJob.go.snap new file mode 100644 index 00000000000..b6823401941 --- /dev/null +++ b/service/mailmanager/snapshot/api_op_CreateAddressListImportJob.go.snap @@ -0,0 +1,42 @@ +CreateAddressListImportJob + 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 + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/mailmanager/snapshot/api_op_DeleteAddressList.go.snap b/service/mailmanager/snapshot/api_op_DeleteAddressList.go.snap new file mode 100644 index 00000000000..d5767c76d5e --- /dev/null +++ b/service/mailmanager/snapshot/api_op_DeleteAddressList.go.snap @@ -0,0 +1,41 @@ +DeleteAddressList + 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 + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/mailmanager/snapshot/api_op_DeregisterMemberFromAddressList.go.snap b/service/mailmanager/snapshot/api_op_DeregisterMemberFromAddressList.go.snap new file mode 100644 index 00000000000..b24f4961b43 --- /dev/null +++ b/service/mailmanager/snapshot/api_op_DeregisterMemberFromAddressList.go.snap @@ -0,0 +1,41 @@ +DeregisterMemberFromAddressList + 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 + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/mailmanager/snapshot/api_op_GetAddressList.go.snap b/service/mailmanager/snapshot/api_op_GetAddressList.go.snap new file mode 100644 index 00000000000..bcd3b4ff7d3 --- /dev/null +++ b/service/mailmanager/snapshot/api_op_GetAddressList.go.snap @@ -0,0 +1,41 @@ +GetAddressList + 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 + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/mailmanager/snapshot/api_op_GetAddressListImportJob.go.snap b/service/mailmanager/snapshot/api_op_GetAddressListImportJob.go.snap new file mode 100644 index 00000000000..fe4be84641b --- /dev/null +++ b/service/mailmanager/snapshot/api_op_GetAddressListImportJob.go.snap @@ -0,0 +1,41 @@ +GetAddressListImportJob + 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 + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/mailmanager/snapshot/api_op_GetMemberOfAddressList.go.snap b/service/mailmanager/snapshot/api_op_GetMemberOfAddressList.go.snap new file mode 100644 index 00000000000..14c70cb37d4 --- /dev/null +++ b/service/mailmanager/snapshot/api_op_GetMemberOfAddressList.go.snap @@ -0,0 +1,41 @@ +GetMemberOfAddressList + 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 + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/mailmanager/snapshot/api_op_ListAddressListImportJobs.go.snap b/service/mailmanager/snapshot/api_op_ListAddressListImportJobs.go.snap new file mode 100644 index 00000000000..a2655056e32 --- /dev/null +++ b/service/mailmanager/snapshot/api_op_ListAddressListImportJobs.go.snap @@ -0,0 +1,41 @@ +ListAddressListImportJobs + 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 + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/mailmanager/snapshot/api_op_ListAddressLists.go.snap b/service/mailmanager/snapshot/api_op_ListAddressLists.go.snap new file mode 100644 index 00000000000..7e2576e972d --- /dev/null +++ b/service/mailmanager/snapshot/api_op_ListAddressLists.go.snap @@ -0,0 +1,40 @@ +ListAddressLists + 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 + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/mailmanager/snapshot/api_op_ListMembersOfAddressList.go.snap b/service/mailmanager/snapshot/api_op_ListMembersOfAddressList.go.snap new file mode 100644 index 00000000000..b66903857ec --- /dev/null +++ b/service/mailmanager/snapshot/api_op_ListMembersOfAddressList.go.snap @@ -0,0 +1,41 @@ +ListMembersOfAddressList + 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 + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/mailmanager/snapshot/api_op_RegisterMemberToAddressList.go.snap b/service/mailmanager/snapshot/api_op_RegisterMemberToAddressList.go.snap new file mode 100644 index 00000000000..ca61177b35a --- /dev/null +++ b/service/mailmanager/snapshot/api_op_RegisterMemberToAddressList.go.snap @@ -0,0 +1,41 @@ +RegisterMemberToAddressList + 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 + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/mailmanager/snapshot/api_op_StartAddressListImportJob.go.snap b/service/mailmanager/snapshot/api_op_StartAddressListImportJob.go.snap new file mode 100644 index 00000000000..8949fe89905 --- /dev/null +++ b/service/mailmanager/snapshot/api_op_StartAddressListImportJob.go.snap @@ -0,0 +1,41 @@ +StartAddressListImportJob + 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 + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/mailmanager/snapshot/api_op_StopAddressListImportJob.go.snap b/service/mailmanager/snapshot/api_op_StopAddressListImportJob.go.snap new file mode 100644 index 00000000000..4952129dd75 --- /dev/null +++ b/service/mailmanager/snapshot/api_op_StopAddressListImportJob.go.snap @@ -0,0 +1,41 @@ +StopAddressListImportJob + 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 + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/mailmanager/snapshot_test.go b/service/mailmanager/snapshot_test.go index a024ce33852..f5bd667f980 100644 --- a/service/mailmanager/snapshot_test.go +++ b/service/mailmanager/snapshot_test.go @@ -86,6 +86,30 @@ func TestCheckSnapshot_CreateAddonSubscription(t *testing.T) { } } +func TestCheckSnapshot_CreateAddressList(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateAddressList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateAddressList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_CreateAddressListImportJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateAddressListImportJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateAddressListImportJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateArchive(t *testing.T) { svc := New(Options{}) _, err := svc.CreateArchive(context.Background(), nil, func(o *Options) { @@ -170,6 +194,18 @@ func TestCheckSnapshot_DeleteAddonSubscription(t *testing.T) { } } +func TestCheckSnapshot_DeleteAddressList(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteAddressList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteAddressList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteArchive(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteArchive(context.Background(), nil, func(o *Options) { @@ -230,6 +266,18 @@ func TestCheckSnapshot_DeleteTrafficPolicy(t *testing.T) { } } +func TestCheckSnapshot_DeregisterMemberFromAddressList(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeregisterMemberFromAddressList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeregisterMemberFromAddressList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetAddonInstance(t *testing.T) { svc := New(Options{}) _, err := svc.GetAddonInstance(context.Background(), nil, func(o *Options) { @@ -254,6 +302,30 @@ func TestCheckSnapshot_GetAddonSubscription(t *testing.T) { } } +func TestCheckSnapshot_GetAddressList(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetAddressList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetAddressList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetAddressListImportJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetAddressListImportJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetAddressListImportJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetArchive(t *testing.T) { svc := New(Options{}) _, err := svc.GetArchive(context.Background(), nil, func(o *Options) { @@ -338,6 +410,18 @@ func TestCheckSnapshot_GetIngressPoint(t *testing.T) { } } +func TestCheckSnapshot_GetMemberOfAddressList(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetMemberOfAddressList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetMemberOfAddressList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetRelay(t *testing.T) { svc := New(Options{}) _, err := svc.GetRelay(context.Background(), nil, func(o *Options) { @@ -398,6 +482,30 @@ func TestCheckSnapshot_ListAddonSubscriptions(t *testing.T) { } } +func TestCheckSnapshot_ListAddressListImportJobs(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListAddressListImportJobs(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListAddressListImportJobs") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListAddressLists(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListAddressLists(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListAddressLists") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListArchiveExports(t *testing.T) { svc := New(Options{}) _, err := svc.ListArchiveExports(context.Background(), nil, func(o *Options) { @@ -446,6 +554,18 @@ func TestCheckSnapshot_ListIngressPoints(t *testing.T) { } } +func TestCheckSnapshot_ListMembersOfAddressList(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListMembersOfAddressList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListMembersOfAddressList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListRelays(t *testing.T) { svc := New(Options{}) _, err := svc.ListRelays(context.Background(), nil, func(o *Options) { @@ -494,6 +614,30 @@ func TestCheckSnapshot_ListTrafficPolicies(t *testing.T) { } } +func TestCheckSnapshot_RegisterMemberToAddressList(t *testing.T) { + svc := New(Options{}) + _, err := svc.RegisterMemberToAddressList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "RegisterMemberToAddressList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_StartAddressListImportJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartAddressListImportJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "StartAddressListImportJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_StartArchiveExport(t *testing.T) { svc := New(Options{}) _, err := svc.StartArchiveExport(context.Background(), nil, func(o *Options) { @@ -518,6 +662,18 @@ func TestCheckSnapshot_StartArchiveSearch(t *testing.T) { } } +func TestCheckSnapshot_StopAddressListImportJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.StopAddressListImportJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "StopAddressListImportJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_StopArchiveExport(t *testing.T) { svc := New(Options{}) _, err := svc.StopArchiveExport(context.Background(), nil, func(o *Options) { @@ -649,6 +805,30 @@ func TestUpdateSnapshot_CreateAddonSubscription(t *testing.T) { } } +func TestUpdateSnapshot_CreateAddressList(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateAddressList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateAddressList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_CreateAddressListImportJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateAddressListImportJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateAddressListImportJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateArchive(t *testing.T) { svc := New(Options{}) _, err := svc.CreateArchive(context.Background(), nil, func(o *Options) { @@ -733,6 +913,18 @@ func TestUpdateSnapshot_DeleteAddonSubscription(t *testing.T) { } } +func TestUpdateSnapshot_DeleteAddressList(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteAddressList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteAddressList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteArchive(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteArchive(context.Background(), nil, func(o *Options) { @@ -793,6 +985,18 @@ func TestUpdateSnapshot_DeleteTrafficPolicy(t *testing.T) { } } +func TestUpdateSnapshot_DeregisterMemberFromAddressList(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeregisterMemberFromAddressList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeregisterMemberFromAddressList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetAddonInstance(t *testing.T) { svc := New(Options{}) _, err := svc.GetAddonInstance(context.Background(), nil, func(o *Options) { @@ -817,6 +1021,30 @@ func TestUpdateSnapshot_GetAddonSubscription(t *testing.T) { } } +func TestUpdateSnapshot_GetAddressList(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetAddressList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetAddressList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetAddressListImportJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetAddressListImportJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetAddressListImportJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetArchive(t *testing.T) { svc := New(Options{}) _, err := svc.GetArchive(context.Background(), nil, func(o *Options) { @@ -901,6 +1129,18 @@ func TestUpdateSnapshot_GetIngressPoint(t *testing.T) { } } +func TestUpdateSnapshot_GetMemberOfAddressList(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetMemberOfAddressList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetMemberOfAddressList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetRelay(t *testing.T) { svc := New(Options{}) _, err := svc.GetRelay(context.Background(), nil, func(o *Options) { @@ -961,6 +1201,30 @@ func TestUpdateSnapshot_ListAddonSubscriptions(t *testing.T) { } } +func TestUpdateSnapshot_ListAddressListImportJobs(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListAddressListImportJobs(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListAddressListImportJobs") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListAddressLists(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListAddressLists(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListAddressLists") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListArchiveExports(t *testing.T) { svc := New(Options{}) _, err := svc.ListArchiveExports(context.Background(), nil, func(o *Options) { @@ -1009,6 +1273,18 @@ func TestUpdateSnapshot_ListIngressPoints(t *testing.T) { } } +func TestUpdateSnapshot_ListMembersOfAddressList(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListMembersOfAddressList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListMembersOfAddressList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListRelays(t *testing.T) { svc := New(Options{}) _, err := svc.ListRelays(context.Background(), nil, func(o *Options) { @@ -1057,6 +1333,30 @@ func TestUpdateSnapshot_ListTrafficPolicies(t *testing.T) { } } +func TestUpdateSnapshot_RegisterMemberToAddressList(t *testing.T) { + svc := New(Options{}) + _, err := svc.RegisterMemberToAddressList(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "RegisterMemberToAddressList") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_StartAddressListImportJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartAddressListImportJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "StartAddressListImportJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_StartArchiveExport(t *testing.T) { svc := New(Options{}) _, err := svc.StartArchiveExport(context.Background(), nil, func(o *Options) { @@ -1081,6 +1381,18 @@ func TestUpdateSnapshot_StartArchiveSearch(t *testing.T) { } } +func TestUpdateSnapshot_StopAddressListImportJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.StopAddressListImportJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "StopAddressListImportJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_StopArchiveExport(t *testing.T) { svc := New(Options{}) _, err := svc.StopArchiveExport(context.Background(), nil, func(o *Options) { diff --git a/service/mailmanager/types/enums.go b/service/mailmanager/types/enums.go index 1f0e451e1d0..72e56022892 100644 --- a/service/mailmanager/types/enums.go +++ b/service/mailmanager/types/enums.go @@ -167,6 +167,68 @@ func (ExportState) Values() []ExportState { } } +type ImportDataType string + +// Enum values for ImportDataType +const ( + ImportDataTypeCsv ImportDataType = "CSV" + ImportDataTypeJson ImportDataType = "JSON" +) + +// Values returns all known values for ImportDataType. 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 (ImportDataType) Values() []ImportDataType { + return []ImportDataType{ + "CSV", + "JSON", + } +} + +type ImportJobStatus string + +// Enum values for ImportJobStatus +const ( + ImportJobStatusCreated ImportJobStatus = "CREATED" + ImportJobStatusProcessing ImportJobStatus = "PROCESSING" + ImportJobStatusCompleted ImportJobStatus = "COMPLETED" + ImportJobStatusFailed ImportJobStatus = "FAILED" + ImportJobStatusStopped ImportJobStatus = "STOPPED" +) + +// Values returns all known values for ImportJobStatus. 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 (ImportJobStatus) Values() []ImportJobStatus { + return []ImportJobStatus{ + "CREATED", + "PROCESSING", + "COMPLETED", + "FAILED", + "STOPPED", + } +} + +type IngressAddressListEmailAttribute string + +// Enum values for IngressAddressListEmailAttribute +const ( + IngressAddressListEmailAttributeRecipient IngressAddressListEmailAttribute = "RECIPIENT" +) + +// Values returns all known values for IngressAddressListEmailAttribute. 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 (IngressAddressListEmailAttribute) Values() []IngressAddressListEmailAttribute { + return []IngressAddressListEmailAttribute{ + "RECIPIENT", + } +} + type IngressBooleanOperator string // Enum values for IngressBooleanOperator @@ -450,6 +512,34 @@ func (RetentionPeriod) Values() []RetentionPeriod { } } +type RuleAddressListEmailAttribute string + +// Enum values for RuleAddressListEmailAttribute +const ( + RuleAddressListEmailAttributeRecipient RuleAddressListEmailAttribute = "RECIPIENT" + RuleAddressListEmailAttributeMailFrom RuleAddressListEmailAttribute = "MAIL_FROM" + RuleAddressListEmailAttributeSender RuleAddressListEmailAttribute = "SENDER" + RuleAddressListEmailAttributeFrom RuleAddressListEmailAttribute = "FROM" + RuleAddressListEmailAttributeTo RuleAddressListEmailAttribute = "TO" + RuleAddressListEmailAttributeCc RuleAddressListEmailAttribute = "CC" +) + +// Values returns all known values for RuleAddressListEmailAttribute. 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 (RuleAddressListEmailAttribute) Values() []RuleAddressListEmailAttribute { + return []RuleAddressListEmailAttribute{ + "RECIPIENT", + "MAIL_FROM", + "SENDER", + "FROM", + "TO", + "CC", + } +} + type RuleBooleanEmailAttribute string // Enum values for RuleBooleanEmailAttribute diff --git a/service/mailmanager/types/types.go b/service/mailmanager/types/types.go index 4cfd549fbc2..74487342b6b 100644 --- a/service/mailmanager/types/types.go +++ b/service/mailmanager/types/types.go @@ -66,6 +66,47 @@ type AddonSubscription struct { noSmithyDocumentSerde } +// Filtering options for ListMembersOfAddressList operation. +type AddressFilter struct { + + // Filter to limit the results to addresses having the provided prefix. + AddressPrefix *string + + noSmithyDocumentSerde +} + +// An address list contains a list of emails and domains that are used in +// MailManager Ingress endpoints and Rules for email management. +type AddressList struct { + + // The Amazon Resource Name (ARN) of the address list. + // + // This member is required. + AddressListArn *string + + // The identifier of the address list. + // + // This member is required. + AddressListId *string + + // The user-friendly name of the address list. + // + // This member is required. + AddressListName *string + + // The timestamp of when the address list was created. + // + // This member is required. + CreatedTimestamp *time.Time + + // The timestamp of when the address list was last updated. + // + // This member is required. + LastUpdatedTimestamp *time.Time + + noSmithyDocumentSerde +} + // The result of an analysis can be used in conditions to trigger actions. // Analyses can inspect the email content and report a certain aspect of the email. type Analysis struct { @@ -384,6 +425,77 @@ type ExportSummary struct { noSmithyDocumentSerde } +// The import data format contains the specifications of the input file that would +// be passed to the address list import job. +type ImportDataFormat struct { + + // The type of file that would be passed as an input for the address list import + // job. + // + // This member is required. + ImportDataType ImportDataType + + noSmithyDocumentSerde +} + +// Details about an import job. +type ImportJob struct { + + // The unique identifier of the address list the import job was created for. + // + // This member is required. + AddressListId *string + + // The timestamp of when the import job was created. + // + // This member is required. + CreatedTimestamp *time.Time + + // The format of the input for the import job. + // + // This member is required. + ImportDataFormat *ImportDataFormat + + // The identifier of the import job. + // + // This member is required. + JobId *string + + // A user-friendly name for the import job. + // + // This member is required. + Name *string + + // The pre-signed URL target for uploading the input file. + // + // This member is required. + PreSignedUrl *string + + // The status of the import job. + // + // This member is required. + Status ImportJobStatus + + // The timestamp of when the import job was completed. + CompletedTimestamp *time.Time + + // The reason for failure of an import job. + Error *string + + // The number of addresses in the input that failed to get imported into address + // list. + FailedItemsCount *int32 + + // The number of addresses in the input that were successfully imported into the + // address list. + ImportedItemsCount *int32 + + // The timestamp of when the import job was started. + StartTimestamp *time.Time + + noSmithyDocumentSerde +} + // The Add On ARN and its returned value that is evaluated in a policy statement's // conditional expression to either deny or block the incoming email. type IngressAnalysis struct { @@ -423,6 +535,7 @@ type IngressBooleanExpression struct { // The following types satisfy this interface: // // IngressBooleanToEvaluateMemberAnalysis +// IngressBooleanToEvaluateMemberIsInAddressList type IngressBooleanToEvaluate interface { isIngressBooleanToEvaluate() } @@ -437,6 +550,16 @@ type IngressBooleanToEvaluateMemberAnalysis struct { func (*IngressBooleanToEvaluateMemberAnalysis) isIngressBooleanToEvaluate() {} +// The structure type for a boolean condition that provides the address lists to +// evaluate incoming traffic on. +type IngressBooleanToEvaluateMemberIsInAddressList struct { + Value IngressIsInAddressList + + noSmithyDocumentSerde +} + +func (*IngressBooleanToEvaluateMemberIsInAddressList) isIngressBooleanToEvaluate() {} + // The structure for an IP based condition matching on the incoming mail. // // The following types satisfy this interface: @@ -477,6 +600,24 @@ type IngressIpv4Expression struct { noSmithyDocumentSerde } +// The address lists and the address list attribute value that is evaluated in a +// policy statement's conditional expression to either deny or block the incoming +// email. +type IngressIsInAddressList struct { + + // The address lists that will be used for evaluation. + // + // This member is required. + AddressLists []string + + // The email attribute that needs to be evaluated against the address list. + // + // This member is required. + Attribute IngressAddressListEmailAttribute + + noSmithyDocumentSerde +} + // The structure of an ingress endpoint resource. type IngressPoint struct { @@ -1065,6 +1206,7 @@ type RuleBooleanExpression struct { // The following types satisfy this interface: // // RuleBooleanToEvaluateMemberAttribute +// RuleBooleanToEvaluateMemberIsInAddressList type RuleBooleanToEvaluate interface { isRuleBooleanToEvaluate() } @@ -1078,6 +1220,16 @@ type RuleBooleanToEvaluateMemberAttribute struct { func (*RuleBooleanToEvaluateMemberAttribute) isRuleBooleanToEvaluate() {} +// The structure representing the address lists and address list attribute that +// will be used in evaluation of boolean expression. +type RuleBooleanToEvaluateMemberIsInAddressList struct { + Value RuleIsInAddressList + + noSmithyDocumentSerde +} + +func (*RuleBooleanToEvaluateMemberIsInAddressList) isRuleBooleanToEvaluate() {} + // The conditional expression used to evaluate an email for determining if a rule // action should be taken. // @@ -1214,6 +1366,23 @@ type RuleIpToEvaluateMemberAttribute struct { func (*RuleIpToEvaluateMemberAttribute) isRuleIpToEvaluate() {} +// The structure type for a boolean condition that provides the address lists and +// address list attribute to evaluate. +type RuleIsInAddressList struct { + + // The address lists that will be used for evaluation. + // + // This member is required. + AddressLists []string + + // The email attribute that needs to be evaluated against the address list. + // + // This member is required. + Attribute RuleAddressListEmailAttribute + + noSmithyDocumentSerde +} + // A number expression to match numeric conditions with integers from the incoming // email. type RuleNumberExpression struct { @@ -1416,6 +1585,22 @@ type S3ExportDestinationConfiguration struct { noSmithyDocumentSerde } +// An address that is a member of an address list. +type SavedAddress struct { + + // The email or domain that constitutes the address. + // + // This member is required. + Address *string + + // The timestamp of when the address was added to the address list. + // + // This member is required. + CreatedTimestamp *time.Time + + noSmithyDocumentSerde +} + // The current status of an archive search job. type SearchStatus struct { diff --git a/service/mailmanager/types/types_exported_test.go b/service/mailmanager/types/types_exported_test.go index 97c4f5855be..92df5989905 100644 --- a/service/mailmanager/types/types_exported_test.go +++ b/service/mailmanager/types/types_exported_test.go @@ -108,6 +108,9 @@ func ExampleIngressBooleanToEvaluate_outputUsage() { case *types.IngressBooleanToEvaluateMemberAnalysis: _ = v.Value // Value is types.IngressAnalysis + case *types.IngressBooleanToEvaluateMemberIsInAddressList: + _ = v.Value // Value is types.IngressIsInAddressList + case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) @@ -118,6 +121,7 @@ func ExampleIngressBooleanToEvaluate_outputUsage() { } var _ *types.IngressAnalysis +var _ *types.IngressIsInAddressList func ExampleIngressIpToEvaluate_outputUsage() { var union types.IngressIpToEvaluate @@ -304,6 +308,9 @@ func ExampleRuleBooleanToEvaluate_outputUsage() { case *types.RuleBooleanToEvaluateMemberAttribute: _ = v.Value // Value is types.RuleBooleanEmailAttribute + case *types.RuleBooleanToEvaluateMemberIsInAddressList: + _ = v.Value // Value is types.RuleIsInAddressList + case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) @@ -314,6 +321,7 @@ func ExampleRuleBooleanToEvaluate_outputUsage() { } var _ types.RuleBooleanEmailAttribute +var _ *types.RuleIsInAddressList func ExampleRuleCondition_outputUsage() { var union types.RuleCondition diff --git a/service/mailmanager/validators.go b/service/mailmanager/validators.go index a33e9da6aae..487e7b96d5a 100644 --- a/service/mailmanager/validators.go +++ b/service/mailmanager/validators.go @@ -50,6 +50,46 @@ func (m *validateOpCreateAddonSubscription) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpCreateAddressListImportJob struct { +} + +func (*validateOpCreateAddressListImportJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateAddressListImportJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateAddressListImportJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateAddressListImportJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateAddressList struct { +} + +func (*validateOpCreateAddressList) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateAddressList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateAddressListInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateAddressListInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateArchive struct { } @@ -190,6 +230,26 @@ func (m *validateOpDeleteAddonSubscription) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpDeleteAddressList struct { +} + +func (*validateOpDeleteAddressList) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteAddressList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteAddressListInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteAddressListInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteArchive struct { } @@ -290,6 +350,26 @@ func (m *validateOpDeleteTrafficPolicy) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpDeregisterMemberFromAddressList struct { +} + +func (*validateOpDeregisterMemberFromAddressList) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeregisterMemberFromAddressList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeregisterMemberFromAddressListInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeregisterMemberFromAddressListInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetAddonInstance struct { } @@ -330,6 +410,46 @@ func (m *validateOpGetAddonSubscription) HandleInitialize(ctx context.Context, i return next.HandleInitialize(ctx, in) } +type validateOpGetAddressListImportJob struct { +} + +func (*validateOpGetAddressListImportJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetAddressListImportJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetAddressListImportJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetAddressListImportJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetAddressList struct { +} + +func (*validateOpGetAddressList) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetAddressList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetAddressListInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetAddressListInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetArchiveExport struct { } @@ -470,6 +590,26 @@ func (m *validateOpGetIngressPoint) HandleInitialize(ctx context.Context, in mid return next.HandleInitialize(ctx, in) } +type validateOpGetMemberOfAddressList struct { +} + +func (*validateOpGetMemberOfAddressList) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetMemberOfAddressList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetMemberOfAddressListInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetMemberOfAddressListInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetRelay struct { } @@ -530,6 +670,26 @@ func (m *validateOpGetTrafficPolicy) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpListAddressListImportJobs struct { +} + +func (*validateOpListAddressListImportJobs) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListAddressListImportJobs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListAddressListImportJobsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListAddressListImportJobsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListArchiveExports struct { } @@ -570,6 +730,26 @@ func (m *validateOpListArchiveSearches) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpListMembersOfAddressList struct { +} + +func (*validateOpListMembersOfAddressList) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListMembersOfAddressList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListMembersOfAddressListInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListMembersOfAddressListInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListTagsForResource struct { } @@ -590,6 +770,46 @@ func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpRegisterMemberToAddressList struct { +} + +func (*validateOpRegisterMemberToAddressList) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRegisterMemberToAddressList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RegisterMemberToAddressListInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRegisterMemberToAddressListInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartAddressListImportJob struct { +} + +func (*validateOpStartAddressListImportJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartAddressListImportJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartAddressListImportJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartAddressListImportJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartArchiveExport struct { } @@ -630,6 +850,26 @@ func (m *validateOpStartArchiveSearch) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpStopAddressListImportJob struct { +} + +func (*validateOpStopAddressListImportJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStopAddressListImportJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StopAddressListImportJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStopAddressListImportJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStopArchiveExport struct { } @@ -818,6 +1058,14 @@ func addOpCreateAddonSubscriptionValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpCreateAddonSubscription{}, middleware.After) } +func addOpCreateAddressListImportJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateAddressListImportJob{}, middleware.After) +} + +func addOpCreateAddressListValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateAddressList{}, middleware.After) +} + func addOpCreateArchiveValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateArchive{}, middleware.After) } @@ -846,6 +1094,10 @@ func addOpDeleteAddonSubscriptionValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpDeleteAddonSubscription{}, middleware.After) } +func addOpDeleteAddressListValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteAddressList{}, middleware.After) +} + func addOpDeleteArchiveValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteArchive{}, middleware.After) } @@ -866,6 +1118,10 @@ func addOpDeleteTrafficPolicyValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpDeleteTrafficPolicy{}, middleware.After) } +func addOpDeregisterMemberFromAddressListValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeregisterMemberFromAddressList{}, middleware.After) +} + func addOpGetAddonInstanceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetAddonInstance{}, middleware.After) } @@ -874,6 +1130,14 @@ func addOpGetAddonSubscriptionValidationMiddleware(stack *middleware.Stack) erro return stack.Initialize.Add(&validateOpGetAddonSubscription{}, middleware.After) } +func addOpGetAddressListImportJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetAddressListImportJob{}, middleware.After) +} + +func addOpGetAddressListValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetAddressList{}, middleware.After) +} + func addOpGetArchiveExportValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetArchiveExport{}, middleware.After) } @@ -902,6 +1166,10 @@ func addOpGetIngressPointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetIngressPoint{}, middleware.After) } +func addOpGetMemberOfAddressListValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetMemberOfAddressList{}, middleware.After) +} + func addOpGetRelayValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetRelay{}, middleware.After) } @@ -914,6 +1182,10 @@ func addOpGetTrafficPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetTrafficPolicy{}, middleware.After) } +func addOpListAddressListImportJobsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListAddressListImportJobs{}, middleware.After) +} + func addOpListArchiveExportsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListArchiveExports{}, middleware.After) } @@ -922,10 +1194,22 @@ func addOpListArchiveSearchesValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpListArchiveSearches{}, middleware.After) } +func addOpListMembersOfAddressListValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListMembersOfAddressList{}, middleware.After) +} + func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } +func addOpRegisterMemberToAddressListValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRegisterMemberToAddressList{}, middleware.After) +} + +func addOpStartAddressListImportJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartAddressListImportJob{}, middleware.After) +} + func addOpStartArchiveExportValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartArchiveExport{}, middleware.After) } @@ -934,6 +1218,10 @@ func addOpStartArchiveSearchValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpStartArchiveSearch{}, middleware.After) } +func addOpStopAddressListImportJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStopAddressListImportJob{}, middleware.After) +} + func addOpStopArchiveExportValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStopArchiveExport{}, middleware.After) } @@ -1162,6 +1450,21 @@ func validateDeliverToQBusinessAction(v *types.DeliverToQBusinessAction) error { } } +func validateImportDataFormat(v *types.ImportDataFormat) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ImportDataFormat"} + if len(v.ImportDataType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ImportDataType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateIngressAnalysis(v *types.IngressAnalysis) error { if v == nil { return nil @@ -1213,6 +1516,11 @@ func validateIngressBooleanToEvaluate(v types.IngressBooleanToEvaluate) error { invalidParams.AddNested("[Analysis]", err.(smithy.InvalidParamsError)) } + case *types.IngressBooleanToEvaluateMemberIsInAddressList: + if err := validateIngressIsInAddressList(&uv.Value); err != nil { + invalidParams.AddNested("[IsInAddressList]", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -1242,6 +1550,24 @@ func validateIngressIpv4Expression(v *types.IngressIpv4Expression) error { } } +func validateIngressIsInAddressList(v *types.IngressIsInAddressList) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IngressIsInAddressList"} + if len(v.Attribute) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Attribute")) + } + if v.AddressLists == nil { + invalidParams.Add(smithy.NewErrParamRequired("AddressLists")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateIngressStringExpression(v *types.IngressStringExpression) error { if v == nil { return nil @@ -1491,6 +1817,10 @@ func validateRuleBooleanExpression(v *types.RuleBooleanExpression) error { invalidParams := smithy.InvalidParamsError{Context: "RuleBooleanExpression"} if v.Evaluate == nil { invalidParams.Add(smithy.NewErrParamRequired("Evaluate")) + } else if v.Evaluate != nil { + if err := validateRuleBooleanToEvaluate(v.Evaluate); err != nil { + invalidParams.AddNested("Evaluate", err.(smithy.InvalidParamsError)) + } } if len(v.Operator) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Operator")) @@ -1502,6 +1832,25 @@ func validateRuleBooleanExpression(v *types.RuleBooleanExpression) error { } } +func validateRuleBooleanToEvaluate(v types.RuleBooleanToEvaluate) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RuleBooleanToEvaluate"} + switch uv := v.(type) { + case *types.RuleBooleanToEvaluateMemberIsInAddressList: + if err := validateRuleIsInAddressList(&uv.Value); err != nil { + invalidParams.AddNested("[IsInAddressList]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateRuleCondition(v types.RuleCondition) error { if v == nil { return nil @@ -1602,6 +1951,24 @@ func validateRuleIpExpression(v *types.RuleIpExpression) error { } } +func validateRuleIsInAddressList(v *types.RuleIsInAddressList) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RuleIsInAddressList"} + if len(v.Attribute) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Attribute")) + } + if v.AddressLists == nil { + invalidParams.Add(smithy.NewErrParamRequired("AddressLists")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateRuleNumberExpression(v *types.RuleNumberExpression) error { if v == nil { return nil @@ -1813,6 +2180,51 @@ func validateOpCreateAddonSubscriptionInput(v *CreateAddonSubscriptionInput) err } } +func validateOpCreateAddressListImportJobInput(v *CreateAddressListImportJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateAddressListImportJobInput"} + if v.AddressListId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AddressListId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.ImportDataFormat == nil { + invalidParams.Add(smithy.NewErrParamRequired("ImportDataFormat")) + } else if v.ImportDataFormat != nil { + if err := validateImportDataFormat(v.ImportDataFormat); err != nil { + invalidParams.AddNested("ImportDataFormat", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateAddressListInput(v *CreateAddressListInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateAddressListInput"} + if v.AddressListName == nil { + invalidParams.Add(smithy.NewErrParamRequired("AddressListName")) + } + 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 validateOpCreateArchiveInput(v *CreateArchiveInput) error { if v == nil { return nil @@ -1978,6 +2390,21 @@ func validateOpDeleteAddonSubscriptionInput(v *DeleteAddonSubscriptionInput) err } } +func validateOpDeleteAddressListInput(v *DeleteAddressListInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteAddressListInput"} + if v.AddressListId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AddressListId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteArchiveInput(v *DeleteArchiveInput) error { if v == nil { return nil @@ -2053,6 +2480,24 @@ func validateOpDeleteTrafficPolicyInput(v *DeleteTrafficPolicyInput) error { } } +func validateOpDeregisterMemberFromAddressListInput(v *DeregisterMemberFromAddressListInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeregisterMemberFromAddressListInput"} + if v.AddressListId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AddressListId")) + } + if v.Address == nil { + invalidParams.Add(smithy.NewErrParamRequired("Address")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetAddonInstanceInput(v *GetAddonInstanceInput) error { if v == nil { return nil @@ -2083,6 +2528,36 @@ func validateOpGetAddonSubscriptionInput(v *GetAddonSubscriptionInput) error { } } +func validateOpGetAddressListImportJobInput(v *GetAddressListImportJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetAddressListImportJobInput"} + if v.JobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetAddressListInput(v *GetAddressListInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetAddressListInput"} + if v.AddressListId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AddressListId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetArchiveExportInput(v *GetArchiveExportInput) error { if v == nil { return nil @@ -2188,6 +2663,24 @@ func validateOpGetIngressPointInput(v *GetIngressPointInput) error { } } +func validateOpGetMemberOfAddressListInput(v *GetMemberOfAddressListInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetMemberOfAddressListInput"} + if v.AddressListId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AddressListId")) + } + if v.Address == nil { + invalidParams.Add(smithy.NewErrParamRequired("Address")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetRelayInput(v *GetRelayInput) error { if v == nil { return nil @@ -2233,6 +2726,21 @@ func validateOpGetTrafficPolicyInput(v *GetTrafficPolicyInput) error { } } +func validateOpListAddressListImportJobsInput(v *ListAddressListImportJobsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListAddressListImportJobsInput"} + if v.AddressListId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AddressListId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListArchiveExportsInput(v *ListArchiveExportsInput) error { if v == nil { return nil @@ -2263,6 +2771,21 @@ func validateOpListArchiveSearchesInput(v *ListArchiveSearchesInput) error { } } +func validateOpListMembersOfAddressListInput(v *ListMembersOfAddressListInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListMembersOfAddressListInput"} + if v.AddressListId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AddressListId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil @@ -2278,6 +2801,39 @@ func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { } } +func validateOpRegisterMemberToAddressListInput(v *RegisterMemberToAddressListInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RegisterMemberToAddressListInput"} + if v.AddressListId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AddressListId")) + } + if v.Address == nil { + invalidParams.Add(smithy.NewErrParamRequired("Address")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartAddressListImportJobInput(v *StartAddressListImportJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartAddressListImportJobInput"} + if v.JobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartArchiveExportInput(v *StartArchiveExportInput) error { if v == nil { return nil @@ -2336,6 +2892,21 @@ func validateOpStartArchiveSearchInput(v *StartArchiveSearchInput) error { } } +func validateOpStopAddressListImportJobInput(v *StopAddressListImportJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StopAddressListImportJobInput"} + if v.JobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStopArchiveExportInput(v *StopArchiveExportInput) error { if v == nil { return nil diff --git a/service/s3/api_op_CompleteMultipartUpload.go b/service/s3/api_op_CompleteMultipartUpload.go index 1948aab4839..45305ea41bc 100644 --- a/service/s3/api_op_CompleteMultipartUpload.go +++ b/service/s3/api_op_CompleteMultipartUpload.go @@ -302,7 +302,7 @@ type CompleteMultipartUploadInput struct { // The expected total object size of the multipart upload request. If there’s a // mismatch between the specified object size value and the actual object size // value, it results in an HTTP 400 InvalidRequest error. - MpuObjectSize *string + MpuObjectSize *int64 // The container for the multipart upload request information. MultipartUpload *types.CompletedMultipartUpload diff --git a/service/s3/serializers.go b/service/s3/serializers.go index f584537a94f..c37fab1e162 100644 --- a/service/s3/serializers.go +++ b/service/s3/serializers.go @@ -248,7 +248,7 @@ func awsRestxml_serializeOpHttpBindingsCompleteMultipartUploadInput(v *CompleteM if v.MpuObjectSize != nil { locationName := "X-Amz-Mp-Object-Size" - encoder.SetHeader(locationName).String(*v.MpuObjectSize) + encoder.SetHeader(locationName).Long(*v.MpuObjectSize) } if len(v.RequestPayer) > 0 { diff --git a/service/transcribestreaming/api_op_GetMedicalScribeStream.go b/service/transcribestreaming/api_op_GetMedicalScribeStream.go new file mode 100644 index 00000000000..e68ba610ae6 --- /dev/null +++ b/service/transcribestreaming/api_op_GetMedicalScribeStream.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package transcribestreaming + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/transcribestreaming/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Provides details about the specified Amazon Web Services HealthScribe streaming +// session. To view the status of the streaming session, check the StreamStatus +// field in the response. To get the details of post-stream analytics, including +// its status, check the PostStreamAnalyticsResult field in the response. +func (c *Client) GetMedicalScribeStream(ctx context.Context, params *GetMedicalScribeStreamInput, optFns ...func(*Options)) (*GetMedicalScribeStreamOutput, error) { + if params == nil { + params = &GetMedicalScribeStreamInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetMedicalScribeStream", params, optFns, c.addOperationGetMedicalScribeStreamMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetMedicalScribeStreamOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetMedicalScribeStreamInput struct { + + // The identifier of the HealthScribe streaming session you want information about. + // + // This member is required. + SessionId *string + + noSmithyDocumentSerde +} + +type GetMedicalScribeStreamOutput struct { + + // Provides details about a HealthScribe streaming session. + MedicalScribeStreamDetails *types.MedicalScribeStreamDetails + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetMedicalScribeStreamMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetMedicalScribeStream{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetMedicalScribeStream{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetMedicalScribeStream"); 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 = addOpGetMedicalScribeStreamValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMedicalScribeStream(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_opGetMedicalScribeStream(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetMedicalScribeStream", + } +} diff --git a/service/transcribestreaming/api_op_StartMedicalScribeStream.go b/service/transcribestreaming/api_op_StartMedicalScribeStream.go new file mode 100644 index 00000000000..17f30ef60b6 --- /dev/null +++ b/service/transcribestreaming/api_op_StartMedicalScribeStream.go @@ -0,0 +1,396 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package transcribestreaming + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi" + "github.com/aws/aws-sdk-go-v2/service/transcribestreaming/types" + "github.com/aws/smithy-go/middleware" + smithysync "github.com/aws/smithy-go/sync" + smithyhttp "github.com/aws/smithy-go/transport/http" + "sync" + "time" +) + +// Starts a bidirectional HTTP/2 stream, where audio is streamed to Amazon Web +// Services HealthScribe and the transcription results are streamed to your +// application. +// +// When you start a stream, you first specify the stream configuration in a +// MedicalScribeConfigurationEvent . This event includes channel definitions, +// encryption settings, and post-stream analytics settings, such as the output +// configuration for aggregated transcript and clinical note generation. These are +// additional streaming session configurations beyond those provided in your +// initial start request headers. Whether you are starting a new session or +// resuming an existing session, your first event must be a +// MedicalScribeConfigurationEvent . +// +// After you send a MedicalScribeConfigurationEvent , you start AudioEvents and +// Amazon Web Services HealthScribe responds with real-time transcription results. +// When you are finished, to start processing the results with the post-stream +// analytics, send a MedicalScribeSessionControlEvent with a Type of END_OF_SESSION +// and Amazon Web Services HealthScribe starts the analytics. +// +// You can pause or resume streaming. To pause streaming, complete the input +// stream without sending the MedicalScribeSessionControlEvent . To resume +// streaming, call the StartMedicalScribeStream and specify the same SessionId you +// used to start the stream. +// +// The following parameters are required: +// +// - language-code +// +// - media-encoding +// +// - media-sample-rate-hertz +// +// For more information on streaming with Amazon Web Services HealthScribe, see [Amazon Web Services HealthScribe]. +// +// [Amazon Web Services HealthScribe]: https://docs.aws.amazon.com/transcribe/latest/dg/health-scribe-streaming.html +func (c *Client) StartMedicalScribeStream(ctx context.Context, params *StartMedicalScribeStreamInput, optFns ...func(*Options)) (*StartMedicalScribeStreamOutput, error) { + if params == nil { + params = &StartMedicalScribeStreamInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartMedicalScribeStream", params, optFns, c.addOperationStartMedicalScribeStreamMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartMedicalScribeStreamOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartMedicalScribeStreamInput struct { + + // Specify the language code for your HealthScribe streaming session. + // + // This member is required. + LanguageCode types.MedicalScribeLanguageCode + + // Specify the encoding used for the input audio. + // + // Supported formats are: + // + // - FLAC + // + // - OPUS-encoded audio in an Ogg container + // + // - PCM (only signed 16-bit little-endian audio formats, which does not include + // WAV) + // + // For more information, see [Media formats]. + // + // [Media formats]: https://docs.aws.amazon.com/transcribe/latest/dg/how-input.html#how-input-audio + // + // This member is required. + MediaEncoding types.MedicalScribeMediaEncoding + + // Specify the sample rate of the input audio (in hertz). Amazon Web Services + // HealthScribe supports a range from 16,000 Hz to 48,000 Hz. The sample rate you + // specify must match that of your audio. + // + // This member is required. + MediaSampleRateHertz *int32 + + // Specify an identifier for your streaming session (in UUID format). If you don't + // include a SessionId in your request, Amazon Web Services HealthScribe generates + // an ID and returns it in the response. + SessionId *string + + noSmithyDocumentSerde +} + +type StartMedicalScribeStreamOutput struct { + + // The Language Code that you specified in your request. Same as provided in the + // StartMedicalScribeStreamRequest . + LanguageCode types.MedicalScribeLanguageCode + + // The Media Encoding you specified in your request. Same as provided in the + // StartMedicalScribeStreamRequest + MediaEncoding types.MedicalScribeMediaEncoding + + // The sample rate (in hertz) that you specified in your request. Same as provided + // in the StartMedicalScribeStreamRequest + MediaSampleRateHertz *int32 + + // The unique identifier for your streaming request. + RequestId *string + + // The identifier (in UUID format) for your streaming session. + // + // If you already started streaming, this is same ID as the one you specified in + // your initial StartMedicalScribeStreamRequest . + SessionId *string + + eventStream *StartMedicalScribeStreamEventStream + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +// GetStream returns the type to interact with the event stream. +func (o *StartMedicalScribeStreamOutput) GetStream() *StartMedicalScribeStreamEventStream { + return o.eventStream +} + +func (c *Client) addOperationStartMedicalScribeStreamMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartMedicalScribeStream{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartMedicalScribeStream{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartMedicalScribeStream"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addEventStreamStartMedicalScribeStreamMiddleware(stack, options); err != nil { + return err + } + if err = smithyhttp.AddRequireMinimumProtocol(stack, 2, 0); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addStreamingEventsPayload(stack); err != nil { + return err + } + if err = addContentSHA256Header(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 = eventstreamapi.AddInitializeStreamWriter(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 = addOpStartMedicalScribeStreamValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartMedicalScribeStream(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_opStartMedicalScribeStream(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartMedicalScribeStream", + } +} + +// StartMedicalScribeStreamEventStream provides the event stream handling for the StartMedicalScribeStream operation. +// +// For testing and mocking the event stream this type should be initialized via +// the NewStartMedicalScribeStreamEventStream constructor function. Using the functional options +// to pass in nested mock behavior. +type StartMedicalScribeStreamEventStream struct { + // MedicalScribeInputStreamWriter is the EventStream writer for the + // MedicalScribeInputStream events. This value is automatically set by the SDK when + // the API call is made Use this member when unit testing your code with the SDK to + // mock out the EventStream Writer. + // + // Must not be nil. + Writer MedicalScribeInputStreamWriter + + // MedicalScribeResultStreamReader is the EventStream reader for the + // MedicalScribeResultStream events. This value is automatically set by the SDK + // when the API call is made Use this member when unit testing your code with the + // SDK to mock out the EventStream Reader. + // + // Must not be nil. + Reader MedicalScribeResultStreamReader + + done chan struct{} + closeOnce sync.Once + err *smithysync.OnceErr +} + +// NewStartMedicalScribeStreamEventStream initializes an StartMedicalScribeStreamEventStream. +// This function should only be used for testing and mocking the StartMedicalScribeStreamEventStream +// stream within your application. +// +// The Writer member must be set before writing events to the stream. +// +// The Reader member must be set before reading events from the stream. +func NewStartMedicalScribeStreamEventStream(optFns ...func(*StartMedicalScribeStreamEventStream)) *StartMedicalScribeStreamEventStream { + es := &StartMedicalScribeStreamEventStream{ + done: make(chan struct{}), + err: smithysync.NewOnceErr(), + } + for _, fn := range optFns { + fn(es) + } + return es +} + +// Send writes the event to the stream blocking until the event is written. +// Returns an error if the event was not written. +func (es *StartMedicalScribeStreamEventStream) Send(ctx context.Context, event types.MedicalScribeInputStream) error { + return es.Writer.Send(ctx, event) +} + +// Events returns a channel to read events from. +func (es *StartMedicalScribeStreamEventStream) Events() <-chan types.MedicalScribeResultStream { + return es.Reader.Events() +} + +// Close closes the stream. This will also cause the stream to be closed. +// Close must be called when done using the stream API. Not calling Close +// may result in resource leaks. +// +// Will close the underlying EventStream writer and reader, and no more events can be +// sent or received. +func (es *StartMedicalScribeStreamEventStream) Close() error { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *StartMedicalScribeStreamEventStream) safeClose() { + close(es.done) + + t := time.NewTicker(time.Second) + defer t.Stop() + writeCloseDone := make(chan error) + go func() { + if err := es.Writer.Close(); err != nil { + es.err.SetError(err) + } + close(writeCloseDone) + }() + select { + case <-t.C: + case <-writeCloseDone: + } + + es.Reader.Close() +} + +// Err returns any error that occurred while reading or writing EventStream Events +// from the service API's response. Returns nil if there were no errors. +func (es *StartMedicalScribeStreamEventStream) Err() error { + if err := es.err.Err(); err != nil { + return err + } + + if err := es.Writer.Err(); err != nil { + return err + } + + if err := es.Reader.Err(); err != nil { + return err + } + + return nil +} + +func (es *StartMedicalScribeStreamEventStream) waitStreamClose() { + type errorSet interface { + ErrorSet() <-chan struct{} + } + + var inputErrCh <-chan struct{} + if v, ok := es.Writer.(errorSet); ok { + inputErrCh = v.ErrorSet() + } + + var outputErrCh <-chan struct{} + if v, ok := es.Reader.(errorSet); ok { + outputErrCh = v.ErrorSet() + } + var outputClosedCh <-chan struct{} + if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok { + outputClosedCh = v.Closed() + } + + select { + case <-es.done: + case <-inputErrCh: + es.err.SetError(es.Writer.Err()) + es.Close() + + case <-outputErrCh: + es.err.SetError(es.Reader.Err()) + es.Close() + + case <-outputClosedCh: + if err := es.Reader.Err(); err != nil { + es.err.SetError(es.Reader.Err()) + } + es.Close() + + } +} diff --git a/service/transcribestreaming/deserializers.go b/service/transcribestreaming/deserializers.go index f5529852317..82442be84ed 100644 --- a/service/transcribestreaming/deserializers.go +++ b/service/transcribestreaming/deserializers.go @@ -33,6 +33,167 @@ func deserializeS3Expires(v string) (*time.Time, error) { return &t, nil } +type awsRestjson1_deserializeOpGetMedicalScribeStream struct { +} + +func (*awsRestjson1_deserializeOpGetMedicalScribeStream) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetMedicalScribeStream) HandleDeserialize(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_deserializeOpErrorGetMedicalScribeStream(response, &metadata) + } + output := &GetMedicalScribeStreamOutput{} + 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_deserializeOpDocumentGetMedicalScribeStreamOutput(&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_deserializeOpErrorGetMedicalScribeStream(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetMedicalScribeStreamOutput(v **GetMedicalScribeStreamOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetMedicalScribeStreamOutput + if *v == nil { + sv = &GetMedicalScribeStreamOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MedicalScribeStreamDetails": + if err := awsRestjson1_deserializeDocumentMedicalScribeStreamDetails(&sv.MedicalScribeStreamDetails, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpStartCallAnalyticsStreamTranscription struct { } @@ -224,14 +385,14 @@ func awsRestjson1_deserializeOpHttpBindingsStartCallAnalyticsStreamTranscription return nil } -type awsRestjson1_deserializeOpStartMedicalStreamTranscription struct { +type awsRestjson1_deserializeOpStartMedicalScribeStream struct { } -func (*awsRestjson1_deserializeOpStartMedicalStreamTranscription) ID() string { +func (*awsRestjson1_deserializeOpStartMedicalScribeStream) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartMedicalStreamTranscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartMedicalScribeStream) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -249,12 +410,12 @@ func (m *awsRestjson1_deserializeOpStartMedicalStreamTranscription) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartMedicalStreamTranscription(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartMedicalScribeStream(response, &metadata) } - output := &StartMedicalStreamTranscriptionOutput{} + output := &StartMedicalScribeStreamOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsStartMedicalStreamTranscriptionOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsStartMedicalScribeStreamOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -263,7 +424,7 @@ func (m *awsRestjson1_deserializeOpStartMedicalStreamTranscription) HandleDeseri return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartMedicalStreamTranscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartMedicalScribeStream(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -329,33 +490,19 @@ func awsRestjson1_deserializeOpErrorStartMedicalStreamTranscription(response *sm } } -func awsRestjson1_deserializeOpHttpBindingsStartMedicalStreamTranscriptionOutput(v *StartMedicalStreamTranscriptionOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsStartMedicalScribeStreamOutput(v *StartMedicalScribeStreamOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } - if headerValues := response.Header.Values("x-amzn-transcribe-content-identification-type"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.ContentIdentificationType = types.MedicalContentIdentificationType(headerValues[0]) - } - - if headerValues := response.Header.Values("x-amzn-transcribe-enable-channel-identification"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - vv, err := strconv.ParseBool(headerValues[0]) - if err != nil { - return err - } - v.EnableChannelIdentification = vv - } - if headerValues := response.Header.Values("x-amzn-transcribe-language-code"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) - v.LanguageCode = types.LanguageCode(headerValues[0]) + v.LanguageCode = types.MedicalScribeLanguageCode(headerValues[0]) } if headerValues := response.Header.Values("x-amzn-transcribe-media-encoding"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) - v.MediaEncoding = types.MediaEncoding(headerValues[0]) + v.MediaEncoding = types.MedicalScribeMediaEncoding(headerValues[0]) } if headerValues := response.Header.Values("x-amzn-transcribe-sample-rate"); len(headerValues) != 0 { @@ -367,15 +514,6 @@ func awsRestjson1_deserializeOpHttpBindingsStartMedicalStreamTranscriptionOutput v.MediaSampleRateHertz = ptr.Int32(int32(vv)) } - if headerValues := response.Header.Values("x-amzn-transcribe-number-of-channels"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - vv, err := strconv.ParseInt(headerValues[0], 0, 32) - if err != nil { - return err - } - v.NumberOfChannels = ptr.Int32(int32(vv)) - } - if headerValues := response.Header.Values("x-amzn-request-id"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) v.RequestId = ptr.String(headerValues[0]) @@ -386,41 +524,17 @@ func awsRestjson1_deserializeOpHttpBindingsStartMedicalStreamTranscriptionOutput v.SessionId = ptr.String(headerValues[0]) } - if headerValues := response.Header.Values("x-amzn-transcribe-show-speaker-label"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - vv, err := strconv.ParseBool(headerValues[0]) - if err != nil { - return err - } - v.ShowSpeakerLabel = vv - } - - if headerValues := response.Header.Values("x-amzn-transcribe-specialty"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.Specialty = types.Specialty(headerValues[0]) - } - - if headerValues := response.Header.Values("x-amzn-transcribe-type"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.Type = types.Type(headerValues[0]) - } - - if headerValues := response.Header.Values("x-amzn-transcribe-vocabulary-name"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.VocabularyName = ptr.String(headerValues[0]) - } - return nil } -type awsRestjson1_deserializeOpStartStreamTranscription struct { +type awsRestjson1_deserializeOpStartMedicalStreamTranscription struct { } -func (*awsRestjson1_deserializeOpStartStreamTranscription) ID() string { +func (*awsRestjson1_deserializeOpStartMedicalStreamTranscription) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartStreamTranscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartMedicalStreamTranscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -438,12 +552,12 @@ func (m *awsRestjson1_deserializeOpStartStreamTranscription) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartStreamTranscription(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartMedicalStreamTranscription(response, &metadata) } - output := &StartStreamTranscriptionOutput{} + output := &StartMedicalStreamTranscriptionOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsStartStreamTranscriptionOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsStartMedicalStreamTranscriptionOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -452,7 +566,7 @@ func (m *awsRestjson1_deserializeOpStartStreamTranscription) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartStreamTranscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartMedicalStreamTranscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -518,19 +632,14 @@ func awsRestjson1_deserializeOpErrorStartStreamTranscription(response *smithyhtt } } -func awsRestjson1_deserializeOpHttpBindingsStartStreamTranscriptionOutput(v *StartStreamTranscriptionOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsStartMedicalStreamTranscriptionOutput(v *StartMedicalStreamTranscriptionOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } if headerValues := response.Header.Values("x-amzn-transcribe-content-identification-type"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) - v.ContentIdentificationType = types.ContentIdentificationType(headerValues[0]) - } - - if headerValues := response.Header.Values("x-amzn-transcribe-content-redaction-type"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.ContentRedactionType = types.ContentRedactionType(headerValues[0]) + v.ContentIdentificationType = types.MedicalContentIdentificationType(headerValues[0]) } if headerValues := response.Header.Values("x-amzn-transcribe-enable-channel-identification"); len(headerValues) != 0 { @@ -542,41 +651,235 @@ func awsRestjson1_deserializeOpHttpBindingsStartStreamTranscriptionOutput(v *Sta v.EnableChannelIdentification = vv } - if headerValues := response.Header.Values("x-amzn-transcribe-enable-partial-results-stabilization"); len(headerValues) != 0 { + if headerValues := response.Header.Values("x-amzn-transcribe-language-code"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) - vv, err := strconv.ParseBool(headerValues[0]) - if err != nil { - return err - } - v.EnablePartialResultsStabilization = vv + v.LanguageCode = types.LanguageCode(headerValues[0]) } - if headerValues := response.Header.Values("x-amzn-transcribe-identify-language"); len(headerValues) != 0 { + if headerValues := response.Header.Values("x-amzn-transcribe-media-encoding"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) - vv, err := strconv.ParseBool(headerValues[0]) + v.MediaEncoding = types.MediaEncoding(headerValues[0]) + } + + if headerValues := response.Header.Values("x-amzn-transcribe-sample-rate"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseInt(headerValues[0], 0, 32) if err != nil { return err } - v.IdentifyLanguage = vv + v.MediaSampleRateHertz = ptr.Int32(int32(vv)) } - if headerValues := response.Header.Values("x-amzn-transcribe-identify-multiple-languages"); len(headerValues) != 0 { + if headerValues := response.Header.Values("x-amzn-transcribe-number-of-channels"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) - vv, err := strconv.ParseBool(headerValues[0]) + vv, err := strconv.ParseInt(headerValues[0], 0, 32) if err != nil { return err } - v.IdentifyMultipleLanguages = vv + v.NumberOfChannels = ptr.Int32(int32(vv)) } - if headerValues := response.Header.Values("x-amzn-transcribe-language-code"); len(headerValues) != 0 { + if headerValues := response.Header.Values("x-amzn-request-id"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) - v.LanguageCode = types.LanguageCode(headerValues[0]) + v.RequestId = ptr.String(headerValues[0]) } - if headerValues := response.Header.Values("x-amzn-transcribe-language-model-name"); len(headerValues) != 0 { + if headerValues := response.Header.Values("x-amzn-transcribe-session-id"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) - v.LanguageModelName = ptr.String(headerValues[0]) + v.SessionId = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("x-amzn-transcribe-show-speaker-label"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseBool(headerValues[0]) + if err != nil { + return err + } + v.ShowSpeakerLabel = vv + } + + if headerValues := response.Header.Values("x-amzn-transcribe-specialty"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Specialty = types.Specialty(headerValues[0]) + } + + if headerValues := response.Header.Values("x-amzn-transcribe-type"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Type = types.Type(headerValues[0]) + } + + if headerValues := response.Header.Values("x-amzn-transcribe-vocabulary-name"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.VocabularyName = ptr.String(headerValues[0]) + } + + return nil +} + +type awsRestjson1_deserializeOpStartStreamTranscription struct { +} + +func (*awsRestjson1_deserializeOpStartStreamTranscription) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStartStreamTranscription) HandleDeserialize(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_deserializeOpErrorStartStreamTranscription(response, &metadata) + } + output := &StartStreamTranscriptionOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsStartStreamTranscriptionOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorStartStreamTranscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsStartStreamTranscriptionOutput(v *StartStreamTranscriptionOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amzn-transcribe-content-identification-type"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ContentIdentificationType = types.ContentIdentificationType(headerValues[0]) + } + + if headerValues := response.Header.Values("x-amzn-transcribe-content-redaction-type"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ContentRedactionType = types.ContentRedactionType(headerValues[0]) + } + + if headerValues := response.Header.Values("x-amzn-transcribe-enable-channel-identification"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseBool(headerValues[0]) + if err != nil { + return err + } + v.EnableChannelIdentification = vv + } + + if headerValues := response.Header.Values("x-amzn-transcribe-enable-partial-results-stabilization"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseBool(headerValues[0]) + if err != nil { + return err + } + v.EnablePartialResultsStabilization = vv + } + + if headerValues := response.Header.Values("x-amzn-transcribe-identify-language"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseBool(headerValues[0]) + if err != nil { + return err + } + v.IdentifyLanguage = vv + } + + if headerValues := response.Header.Values("x-amzn-transcribe-identify-multiple-languages"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseBool(headerValues[0]) + if err != nil { + return err + } + v.IdentifyMultipleLanguages = vv + } + + if headerValues := response.Header.Values("x-amzn-transcribe-language-code"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.LanguageCode = types.LanguageCode(headerValues[0]) + } + + if headerValues := response.Header.Values("x-amzn-transcribe-language-model-name"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.LanguageModelName = ptr.String(headerValues[0]) } if headerValues := response.Header.Values("x-amzn-transcribe-language-options"); len(headerValues) != 0 { @@ -668,7 +971,7 @@ func awsRestjson1_deserializeOpHttpBindingsStartStreamTranscriptionOutput(v *Sta return nil } -func awsRestjson1_deserializeEventStreamCallAnalyticsTranscriptResultStream(v *types.CallAnalyticsTranscriptResultStream, msg *eventstream.Message) error { +func awsRestjson1_deserializeEventStreamMedicalScribeResultStream(v *types.MedicalScribeResultStream, msg *eventstream.Message) error { if v == nil { return fmt.Errorf("unexpected serialization of nil %T", v) } @@ -679,17 +982,9 @@ func awsRestjson1_deserializeEventStreamCallAnalyticsTranscriptResultStream(v *t } switch { - case strings.EqualFold("CategoryEvent", eventType.String()): - vv := &types.CallAnalyticsTranscriptResultStreamMemberCategoryEvent{} - if err := awsRestjson1_deserializeEventMessageCategoryEvent(&vv.Value, msg); err != nil { - return err - } - *v = vv - return nil - - case strings.EqualFold("UtteranceEvent", eventType.String()): - vv := &types.CallAnalyticsTranscriptResultStreamMemberUtteranceEvent{} - if err := awsRestjson1_deserializeEventMessageUtteranceEvent(&vv.Value, msg); err != nil { + case strings.EqualFold("TranscriptEvent", eventType.String()): + vv := &types.MedicalScribeResultStreamMemberTranscriptEvent{} + if err := awsRestjson1_deserializeEventMessageMedicalScribeTranscriptEvent(&vv.Value, msg); err != nil { return err } *v = vv @@ -707,7 +1002,7 @@ func awsRestjson1_deserializeEventStreamCallAnalyticsTranscriptResultStream(v *t } } -func awsRestjson1_deserializeEventStreamExceptionCallAnalyticsTranscriptResultStream(msg *eventstream.Message) error { +func awsRestjson1_deserializeEventStreamExceptionMedicalScribeResultStream(msg *eventstream.Message) error { exceptionType := msg.Headers.Get(eventstreamapi.ExceptionTypeHeader) if exceptionType == nil { return fmt.Errorf("%s event header not present", eventstreamapi.ExceptionTypeHeader) @@ -759,45 +1054,7 @@ func awsRestjson1_deserializeEventStreamExceptionCallAnalyticsTranscriptResultSt } } -func awsRestjson1_deserializeEventMessageUtteranceEvent(v *types.UtteranceEvent, msg *eventstream.Message) error { - if v == nil { - return fmt.Errorf("unexpected serialization of nil %T", v) - } - - br := bytes.NewReader(msg.Payload) - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(br, 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 - } - - if err := awsRestjson1_deserializeDocumentUtteranceEvent(&v, shape); err != nil { - 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 nil -} - -func awsRestjson1_deserializeEventMessageCategoryEvent(v *types.CategoryEvent, msg *eventstream.Message) error { +func awsRestjson1_deserializeEventMessageMedicalScribeTranscriptEvent(v *types.MedicalScribeTranscriptEvent, msg *eventstream.Message) error { if v == nil { return fmt.Errorf("unexpected serialization of nil %T", v) } @@ -820,7 +1077,7 @@ func awsRestjson1_deserializeEventMessageCategoryEvent(v *types.CategoryEvent, m return err } - if err := awsRestjson1_deserializeDocumentCategoryEvent(&v, shape); err != nil { + if err := awsRestjson1_deserializeDocumentMedicalScribeTranscriptEvent(&v, shape); err != nil { if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1050,7 +1307,7 @@ func awsRestjson1_deserializeDocumentBadRequestException(v **types.BadRequestExc return nil } -func awsRestjson1_deserializeDocumentCallAnalyticsEntity(v **types.CallAnalyticsEntity, value interface{}) error { +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1063,100 +1320,102 @@ func awsRestjson1_deserializeDocumentCallAnalyticsEntity(v **types.CallAnalytics return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CallAnalyticsEntity + var sv *types.ConflictException if *v == nil { - sv = &types.CallAnalyticsEntity{} + sv = &types.ConflictException{} } else { sv = *v } for key, value := range shape { switch key { - case "BeginOffsetMillis": - 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.BeginOffsetMillis = ptr.Int64(i64) - } - - case "Category": + case "message", "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.Category = ptr.String(jtv) + sv.Message = ptr.String(jtv) } - 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: + _, _ = key, value - default: - return fmt.Errorf("unknown JSON number value: %s", jtv) + } + } + *v = sv + return nil +} - } - sv.Confidence = ptr.Float64(f64) +func awsRestjson1_deserializeDocumentInternalFailureException(v **types.InternalFailureException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - default: - return fmt.Errorf("expected Confidence to be a JSON Number, got %T instead", value) + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - } - } + var sv *types.InternalFailureException + if *v == nil { + sv = &types.InternalFailureException{} + } else { + sv = *v + } - case "Content": + for key, value := range shape { + switch key { + case "message", "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.Content = ptr.String(jtv) + sv.Message = ptr.String(jtv) } - case "EndOffsetMillis": - 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.EndOffsetMillis = ptr.Int64(i64) - } + default: + _, _ = key, value - case "Type": + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LimitExceededException + if *v == nil { + sv = &types.LimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "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.Type = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -1168,7 +1427,7 @@ func awsRestjson1_deserializeDocumentCallAnalyticsEntity(v **types.CallAnalytics return nil } -func awsRestjson1_deserializeDocumentCallAnalyticsEntityList(v *[]types.CallAnalyticsEntity, value interface{}) error { +func awsRestjson1_deserializeDocumentMedicalScribeTranscriptEvent(v **types.MedicalScribeTranscriptEvent, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1176,33 +1435,35 @@ func awsRestjson1_deserializeDocumentCallAnalyticsEntityList(v *[]types.CallAnal 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.CallAnalyticsEntity + var sv *types.MedicalScribeTranscriptEvent if *v == nil { - cv = []types.CallAnalyticsEntity{} + sv = &types.MedicalScribeTranscriptEvent{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.CallAnalyticsEntity - destAddr := &col - if err := awsRestjson1_deserializeDocumentCallAnalyticsEntity(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "TranscriptSegment": + if err := awsRestjson1_deserializeDocumentMedicalScribeTranscriptSegment(&sv.TranscriptSegment, value); err != nil { + return err + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentCallAnalyticsItem(v **types.CallAnalyticsItem, value interface{}) error { +func awsRestjson1_deserializeDocumentMedicalScribeTranscriptItem(v **types.MedicalScribeTranscriptItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1215,26 +1476,47 @@ func awsRestjson1_deserializeDocumentCallAnalyticsItem(v **types.CallAnalyticsIt return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CallAnalyticsItem + var sv *types.MedicalScribeTranscriptItem if *v == nil { - sv = &types.CallAnalyticsItem{} + sv = &types.MedicalScribeTranscriptItem{} } else { sv = *v } for key, value := range shape { switch key { - case "BeginOffsetMillis": + case "BeginAudioTime": 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 + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.BeginAudioTime = 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.BeginAudioTime = f64 + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + } - sv.BeginOffsetMillis = ptr.Int64(i64) } case "Confidence": @@ -1280,44 +1562,56 @@ func awsRestjson1_deserializeDocumentCallAnalyticsItem(v **types.CallAnalyticsIt sv.Content = ptr.String(jtv) } - case "EndOffsetMillis": + case "EndAudioTime": 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.EndOffsetMillis = ptr.Int64(i64) - } + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndAudioTime = 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.EndAudioTime = f64 + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) - case "Stable": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Stable to be of type *bool, got %T instead", value) } - sv.Stable = ptr.Bool(jtv) } case "Type": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ItemType to be of type string, got %T instead", value) + return fmt.Errorf("expected MedicalScribeTranscriptItemType to be of type string, got %T instead", value) } - sv.Type = types.ItemType(jtv) + sv.Type = types.MedicalScribeTranscriptItemType(jtv) } case "VocabularyFilterMatch": if value != nil { jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) } - sv.VocabularyFilterMatch = jtv + sv.VocabularyFilterMatch = ptr.Bool(jtv) } default: @@ -1329,7 +1623,7 @@ func awsRestjson1_deserializeDocumentCallAnalyticsItem(v **types.CallAnalyticsIt return nil } -func awsRestjson1_deserializeDocumentCallAnalyticsItemList(v *[]types.CallAnalyticsItem, value interface{}) error { +func awsRestjson1_deserializeDocumentMedicalScribeTranscriptItemList(v *[]types.MedicalScribeTranscriptItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1342,17 +1636,17 @@ func awsRestjson1_deserializeDocumentCallAnalyticsItemList(v *[]types.CallAnalyt return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.CallAnalyticsItem + var cv []types.MedicalScribeTranscriptItem if *v == nil { - cv = []types.CallAnalyticsItem{} + cv = []types.MedicalScribeTranscriptItem{} } else { cv = *v } for _, value := range shape { - var col types.CallAnalyticsItem + var col types.MedicalScribeTranscriptItem destAddr := &col - if err := awsRestjson1_deserializeDocumentCallAnalyticsItem(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentMedicalScribeTranscriptItem(&destAddr, value); err != nil { return err } col = *destAddr @@ -1363,7 +1657,7 @@ func awsRestjson1_deserializeDocumentCallAnalyticsItemList(v *[]types.CallAnalyt return nil } -func awsRestjson1_deserializeDocumentCategoryEvent(v **types.CategoryEvent, value interface{}) error { +func awsRestjson1_deserializeDocumentMedicalScribeTranscriptSegment(v **types.MedicalScribeTranscriptSegment, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1376,120 +1670,122 @@ func awsRestjson1_deserializeDocumentCategoryEvent(v **types.CategoryEvent, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CategoryEvent + var sv *types.MedicalScribeTranscriptSegment if *v == nil { - sv = &types.CategoryEvent{} + sv = &types.MedicalScribeTranscriptSegment{} } else { sv = *v } for key, value := range shape { switch key { - case "MatchedCategories": - if err := awsRestjson1_deserializeDocumentStringList(&sv.MatchedCategories, value); err != nil { - return err - } - - case "MatchedDetails": - if err := awsRestjson1_deserializeDocumentMatchedCategoryDetails(&sv.MatchedDetails, value); err != nil { - return err - } + case "BeginAudioTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.BeginAudioTime = f64 - default: - _, _ = key, value + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() - } - } - *v = sv - return nil -} + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) -func awsRestjson1_deserializeDocumentCharacterOffsets(v **types.CharacterOffsets, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) - var sv *types.CharacterOffsets - if *v == nil { - sv = &types.CharacterOffsets{} - } else { - sv = *v - } + } + sv.BeginAudioTime = f64 - for key, value := range shape { - switch key { - case "Begin": + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "ChannelId": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Integer 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.Begin = ptr.Int32(int32(i64)) + sv.ChannelId = ptr.String(jtv) } - case "End": + case "Content": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Integer 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.End = ptr.Int32(int32(i64)) + sv.Content = ptr.String(jtv) } - default: - _, _ = key, value + case "EndAudioTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndAudioTime = f64 - } - } - *v = sv - return nil -} + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() -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 - } + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) - var sv *types.ConflictException - if *v == nil { - sv = &types.ConflictException{} - } else { - sv = *v - } + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) - for key, value := range shape { - switch key { - case "message", "Message": + } + sv.EndAudioTime = f64 + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "IsPartial": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsPartial = jtv + } + + case "Items": + if err := awsRestjson1_deserializeDocumentMedicalScribeTranscriptItemList(&sv.Items, value); err != nil { + return err + } + + case "SegmentId": 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.SegmentId = ptr.String(jtv) } default: @@ -1501,7 +1797,7 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } -func awsRestjson1_deserializeDocumentInternalFailureException(v **types.InternalFailureException, value interface{}) error { +func awsRestjson1_deserializeDocumentServiceUnavailableException(v **types.ServiceUnavailableException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1514,9 +1810,9 @@ func awsRestjson1_deserializeDocumentInternalFailureException(v **types.Internal return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InternalFailureException + var sv *types.ServiceUnavailableException if *v == nil { - sv = &types.InternalFailureException{} + sv = &types.ServiceUnavailableException{} } else { sv = *v } @@ -1541,188 +1837,174 @@ func awsRestjson1_deserializeDocumentInternalFailureException(v **types.Internal return nil } -func awsRestjson1_deserializeDocumentIssueDetected(v **types.IssueDetected, value interface{}) error { +func awsRestjson1_deserializeEventStreamCallAnalyticsTranscriptResultStream(v *types.CallAnalyticsTranscriptResultStream, msg *eventstream.Message) error { if v == nil { - return fmt.Errorf("unexpected nil of 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("unexpected serialization of nil %T", v) } - var sv *types.IssueDetected - if *v == nil { - sv = &types.IssueDetected{} - } else { - sv = *v + eventType := msg.Headers.Get(eventstreamapi.EventTypeHeader) + if eventType == nil { + return fmt.Errorf("%s event header not present", eventstreamapi.EventTypeHeader) } - for key, value := range shape { - switch key { - case "CharacterOffsets": - if err := awsRestjson1_deserializeDocumentCharacterOffsets(&sv.CharacterOffsets, value); err != nil { - return err - } - - default: - _, _ = key, value + switch { + case strings.EqualFold("CategoryEvent", eventType.String()): + vv := &types.CallAnalyticsTranscriptResultStreamMemberCategoryEvent{} + if err := awsRestjson1_deserializeEventMessageCategoryEvent(&vv.Value, msg); err != nil { + return err + } + *v = vv + return nil + case strings.EqualFold("UtteranceEvent", eventType.String()): + vv := &types.CallAnalyticsTranscriptResultStreamMemberUtteranceEvent{} + if err := awsRestjson1_deserializeEventMessageUtteranceEvent(&vv.Value, msg); err != nil { + return err } - } - *v = sv - return nil -} + *v = vv + return nil -func awsRestjson1_deserializeDocumentIssuesDetected(v *[]types.IssueDetected, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { + default: + buffer := bytes.NewBuffer(nil) + eventstream.NewEncoder().Encode(buffer, *msg) + *v = &types.UnknownUnionMember{ + Tag: eventType.String(), + Value: buffer.Bytes(), + } return nil - } - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) } +} - var cv []types.IssueDetected - if *v == nil { - cv = []types.IssueDetected{} - } else { - cv = *v +func awsRestjson1_deserializeEventStreamExceptionCallAnalyticsTranscriptResultStream(msg *eventstream.Message) error { + exceptionType := msg.Headers.Get(eventstreamapi.ExceptionTypeHeader) + if exceptionType == nil { + return fmt.Errorf("%s event header not present", eventstreamapi.ExceptionTypeHeader) } - for _, value := range shape { - var col types.IssueDetected - destAddr := &col - if err := awsRestjson1_deserializeDocumentIssueDetected(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + switch { + case strings.EqualFold("BadRequestException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionBadRequestException(msg) - } - *v = cv - return nil -} + case strings.EqualFold("ConflictException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionConflictException(msg) -func awsRestjson1_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + case strings.EqualFold("InternalFailureException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionInternalFailureException(msg) - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case strings.EqualFold("LimitExceededException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionLimitExceededException(msg) - var sv *types.LimitExceededException - if *v == nil { - sv = &types.LimitExceededException{} - } else { - sv = *v - } + case strings.EqualFold("ServiceUnavailableException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionServiceUnavailableException(msg) - for key, value := range shape { - switch key { - case "message", "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 + default: + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(br, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + return err + } + errorCode := "UnknownError" + errorMessage := errorCode + if ev := exceptionType.String(); len(ev) > 0 { + errorCode = ev + } else if ev := code; len(ev) > 0 { + errorCode = ev + } + if ev := message; len(ev) > 0 { + errorMessage = ev + } + return &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } + } - *v = sv - return nil } -func awsRestjson1_deserializeDocumentMatchedCategoryDetails(v *map[string]types.PointsOfInterest, value interface{}) error { +func awsRestjson1_deserializeEventMessageUtteranceEvent(v *types.UtteranceEvent, msg *eventstream.Message) error { if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil + return fmt.Errorf("unexpected serialization of nil %T", v) } - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) - var mv map[string]types.PointsOfInterest - if *v == nil { - mv = map[string]types.PointsOfInterest{} - } else { - mv = *v + body := io.TeeReader(br, 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 } - for key, value := range shape { - var parsedVal types.PointsOfInterest - mapVar := parsedVal - destAddr := &mapVar - if err := awsRestjson1_deserializeDocumentPointsOfInterest(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentUtteranceEvent(&v, shape); err != nil { + 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 } - parsedVal = *destAddr - mv[key] = parsedVal } - *v = mv return nil } -func awsRestjson1_deserializeDocumentPointsOfInterest(v **types.PointsOfInterest, value interface{}) error { +func awsRestjson1_deserializeEventMessageCategoryEvent(v *types.CategoryEvent, msg *eventstream.Message) error { if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil + return fmt.Errorf("unexpected serialization of nil %T", v) } - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) - var sv *types.PointsOfInterest - if *v == nil { - sv = &types.PointsOfInterest{} - } else { - sv = *v + body := io.TeeReader(br, 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 } - for key, value := range shape { - switch key { - case "TimestampRanges": - if err := awsRestjson1_deserializeDocumentTimestampRanges(&sv.TimestampRanges, value); err != nil { - return err + if err := awsRestjson1_deserializeDocumentCategoryEvent(&v, shape); err != nil { + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } - - default: - _, _ = key, value - + return err } + } - *v = sv return nil } -func awsRestjson1_deserializeDocumentServiceUnavailableException(v **types.ServiceUnavailableException, value interface{}) error { +func awsRestjson1_deserializeDocumentCallAnalyticsEntity(v **types.CallAnalyticsEntity, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1735,22 +2017,100 @@ func awsRestjson1_deserializeDocumentServiceUnavailableException(v **types.Servi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ServiceUnavailableException + var sv *types.CallAnalyticsEntity if *v == nil { - sv = &types.ServiceUnavailableException{} + sv = &types.CallAnalyticsEntity{} } else { sv = *v } for key, value := range shape { switch key { - case "message", "Message": + case "BeginOffsetMillis": + 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.BeginOffsetMillis = ptr.Int64(i64) + } + + case "Category": 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.Category = ptr.String(jtv) + } + + 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 Confidence to be a JSON Number, got %T instead", value) + + } + } + + case "Content": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Content = ptr.String(jtv) + } + + case "EndOffsetMillis": + 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.EndOffsetMillis = ptr.Int64(i64) + } + + 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) } default: @@ -1762,7 +2122,7 @@ func awsRestjson1_deserializeDocumentServiceUnavailableException(v **types.Servi return nil } -func awsRestjson1_deserializeDocumentStringList(v *[]string, value interface{}) error { +func awsRestjson1_deserializeDocumentCallAnalyticsEntityList(v *[]types.CallAnalyticsEntity, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1775,22 +2135,20 @@ func awsRestjson1_deserializeDocumentStringList(v *[]string, value interface{}) return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var cv []types.CallAnalyticsEntity if *v == nil { - cv = []string{} + cv = []types.CallAnalyticsEntity{} } 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.CallAnalyticsEntity + destAddr := &col + if err := awsRestjson1_deserializeDocumentCallAnalyticsEntity(&destAddr, value); err != nil { + return err } + col = *destAddr cv = append(cv, col) } @@ -1798,7 +2156,7 @@ func awsRestjson1_deserializeDocumentStringList(v *[]string, value interface{}) return nil } -func awsRestjson1_deserializeDocumentTimestampRange(v **types.TimestampRange, value interface{}) error { +func awsRestjson1_deserializeDocumentCallAnalyticsItem(v **types.CallAnalyticsItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1811,9 +2169,9 @@ func awsRestjson1_deserializeDocumentTimestampRange(v **types.TimestampRange, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.TimestampRange + var sv *types.CallAnalyticsItem if *v == nil { - sv = &types.TimestampRange{} + sv = &types.CallAnalyticsItem{} } else { sv = *v } @@ -1833,19 +2191,89 @@ func awsRestjson1_deserializeDocumentTimestampRange(v **types.TimestampRange, va sv.BeginOffsetMillis = ptr.Int64(i64) } - case "EndOffsetMillis": + case "Confidence": 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 - } + 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 Confidence to be a JSON Number, got %T instead", value) + + } + } + + case "Content": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Content = ptr.String(jtv) + } + + case "EndOffsetMillis": + 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.EndOffsetMillis = ptr.Int64(i64) } + case "Stable": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Stable to be of type *bool, got %T instead", value) + } + sv.Stable = ptr.Bool(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ItemType to be of type string, got %T instead", value) + } + sv.Type = types.ItemType(jtv) + } + + case "VocabularyFilterMatch": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.VocabularyFilterMatch = jtv + } + default: _, _ = key, value @@ -1855,7 +2283,7 @@ func awsRestjson1_deserializeDocumentTimestampRange(v **types.TimestampRange, va return nil } -func awsRestjson1_deserializeDocumentTimestampRanges(v *[]types.TimestampRange, value interface{}) error { +func awsRestjson1_deserializeDocumentCallAnalyticsItemList(v *[]types.CallAnalyticsItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1868,17 +2296,17 @@ func awsRestjson1_deserializeDocumentTimestampRanges(v *[]types.TimestampRange, return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.TimestampRange + var cv []types.CallAnalyticsItem if *v == nil { - cv = []types.TimestampRange{} + cv = []types.CallAnalyticsItem{} } else { cv = *v } for _, value := range shape { - var col types.TimestampRange + var col types.CallAnalyticsItem destAddr := &col - if err := awsRestjson1_deserializeDocumentTimestampRange(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentCallAnalyticsItem(&destAddr, value); err != nil { return err } col = *destAddr @@ -1889,7 +2317,7 @@ func awsRestjson1_deserializeDocumentTimestampRanges(v *[]types.TimestampRange, return nil } -func awsRestjson1_deserializeDocumentUtteranceEvent(v **types.UtteranceEvent, value interface{}) error { +func awsRestjson1_deserializeDocumentCategoryEvent(v **types.CategoryEvent, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1902,99 +2330,116 @@ func awsRestjson1_deserializeDocumentUtteranceEvent(v **types.UtteranceEvent, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UtteranceEvent + var sv *types.CategoryEvent if *v == nil { - sv = &types.UtteranceEvent{} + sv = &types.CategoryEvent{} } else { sv = *v } for key, value := range shape { switch key { - case "BeginOffsetMillis": + case "MatchedCategories": + if err := awsRestjson1_deserializeDocumentStringList(&sv.MatchedCategories, value); err != nil { + return err + } + + case "MatchedDetails": + if err := awsRestjson1_deserializeDocumentMatchedCategoryDetails(&sv.MatchedDetails, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCharacterOffsets(v **types.CharacterOffsets, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CharacterOffsets + if *v == nil { + sv = &types.CharacterOffsets{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Begin": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected Long 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.BeginOffsetMillis = ptr.Int64(i64) + sv.Begin = ptr.Int32(int32(i64)) } - case "EndOffsetMillis": + case "End": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected Long 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.EndOffsetMillis = ptr.Int64(i64) - } - - case "Entities": - if err := awsRestjson1_deserializeDocumentCallAnalyticsEntityList(&sv.Entities, value); err != nil { - return err - } - - case "IsPartial": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.IsPartial = jtv + sv.End = ptr.Int32(int32(i64)) } - case "IssuesDetected": - if err := awsRestjson1_deserializeDocumentIssuesDetected(&sv.IssuesDetected, value); err != nil { - return err - } + default: + _, _ = key, value - case "Items": - if err := awsRestjson1_deserializeDocumentCallAnalyticsItemList(&sv.Items, value); err != nil { - return err - } + } + } + *v = sv + return nil +} - case "ParticipantRole": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ParticipantRole to be of type string, got %T instead", value) - } - sv.ParticipantRole = types.ParticipantRole(jtv) - } +func awsRestjson1_deserializeDocumentIssueDetected(v **types.IssueDetected, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "Sentiment": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Sentiment to be of type string, got %T instead", value) - } - sv.Sentiment = types.Sentiment(jtv) - } + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - case "Transcript": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Transcript = ptr.String(jtv) - } + var sv *types.IssueDetected + if *v == nil { + sv = &types.IssueDetected{} + } else { + sv = *v + } - case "UtteranceId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.UtteranceId = ptr.String(jtv) + for key, value := range shape { + switch key { + case "CharacterOffsets": + if err := awsRestjson1_deserializeDocumentCharacterOffsets(&sv.CharacterOffsets, value); err != nil { + return err } default: @@ -2006,128 +2451,148 @@ func awsRestjson1_deserializeDocumentUtteranceEvent(v **types.UtteranceEvent, va return nil } -func awsRestjson1_deserializeEventStreamMedicalTranscriptResultStream(v *types.MedicalTranscriptResultStream, msg *eventstream.Message) error { +func awsRestjson1_deserializeDocumentIssuesDetected(v *[]types.IssueDetected, value interface{}) error { if v == nil { - return fmt.Errorf("unexpected serialization of nil %T", v) + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - eventType := msg.Headers.Get(eventstreamapi.EventTypeHeader) - if eventType == nil { - return fmt.Errorf("%s event header not present", eventstreamapi.EventTypeHeader) + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) } - switch { - case strings.EqualFold("TranscriptEvent", eventType.String()): - vv := &types.MedicalTranscriptResultStreamMemberTranscriptEvent{} - if err := awsRestjson1_deserializeEventMessageMedicalTranscriptEvent(&vv.Value, msg); err != nil { - return err - } - *v = vv - return nil + var cv []types.IssueDetected + if *v == nil { + cv = []types.IssueDetected{} + } else { + cv = *v + } - default: - buffer := bytes.NewBuffer(nil) - eventstream.NewEncoder().Encode(buffer, *msg) - *v = &types.UnknownUnionMember{ - Tag: eventType.String(), - Value: buffer.Bytes(), + for _, value := range shape { + var col types.IssueDetected + destAddr := &col + if err := awsRestjson1_deserializeDocumentIssueDetected(&destAddr, value); err != nil { + return err } - return nil + col = *destAddr + cv = append(cv, col) } + *v = cv + return nil } -func awsRestjson1_deserializeEventStreamExceptionMedicalTranscriptResultStream(msg *eventstream.Message) error { - exceptionType := msg.Headers.Get(eventstreamapi.ExceptionTypeHeader) - if exceptionType == nil { - return fmt.Errorf("%s event header not present", eventstreamapi.ExceptionTypeHeader) +func awsRestjson1_deserializeDocumentMatchedCategoryDetails(v *map[string]types.PointsOfInterest, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - switch { - case strings.EqualFold("BadRequestException", exceptionType.String()): - return awsRestjson1_deserializeEventMessageExceptionBadRequestException(msg) + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - case strings.EqualFold("ConflictException", exceptionType.String()): - return awsRestjson1_deserializeEventMessageExceptionConflictException(msg) + var mv map[string]types.PointsOfInterest + if *v == nil { + mv = map[string]types.PointsOfInterest{} + } else { + mv = *v + } - case strings.EqualFold("InternalFailureException", exceptionType.String()): - return awsRestjson1_deserializeEventMessageExceptionInternalFailureException(msg) + for key, value := range shape { + var parsedVal types.PointsOfInterest + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentPointsOfInterest(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal - case strings.EqualFold("LimitExceededException", exceptionType.String()): - return awsRestjson1_deserializeEventMessageExceptionLimitExceededException(msg) + } + *v = mv + return nil +} - case strings.EqualFold("ServiceUnavailableException", exceptionType.String()): - return awsRestjson1_deserializeEventMessageExceptionServiceUnavailableException(msg) +func awsRestjson1_deserializeDocumentPointsOfInterest(v **types.PointsOfInterest, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - default: - br := bytes.NewReader(msg.Payload) - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - body := io.TeeReader(br, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - code, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - return err - } - errorCode := "UnknownError" - errorMessage := errorCode - if ev := exceptionType.String(); len(ev) > 0 { - errorCode = ev - } else if ev := code; len(ev) > 0 { - errorCode = ev - } - if ev := message; len(ev) > 0 { - errorMessage = ev - } - return &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } + var sv *types.PointsOfInterest + if *v == nil { + sv = &types.PointsOfInterest{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "TimestampRanges": + if err := awsRestjson1_deserializeDocumentTimestampRanges(&sv.TimestampRanges, value); err != nil { + return err + } + + default: + _, _ = key, value + } } + *v = sv + return nil } -func awsRestjson1_deserializeEventMessageMedicalTranscriptEvent(v *types.MedicalTranscriptEvent, msg *eventstream.Message) error { +func awsRestjson1_deserializeDocumentStringList(v *[]string, value interface{}) error { if v == nil { - return fmt.Errorf("unexpected serialization of nil %T", v) + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - br := bytes.NewReader(msg.Payload) - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - body := io.TeeReader(br, 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 + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v } - if err := awsRestjson1_deserializeDocumentMedicalTranscriptEvent(&v, shape); err != nil { - 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(), + 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) } - return err + col = jtv } + cv = append(cv, col) } + *v = cv return nil } -func awsRestjson1_deserializeDocumentMedicalAlternative(v **types.MedicalAlternative, value interface{}) error { +func awsRestjson1_deserializeDocumentTimestampRange(v **types.TimestampRange, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2140,32 +2605,39 @@ func awsRestjson1_deserializeDocumentMedicalAlternative(v **types.MedicalAlterna return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.MedicalAlternative + var sv *types.TimestampRange if *v == nil { - sv = &types.MedicalAlternative{} + sv = &types.TimestampRange{} } else { sv = *v } for key, value := range shape { switch key { - case "Entities": - if err := awsRestjson1_deserializeDocumentMedicalEntityList(&sv.Entities, value); err != nil { - return err - } - - case "Items": - if err := awsRestjson1_deserializeDocumentMedicalItemList(&sv.Items, value); err != nil { - return err + case "BeginOffsetMillis": + 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.BeginOffsetMillis = ptr.Int64(i64) } - case "Transcript": + case "EndOffsetMillis": 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 Long to be json.Number, got %T instead", value) } - sv.Transcript = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.EndOffsetMillis = ptr.Int64(i64) } default: @@ -2177,7 +2649,7 @@ func awsRestjson1_deserializeDocumentMedicalAlternative(v **types.MedicalAlterna return nil } -func awsRestjson1_deserializeDocumentMedicalAlternativeList(v *[]types.MedicalAlternative, value interface{}) error { +func awsRestjson1_deserializeDocumentTimestampRanges(v *[]types.TimestampRange, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2190,17 +2662,17 @@ func awsRestjson1_deserializeDocumentMedicalAlternativeList(v *[]types.MedicalAl return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.MedicalAlternative + var cv []types.TimestampRange if *v == nil { - cv = []types.MedicalAlternative{} + cv = []types.TimestampRange{} } else { cv = *v } for _, value := range shape { - var col types.MedicalAlternative + var col types.TimestampRange destAddr := &col - if err := awsRestjson1_deserializeDocumentMedicalAlternative(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentTimestampRange(&destAddr, value); err != nil { return err } col = *destAddr @@ -2211,7 +2683,7 @@ func awsRestjson1_deserializeDocumentMedicalAlternativeList(v *[]types.MedicalAl return nil } -func awsRestjson1_deserializeDocumentMedicalEntity(v **types.MedicalEntity, value interface{}) error { +func awsRestjson1_deserializeDocumentUtteranceEvent(v **types.UtteranceEvent, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2224,179 +2696,232 @@ func awsRestjson1_deserializeDocumentMedicalEntity(v **types.MedicalEntity, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.MedicalEntity + var sv *types.UtteranceEvent if *v == nil { - sv = &types.MedicalEntity{} + sv = &types.UtteranceEvent{} } else { sv = *v } for key, value := range shape { switch key { - case "Category": + case "BeginOffsetMillis": 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 Long to be json.Number, got %T instead", value) } - sv.Category = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BeginOffsetMillis = ptr.Int64(i64) } - case "Confidence": + case "EndOffsetMillis": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.Confidence = ptr.Float64(f64) + 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.EndOffsetMillis = ptr.Int64(i64) + } - case string: - var f64 float64 - switch { - case strings.EqualFold(jtv, "NaN"): - f64 = math.NaN() + case "Entities": + if err := awsRestjson1_deserializeDocumentCallAnalyticsEntityList(&sv.Entities, value); err != nil { + return err + } - case strings.EqualFold(jtv, "Infinity"): - f64 = math.Inf(1) - - case strings.EqualFold(jtv, "-Infinity"): - f64 = math.Inf(-1) + case "IsPartial": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsPartial = jtv + } - default: - return fmt.Errorf("unknown JSON number value: %s", jtv) + case "IssuesDetected": + if err := awsRestjson1_deserializeDocumentIssuesDetected(&sv.IssuesDetected, value); err != nil { + return err + } - } - sv.Confidence = ptr.Float64(f64) + case "Items": + if err := awsRestjson1_deserializeDocumentCallAnalyticsItemList(&sv.Items, value); err != nil { + return err + } - default: - return fmt.Errorf("expected Confidence to be a JSON Number, got %T instead", value) + case "ParticipantRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParticipantRole to be of type string, got %T instead", value) + } + sv.ParticipantRole = types.ParticipantRole(jtv) + } + case "Sentiment": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Sentiment to be of type string, got %T instead", value) } + sv.Sentiment = types.Sentiment(jtv) } - case "Content": + case "Transcript": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Content = ptr.String(jtv) + sv.Transcript = ptr.String(jtv) } - case "EndTime": + case "UtteranceId": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.EndTime = f64 - - case string: - var f64 float64 - switch { - case strings.EqualFold(jtv, "NaN"): - f64 = math.NaN() - - case strings.EqualFold(jtv, "Infinity"): - f64 = math.Inf(1) + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.UtteranceId = ptr.String(jtv) + } - case strings.EqualFold(jtv, "-Infinity"): - f64 = math.Inf(-1) + default: + _, _ = key, value - default: - return fmt.Errorf("unknown JSON number value: %s", jtv) + } + } + *v = sv + return nil +} - } - sv.EndTime = f64 +func awsRestjson1_deserializeEventStreamMedicalTranscriptResultStream(v *types.MedicalTranscriptResultStream, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } - default: - return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + eventType := msg.Headers.Get(eventstreamapi.EventTypeHeader) + if eventType == nil { + return fmt.Errorf("%s event header not present", eventstreamapi.EventTypeHeader) + } - } - } + switch { + case strings.EqualFold("TranscriptEvent", eventType.String()): + vv := &types.MedicalTranscriptResultStreamMemberTranscriptEvent{} + if err := awsRestjson1_deserializeEventMessageMedicalTranscriptEvent(&vv.Value, msg); err != nil { + return err + } + *v = vv + return nil - case "StartTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.StartTime = f64 + default: + buffer := bytes.NewBuffer(nil) + eventstream.NewEncoder().Encode(buffer, *msg) + *v = &types.UnknownUnionMember{ + Tag: eventType.String(), + Value: buffer.Bytes(), + } + return nil - case string: - var f64 float64 - switch { - case strings.EqualFold(jtv, "NaN"): - f64 = math.NaN() + } +} - case strings.EqualFold(jtv, "Infinity"): - f64 = math.Inf(1) +func awsRestjson1_deserializeEventStreamExceptionMedicalTranscriptResultStream(msg *eventstream.Message) error { + exceptionType := msg.Headers.Get(eventstreamapi.ExceptionTypeHeader) + if exceptionType == nil { + return fmt.Errorf("%s event header not present", eventstreamapi.ExceptionTypeHeader) + } - case strings.EqualFold(jtv, "-Infinity"): - f64 = math.Inf(-1) + switch { + case strings.EqualFold("BadRequestException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionBadRequestException(msg) - default: - return fmt.Errorf("unknown JSON number value: %s", jtv) + case strings.EqualFold("ConflictException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionConflictException(msg) - } - sv.StartTime = f64 + case strings.EqualFold("InternalFailureException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionInternalFailureException(msg) - default: - return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + case strings.EqualFold("LimitExceededException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionLimitExceededException(msg) - } - } + case strings.EqualFold("ServiceUnavailableException", exceptionType.String()): + return awsRestjson1_deserializeEventMessageExceptionServiceUnavailableException(msg) - default: - _, _ = key, value + default: + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(br, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + return err + } + errorCode := "UnknownError" + errorMessage := errorCode + if ev := exceptionType.String(); len(ev) > 0 { + errorCode = ev + } else if ev := code; len(ev) > 0 { + errorCode = ev + } + if ev := message; len(ev) > 0 { + errorMessage = ev } + return &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + } - *v = sv - return nil } -func awsRestjson1_deserializeDocumentMedicalEntityList(v *[]types.MedicalEntity, value interface{}) error { +func awsRestjson1_deserializeEventMessageMedicalTranscriptEvent(v *types.MedicalTranscriptEvent, msg *eventstream.Message) error { if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil + return fmt.Errorf("unexpected serialization of nil %T", v) } - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) - var cv []types.MedicalEntity - if *v == nil { - cv = []types.MedicalEntity{} - } else { - cv = *v + body := io.TeeReader(br, 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 } - for _, value := range shape { - var col types.MedicalEntity - destAddr := &col - if err := awsRestjson1_deserializeDocumentMedicalEntity(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentMedicalTranscriptEvent(&v, shape); err != nil { + 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 } - col = *destAddr - cv = append(cv, col) } - *v = cv return nil } -func awsRestjson1_deserializeDocumentMedicalItem(v **types.MedicalItem, value interface{}) error { +func awsRestjson1_deserializeDocumentMedicalAlternative(v **types.MedicalAlternative, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2409,33 +2934,126 @@ func awsRestjson1_deserializeDocumentMedicalItem(v **types.MedicalItem, value in return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.MedicalItem + var sv *types.MedicalAlternative if *v == nil { - sv = &types.MedicalItem{} + sv = &types.MedicalAlternative{} } 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 "Entities": + if err := awsRestjson1_deserializeDocumentMedicalEntityList(&sv.Entities, value); err != nil { + return err + } - case strings.EqualFold(jtv, "Infinity"): - f64 = math.Inf(1) + case "Items": + if err := awsRestjson1_deserializeDocumentMedicalItemList(&sv.Items, value); err != nil { + return err + } + + case "Transcript": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Transcript = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMedicalAlternativeList(v *[]types.MedicalAlternative, 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.MedicalAlternative + if *v == nil { + cv = []types.MedicalAlternative{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MedicalAlternative + destAddr := &col + if err := awsRestjson1_deserializeDocumentMedicalAlternative(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentMedicalEntity(v **types.MedicalEntity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.MedicalEntity + if *v == nil { + sv = &types.MedicalEntity{} + } 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 String to be of type string, got %T instead", value) + } + sv.Category = ptr.String(jtv) + } + + 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) @@ -2495,15 +3113,6 @@ func awsRestjson1_deserializeDocumentMedicalItem(v **types.MedicalItem, value in } } - case "Speaker": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Speaker = ptr.String(jtv) - } - case "StartTime": if value != nil { switch jtv := value.(type) { @@ -2538,15 +3147,6 @@ func awsRestjson1_deserializeDocumentMedicalItem(v **types.MedicalItem, value in } } - case "Type": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ItemType to be of type string, got %T instead", value) - } - sv.Type = types.ItemType(jtv) - } - default: _, _ = key, value @@ -2556,7 +3156,7 @@ func awsRestjson1_deserializeDocumentMedicalItem(v **types.MedicalItem, value in return nil } -func awsRestjson1_deserializeDocumentMedicalItemList(v *[]types.MedicalItem, value interface{}) error { +func awsRestjson1_deserializeDocumentMedicalEntityList(v *[]types.MedicalEntity, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2569,17 +3169,17 @@ func awsRestjson1_deserializeDocumentMedicalItemList(v *[]types.MedicalItem, val return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.MedicalItem + var cv []types.MedicalEntity if *v == nil { - cv = []types.MedicalItem{} + cv = []types.MedicalEntity{} } else { cv = *v } for _, value := range shape { - var col types.MedicalItem + var col types.MedicalEntity destAddr := &col - if err := awsRestjson1_deserializeDocumentMedicalItem(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentMedicalEntity(&destAddr, value); err != nil { return err } col = *destAddr @@ -2590,7 +3190,7 @@ func awsRestjson1_deserializeDocumentMedicalItemList(v *[]types.MedicalItem, val return nil } -func awsRestjson1_deserializeDocumentMedicalResult(v **types.MedicalResult, value interface{}) error { +func awsRestjson1_deserializeDocumentMedicalItem(v **types.MedicalItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2603,27 +3203,56 @@ func awsRestjson1_deserializeDocumentMedicalResult(v **types.MedicalResult, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.MedicalResult + var sv *types.MedicalItem if *v == nil { - sv = &types.MedicalResult{} + sv = &types.MedicalItem{} } else { sv = *v } for key, value := range shape { switch key { - case "Alternatives": - if err := awsRestjson1_deserializeDocumentMedicalAlternativeList(&sv.Alternatives, value); err != nil { - return err + 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 Confidence to be a JSON Number, got %T instead", value) + + } } - case "ChannelId": + case "Content": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ChannelId = ptr.String(jtv) + sv.Content = ptr.String(jtv) } case "EndTime": @@ -2660,22 +3289,13 @@ func awsRestjson1_deserializeDocumentMedicalResult(v **types.MedicalResult, valu } } - case "IsPartial": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.IsPartial = jtv - } - - case "ResultId": + case "Speaker": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ResultId = ptr.String(jtv) + sv.Speaker = ptr.String(jtv) } case "StartTime": @@ -2712,6 +3332,15 @@ func awsRestjson1_deserializeDocumentMedicalResult(v **types.MedicalResult, valu } } + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ItemType to be of type string, got %T instead", value) + } + sv.Type = types.ItemType(jtv) + } + default: _, _ = key, value @@ -2721,7 +3350,7 @@ func awsRestjson1_deserializeDocumentMedicalResult(v **types.MedicalResult, valu return nil } -func awsRestjson1_deserializeDocumentMedicalResultList(v *[]types.MedicalResult, value interface{}) error { +func awsRestjson1_deserializeDocumentMedicalItemList(v *[]types.MedicalItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2734,17 +3363,17 @@ func awsRestjson1_deserializeDocumentMedicalResultList(v *[]types.MedicalResult, return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.MedicalResult + var cv []types.MedicalItem if *v == nil { - cv = []types.MedicalResult{} + cv = []types.MedicalItem{} } else { cv = *v } for _, value := range shape { - var col types.MedicalResult + var col types.MedicalItem destAddr := &col - if err := awsRestjson1_deserializeDocumentMedicalResult(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentMedicalItem(&destAddr, value); err != nil { return err } col = *destAddr @@ -2755,7 +3384,7 @@ func awsRestjson1_deserializeDocumentMedicalResultList(v *[]types.MedicalResult, return nil } -func awsRestjson1_deserializeDocumentMedicalTranscript(v **types.MedicalTranscript, value interface{}) error { +func awsRestjson1_deserializeDocumentMedicalResult(v **types.MedicalResult, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2768,40 +3397,205 @@ func awsRestjson1_deserializeDocumentMedicalTranscript(v **types.MedicalTranscri return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.MedicalTranscript + var sv *types.MedicalResult if *v == nil { - sv = &types.MedicalTranscript{} + sv = &types.MedicalResult{} } else { sv = *v } for key, value := range shape { switch key { - case "Results": - if err := awsRestjson1_deserializeDocumentMedicalResultList(&sv.Results, value); err != nil { + case "Alternatives": + if err := awsRestjson1_deserializeDocumentMedicalAlternativeList(&sv.Alternatives, value); err != nil { return err } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} + case "ChannelId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ChannelId = ptr.String(jtv) + } -func awsRestjson1_deserializeDocumentMedicalTranscriptEvent(v **types.MedicalTranscriptEvent, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + case "EndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = f64 - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) + 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.EndTime = f64 + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "IsPartial": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsPartial = jtv + } + + case "ResultId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResultId = ptr.String(jtv) + } + + case "StartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = 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.StartTime = 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_deserializeDocumentMedicalResultList(v *[]types.MedicalResult, 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.MedicalResult + if *v == nil { + cv = []types.MedicalResult{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MedicalResult + destAddr := &col + if err := awsRestjson1_deserializeDocumentMedicalResult(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentMedicalTranscript(v **types.MedicalTranscript, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.MedicalTranscript + if *v == nil { + sv = &types.MedicalTranscript{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Results": + if err := awsRestjson1_deserializeDocumentMedicalResultList(&sv.Results, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMedicalTranscriptEvent(v **types.MedicalTranscriptEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.MedicalTranscriptEvent @@ -3941,6 +4735,42 @@ func awsRestjson1_deserializeErrorLimitExceededException(response *smithyhttp.Re return output } +func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + func awsRestjson1_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ServiceUnavailableException{} var buff [1024]byte @@ -3976,3 +4806,558 @@ func awsRestjson1_deserializeErrorServiceUnavailableException(response *smithyht return output } + +func awsRestjson1_deserializeDocumentClinicalNoteGenerationResult(v **types.ClinicalNoteGenerationResult, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ClinicalNoteGenerationResult + if *v == nil { + sv = &types.ClinicalNoteGenerationResult{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ClinicalNoteOutputLocation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uri to be of type string, got %T instead", value) + } + sv.ClinicalNoteOutputLocation = ptr.String(jtv) + } + + case "FailureReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FailureReason = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ClinicalNoteGenerationStatus to be of type string, got %T instead", value) + } + sv.Status = types.ClinicalNoteGenerationStatus(jtv) + } + + case "TranscriptOutputLocation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uri to be of type string, got %T instead", value) + } + sv.TranscriptOutputLocation = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentClinicalNoteGenerationSettings(v **types.ClinicalNoteGenerationSettings, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ClinicalNoteGenerationSettings + if *v == nil { + sv = &types.ClinicalNoteGenerationSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OutputBucketName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BucketName to be of type string, got %T instead", value) + } + sv.OutputBucketName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentKMSEncryptionContextMap(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentMedicalScribeChannelDefinition(v **types.MedicalScribeChannelDefinition, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.MedicalScribeChannelDefinition + if *v == nil { + sv = &types.MedicalScribeChannelDefinition{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelId": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MedicalScribeChannelId to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ChannelId = int32(i64) + } + + case "ParticipantRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MedicalScribeParticipantRole to be of type string, got %T instead", value) + } + sv.ParticipantRole = types.MedicalScribeParticipantRole(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMedicalScribeChannelDefinitions(v *[]types.MedicalScribeChannelDefinition, 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.MedicalScribeChannelDefinition + if *v == nil { + cv = []types.MedicalScribeChannelDefinition{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MedicalScribeChannelDefinition + destAddr := &col + if err := awsRestjson1_deserializeDocumentMedicalScribeChannelDefinition(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentMedicalScribeEncryptionSettings(v **types.MedicalScribeEncryptionSettings, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.MedicalScribeEncryptionSettings + if *v == nil { + sv = &types.MedicalScribeEncryptionSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "KmsEncryptionContext": + if err := awsRestjson1_deserializeDocumentKMSEncryptionContextMap(&sv.KmsEncryptionContext, value); err != nil { + return err + } + + case "KmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KMSKeyId to be of type string, got %T instead", value) + } + sv.KmsKeyId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMedicalScribePostStreamAnalyticsResult(v **types.MedicalScribePostStreamAnalyticsResult, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.MedicalScribePostStreamAnalyticsResult + if *v == nil { + sv = &types.MedicalScribePostStreamAnalyticsResult{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ClinicalNoteGenerationResult": + if err := awsRestjson1_deserializeDocumentClinicalNoteGenerationResult(&sv.ClinicalNoteGenerationResult, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMedicalScribePostStreamAnalyticsSettings(v **types.MedicalScribePostStreamAnalyticsSettings, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.MedicalScribePostStreamAnalyticsSettings + if *v == nil { + sv = &types.MedicalScribePostStreamAnalyticsSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ClinicalNoteGenerationSettings": + if err := awsRestjson1_deserializeDocumentClinicalNoteGenerationSettings(&sv.ClinicalNoteGenerationSettings, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMedicalScribeStreamDetails(v **types.MedicalScribeStreamDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.MedicalScribeStreamDetails + if *v == nil { + sv = &types.MedicalScribeStreamDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelDefinitions": + if err := awsRestjson1_deserializeDocumentMedicalScribeChannelDefinitions(&sv.ChannelDefinitions, value); err != nil { + return err + } + + case "EncryptionSettings": + if err := awsRestjson1_deserializeDocumentMedicalScribeEncryptionSettings(&sv.EncryptionSettings, value); err != nil { + return err + } + + case "LanguageCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MedicalScribeLanguageCode to be of type string, got %T instead", value) + } + sv.LanguageCode = types.MedicalScribeLanguageCode(jtv) + } + + case "MediaEncoding": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MedicalScribeMediaEncoding to be of type string, got %T instead", value) + } + sv.MediaEncoding = types.MedicalScribeMediaEncoding(jtv) + } + + case "MediaSampleRateHertz": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MedicalScribeMediaSampleRateHertz to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MediaSampleRateHertz = ptr.Int32(int32(i64)) + } + + case "PostStreamAnalyticsResult": + if err := awsRestjson1_deserializeDocumentMedicalScribePostStreamAnalyticsResult(&sv.PostStreamAnalyticsResult, value); err != nil { + return err + } + + case "PostStreamAnalyticsSettings": + if err := awsRestjson1_deserializeDocumentMedicalScribePostStreamAnalyticsSettings(&sv.PostStreamAnalyticsSettings, value); err != nil { + return err + } + + case "ResourceAccessRoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IamRoleArn to be of type string, got %T instead", value) + } + sv.ResourceAccessRoleArn = ptr.String(jtv) + } + + case "SessionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionId to be of type string, got %T instead", value) + } + sv.SessionId = ptr.String(jtv) + } + + case "StreamCreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StreamCreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "StreamEndedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StreamEndedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "StreamStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MedicalScribeStreamStatus to be of type string, got %T instead", value) + } + sv.StreamStatus = types.MedicalScribeStreamStatus(jtv) + } + + case "VocabularyFilterMethod": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MedicalScribeVocabularyFilterMethod to be of type string, got %T instead", value) + } + sv.VocabularyFilterMethod = types.MedicalScribeVocabularyFilterMethod(jtv) + } + + case "VocabularyFilterName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VocabularyFilterName to be of type string, got %T instead", value) + } + sv.VocabularyFilterName = ptr.String(jtv) + } + + case "VocabularyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VocabularyName to be of type string, got %T instead", value) + } + sv.VocabularyName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ResourceNotFoundException + if *v == nil { + sv = &types.ResourceNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "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 +} diff --git a/service/transcribestreaming/doc.go b/service/transcribestreaming/doc.go index b6306a812e3..732df86734c 100644 --- a/service/transcribestreaming/doc.go +++ b/service/transcribestreaming/doc.go @@ -3,8 +3,8 @@ // Package transcribestreaming provides the API client, operations, and parameter // types for Amazon Transcribe Streaming Service. // -// Amazon Transcribe streaming offers three main types of real-time transcription: -// Standard, Medical, and Call Analytics. +// Amazon Transcribe streaming offers four main types of real-time transcription: +// Standard, Medical, Call Analytics, and Health Scribe. // // - Standard transcriptions are the most common option. Refer to for details. // @@ -16,4 +16,8 @@ // - Call Analytics transcriptions are designed for use with call center audio // on two different channels; if you're looking for insight into customer service // calls, use this option. Refer to for details. +// +// - HealthScribe transcriptions are designed to automatically create clinical +// notes from patient-clinician conversations using generative AI. Refer to [here] +// for details. package transcribestreaming diff --git a/service/transcribestreaming/eventstream.go b/service/transcribestreaming/eventstream.go index 9b54d8bfb99..c77ddf6779a 100644 --- a/service/transcribestreaming/eventstream.go +++ b/service/transcribestreaming/eventstream.go @@ -31,6 +31,16 @@ type AudioStreamWriter interface { Err() error } +// MedicalScribeInputStreamWriter provides the interface for writing events to a +// stream. +// +// The writer's Close method must allow multiple concurrent calls. +type MedicalScribeInputStreamWriter interface { + Send(context.Context, types.MedicalScribeInputStream) error + Close() error + Err() error +} + // CallAnalyticsTranscriptResultStreamReader provides the interface for reading // events from a stream. // @@ -41,6 +51,16 @@ type CallAnalyticsTranscriptResultStreamReader interface { Err() error } +// MedicalScribeResultStreamReader provides the interface for reading events from +// a stream. +// +// The writer's Close method must allow multiple concurrent calls. +type MedicalScribeResultStreamReader interface { + Events() <-chan types.MedicalScribeResultStream + Close() error + Err() error +} + // MedicalTranscriptResultStreamReader provides the interface for reading events // from a stream. // @@ -65,6 +85,213 @@ type eventStreamSigner interface { GetSignature(ctx context.Context, headers, payload []byte, signingTime time.Time, optFns ...func(*v4.StreamSignerOptions)) ([]byte, error) } +type asyncMedicalScribeInputStream struct { + Event types.MedicalScribeInputStream + Result chan<- error +} + +func (e asyncMedicalScribeInputStream) ReportResult(cancel <-chan struct{}, err error) bool { + select { + case e.Result <- err: + return true + + case <-cancel: + return false + + } +} + +type medicalScribeInputStreamWriter struct { + encoder *eventstream.Encoder + signer eventStreamSigner + stream chan asyncMedicalScribeInputStream + serializationBuffer *bytes.Buffer + signingBuffer *bytes.Buffer + eventStream io.WriteCloser + done chan struct{} + closeOnce sync.Once + err *smithysync.OnceErr +} + +func newMedicalScribeInputStreamWriter(stream io.WriteCloser, encoder *eventstream.Encoder, signer eventStreamSigner) *medicalScribeInputStreamWriter { + w := &medicalScribeInputStreamWriter{ + encoder: encoder, + signer: signer, + stream: make(chan asyncMedicalScribeInputStream), + eventStream: stream, + done: make(chan struct{}), + err: smithysync.NewOnceErr(), + serializationBuffer: bytes.NewBuffer(nil), + signingBuffer: bytes.NewBuffer(nil), + } + + go w.writeStream() + + return w + +} + +func (w *medicalScribeInputStreamWriter) Send(ctx context.Context, event types.MedicalScribeInputStream) error { + return w.send(ctx, event) +} + +func (w *medicalScribeInputStreamWriter) send(ctx context.Context, event types.MedicalScribeInputStream) error { + if err := w.err.Err(); err != nil { + return err + } + + resultCh := make(chan error) + + wrapped := asyncMedicalScribeInputStream{ + Event: event, + Result: resultCh, + } + + select { + case w.stream <- wrapped: + case <-ctx.Done(): + return ctx.Err() + case <-w.done: + return fmt.Errorf("stream closed, unable to send event") + + } + + select { + case err := <-resultCh: + return err + case <-ctx.Done(): + return ctx.Err() + case <-w.done: + return fmt.Errorf("stream closed, unable to send event") + + } + +} + +func (w *medicalScribeInputStreamWriter) writeStream() { + defer w.Close() + + for { + select { + case wrapper := <-w.stream: + err := w.writeEvent(wrapper.Event) + wrapper.ReportResult(w.done, err) + if err != nil { + w.err.SetError(err) + return + } + + case <-w.done: + if err := w.closeStream(); err != nil { + w.err.SetError(err) + } + return + + } + } +} + +func (w *medicalScribeInputStreamWriter) writeEvent(event types.MedicalScribeInputStream) error { + // serializedEvent returned bytes refers to an underlying byte buffer and must not + // escape this writeEvent scope without first copying. Any previous bytes stored in + // the buffer are cleared by this call. + serializedEvent, err := w.serializeEvent(event) + if err != nil { + return err + } + + // signedEvent returned bytes refers to an underlying byte buffer and must not + // escape this writeEvent scope without first copying. Any previous bytes stored in + // the buffer are cleared by this call. + signedEvent, err := w.signEvent(serializedEvent) + if err != nil { + return err + } + + // bytes are now copied to the underlying stream writer + _, err = io.Copy(w.eventStream, bytes.NewReader(signedEvent)) + return err +} + +func (w *medicalScribeInputStreamWriter) serializeEvent(event types.MedicalScribeInputStream) ([]byte, error) { + w.serializationBuffer.Reset() + + eventMessage := eventstream.Message{} + + if err := awsRestjson1_serializeEventStreamMedicalScribeInputStream(event, &eventMessage); err != nil { + return nil, err + } + + if err := w.encoder.Encode(w.serializationBuffer, eventMessage); err != nil { + return nil, err + } + + return w.serializationBuffer.Bytes(), nil +} + +func (w *medicalScribeInputStreamWriter) signEvent(payload []byte) ([]byte, error) { + w.signingBuffer.Reset() + + date := time.Now().UTC() + + var msg eventstream.Message + msg.Headers.Set(eventstreamapi.DateHeader, eventstream.TimestampValue(date)) + msg.Payload = payload + + var headers bytes.Buffer + if err := eventstream.EncodeHeaders(&headers, msg.Headers); err != nil { + return nil, err + } + + sig, err := w.signer.GetSignature(context.Background(), headers.Bytes(), msg.Payload, date) + if err != nil { + return nil, err + } + + msg.Headers.Set(eventstreamapi.ChunkSignatureHeader, eventstream.BytesValue(sig)) + + if err := w.encoder.Encode(w.signingBuffer, msg); err != nil { + return nil, err + } + + return w.signingBuffer.Bytes(), nil +} + +func (w *medicalScribeInputStreamWriter) closeStream() (err error) { + defer func() { + if cErr := w.eventStream.Close(); cErr != nil && err == nil { + err = cErr + } + }() + + // Per the protocol, a signed empty message is used to indicate the end of the stream, + // and that no subsequent events will be sent. + signedEvent, err := w.signEvent([]byte{}) + if err != nil { + return err + } + + _, err = io.Copy(w.eventStream, bytes.NewReader(signedEvent)) + return err +} + +func (w *medicalScribeInputStreamWriter) ErrorSet() <-chan struct{} { + return w.err.ErrorSet() +} + +func (w *medicalScribeInputStreamWriter) Close() error { + w.closeOnce.Do(w.safeClose) + return w.Err() +} + +func (w *medicalScribeInputStreamWriter) safeClose() { + close(w.done) +} + +func (w *medicalScribeInputStreamWriter) Err() error { + return w.err.Err() +} + type asyncAudioStream struct { Event types.AudioStream Result chan<- error @@ -272,6 +499,134 @@ func (w *audioStreamWriter) Err() error { return w.err.Err() } +type medicalScribeResultStreamReader struct { + stream chan types.MedicalScribeResultStream + decoder *eventstream.Decoder + eventStream io.ReadCloser + err *smithysync.OnceErr + payloadBuf []byte + done chan struct{} + closeOnce sync.Once +} + +func newMedicalScribeResultStreamReader(readCloser io.ReadCloser, decoder *eventstream.Decoder) *medicalScribeResultStreamReader { + w := &medicalScribeResultStreamReader{ + stream: make(chan types.MedicalScribeResultStream), + decoder: decoder, + eventStream: readCloser, + err: smithysync.NewOnceErr(), + done: make(chan struct{}), + payloadBuf: make([]byte, 10*1024), + } + + go w.readEventStream() + + return w +} + +func (r *medicalScribeResultStreamReader) Events() <-chan types.MedicalScribeResultStream { + return r.stream +} + +func (r *medicalScribeResultStreamReader) readEventStream() { + defer r.Close() + defer close(r.stream) + + for { + r.payloadBuf = r.payloadBuf[0:0] + decodedMessage, err := r.decoder.Decode(r.eventStream, r.payloadBuf) + if err != nil { + if err == io.EOF { + return + } + select { + case <-r.done: + return + default: + r.err.SetError(err) + return + } + } + + event, err := r.deserializeEventMessage(&decodedMessage) + if err != nil { + r.err.SetError(err) + return + } + + select { + case r.stream <- event: + case <-r.done: + return + } + + } +} + +func (r *medicalScribeResultStreamReader) deserializeEventMessage(msg *eventstream.Message) (types.MedicalScribeResultStream, error) { + messageType := msg.Headers.Get(eventstreamapi.MessageTypeHeader) + if messageType == nil { + return nil, fmt.Errorf("%s event header not present", eventstreamapi.MessageTypeHeader) + } + + switch messageType.String() { + case eventstreamapi.EventMessageType: + var v types.MedicalScribeResultStream + if err := awsRestjson1_deserializeEventStreamMedicalScribeResultStream(&v, msg); err != nil { + return nil, err + } + return v, nil + + case eventstreamapi.ExceptionMessageType: + return nil, awsRestjson1_deserializeEventStreamExceptionMedicalScribeResultStream(msg) + + case eventstreamapi.ErrorMessageType: + errorCode := "UnknownError" + errorMessage := errorCode + if header := msg.Headers.Get(eventstreamapi.ErrorCodeHeader); header != nil { + errorCode = header.String() + } + if header := msg.Headers.Get(eventstreamapi.ErrorMessageHeader); header != nil { + errorMessage = header.String() + } + return nil, &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + + default: + mc := msg.Clone() + return nil, &UnknownEventMessageError{ + Type: messageType.String(), + Message: &mc, + } + + } +} + +func (r *medicalScribeResultStreamReader) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() +} + +func (r *medicalScribeResultStreamReader) Close() error { + r.closeOnce.Do(r.safeClose) + return r.Err() +} + +func (r *medicalScribeResultStreamReader) safeClose() { + close(r.done) + r.eventStream.Close() + +} + +func (r *medicalScribeResultStreamReader) Err() error { + return r.err.Err() +} + +func (r *medicalScribeResultStreamReader) Closed() <-chan struct{} { + return r.done +} + type callAnalyticsTranscriptResultStreamReader struct { stream chan types.CallAnalyticsTranscriptResultStream decoder *eventstream.Decoder @@ -797,6 +1152,147 @@ func addEventStreamStartCallAnalyticsStreamTranscriptionMiddleware(stack *middle } +type awsRestjson1_deserializeOpEventStreamStartMedicalScribeStream struct { + LogEventStreamWrites bool + LogEventStreamReads bool +} + +func (*awsRestjson1_deserializeOpEventStreamStartMedicalScribeStream) ID() string { + return "OperationEventStreamDeserializer" +} + +func (m *awsRestjson1_deserializeOpEventStreamStartMedicalScribeStream) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + defer func() { + if err == nil { + return + } + m.closeResponseBody(out) + }() + + logger := middleware.GetLogger(ctx) + + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type: %T", in.Request) + } + _ = request + + if err := eventstreamapi.ApplyHTTPTransportFixes(request); err != nil { + return out, metadata, err + } + + requestSignature, err := v4.GetSignedRequestSignature(request.Request) + if err != nil { + return out, metadata, fmt.Errorf("failed to get event stream seed signature: %v", err) + } + + identity := getIdentity(ctx) + if identity == nil { + return out, metadata, fmt.Errorf("no identity") + } + + creds, ok := identity.(*internalauthsmithy.CredentialsAdapter) + if !ok { + return out, metadata, fmt.Errorf("identity is not sigv4 credentials") + } + + rscheme := getResolvedAuthScheme(ctx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + name, ok := smithyhttp.GetSigV4SigningName(&rscheme.SignerProperties) + if !ok { + return out, metadata, fmt.Errorf("no sigv4 signing name") + } + + region, ok := smithyhttp.GetSigV4SigningRegion(&rscheme.SignerProperties) + if !ok { + return out, metadata, fmt.Errorf("no sigv4 signing region") + } + + signer := v4.NewStreamSigner(creds.Credentials, name, region, requestSignature) + + eventWriter := newMedicalScribeInputStreamWriter( + eventstreamapi.GetInputStreamWriter(ctx), + eventstream.NewEncoder(func(options *eventstream.EncoderOptions) { + options.Logger = logger + options.LogMessages = m.LogEventStreamWrites + + }), + signer, + ) + defer func() { + if err == nil { + return + } + _ = eventWriter.Close() + }() + + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + deserializeOutput, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type: %T", out.RawResponse) + } + _ = deserializeOutput + + output, ok := out.Result.(*StartMedicalScribeStreamOutput) + if out.Result != nil && !ok { + return out, metadata, fmt.Errorf("unexpected output result type: %T", out.Result) + } else if out.Result == nil { + output = &StartMedicalScribeStreamOutput{} + out.Result = output + } + + eventReader := newMedicalScribeResultStreamReader( + deserializeOutput.Body, + eventstream.NewDecoder(func(options *eventstream.DecoderOptions) { + options.Logger = logger + options.LogMessages = m.LogEventStreamReads + + }), + ) + defer func() { + if err == nil { + return + } + _ = eventReader.Close() + }() + + output.eventStream = NewStartMedicalScribeStreamEventStream(func(stream *StartMedicalScribeStreamEventStream) { + stream.Writer = eventWriter + stream.Reader = eventReader + }) + + go output.eventStream.waitStreamClose() + + return out, metadata, nil +} + +func (*awsRestjson1_deserializeOpEventStreamStartMedicalScribeStream) closeResponseBody(out middleware.DeserializeOutput) { + if resp, ok := out.RawResponse.(*smithyhttp.Response); ok && resp != nil && resp.Body != nil { + _, _ = io.Copy(ioutil.Discard, resp.Body) + _ = resp.Body.Close() + } +} + +func addEventStreamStartMedicalScribeStreamMiddleware(stack *middleware.Stack, options Options) error { + if err := stack.Deserialize.Insert(&awsRestjson1_deserializeOpEventStreamStartMedicalScribeStream{ + LogEventStreamWrites: options.ClientLogMode.IsRequestEventMessage(), + LogEventStreamReads: options.ClientLogMode.IsResponseEventMessage(), + }, "OperationDeserializer", middleware.Before); err != nil { + return err + } + return nil + +} + type awsRestjson1_deserializeOpEventStreamStartMedicalStreamTranscription struct { LogEventStreamWrites bool LogEventStreamReads bool @@ -1097,6 +1593,10 @@ func setSafeEventStreamClientLogMode(o *Options, operation string) { toggleEventStreamClientLogMode(o, true, true) return + case "StartMedicalScribeStream": + toggleEventStreamClientLogMode(o, true, true) + return + case "StartMedicalStreamTranscription": toggleEventStreamClientLogMode(o, true, true) return diff --git a/service/transcribestreaming/generated.json b/service/transcribestreaming/generated.json index 2632aa2b411..d2e55798db2 100644 --- a/service/transcribestreaming/generated.json +++ b/service/transcribestreaming/generated.json @@ -9,7 +9,9 @@ "files": [ "api_client.go", "api_client_test.go", + "api_op_GetMedicalScribeStream.go", "api_op_StartCallAnalyticsStreamTranscription.go", + "api_op_StartMedicalScribeStream.go", "api_op_StartMedicalStreamTranscription.go", "api_op_StartStreamTranscription.go", "auth.go", diff --git a/service/transcribestreaming/serializers.go b/service/transcribestreaming/serializers.go index 6bd35b16d32..8e967330b82 100644 --- a/service/transcribestreaming/serializers.go +++ b/service/transcribestreaming/serializers.go @@ -16,6 +16,77 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +type awsRestjson1_serializeOpGetMedicalScribeStream struct { +} + +func (*awsRestjson1_serializeOpGetMedicalScribeStream) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetMedicalScribeStream) 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.(*GetMedicalScribeStreamInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/medical-scribe-stream/{SessionId}") + 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_serializeOpHttpBindingsGetMedicalScribeStreamInput(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_serializeOpHttpBindingsGetMedicalScribeStreamInput(v *GetMedicalScribeStreamInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.SessionId == nil || len(*v.SessionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member SessionId must not be empty")} + } + if v.SessionId != nil { + if err := encoder.SetURI("SessionId").String(*v.SessionId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpStartCallAnalyticsStreamTranscription struct { } @@ -145,6 +216,90 @@ func awsRestjson1_serializeOpHttpBindingsStartCallAnalyticsStreamTranscriptionIn return nil } +type awsRestjson1_serializeOpStartMedicalScribeStream struct { +} + +func (*awsRestjson1_serializeOpStartMedicalScribeStream) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartMedicalScribeStream) 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.(*StartMedicalScribeStreamInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/medical-scribe-stream") + 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_serializeOpHttpBindingsStartMedicalScribeStreamInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/vnd.amazon.eventstream") + + 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_serializeOpHttpBindingsStartMedicalScribeStreamInput(v *StartMedicalScribeStreamInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if len(v.LanguageCode) > 0 { + locationName := "X-Amzn-Transcribe-Language-Code" + encoder.SetHeader(locationName).String(string(v.LanguageCode)) + } + + if len(v.MediaEncoding) > 0 { + locationName := "X-Amzn-Transcribe-Media-Encoding" + encoder.SetHeader(locationName).String(string(v.MediaEncoding)) + } + + if v.MediaSampleRateHertz != nil { + locationName := "X-Amzn-Transcribe-Sample-Rate" + encoder.SetHeader(locationName).Integer(*v.MediaSampleRateHertz) + } + + if v.SessionId != nil { + locationName := "X-Amzn-Transcribe-Session-Id" + encoder.SetHeader(locationName).String(*v.SessionId) + } + + return nil +} + type awsRestjson1_serializeOpStartMedicalStreamTranscription struct { } @@ -438,6 +593,218 @@ func awsRestjson1_serializeOpHttpBindingsStartStreamTranscriptionInput(v *StartS return nil } +func awsRestjson1_serializeEventStreamMedicalScribeInputStream(v types.MedicalScribeInputStream, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + switch vv := v.(type) { + case *types.MedicalScribeInputStreamMemberAudioEvent: + msg.Headers.Set(eventstreamapi.EventTypeHeader, eventstream.StringValue("AudioEvent")) + return awsRestjson1_serializeEventMessageMedicalScribeAudioEvent(&vv.Value, msg) + + case *types.MedicalScribeInputStreamMemberSessionControlEvent: + msg.Headers.Set(eventstreamapi.EventTypeHeader, eventstream.StringValue("SessionControlEvent")) + return awsRestjson1_serializeEventMessageMedicalScribeSessionControlEvent(&vv.Value, msg) + + case *types.MedicalScribeInputStreamMemberConfigurationEvent: + msg.Headers.Set(eventstreamapi.EventTypeHeader, eventstream.StringValue("ConfigurationEvent")) + return awsRestjson1_serializeEventMessageMedicalScribeConfigurationEvent(&vv.Value, msg) + + default: + return fmt.Errorf("unexpected event message type: %v", v) + + } +} +func awsRestjson1_serializeEventMessageMedicalScribeAudioEvent(v *types.MedicalScribeAudioEvent, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + if v.AudioChunk != nil { + msg.Headers.Set(eventstreamapi.ContentTypeHeader, eventstream.StringValue("application/octet-stream")) + msg.Payload = v.AudioChunk + } + return nil +} + +func awsRestjson1_serializeEventMessageMedicalScribeConfigurationEvent(v *types.MedicalScribeConfigurationEvent, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set(eventstreamapi.ContentTypeHeader, eventstream.StringValue("application/json")) + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentMedicalScribeConfigurationEvent(v, jsonEncoder.Value); err != nil { + return err + } + msg.Payload = jsonEncoder.Bytes() + return nil +} + +func awsRestjson1_serializeEventMessageMedicalScribeSessionControlEvent(v *types.MedicalScribeSessionControlEvent, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set(eventstreamapi.ContentTypeHeader, eventstream.StringValue("application/json")) + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentMedicalScribeSessionControlEvent(v, jsonEncoder.Value); err != nil { + return err + } + msg.Payload = jsonEncoder.Bytes() + return nil +} + +func awsRestjson1_serializeDocumentClinicalNoteGenerationSettings(v *types.ClinicalNoteGenerationSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OutputBucketName != nil { + ok := object.Key("OutputBucketName") + ok.String(*v.OutputBucketName) + } + + return nil +} + +func awsRestjson1_serializeDocumentKMSEncryptionContextMap(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsRestjson1_serializeDocumentMedicalScribeChannelDefinition(v *types.MedicalScribeChannelDefinition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + { + ok := object.Key("ChannelId") + ok.Integer(v.ChannelId) + } + + if len(v.ParticipantRole) > 0 { + ok := object.Key("ParticipantRole") + ok.String(string(v.ParticipantRole)) + } + + return nil +} + +func awsRestjson1_serializeDocumentMedicalScribeChannelDefinitions(v []types.MedicalScribeChannelDefinition, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentMedicalScribeChannelDefinition(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentMedicalScribeConfigurationEvent(v *types.MedicalScribeConfigurationEvent, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ChannelDefinitions != nil { + ok := object.Key("ChannelDefinitions") + if err := awsRestjson1_serializeDocumentMedicalScribeChannelDefinitions(v.ChannelDefinitions, ok); err != nil { + return err + } + } + + if v.EncryptionSettings != nil { + ok := object.Key("EncryptionSettings") + if err := awsRestjson1_serializeDocumentMedicalScribeEncryptionSettings(v.EncryptionSettings, ok); err != nil { + return err + } + } + + if v.PostStreamAnalyticsSettings != nil { + ok := object.Key("PostStreamAnalyticsSettings") + if err := awsRestjson1_serializeDocumentMedicalScribePostStreamAnalyticsSettings(v.PostStreamAnalyticsSettings, ok); err != nil { + return err + } + } + + if v.ResourceAccessRoleArn != nil { + ok := object.Key("ResourceAccessRoleArn") + ok.String(*v.ResourceAccessRoleArn) + } + + if len(v.VocabularyFilterMethod) > 0 { + ok := object.Key("VocabularyFilterMethod") + ok.String(string(v.VocabularyFilterMethod)) + } + + if v.VocabularyFilterName != nil { + ok := object.Key("VocabularyFilterName") + ok.String(*v.VocabularyFilterName) + } + + if v.VocabularyName != nil { + ok := object.Key("VocabularyName") + ok.String(*v.VocabularyName) + } + + return nil +} + +func awsRestjson1_serializeDocumentMedicalScribeEncryptionSettings(v *types.MedicalScribeEncryptionSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.KmsEncryptionContext != nil { + ok := object.Key("KmsEncryptionContext") + if err := awsRestjson1_serializeDocumentKMSEncryptionContextMap(v.KmsEncryptionContext, ok); err != nil { + return err + } + } + + if v.KmsKeyId != nil { + ok := object.Key("KmsKeyId") + ok.String(*v.KmsKeyId) + } + + return nil +} + +func awsRestjson1_serializeDocumentMedicalScribePostStreamAnalyticsSettings(v *types.MedicalScribePostStreamAnalyticsSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClinicalNoteGenerationSettings != nil { + ok := object.Key("ClinicalNoteGenerationSettings") + if err := awsRestjson1_serializeDocumentClinicalNoteGenerationSettings(v.ClinicalNoteGenerationSettings, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentMedicalScribeSessionControlEvent(v *types.MedicalScribeSessionControlEvent, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + return nil +} + func awsRestjson1_serializeEventStreamAudioStream(v types.AudioStream, msg *eventstream.Message) error { if v == nil { return fmt.Errorf("unexpected serialization of nil %T", v) diff --git a/service/transcribestreaming/snapshot/api_op_GetMedicalScribeStream.go.snap b/service/transcribestreaming/snapshot/api_op_GetMedicalScribeStream.go.snap new file mode 100644 index 00000000000..2be371b688a --- /dev/null +++ b/service/transcribestreaming/snapshot/api_op_GetMedicalScribeStream.go.snap @@ -0,0 +1,41 @@ +GetMedicalScribeStream + 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 + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/transcribestreaming/snapshot/api_op_StartMedicalScribeStream.go.snap b/service/transcribestreaming/snapshot/api_op_StartMedicalScribeStream.go.snap new file mode 100644 index 00000000000..24fa0668a71 --- /dev/null +++ b/service/transcribestreaming/snapshot/api_op_StartMedicalScribeStream.go.snap @@ -0,0 +1,42 @@ +StartMedicalScribeStream + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ComputePayloadHash + SigV4ContentSHA256Header + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + setLegacyContextSigningOptions + Signing + InitializeStreamWriter + Deserialize stack step + AddRawResponseToMetadata + OperationEventStreamDeserializer + RequireMinimumProtocol + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/transcribestreaming/snapshot_test.go b/service/transcribestreaming/snapshot_test.go index 16e926bea65..9d96a1211fb 100644 --- a/service/transcribestreaming/snapshot_test.go +++ b/service/transcribestreaming/snapshot_test.go @@ -62,6 +62,18 @@ func testSnapshot(stack *middleware.Stack, operation string) error { } return snapshotOK{} } +func TestCheckSnapshot_GetMedicalScribeStream(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetMedicalScribeStream(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetMedicalScribeStream") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_StartCallAnalyticsStreamTranscription(t *testing.T) { svc := New(Options{}) _, err := svc.StartCallAnalyticsStreamTranscription(context.Background(), nil, func(o *Options) { @@ -74,6 +86,18 @@ func TestCheckSnapshot_StartCallAnalyticsStreamTranscription(t *testing.T) { } } +func TestCheckSnapshot_StartMedicalScribeStream(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartMedicalScribeStream(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "StartMedicalScribeStream") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_StartMedicalStreamTranscription(t *testing.T) { svc := New(Options{}) _, err := svc.StartMedicalStreamTranscription(context.Background(), nil, func(o *Options) { @@ -97,6 +121,18 @@ func TestCheckSnapshot_StartStreamTranscription(t *testing.T) { t.Fatal(err) } } +func TestUpdateSnapshot_GetMedicalScribeStream(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetMedicalScribeStream(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetMedicalScribeStream") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_StartCallAnalyticsStreamTranscription(t *testing.T) { svc := New(Options{}) _, err := svc.StartCallAnalyticsStreamTranscription(context.Background(), nil, func(o *Options) { @@ -109,6 +145,18 @@ func TestUpdateSnapshot_StartCallAnalyticsStreamTranscription(t *testing.T) { } } +func TestUpdateSnapshot_StartMedicalScribeStream(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartMedicalScribeStream(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "StartMedicalScribeStream") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_StartMedicalStreamTranscription(t *testing.T) { svc := New(Options{}) _, err := svc.StartMedicalStreamTranscription(context.Background(), nil, func(o *Options) { diff --git a/service/transcribestreaming/types/enums.go b/service/transcribestreaming/types/enums.go index cbea9fbda59..cf268bc954c 100644 --- a/service/transcribestreaming/types/enums.go +++ b/service/transcribestreaming/types/enums.go @@ -35,6 +35,28 @@ func (CallAnalyticsLanguageCode) Values() []CallAnalyticsLanguageCode { } } +type ClinicalNoteGenerationStatus string + +// Enum values for ClinicalNoteGenerationStatus +const ( + ClinicalNoteGenerationStatusInProgress ClinicalNoteGenerationStatus = "IN_PROGRESS" + ClinicalNoteGenerationStatusFailed ClinicalNoteGenerationStatus = "FAILED" + ClinicalNoteGenerationStatusCompleted ClinicalNoteGenerationStatus = "COMPLETED" +) + +// Values returns all known values for ClinicalNoteGenerationStatus. 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 (ClinicalNoteGenerationStatus) Values() []ClinicalNoteGenerationStatus { + return []ClinicalNoteGenerationStatus{ + "IN_PROGRESS", + "FAILED", + "COMPLETED", + } +} + type ContentIdentificationType string // Enum values for ContentIdentificationType @@ -269,6 +291,147 @@ func (MedicalContentIdentificationType) Values() []MedicalContentIdentificationT } } +type MedicalScribeLanguageCode string + +// Enum values for MedicalScribeLanguageCode +const ( + MedicalScribeLanguageCodeEnUs MedicalScribeLanguageCode = "en-US" +) + +// Values returns all known values for MedicalScribeLanguageCode. 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 (MedicalScribeLanguageCode) Values() []MedicalScribeLanguageCode { + return []MedicalScribeLanguageCode{ + "en-US", + } +} + +type MedicalScribeMediaEncoding string + +// Enum values for MedicalScribeMediaEncoding +const ( + MedicalScribeMediaEncodingPcm MedicalScribeMediaEncoding = "pcm" + MedicalScribeMediaEncodingOggOpus MedicalScribeMediaEncoding = "ogg-opus" + MedicalScribeMediaEncodingFlac MedicalScribeMediaEncoding = "flac" +) + +// Values returns all known values for MedicalScribeMediaEncoding. 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 (MedicalScribeMediaEncoding) Values() []MedicalScribeMediaEncoding { + return []MedicalScribeMediaEncoding{ + "pcm", + "ogg-opus", + "flac", + } +} + +type MedicalScribeParticipantRole string + +// Enum values for MedicalScribeParticipantRole +const ( + MedicalScribeParticipantRolePatient MedicalScribeParticipantRole = "PATIENT" + MedicalScribeParticipantRoleClinician MedicalScribeParticipantRole = "CLINICIAN" +) + +// Values returns all known values for MedicalScribeParticipantRole. 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 (MedicalScribeParticipantRole) Values() []MedicalScribeParticipantRole { + return []MedicalScribeParticipantRole{ + "PATIENT", + "CLINICIAN", + } +} + +type MedicalScribeSessionControlEventType string + +// Enum values for MedicalScribeSessionControlEventType +const ( + MedicalScribeSessionControlEventTypeEndOfSession MedicalScribeSessionControlEventType = "END_OF_SESSION" +) + +// Values returns all known values for MedicalScribeSessionControlEventType. 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 (MedicalScribeSessionControlEventType) Values() []MedicalScribeSessionControlEventType { + return []MedicalScribeSessionControlEventType{ + "END_OF_SESSION", + } +} + +type MedicalScribeStreamStatus string + +// Enum values for MedicalScribeStreamStatus +const ( + MedicalScribeStreamStatusInProgress MedicalScribeStreamStatus = "IN_PROGRESS" + MedicalScribeStreamStatusPaused MedicalScribeStreamStatus = "PAUSED" + MedicalScribeStreamStatusFailed MedicalScribeStreamStatus = "FAILED" + MedicalScribeStreamStatusCompleted MedicalScribeStreamStatus = "COMPLETED" +) + +// Values returns all known values for MedicalScribeStreamStatus. 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 (MedicalScribeStreamStatus) Values() []MedicalScribeStreamStatus { + return []MedicalScribeStreamStatus{ + "IN_PROGRESS", + "PAUSED", + "FAILED", + "COMPLETED", + } +} + +type MedicalScribeTranscriptItemType string + +// Enum values for MedicalScribeTranscriptItemType +const ( + MedicalScribeTranscriptItemTypePronunciation MedicalScribeTranscriptItemType = "pronunciation" + MedicalScribeTranscriptItemTypePunctuation MedicalScribeTranscriptItemType = "punctuation" +) + +// Values returns all known values for MedicalScribeTranscriptItemType. 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 (MedicalScribeTranscriptItemType) Values() []MedicalScribeTranscriptItemType { + return []MedicalScribeTranscriptItemType{ + "pronunciation", + "punctuation", + } +} + +type MedicalScribeVocabularyFilterMethod string + +// Enum values for MedicalScribeVocabularyFilterMethod +const ( + MedicalScribeVocabularyFilterMethodRemove MedicalScribeVocabularyFilterMethod = "remove" + MedicalScribeVocabularyFilterMethodMask MedicalScribeVocabularyFilterMethod = "mask" + MedicalScribeVocabularyFilterMethodTag MedicalScribeVocabularyFilterMethod = "tag" +) + +// Values returns all known values for MedicalScribeVocabularyFilterMethod. 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 (MedicalScribeVocabularyFilterMethod) Values() []MedicalScribeVocabularyFilterMethod { + return []MedicalScribeVocabularyFilterMethod{ + "remove", + "mask", + "tag", + } +} + type PartialResultsStability string // Enum values for PartialResultsStability diff --git a/service/transcribestreaming/types/errors.go b/service/transcribestreaming/types/errors.go index a70c5624bd1..d0f59e42626 100644 --- a/service/transcribestreaming/types/errors.go +++ b/service/transcribestreaming/types/errors.go @@ -118,6 +118,32 @@ func (e *LimitExceededException) ErrorCode() string { } func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The request references a resource which doesn't exist. +type ResourceNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The service is currently unavailable. Try your request later. type ServiceUnavailableException struct { Message *string diff --git a/service/transcribestreaming/types/types.go b/service/transcribestreaming/types/types.go index e7c12c49a23..ce98a61d8fa 100644 --- a/service/transcribestreaming/types/types.go +++ b/service/transcribestreaming/types/types.go @@ -4,6 +4,7 @@ package types import ( smithydocument "github.com/aws/smithy-go/document" + "time" ) // A list of possible alternative transcriptions for the input audio. Each @@ -31,8 +32,22 @@ type Alternative struct { // [Event stream encoding]: https://docs.aws.amazon.com/transcribe/latest/dg/event-stream.html type AudioEvent struct { - // An audio blob that contains the next part of the audio that you want to - // transcribe. The maximum audio chunk size is 32 KB. + // An audio blob containing the next segment of audio from your application, with + // a maximum duration of 1 second. The maximum size in bytes varies based on audio + // properties. + // + // Find recommended size in [Transcribing streaming best practices]. + // + // Size calculation: Duration (s) * Sample Rate (Hz) * Number of Channels * 2 + // (Bytes per Sample) + // + // For example, a 1-second chunk of 16 kHz, 2-channel, 16-bit audio would be 1 * + // 16000 * 2 * 2 = 64000 bytes . + // + // For 8 kHz, 1-channel, 16-bit audio, a 1-second chunk would be 1 * 8000 * 1 * 2 + // = 16000 bytes . + // + // [Transcribing streaming best practices]: https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#best-practices AudioChunk []byte noSmithyDocumentSerde @@ -237,6 +252,64 @@ type CharacterOffsets struct { noSmithyDocumentSerde } +// The details for clinical note generation, including status, and output +// locations for clinical note and aggregated transcript if the analytics +// completed, or failure reason if the analytics failed. +type ClinicalNoteGenerationResult struct { + + // Holds the Amazon S3 URI for the output Clinical Note. + ClinicalNoteOutputLocation *string + + // If ClinicalNoteGenerationResult is FAILED , information about why it failed. + FailureReason *string + + // The status of the clinical note generation. + // + // Possible Values: + // + // - IN_PROGRESS + // + // - FAILED + // + // - COMPLETED + // + // After audio streaming finishes, and you send a MedicalScribeSessionControlEvent + // event (with END_OF_SESSION as the Type), the status is set to IN_PROGRESS . If + // the status is COMPLETED , the analytics completed successfully, and you can find + // the results at the locations specified in ClinicalNoteOutputLocation and + // TranscriptOutputLocation . If the status is FAILED , FailureReason provides + // details about the failure. + Status ClinicalNoteGenerationStatus + + // Holds the Amazon S3 URI for the output Transcript. + TranscriptOutputLocation *string + + noSmithyDocumentSerde +} + +// The output configuration for aggregated transcript and clinical note generation. +type ClinicalNoteGenerationSettings struct { + + // The name of the Amazon S3 bucket where you want the output of Amazon Web + // Services HealthScribe post-stream analytics stored. Don't include the S3:// + // prefix of the specified bucket. + // + // HealthScribe outputs transcript and clinical note files under the prefix: + // S3://$output-bucket-name/healthscribe-streaming/session-id/post-stream-analytics/clinical-notes + // + // The role ResourceAccessRoleArn specified in the MedicalScribeConfigurationEvent + // must have permission to use the specified location. You can change Amazon S3 + // permissions using the [Amazon Web Services Management Console]. See also [Permissions Required for IAM User Roles] . + // + // [Amazon Web Services Management Console]: https://console.aws.amazon.com/s3 + // [Permissions Required for IAM User Roles]: https://docs.aws.amazon.com/transcribe/latest/dg/security_iam_id-based-policy-examples.html#auth-role-iam-user + // + // This member is required. + OutputBucketName *string + + noSmithyDocumentSerde +} + // Allows you to set audio channel definitions and post-call analytics settings. type ConfigurationEvent struct { @@ -465,6 +538,441 @@ type MedicalResult struct { noSmithyDocumentSerde } +// A wrapper for your audio chunks +// +// For more information, see [Event stream encoding]. +// +// [Event stream encoding]: https://docs.aws.amazon.com/transcribe/latest/dg/event-stream.html +type MedicalScribeAudioEvent struct { + + // An audio blob containing the next segment of audio from your application, with + // a maximum duration of 1 second. The maximum size in bytes varies based on audio + // properties. + // + // Find recommended size in [Transcribing streaming best practices]. + // + // Size calculation: Duration (s) * Sample Rate (Hz) * Number of Channels * 2 + // (Bytes per Sample) + // + // For example, a 1-second chunk of 16 kHz, 2-channel, 16-bit audio would be 1 * + // 16000 * 2 * 2 = 64000 bytes . + // + // For 8 kHz, 1-channel, 16-bit audio, a 1-second chunk would be 1 * 8000 * 1 * 2 + // = 16000 bytes . + // + // [Transcribing streaming best practices]: https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#best-practices + // + // This member is required. + AudioChunk []byte + + noSmithyDocumentSerde +} + +// Makes it possible to specify which speaker is on which channel. For example, if +// the clinician is the first participant to speak, you would set the ChannelId of +// the first ChannelDefinition in the list to 0 (to indicate the first channel) +// and ParticipantRole to CLINICIAN (to indicate that it's the clinician +// speaking). Then you would set the ChannelId of the second ChannelDefinition in +// the list to 1 (to indicate the second channel) and ParticipantRole to PATIENT +// (to indicate that it's the patient speaking). +// +// If you don't specify a channel definition, HealthScribe will diarize the +// transcription and identify speaker roles for each speaker. +type MedicalScribeChannelDefinition struct { + + // Specify the audio channel you want to define. + // + // This member is required. + ChannelId int32 + + // Specify the participant that you want to flag. The allowed options are CLINICIAN + // and PATIENT . + // + // This member is required. + ParticipantRole MedicalScribeParticipantRole + + noSmithyDocumentSerde +} + +// Specify details to configure the streaming session, including channel +// definitions, encryption settings, post-stream analytics settings, resource +// access role ARN and vocabulary settings. +// +// Whether you are starting a new session or resuming an existing session, your +// first event must be a MedicalScribeConfigurationEvent . If you are resuming a +// session, then this event must have the same configurations that you provided to +// start the session. +type MedicalScribeConfigurationEvent struct { + + // Specify settings for post-stream analytics. + // + // This member is required. + PostStreamAnalyticsSettings *MedicalScribePostStreamAnalyticsSettings + + // The Amazon Resource Name (ARN) of an IAM role that has permissions to access + // the Amazon S3 output bucket you specified, and use your KMS key if supplied. If + // the role that you specify doesn’t have the appropriate permissions, your request + // fails. + // + // IAM role ARNs have the format + // arn:partition:iam::account:role/role-name-with-path . For example: + // arn:aws:iam::111122223333:role/Admin . + // + // For more information, see [Amazon Web Services HealthScribe]. + // + // [Amazon Web Services HealthScribe]: https://docs.aws.amazon.com/transcribe/latest/dg/health-scribe-streaming.html + // + // This member is required. + ResourceAccessRoleArn *string + + // Specify which speaker is on which audio channel. + ChannelDefinitions []MedicalScribeChannelDefinition + + // Specify the encryption settings for your streaming session. + EncryptionSettings *MedicalScribeEncryptionSettings + + // Specify how you want your custom vocabulary filter applied to the streaming + // session. + // + // To replace words with *** , specify mask . + // + // To delete words, specify remove . + // + // To flag words without changing them, specify tag . + VocabularyFilterMethod MedicalScribeVocabularyFilterMethod + + // Specify the name of the custom vocabulary filter you want to include in your + // streaming session. Custom vocabulary filter names are case-sensitive. + // + // If you include VocabularyFilterName in the MedicalScribeConfigurationEvent , you + // must also include VocabularyFilterMethod . + VocabularyFilterName *string + + // Specify the name of the custom vocabulary you want to use for your streaming + // session. Custom vocabulary names are case-sensitive. + VocabularyName *string + + noSmithyDocumentSerde +} + +// Contains encryption related settings to be used for data encryption with Key +// Management Service, including KmsEncryptionContext and KmsKeyId. The KmsKeyId is +// required, while KmsEncryptionContext is optional for additional layer of +// security. +// +// By default, Amazon Web Services HealthScribe provides encryption at rest to +// protect sensitive customer data using Amazon S3-managed keys. HealthScribe uses +// the KMS key you specify as a second layer of encryption. +// +// Your ResourceAccessRoleArn must permission to use your KMS key. For more +// information, see [Data Encryption at rest for Amazon Web Services HealthScribe]. +// +// [Data Encryption at rest for Amazon Web Services HealthScribe]: https://docs.aws.amazon.com/transcribe/latest/dg/health-scribe-encryption.html +type MedicalScribeEncryptionSettings struct { + + // The ID of the KMS key you want to use for your streaming session. You can + // specify its KMS key ID, key Amazon Resource Name (ARN), alias name, or alias + // ARN. When using an alias name, prefix it with "alias/" . To specify a KMS key in + // a different Amazon Web Services account, you must use the key ARN or alias ARN. + // + // For example: + // + // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // - Key ARN: + // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // - Alias name: alias/ExampleAlias + // + // - Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias + // + // To get the key ID and key ARN for a KMS key, use the [ListKeys] or [DescribeKey] KMS API operations. + // To get the alias name and alias ARN, use [ListKeys]API operation. + // + // [DescribeKey]: https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html + // [ListKeys]: https://docs.aws.amazon.com/kms/latest/APIReference/API_ListAliases.html + // + // This member is required. + KmsKeyId *string + + // A map of plain text, non-secret key:value pairs, known as encryption context + // pairs, that provide an added layer of security for your data. For more + // information, see [KMSencryption context]and [Asymmetric keys in KMS]. + // + // [Asymmetric keys in KMS]: https://docs.aws.amazon.com/transcribe/latest/dg/symmetric-asymmetric.html + // [KMSencryption context]: https://docs.aws.amazon.com/transcribe/latest/dg/key-management.html#kms-context + KmsEncryptionContext map[string]string + + noSmithyDocumentSerde +} + +// An encoded stream of events. The stream is encoded as HTTP/2 data frames. +// +// An input stream consists of the following types of events. The first element of +// the input stream must be the MedicalScribeConfigurationEvent event type. +// +// - MedicalScribeConfigurationEvent +// +// - MedicalScribeAudioEvent +// +// - MedicalScribeSessionControlEvent +// +// The following types satisfy this interface: +// +// MedicalScribeInputStreamMemberAudioEvent +// MedicalScribeInputStreamMemberConfigurationEvent +// MedicalScribeInputStreamMemberSessionControlEvent +type MedicalScribeInputStream interface { + isMedicalScribeInputStream() +} + +// A wrapper for your audio chunks +// +// For more information, see [Event stream encoding]. +// +// [Event stream encoding]: https://docs.aws.amazon.com/transcribe/latest/dg/event-stream.html +type MedicalScribeInputStreamMemberAudioEvent struct { + Value MedicalScribeAudioEvent + + noSmithyDocumentSerde +} + +func (*MedicalScribeInputStreamMemberAudioEvent) isMedicalScribeInputStream() {} + +// Specify additional streaming session configurations beyond those provided in +// your initial start request headers. For example, specify channel definitions, +// encryption settings, and post-stream analytics settings. +// +// Whether you are starting a new session or resuming an existing session, your +// first event must be a MedicalScribeConfigurationEvent . +type MedicalScribeInputStreamMemberConfigurationEvent struct { + Value MedicalScribeConfigurationEvent + + noSmithyDocumentSerde +} + +func (*MedicalScribeInputStreamMemberConfigurationEvent) isMedicalScribeInputStream() {} + +// Specify the lifecycle of your streaming session, such as ending the session. +type MedicalScribeInputStreamMemberSessionControlEvent struct { + Value MedicalScribeSessionControlEvent + + noSmithyDocumentSerde +} + +func (*MedicalScribeInputStreamMemberSessionControlEvent) isMedicalScribeInputStream() {} + +// Contains details for the result of post-stream analytics. +type MedicalScribePostStreamAnalyticsResult struct { + + // Provides the Clinical Note Generation result for post-stream analytics. + ClinicalNoteGenerationResult *ClinicalNoteGenerationResult + + noSmithyDocumentSerde +} + +// The settings for post-stream analytics. +type MedicalScribePostStreamAnalyticsSettings struct { + + // Specify settings for the post-stream clinical note generation. + // + // This member is required. + ClinicalNoteGenerationSettings *ClinicalNoteGenerationSettings + + noSmithyDocumentSerde +} + +// Result stream where you will receive the output events. The details are +// provided in the MedicalScribeTranscriptEvent object. +// +// The following types satisfy this interface: +// +// MedicalScribeResultStreamMemberTranscriptEvent +type MedicalScribeResultStream interface { + isMedicalScribeResultStream() +} + +// The transcript event that contains real-time transcription results. +type MedicalScribeResultStreamMemberTranscriptEvent struct { + Value MedicalScribeTranscriptEvent + + noSmithyDocumentSerde +} + +func (*MedicalScribeResultStreamMemberTranscriptEvent) isMedicalScribeResultStream() {} + +// Specify the lifecycle of your streaming session. +type MedicalScribeSessionControlEvent struct { + + // The type of MedicalScribeSessionControlEvent . + // + // Possible Values: + // + // - END_OF_SESSION - Indicates the audio streaming is complete. After you send + // an END_OF_SESSION event, Amazon Web Services HealthScribe starts the post-stream + // analytics. The session can't be resumed after this event is sent. After Amazon + // Web Services HealthScribe processes the event, the real-time StreamStatus is + // COMPLETED . You get the StreamStatus and other stream details with the [GetMedicalScribeStream]API + // operation. For more information about different streaming statuses, see the + // StreamStatus description in the [MedicalScribeStreamDetails]. + // + // [GetMedicalScribeStream]: https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_GetMedicalScribeStream.html + // [MedicalScribeStreamDetails]: https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_MedicalScribeStreamDetails.html + // + // This member is required. + Type MedicalScribeSessionControlEventType + + noSmithyDocumentSerde +} + +// Contains details about a Amazon Web Services HealthScribe streaming session. +type MedicalScribeStreamDetails struct { + + // The Channel Definitions of the HealthScribe streaming session. + ChannelDefinitions []MedicalScribeChannelDefinition + + // The Encryption Settings of the HealthScribe streaming session. + EncryptionSettings *MedicalScribeEncryptionSettings + + // The Language Code of the HealthScribe streaming session. + LanguageCode MedicalScribeLanguageCode + + // The Media Encoding of the HealthScribe streaming session. + MediaEncoding MedicalScribeMediaEncoding + + // The sample rate (in hertz) of the HealthScribe streaming session. + MediaSampleRateHertz *int32 + + // The result of post-stream analytics for the HealthScribe streaming session. + PostStreamAnalyticsResult *MedicalScribePostStreamAnalyticsResult + + // The post-stream analytics settings of the HealthScribe streaming session. + PostStreamAnalyticsSettings *MedicalScribePostStreamAnalyticsSettings + + // The Amazon Resource Name (ARN) of the role used in the HealthScribe streaming + // session. + ResourceAccessRoleArn *string + + // The identifier of the HealthScribe streaming session. + SessionId *string + + // The date and time when the HealthScribe streaming session was created. + StreamCreatedAt *time.Time + + // The date and time when the HealthScribe streaming session was ended. + StreamEndedAt *time.Time + + // The streaming status of the HealthScribe streaming session. + // + // Possible Values: + // + // - IN_PROGRESS + // + // - PAUSED + // + // - FAILED + // + // - COMPLETED + // + // This status is specific to real-time streaming. A COMPLETED status doesn't mean + // that the post-stream analytics is complete. To get status of an analytics + // result, check the Status field for the analytics result within the + // MedicalScribePostStreamAnalyticsResult . For example, you can view the status of + // the ClinicalNoteGenerationResult . + StreamStatus MedicalScribeStreamStatus + + // The method of the vocabulary filter for the HealthScribe streaming session. + VocabularyFilterMethod MedicalScribeVocabularyFilterMethod + + // The name of the vocabulary filter used for the HealthScribe streaming session . + VocabularyFilterName *string + + // The vocabulary name of the HealthScribe streaming session. + VocabularyName *string + + noSmithyDocumentSerde +} + +// The event associated with MedicalScribeResultStream . +// +// Contains MedicalScribeTranscriptSegment , which contains segment related +// information. +type MedicalScribeTranscriptEvent struct { + + // The TranscriptSegment associated with a MedicalScribeTranscriptEvent . + TranscriptSegment *MedicalScribeTranscriptSegment + + noSmithyDocumentSerde +} + +// A word, phrase, or punctuation mark in your transcription output, along with +// various associated attributes, such as confidence score, type, and start and end +// times. +type MedicalScribeTranscriptItem struct { + + // The start time, in milliseconds, of the transcribed item. + BeginAudioTime float64 + + // The confidence score associated with a word or phrase in your transcript. + // + // Confidence scores are values between 0 and 1. A larger value indicates a higher + // probability that the identified item correctly matches the item spoken in your + // media. + Confidence *float64 + + // The word, phrase or punctuation mark that was transcribed. + Content *string + + // The end time, in milliseconds, of the transcribed item. + EndAudioTime float64 + + // The type of item identified. Options are: PRONUNCIATION (spoken words) and + // PUNCTUATION . + Type MedicalScribeTranscriptItemType + + // Indicates whether the specified item matches a word in the vocabulary filter + // included in your configuration event. If true , there is a vocabulary filter + // match. + VocabularyFilterMatch *bool + + noSmithyDocumentSerde +} + +// Contains a set of transcription results, along with additional information of +// the segment. +type MedicalScribeTranscriptSegment struct { + + // The start time, in milliseconds, of the segment. + BeginAudioTime float64 + + // Indicates which audio channel is associated with the + // MedicalScribeTranscriptSegment . + // + // If MedicalScribeChannelDefinition is not provided in the + // MedicalScribeConfigurationEvent , then this field will not be included. + ChannelId *string + + // Contains transcribed text of the segment. + Content *string + + // The end time, in milliseconds, of the segment. + EndAudioTime float64 + + // Indicates if the segment is complete. + // + // If IsPartial is true , the segment is not complete. If IsPartial is false , the + // segment is complete. + IsPartial bool + + // Contains words, phrases, or punctuation marks in your segment. + Items []MedicalScribeTranscriptItem + + // The identifier of the segment. + SegmentId *string + + noSmithyDocumentSerde +} + // The MedicalTranscript associated with a . // // MedicalTranscript contains Results , which contains a set of transcription @@ -782,5 +1290,7 @@ type UnknownUnionMember struct { func (*UnknownUnionMember) isAudioStream() {} func (*UnknownUnionMember) isCallAnalyticsTranscriptResultStream() {} +func (*UnknownUnionMember) isMedicalScribeInputStream() {} +func (*UnknownUnionMember) isMedicalScribeResultStream() {} func (*UnknownUnionMember) isMedicalTranscriptResultStream() {} func (*UnknownUnionMember) isTranscriptResultStream() {} diff --git a/service/transcribestreaming/types/types_exported_test.go b/service/transcribestreaming/types/types_exported_test.go index 2ade64697bc..6c3dcc6ee63 100644 --- a/service/transcribestreaming/types/types_exported_test.go +++ b/service/transcribestreaming/types/types_exported_test.go @@ -51,6 +51,50 @@ func ExampleCallAnalyticsTranscriptResultStream_outputUsage() { var _ *types.CategoryEvent var _ *types.UtteranceEvent +func ExampleMedicalScribeInputStream_outputUsage() { + var union types.MedicalScribeInputStream + // type switches can be used to check the union value + switch v := union.(type) { + case *types.MedicalScribeInputStreamMemberAudioEvent: + _ = v.Value // Value is types.MedicalScribeAudioEvent + + case *types.MedicalScribeInputStreamMemberConfigurationEvent: + _ = v.Value // Value is types.MedicalScribeConfigurationEvent + + case *types.MedicalScribeInputStreamMemberSessionControlEvent: + _ = v.Value // Value is types.MedicalScribeSessionControlEvent + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.MedicalScribeSessionControlEvent +var _ *types.MedicalScribeAudioEvent +var _ *types.MedicalScribeConfigurationEvent + +func ExampleMedicalScribeResultStream_outputUsage() { + var union types.MedicalScribeResultStream + // type switches can be used to check the union value + switch v := union.(type) { + case *types.MedicalScribeResultStreamMemberTranscriptEvent: + _ = v.Value // Value is types.MedicalScribeTranscriptEvent + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.MedicalScribeTranscriptEvent + func ExampleMedicalTranscriptResultStream_outputUsage() { var union types.MedicalTranscriptResultStream // type switches can be used to check the union value diff --git a/service/transcribestreaming/validators.go b/service/transcribestreaming/validators.go index c44defb610d..4b7fae70200 100644 --- a/service/transcribestreaming/validators.go +++ b/service/transcribestreaming/validators.go @@ -10,6 +10,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpGetMedicalScribeStream struct { +} + +func (*validateOpGetMedicalScribeStream) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetMedicalScribeStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetMedicalScribeStreamInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetMedicalScribeStreamInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartCallAnalyticsStreamTranscription struct { } @@ -30,6 +50,26 @@ func (m *validateOpStartCallAnalyticsStreamTranscription) HandleInitialize(ctx c return next.HandleInitialize(ctx, in) } +type validateOpStartMedicalScribeStream struct { +} + +func (*validateOpStartMedicalScribeStream) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartMedicalScribeStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartMedicalScribeStreamInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartMedicalScribeStreamInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartMedicalStreamTranscription struct { } @@ -70,10 +110,18 @@ func (m *validateOpStartStreamTranscription) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +func addOpGetMedicalScribeStreamValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetMedicalScribeStream{}, middleware.After) +} + func addOpStartCallAnalyticsStreamTranscriptionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartCallAnalyticsStreamTranscription{}, middleware.After) } +func addOpStartMedicalScribeStreamValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartMedicalScribeStream{}, middleware.After) +} + func addOpStartMedicalStreamTranscriptionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartMedicalStreamTranscription{}, middleware.After) } @@ -133,6 +181,21 @@ func validateChannelDefinitions(v []types.ChannelDefinition) error { } } +func validateClinicalNoteGenerationSettings(v *types.ClinicalNoteGenerationSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ClinicalNoteGenerationSettings"} + if v.OutputBucketName == nil { + invalidParams.Add(smithy.NewErrParamRequired("OutputBucketName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateConfigurationEvent(v *types.ConfigurationEvent) error { if v == nil { return nil @@ -155,6 +218,163 @@ func validateConfigurationEvent(v *types.ConfigurationEvent) error { } } +func validateMedicalScribeAudioEvent(v *types.MedicalScribeAudioEvent) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MedicalScribeAudioEvent"} + if v.AudioChunk == nil { + invalidParams.Add(smithy.NewErrParamRequired("AudioChunk")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMedicalScribeChannelDefinition(v *types.MedicalScribeChannelDefinition) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MedicalScribeChannelDefinition"} + if len(v.ParticipantRole) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ParticipantRole")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMedicalScribeChannelDefinitions(v []types.MedicalScribeChannelDefinition) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MedicalScribeChannelDefinitions"} + for i := range v { + if err := validateMedicalScribeChannelDefinition(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMedicalScribeConfigurationEvent(v *types.MedicalScribeConfigurationEvent) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MedicalScribeConfigurationEvent"} + if v.ResourceAccessRoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceAccessRoleArn")) + } + if v.ChannelDefinitions != nil { + if err := validateMedicalScribeChannelDefinitions(v.ChannelDefinitions); err != nil { + invalidParams.AddNested("ChannelDefinitions", err.(smithy.InvalidParamsError)) + } + } + if v.EncryptionSettings != nil { + if err := validateMedicalScribeEncryptionSettings(v.EncryptionSettings); err != nil { + invalidParams.AddNested("EncryptionSettings", err.(smithy.InvalidParamsError)) + } + } + if v.PostStreamAnalyticsSettings == nil { + invalidParams.Add(smithy.NewErrParamRequired("PostStreamAnalyticsSettings")) + } else if v.PostStreamAnalyticsSettings != nil { + if err := validateMedicalScribePostStreamAnalyticsSettings(v.PostStreamAnalyticsSettings); err != nil { + invalidParams.AddNested("PostStreamAnalyticsSettings", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMedicalScribeEncryptionSettings(v *types.MedicalScribeEncryptionSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MedicalScribeEncryptionSettings"} + if v.KmsKeyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("KmsKeyId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMedicalScribeInputStream(v types.MedicalScribeInputStream) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MedicalScribeInputStream"} + switch uv := v.(type) { + case *types.MedicalScribeInputStreamMemberAudioEvent: + if err := validateMedicalScribeAudioEvent(&uv.Value); err != nil { + invalidParams.AddNested("[AudioEvent]", err.(smithy.InvalidParamsError)) + } + + case *types.MedicalScribeInputStreamMemberConfigurationEvent: + if err := validateMedicalScribeConfigurationEvent(&uv.Value); err != nil { + invalidParams.AddNested("[ConfigurationEvent]", err.(smithy.InvalidParamsError)) + } + + case *types.MedicalScribeInputStreamMemberSessionControlEvent: + if err := validateMedicalScribeSessionControlEvent(&uv.Value); err != nil { + invalidParams.AddNested("[SessionControlEvent]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMedicalScribePostStreamAnalyticsSettings(v *types.MedicalScribePostStreamAnalyticsSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MedicalScribePostStreamAnalyticsSettings"} + if v.ClinicalNoteGenerationSettings == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClinicalNoteGenerationSettings")) + } else if v.ClinicalNoteGenerationSettings != nil { + if err := validateClinicalNoteGenerationSettings(v.ClinicalNoteGenerationSettings); err != nil { + invalidParams.AddNested("ClinicalNoteGenerationSettings", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMedicalScribeSessionControlEvent(v *types.MedicalScribeSessionControlEvent) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MedicalScribeSessionControlEvent"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validatePostCallAnalyticsSettings(v *types.PostCallAnalyticsSettings) error { if v == nil { return nil @@ -173,6 +393,21 @@ func validatePostCallAnalyticsSettings(v *types.PostCallAnalyticsSettings) error } } +func validateOpGetMedicalScribeStreamInput(v *GetMedicalScribeStreamInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetMedicalScribeStreamInput"} + if v.SessionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SessionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartCallAnalyticsStreamTranscriptionInput(v *StartCallAnalyticsStreamTranscriptionInput) error { if v == nil { return nil @@ -194,6 +429,27 @@ func validateOpStartCallAnalyticsStreamTranscriptionInput(v *StartCallAnalyticsS } } +func validateOpStartMedicalScribeStreamInput(v *StartMedicalScribeStreamInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartMedicalScribeStreamInput"} + if len(v.LanguageCode) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("LanguageCode")) + } + if v.MediaSampleRateHertz == nil { + invalidParams.Add(smithy.NewErrParamRequired("MediaSampleRateHertz")) + } + if len(v.MediaEncoding) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("MediaEncoding")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartMedicalStreamTranscriptionInput(v *StartMedicalStreamTranscriptionInput) error { if v == nil { return nil