From ac9e9a5ccf764c44da10066938d3a43fc6656b6e Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Tue, 29 Aug 2023 18:20:43 +0000 Subject: [PATCH] Regenerated Clients --- .../11cf74ec11a2483bbf6b239f1ee6cfdd.json | 8 + .../25989c4a2f574c12963051c1e5f5e7bb.json | 8 + .../7cbc3cf503ec40378dc967f37c8723c6.json | 8 + .../809b4f8c317a400a8b56b3fa778aa846.json | 8 + .../api_op_AdminUpdateUserAttributes.go | 16 +- .../api_op_AssociateSoftwareToken.go | 8 - .../api_op_ConfirmDevice.go | 8 - .../api_op_ForgetDevice.go | 8 - .../api_op_GetDevice.go | 8 - .../api_op_GlobalSignOut.go | 8 - .../api_op_ListDevices.go | 8 - .../api_op_RevokeToken.go | 8 - .../api_op_SetUserMFAPreference.go | 8 - .../api_op_UpdateAuthEventFeedback.go | 8 - .../api_op_UpdateDeviceStatus.go | 8 - .../api_op_VerifySoftwareToken.go | 8 - .../cognitoidentityprovider/types/types.go | 7 +- .../api_op_CreateDataRepositoryAssociation.go | 4 +- .../fsx/api_op_CreateDataRepositoryTask.go | 12 +- service/fsx/api_op_CreateFileSystem.go | 6 +- .../fsx/api_op_CreateFileSystemFromBackup.go | 4 +- .../api_op_DeleteDataRepositoryAssociation.go | 2 +- service/fsx/api_op_DeleteFileSystem.go | 20 +- ...i_op_DescribeDataRepositoryAssociations.go | 2 +- .../api_op_UpdateDataRepositoryAssociation.go | 2 +- service/fsx/api_op_UpdateFileSystem.go | 2 + service/fsx/types/types.go | 95 +- service/omics/api_op_GetRun.go | 3 + service/omics/api_op_StartRun.go | 13 +- service/omics/deserializers.go | 9 + service/omics/serializers.go | 5 + service/omics/types/enums.go | 18 + service/sesv2/api_op_CancelExportJob.go | 259 ++ service/sesv2/api_op_CreateExportJob.go | 271 ++ service/sesv2/api_op_GetExportJob.go | 290 ++ service/sesv2/api_op_GetMessageInsights.go | 280 ++ service/sesv2/api_op_ListExportJobs.go | 370 ++ service/sesv2/deserializers.go | 3205 ++++++++++++++--- service/sesv2/generated.json | 5 + service/sesv2/serializers.go | 666 +++- service/sesv2/types/enums.go | 102 + service/sesv2/types/types.go | 313 +- service/sesv2/validators.go | 249 ++ 43 files changed, 5599 insertions(+), 751 deletions(-) create mode 100644 .changelog/11cf74ec11a2483bbf6b239f1ee6cfdd.json create mode 100644 .changelog/25989c4a2f574c12963051c1e5f5e7bb.json create mode 100644 .changelog/7cbc3cf503ec40378dc967f37c8723c6.json create mode 100644 .changelog/809b4f8c317a400a8b56b3fa778aa846.json create mode 100644 service/sesv2/api_op_CancelExportJob.go create mode 100644 service/sesv2/api_op_CreateExportJob.go create mode 100644 service/sesv2/api_op_GetExportJob.go create mode 100644 service/sesv2/api_op_GetMessageInsights.go create mode 100644 service/sesv2/api_op_ListExportJobs.go diff --git a/.changelog/11cf74ec11a2483bbf6b239f1ee6cfdd.json b/.changelog/11cf74ec11a2483bbf6b239f1ee6cfdd.json new file mode 100644 index 00000000000..521c6026b30 --- /dev/null +++ b/.changelog/11cf74ec11a2483bbf6b239f1ee6cfdd.json @@ -0,0 +1,8 @@ +{ + "id": "11cf74ec-11a2-483b-bf6b-239f1ee6cfdd", + "type": "documentation", + "description": "Documentation updates for project quotas.", + "modules": [ + "service/fsx" + ] +} \ No newline at end of file diff --git a/.changelog/25989c4a2f574c12963051c1e5f5e7bb.json b/.changelog/25989c4a2f574c12963051c1e5f5e7bb.json new file mode 100644 index 00000000000..5300112157a --- /dev/null +++ b/.changelog/25989c4a2f574c12963051c1e5f5e7bb.json @@ -0,0 +1,8 @@ +{ + "id": "25989c4a-2f57-4c12-9630-51c1e5f5e7bb", + "type": "feature", + "description": "Adds support for the new Export and Message Insights features: create, get, list and cancel export jobs; get message insights.", + "modules": [ + "service/sesv2" + ] +} \ No newline at end of file diff --git a/.changelog/7cbc3cf503ec40378dc967f37c8723c6.json b/.changelog/7cbc3cf503ec40378dc967f37c8723c6.json new file mode 100644 index 00000000000..bf72257156d --- /dev/null +++ b/.changelog/7cbc3cf503ec40378dc967f37c8723c6.json @@ -0,0 +1,8 @@ +{ + "id": "7cbc3cf5-03ec-4037-8dc9-67f37c8723c6", + "type": "feature", + "description": "Added API example requests and responses for several operations. Fixed the validation regex for user pools Identity Provider name.", + "modules": [ + "service/cognitoidentityprovider" + ] +} \ No newline at end of file diff --git a/.changelog/809b4f8c317a400a8b56b3fa778aa846.json b/.changelog/809b4f8c317a400a8b56b3fa778aa846.json new file mode 100644 index 00000000000..5a1683812f4 --- /dev/null +++ b/.changelog/809b4f8c317a400a8b56b3fa778aa846.json @@ -0,0 +1,8 @@ +{ + "id": "809b4f8c-317a-400a-8b56-b3fa778aa846", + "type": "feature", + "description": "Add RetentionMode support for Runs.", + "modules": [ + "service/omics" + ] +} \ No newline at end of file diff --git a/service/cognitoidentityprovider/api_op_AdminUpdateUserAttributes.go b/service/cognitoidentityprovider/api_op_AdminUpdateUserAttributes.go index bc49f6fef05..c05da04f42f 100644 --- a/service/cognitoidentityprovider/api_op_AdminUpdateUserAttributes.go +++ b/service/cognitoidentityprovider/api_op_AdminUpdateUserAttributes.go @@ -30,13 +30,15 @@ import ( // production. For more information, see SMS message settings for Amazon Cognito // user pools (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-sms-settings.html) // in the Amazon Cognito Developer Guide. Updates the specified user's attributes, -// including developer attributes, as an administrator. Works on any user. For -// custom attributes, you must prepend the custom: prefix to the attribute name. -// In addition to updating user attributes, this API can also be used to mark phone -// and email as verified. Amazon Cognito evaluates Identity and Access Management -// (IAM) policies in requests for this API operation. For this operation, you must -// use IAM credentials to authorize requests, and you must grant yourself the -// corresponding IAM permission in a policy. Learn more +// including developer attributes, as an administrator. Works on any user. To +// delete an attribute from your user, submit the attribute in your API request +// with a blank value. For custom attributes, you must prepend the custom: prefix +// to the attribute name. In addition to updating user attributes, this API can +// also be used to mark phone and email as verified. Amazon Cognito evaluates +// Identity and Access Management (IAM) policies in requests for this API +// operation. For this operation, you must use IAM credentials to authorize +// requests, and you must grant yourself the corresponding IAM permission in a +// policy. Learn more // - Signing Amazon Web Services API Requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-signing.html) // - Using the Amazon Cognito user pools API and user pool endpoints (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html) func (c *Client) AdminUpdateUserAttributes(ctx context.Context, params *AdminUpdateUserAttributesInput, optFns ...func(*Options)) (*AdminUpdateUserAttributesOutput, error) { diff --git a/service/cognitoidentityprovider/api_op_AssociateSoftwareToken.go b/service/cognitoidentityprovider/api_op_AssociateSoftwareToken.go index b9a43965a24..94f19fc0cb6 100644 --- a/service/cognitoidentityprovider/api_op_AssociateSoftwareToken.go +++ b/service/cognitoidentityprovider/api_op_AssociateSoftwareToken.go @@ -8,7 +8,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" @@ -105,15 +104,9 @@ func (c *Client) addOperationAssociateSoftwareTokenMiddlewares(stack *middleware if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { - return err - } if err = addRetryMiddlewares(stack, options); err != nil { return err } - if err = addHTTPSignerV4Middleware(stack, options); err != nil { - return err - } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } @@ -157,7 +150,6 @@ func newServiceMetadataMiddleware_opAssociateSoftwareToken(region string) *awsmi return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, - SigningName: "cognito-idp", OperationName: "AssociateSoftwareToken", } } diff --git a/service/cognitoidentityprovider/api_op_ConfirmDevice.go b/service/cognitoidentityprovider/api_op_ConfirmDevice.go index 2a99e8bb72b..3ed527874b7 100644 --- a/service/cognitoidentityprovider/api_op_ConfirmDevice.go +++ b/service/cognitoidentityprovider/api_op_ConfirmDevice.go @@ -8,7 +8,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/types" smithyendpoints "github.com/aws/smithy-go/endpoints" @@ -97,15 +96,9 @@ func (c *Client) addOperationConfirmDeviceMiddlewares(stack *middleware.Stack, o if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { - return err - } if err = addRetryMiddlewares(stack, options); err != nil { return err } - if err = addHTTPSignerV4Middleware(stack, options); err != nil { - return err - } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } @@ -152,7 +145,6 @@ func newServiceMetadataMiddleware_opConfirmDevice(region string) *awsmiddleware. return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, - SigningName: "cognito-idp", OperationName: "ConfirmDevice", } } diff --git a/service/cognitoidentityprovider/api_op_ForgetDevice.go b/service/cognitoidentityprovider/api_op_ForgetDevice.go index 683dc1a1fcf..2b6f7d2d6fe 100644 --- a/service/cognitoidentityprovider/api_op_ForgetDevice.go +++ b/service/cognitoidentityprovider/api_op_ForgetDevice.go @@ -8,7 +8,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" @@ -82,15 +81,9 @@ func (c *Client) addOperationForgetDeviceMiddlewares(stack *middleware.Stack, op if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { - return err - } if err = addRetryMiddlewares(stack, options); err != nil { return err } - if err = addHTTPSignerV4Middleware(stack, options); err != nil { - return err - } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } @@ -137,7 +130,6 @@ func newServiceMetadataMiddleware_opForgetDevice(region string) *awsmiddleware.R return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, - SigningName: "cognito-idp", OperationName: "ForgetDevice", } } diff --git a/service/cognitoidentityprovider/api_op_GetDevice.go b/service/cognitoidentityprovider/api_op_GetDevice.go index 1458c696f61..6348dc167be 100644 --- a/service/cognitoidentityprovider/api_op_GetDevice.go +++ b/service/cognitoidentityprovider/api_op_GetDevice.go @@ -8,7 +8,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/types" smithyendpoints "github.com/aws/smithy-go/endpoints" @@ -90,15 +89,9 @@ func (c *Client) addOperationGetDeviceMiddlewares(stack *middleware.Stack, optio if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { - return err - } if err = addRetryMiddlewares(stack, options); err != nil { return err } - if err = addHTTPSignerV4Middleware(stack, options); err != nil { - return err - } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } @@ -145,7 +138,6 @@ func newServiceMetadataMiddleware_opGetDevice(region string) *awsmiddleware.Regi return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, - SigningName: "cognito-idp", OperationName: "GetDevice", } } diff --git a/service/cognitoidentityprovider/api_op_GlobalSignOut.go b/service/cognitoidentityprovider/api_op_GlobalSignOut.go index b310ec2cf74..5f1d9fff655 100644 --- a/service/cognitoidentityprovider/api_op_GlobalSignOut.go +++ b/service/cognitoidentityprovider/api_op_GlobalSignOut.go @@ -8,7 +8,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" @@ -87,15 +86,9 @@ func (c *Client) addOperationGlobalSignOutMiddlewares(stack *middleware.Stack, o if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { - return err - } if err = addRetryMiddlewares(stack, options); err != nil { return err } - if err = addHTTPSignerV4Middleware(stack, options); err != nil { - return err - } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } @@ -142,7 +135,6 @@ func newServiceMetadataMiddleware_opGlobalSignOut(region string) *awsmiddleware. return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, - SigningName: "cognito-idp", OperationName: "GlobalSignOut", } } diff --git a/service/cognitoidentityprovider/api_op_ListDevices.go b/service/cognitoidentityprovider/api_op_ListDevices.go index 30aee8ad894..2038e2bcfcc 100644 --- a/service/cognitoidentityprovider/api_op_ListDevices.go +++ b/service/cognitoidentityprovider/api_op_ListDevices.go @@ -8,7 +8,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/types" smithyendpoints "github.com/aws/smithy-go/endpoints" @@ -95,15 +94,9 @@ func (c *Client) addOperationListDevicesMiddlewares(stack *middleware.Stack, opt if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { - return err - } if err = addRetryMiddlewares(stack, options); err != nil { return err } - if err = addHTTPSignerV4Middleware(stack, options); err != nil { - return err - } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } @@ -150,7 +143,6 @@ func newServiceMetadataMiddleware_opListDevices(region string) *awsmiddleware.Re return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, - SigningName: "cognito-idp", OperationName: "ListDevices", } } diff --git a/service/cognitoidentityprovider/api_op_RevokeToken.go b/service/cognitoidentityprovider/api_op_RevokeToken.go index 9a0cf303bfd..245d51a36b7 100644 --- a/service/cognitoidentityprovider/api_op_RevokeToken.go +++ b/service/cognitoidentityprovider/api_op_RevokeToken.go @@ -8,7 +8,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" @@ -89,15 +88,9 @@ func (c *Client) addOperationRevokeTokenMiddlewares(stack *middleware.Stack, opt if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { - return err - } if err = addRetryMiddlewares(stack, options); err != nil { return err } - if err = addHTTPSignerV4Middleware(stack, options); err != nil { - return err - } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } @@ -144,7 +137,6 @@ func newServiceMetadataMiddleware_opRevokeToken(region string) *awsmiddleware.Re return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, - SigningName: "cognito-idp", OperationName: "RevokeToken", } } diff --git a/service/cognitoidentityprovider/api_op_SetUserMFAPreference.go b/service/cognitoidentityprovider/api_op_SetUserMFAPreference.go index fc183d2d765..da007eda81b 100644 --- a/service/cognitoidentityprovider/api_op_SetUserMFAPreference.go +++ b/service/cognitoidentityprovider/api_op_SetUserMFAPreference.go @@ -8,7 +8,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/types" smithyendpoints "github.com/aws/smithy-go/endpoints" @@ -95,15 +94,9 @@ func (c *Client) addOperationSetUserMFAPreferenceMiddlewares(stack *middleware.S if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { - return err - } if err = addRetryMiddlewares(stack, options); err != nil { return err } - if err = addHTTPSignerV4Middleware(stack, options); err != nil { - return err - } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } @@ -150,7 +143,6 @@ func newServiceMetadataMiddleware_opSetUserMFAPreference(region string) *awsmidd return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, - SigningName: "cognito-idp", OperationName: "SetUserMFAPreference", } } diff --git a/service/cognitoidentityprovider/api_op_UpdateAuthEventFeedback.go b/service/cognitoidentityprovider/api_op_UpdateAuthEventFeedback.go index 4b62716a7ca..1b37564b30d 100644 --- a/service/cognitoidentityprovider/api_op_UpdateAuthEventFeedback.go +++ b/service/cognitoidentityprovider/api_op_UpdateAuthEventFeedback.go @@ -8,7 +8,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/types" smithyendpoints "github.com/aws/smithy-go/endpoints" @@ -105,15 +104,9 @@ func (c *Client) addOperationUpdateAuthEventFeedbackMiddlewares(stack *middlewar if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { - return err - } if err = addRetryMiddlewares(stack, options); err != nil { return err } - if err = addHTTPSignerV4Middleware(stack, options); err != nil { - return err - } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } @@ -160,7 +153,6 @@ func newServiceMetadataMiddleware_opUpdateAuthEventFeedback(region string) *awsm return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, - SigningName: "cognito-idp", OperationName: "UpdateAuthEventFeedback", } } diff --git a/service/cognitoidentityprovider/api_op_UpdateDeviceStatus.go b/service/cognitoidentityprovider/api_op_UpdateDeviceStatus.go index 178019d5f5b..258a49a6281 100644 --- a/service/cognitoidentityprovider/api_op_UpdateDeviceStatus.go +++ b/service/cognitoidentityprovider/api_op_UpdateDeviceStatus.go @@ -8,7 +8,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/types" smithyendpoints "github.com/aws/smithy-go/endpoints" @@ -89,15 +88,9 @@ func (c *Client) addOperationUpdateDeviceStatusMiddlewares(stack *middleware.Sta if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { - return err - } if err = addRetryMiddlewares(stack, options); err != nil { return err } - if err = addHTTPSignerV4Middleware(stack, options); err != nil { - return err - } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } @@ -144,7 +137,6 @@ func newServiceMetadataMiddleware_opUpdateDeviceStatus(region string) *awsmiddle return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, - SigningName: "cognito-idp", OperationName: "UpdateDeviceStatus", } } diff --git a/service/cognitoidentityprovider/api_op_VerifySoftwareToken.go b/service/cognitoidentityprovider/api_op_VerifySoftwareToken.go index 44a6ae4ad2e..bd175548eab 100644 --- a/service/cognitoidentityprovider/api_op_VerifySoftwareToken.go +++ b/service/cognitoidentityprovider/api_op_VerifySoftwareToken.go @@ -8,7 +8,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/types" smithyendpoints "github.com/aws/smithy-go/endpoints" @@ -102,15 +101,9 @@ func (c *Client) addOperationVerifySoftwareTokenMiddlewares(stack *middleware.St if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { - return err - } if err = addRetryMiddlewares(stack, options); err != nil { return err } - if err = addHTTPSignerV4Middleware(stack, options); err != nil { - return err - } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } @@ -157,7 +150,6 @@ func newServiceMetadataMiddleware_opVerifySoftwareToken(region string) *awsmiddl return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, - SigningName: "cognito-idp", OperationName: "VerifySoftwareToken", } } diff --git a/service/cognitoidentityprovider/types/types.go b/service/cognitoidentityprovider/types/types.go index 981ca3d1961..3033b6e1ef1 100644 --- a/service/cognitoidentityprovider/types/types.go +++ b/service/cognitoidentityprovider/types/types.go @@ -228,7 +228,12 @@ type CloudWatchLogsConfigurationType struct { // The Amazon Resource Name (arn) of a CloudWatch Logs log group where your user // pool sends logs. The log group must not be encrypted with Key Management Service - // and must be in the same Amazon Web Services account as your user pool. + // and must be in the same Amazon Web Services account as your user pool. To send + // logs to log groups with a resource policy of a size greater than 5120 + // characters, configure a log group with a path that starts with /aws/vendedlogs . + // For more information, see Enabling logging from certain Amazon Web Services + // services (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html) + // . LogGroupArn *string noSmithyDocumentSerde diff --git a/service/fsx/api_op_CreateDataRepositoryAssociation.go b/service/fsx/api_op_CreateDataRepositoryAssociation.go index db15f045b59..0708ef761f4 100644 --- a/service/fsx/api_op_CreateDataRepositoryAssociation.go +++ b/service/fsx/api_op_CreateDataRepositoryAssociation.go @@ -20,8 +20,8 @@ import ( // repository association is a link between a directory on the file system and an // Amazon S3 bucket or prefix. You can have a maximum of 8 data repository // associations on a file system. Data repository associations are supported on all -// FSx for Lustre 2.12 and newer file systems, excluding scratch_1 deployment -// type. Each data repository association must have a unique Amazon FSx file system +// FSx for Lustre 2.12 and 2.15 file systems, excluding scratch_1 deployment type. +// Each data repository association must have a unique Amazon FSx file system // directory and a unique S3 bucket or prefix associated with it. You can configure // a data repository association for automatic import only, for automatic export // only, or for both. To learn more about linking a data repository to your file diff --git a/service/fsx/api_op_CreateDataRepositoryTask.go b/service/fsx/api_op_CreateDataRepositoryTask.go index 26a1cedd2a9..6d973d0ad72 100644 --- a/service/fsx/api_op_CreateDataRepositoryTask.go +++ b/service/fsx/api_op_CreateDataRepositoryTask.go @@ -24,7 +24,7 @@ import ( // and metadata changes, including POSIX metadata, to files, directories, and // symbolic links (symlinks) from your FSx file system to a linked data repository. // You use release data repository tasks to release data from your file system for -// files that are archived to S3. The metadata of released files remains on the +// files that are exported to S3. The metadata of released files remains on the // file system so users or applications can still access released files by reading // the files again, which will restore data from Amazon S3 to the FSx for Lustre // file system. To learn more about data repository tasks, see Data Repository @@ -69,8 +69,8 @@ type CreateDataRepositoryTaskInput struct { // - IMPORT_METADATA_FROM_REPOSITORY tasks import metadata changes from a linked // S3 bucket to your Amazon FSx for Lustre file system. // - RELEASE_DATA_FROM_FILESYSTEM tasks release files in your Amazon FSx for - // Lustre file system that are archived and that meet your specified release - // criteria. + // Lustre file system that have been exported to a linked S3 bucket and that meet + // your specified release criteria. // - AUTO_RELEASE_DATA tasks automatically release files from an Amazon File // Cache resource. // @@ -89,7 +89,7 @@ type CreateDataRepositoryTaskInput struct { // A list of paths for the data repository task to use when the task is processed. // If a path that you provide isn't valid, the task fails. If you don't provide // paths, the default behavior is to export all files to S3 (for export tasks), - // import all files from S3 (for import tasks), or release all archived files that + // import all files from S3 (for import tasks), or release all exported files that // meet the last accessed time criteria (for release tasks). // - For export tasks, the list contains paths on the FSx for Lustre file system // from which the files are exported to the Amazon S3 bucket. The default path is @@ -102,9 +102,9 @@ type CreateDataRepositoryTaskInput struct { // path can be an S3 bucket or prefix in the format s3://myBucket/myPrefix (where // myPrefix is optional). // - For release tasks, the list contains directory or file paths on the FSx for - // Lustre file system from which to release archived files. If a directory is + // Lustre file system from which to release exported files. If a directory is // specified, files within the directory are released. If a file path is specified, - // only that file is released. To release all archived files in the file system, + // only that file is released. To release all exported files in the file system, // specify a forward slash (/) as the path. A file must also meet the last accessed // time criteria specified in for the file to be released. Paths []string diff --git a/service/fsx/api_op_CreateFileSystem.go b/service/fsx/api_op_CreateFileSystem.go index 8bb2e478abe..d961b0e8de8 100644 --- a/service/fsx/api_op_CreateFileSystem.go +++ b/service/fsx/api_op_CreateFileSystem.go @@ -116,10 +116,10 @@ type CreateFileSystemInput struct { ClientRequestToken *string // (Optional) For FSx for Lustre file systems, sets the Lustre version for the - // file system that you're creating. Valid values are 2.10 and 2.12 : + // file system that you're creating. Valid values are 2.10 , 2.12 m and 2.15 : // - 2.10 is supported by the Scratch and Persistent_1 Lustre deployment types. - // - 2.12 is supported by all Lustre deployment types. 2.12 is required when - // setting FSx for Lustre DeploymentType to PERSISTENT_2 . + // - 2.12 and 2.15 are supported by all Lustre deployment types. 2.12 or 2.15 is + // required when setting FSx for Lustre DeploymentType to PERSISTENT_2 . // Default value = 2.10 , except when DeploymentType is set to PERSISTENT_2 , then // the default is 2.12 . If you set FileSystemTypeVersion to 2.10 for a // PERSISTENT_2 Lustre deployment type, the CreateFileSystem operation fails. diff --git a/service/fsx/api_op_CreateFileSystemFromBackup.go b/service/fsx/api_op_CreateFileSystemFromBackup.go index 356545a6eda..33e7772451d 100644 --- a/service/fsx/api_op_CreateFileSystemFromBackup.go +++ b/service/fsx/api_op_CreateFileSystemFromBackup.go @@ -81,8 +81,8 @@ type CreateFileSystemFromBackupInput struct { ClientRequestToken *string // Sets the version for the Amazon FSx for Lustre file system that you're creating - // from a backup. Valid values are 2.10 and 2.12 . You don't need to specify - // FileSystemTypeVersion because it will be applied using the backup's + // from a backup. Valid values are 2.10 , 2.12 , and 2.15 . You don't need to + // specify FileSystemTypeVersion because it will be applied using the backup's // FileSystemTypeVersion setting. If you choose to specify FileSystemTypeVersion // when creating from backup, the value must match the backup's // FileSystemTypeVersion setting. diff --git a/service/fsx/api_op_DeleteDataRepositoryAssociation.go b/service/fsx/api_op_DeleteDataRepositoryAssociation.go index ddb74c526b8..20bc4cdeb46 100644 --- a/service/fsx/api_op_DeleteDataRepositoryAssociation.go +++ b/service/fsx/api_op_DeleteDataRepositoryAssociation.go @@ -21,7 +21,7 @@ import ( // S3 bucket. When deleting a data repository association, you have the option of // deleting the data in the file system that corresponds to the data repository // association. Data repository associations are supported on all FSx for Lustre -// 2.12 and newer file systems, excluding scratch_1 deployment type. +// 2.12 and 2.15 file systems, excluding scratch_1 deployment type. func (c *Client) DeleteDataRepositoryAssociation(ctx context.Context, params *DeleteDataRepositoryAssociationInput, optFns ...func(*Options)) (*DeleteDataRepositoryAssociationOutput, error) { if params == nil { params = &DeleteDataRepositoryAssociationInput{} diff --git a/service/fsx/api_op_DeleteFileSystem.go b/service/fsx/api_op_DeleteFileSystem.go index 767bccba5b9..21b03909f77 100644 --- a/service/fsx/api_op_DeleteFileSystem.go +++ b/service/fsx/api_op_DeleteFileSystem.go @@ -23,9 +23,23 @@ import ( // FileSystemId value to the DeleFileSystem operation. By default, when you delete // an Amazon FSx for Windows File Server file system, a final backup is created // upon deletion. This final backup isn't subject to the file system's retention -// policy, and must be manually deleted. The DeleteFileSystem operation returns -// while the file system has the DELETING status. You can check the file system -// deletion status by calling the DescribeFileSystems (https://docs.aws.amazon.com/fsx/latest/APIReference/API_DescribeFileSystems.html) +// policy, and must be manually deleted. To delete an Amazon FSx for Lustre file +// system, first unmount (https://docs.aws.amazon.com/fsx/latest/LustreGuide/unmounting-fs.html) +// it from every connected Amazon EC2 instance, then provide a FileSystemId value +// to the DeleFileSystem operation. By default, Amazon FSx will not take a final +// backup when the DeleteFileSystem operation is invoked. On file systems not +// linked to an Amazon S3 bucket, set SkipFinalBackup to false to take a final +// backup of the file system you are deleting. Backups cannot be enabled on +// S3-linked file systems. To ensure all of your data is written back to S3 before +// deleting your file system, you can either monitor for the +// AgeOfOldestQueuedMessage (https://docs.aws.amazon.com/fsx/latest/LustreGuide/monitoring-cloudwatch.html#auto-import-export-metrics) +// metric to be zero (if using automatic export) or you can run an export data +// repository task (https://docs.aws.amazon.com/fsx/latest/LustreGuide/export-data-repo-task-dra.html) +// . If you have automatic export enabled and want to use an export data repository +// task, you have to disable automatic export before executing the export data +// repository task. The DeleteFileSystem operation returns while the file system +// has the DELETING status. You can check the file system deletion status by +// calling the DescribeFileSystems (https://docs.aws.amazon.com/fsx/latest/APIReference/API_DescribeFileSystems.html) // operation, which returns a list of file systems in your account. If you pass the // file system ID for a deleted file system, the DescribeFileSystems operation // returns a FileSystemNotFound error. If a data repository task is in a PENDING diff --git a/service/fsx/api_op_DescribeDataRepositoryAssociations.go b/service/fsx/api_op_DescribeDataRepositoryAssociations.go index d4dd2f8def5..cbba39efd77 100644 --- a/service/fsx/api_op_DescribeDataRepositoryAssociations.go +++ b/service/fsx/api_op_DescribeDataRepositoryAssociations.go @@ -20,7 +20,7 @@ import ( // data repository associations, if one or more AssociationIds values are provided // in the request, or if filters are used in the request. Data repository // associations are supported on Amazon File Cache resources and all FSx for Lustre -// 2.12 and newer file systems, excluding scratch_1 deployment type. You can use +// 2.12 and 2,15 file systems, excluding scratch_1 deployment type. You can use // filters to narrow the response to include just data repository associations for // specific file systems (use the file-system-id filter with the ID of the file // system) or caches (use the file-cache-id filter with the ID of the cache), or diff --git a/service/fsx/api_op_UpdateDataRepositoryAssociation.go b/service/fsx/api_op_UpdateDataRepositoryAssociation.go index 2763b7576f0..d1759db229b 100644 --- a/service/fsx/api_op_UpdateDataRepositoryAssociation.go +++ b/service/fsx/api_op_UpdateDataRepositoryAssociation.go @@ -18,7 +18,7 @@ import ( // Updates the configuration of an existing data repository association on an // Amazon FSx for Lustre file system. Data repository associations are supported on -// all FSx for Lustre 2.12 and newer file systems, excluding scratch_1 deployment +// all FSx for Lustre 2.12 and 2.15 file systems, excluding scratch_1 deployment // type. func (c *Client) UpdateDataRepositoryAssociation(ctx context.Context, params *UpdateDataRepositoryAssociationInput, optFns ...func(*Options)) (*UpdateDataRepositoryAssociationOutput, error) { if params == nil { diff --git a/service/fsx/api_op_UpdateFileSystem.go b/service/fsx/api_op_UpdateFileSystem.go index e3f7d028178..b4812bf7fc2 100644 --- a/service/fsx/api_op_UpdateFileSystem.go +++ b/service/fsx/api_op_UpdateFileSystem.go @@ -51,11 +51,13 @@ import ( // - WeeklyMaintenanceStartTime // // For FSx for OpenZFS file systems, you can update the following properties: +// - AddRouteTableIds // - AutomaticBackupRetentionDays // - CopyTagsToBackups // - CopyTagsToVolumes // - DailyAutomaticBackupStartTime // - DiskIopsConfiguration +// - RemoveRouteTableIds // - StorageCapacity // - ThroughputCapacity // - WeeklyMaintenanceStartTime diff --git a/service/fsx/types/types.go b/service/fsx/types/types.go index 59cb83a7812..ae9945a6efa 100644 --- a/service/fsx/types/types.go +++ b/service/fsx/types/types.go @@ -612,10 +612,11 @@ type CreateFileSystemOntapConfiguration struct { // which you want the preferred file server to be located. PreferredSubnetId *string - // (Multi-AZ only) Specifies the virtual private cloud (VPC) route tables in which - // your file system's endpoints will be created. You should specify all VPC route - // tables associated with the subnets in which your clients are located. By - // default, Amazon FSx selects your VPC's default route table. + // (Multi-AZ only) Specifies the route tables in which Amazon FSx creates the + // rules for routing traffic to the correct file server. You should specify all + // virtual private cloud (VPC) route tables associated with the subnets in which + // your clients are located. By default, Amazon FSx selects your VPC's default + // route table. RouteTableIds []string // A recurring weekly time, in the format D:HH:MM . D is the day of the week, for @@ -637,16 +638,17 @@ type CreateFileSystemOpenZFSConfiguration struct { // Services Region . Valid values are the following: // - MULTI_AZ_1 - Creates file systems with high availability that are configured // for Multi-AZ redundancy to tolerate temporary unavailability in Availability - // Zones (AZs). Multi_AZ_1 is available in the following Amazon Web Services - // Regions: - // - SINGLE_AZ_1 - (Default) Creates file systems with throughput capacities of - // 64 - 4,096 MB/s. Single_AZ_1 is available in all Amazon Web Services Regions - // where Amazon FSx for OpenZFS is available. + // Zones (AZs). Multi_AZ_1 is available only in the US East (N. Virginia), US + // East (Ohio), US West (Oregon), Asia Pacific (Singapore), Asia Pacific (Tokyo), + // and Europe (Ireland) Amazon Web Services Regions. + // - SINGLE_AZ_1 - Creates file systems with throughput capacities of 64 - 4,096 + // MB/s. Single_AZ_1 is available in all Amazon Web Services Regions where Amazon + // FSx for OpenZFS is available. // - SINGLE_AZ_2 - Creates file systems with throughput capacities of 160 - // 10,240 MB/s using an NVMe L2ARC cache. Single_AZ_2 is available only in the US - // East (N. Virginia), US East (Ohio), US West (Oregon), and Europe (Ireland) - // Amazon Web Services Regions. - // For more information, see: Deployment type availability (https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/availability-durability.html#available-aws-regions) + // East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Singapore), + // Asia Pacific (Tokyo), and Europe (Ireland) Amazon Web Services Regions. + // For more information, see Deployment type availability (https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/availability-durability.html#available-aws-regions) // and File system performance (https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/performance.html#zfs-fs-performance) // in the Amazon FSx for OpenZFS User Guide. // @@ -656,10 +658,10 @@ type CreateFileSystemOpenZFSConfiguration struct { // Specifies the throughput of an Amazon FSx for OpenZFS file system, measured in // megabytes per second (MBps). Valid values depend on the DeploymentType you // choose, as follows: + // - For MULTI_AZ_1 and SINGLE_AZ_2 , valid values are 160, 320, 640, 1280, 2560, + // 3840, 5120, 7680, or 10240 MBps. // - For SINGLE_AZ_1 , valid values are 64, 128, 256, 512, 1024, 2048, 3072, or // 4096 MBps. - // - For SINGLE_AZ_2 , valid values are 160, 320, 640, 1280, 2560, 3840, 5120, - // 7680, or 10240 MBps. // You pay for additional throughput capacity that you provision. // // This member is required. @@ -715,10 +717,11 @@ type CreateFileSystemOpenZFSConfiguration struct { // FSx for OpenZFS file system. All volumes are children of the root volume. RootVolumeConfiguration *OpenZFSCreateRootVolumeConfiguration - // (Multi-AZ only) Specifies the virtual private cloud (VPC) route tables in which - // your file system's endpoints will be created. You should specify all VPC route - // tables associated with the subnets in which your clients are located. By - // default, Amazon FSx selects your VPC's default route table. + // (Multi-AZ only) Specifies the route tables in which Amazon FSx creates the + // rules for routing traffic to the correct file server. You should specify all + // virtual private cloud (VPC) route tables associated with the subnets in which + // your clients are located. By default, Amazon FSx selects your VPC's default + // route table. RouteTableIds []string // A recurring weekly time, in the format D:HH:MM . D is the day of the week, for @@ -1122,7 +1125,7 @@ type CreateSvmActiveDirectoryConfiguration struct { // - DescribeDataRepositoryAssociations // // Data repository associations are supported on Amazon File Cache resources and -// all FSx for Lustre 2.12 and newer file systems, excluding scratch_1 deployment +// all FSx for Lustre 2.12 and 2.15 file systems, excluding scratch_1 deployment // type. type DataRepositoryAssociation struct { @@ -1331,8 +1334,8 @@ type DataRepositoryFailureDetails struct { // - You use import and export data repository tasks to perform bulk transfer // operations between an Amazon FSx for Lustre file system and a linked data // repository. -// - You use release data repository tasks to release archived files from your -// Amazon FSx for Lustre file system. +// - You use release data repository tasks to release have been exported to a +// linked S3 bucketed files from your Amazon FSx for Lustre file system. // - An Amazon File Cache resource uses a task to automatically release files // from the cache. // @@ -1375,8 +1378,8 @@ type DataRepositoryTask struct { // - IMPORT_METADATA_FROM_REPOSITORY tasks import metadata changes from a linked // S3 bucket to your Amazon FSx for Lustre file system. // - RELEASE_DATA_FROM_FILESYSTEM tasks release files in your Amazon FSx for - // Lustre file system that are archived and that meet your specified release - // criteria. + // Lustre file system that have been exported to a linked S3 bucket and that meet + // your specified release criteria. // - AUTO_RELEASE_DATA tasks automatically release files from an Amazon File // Cache resource. // @@ -1659,9 +1662,9 @@ type DiskIopsConfiguration struct { } // Defines the minimum amount of time since last access for a file to be eligible -// for release. Only archived files that were last accessed or modified before this -// point-in-time are eligible to be released from the Amazon FSx for Lustre file -// system. +// for release. Only files that have been exported to S3 and that were last +// accessed or modified before this point-in-time are eligible to be released from +// the Amazon FSx for Lustre file system. type DurationSinceLastAccess struct { // The unit of time used by the Value parameter to determine if a file can be @@ -1670,10 +1673,10 @@ type DurationSinceLastAccess struct { Unit Unit // An integer that represents the minimum amount of time (in days) since a file - // was last accessed in the file system. Only archived files with a MAX(atime, + // was last accessed in the file system. Only exported files with a MAX(atime, // ctime, mtime) timestamp that is more than this amount of time in the past // (relative to the task create time) will be released. The default of Value is 0 . - // This is a required parameter. If an archived file meets the last accessed time + // This is a required parameter. If an exported file meets the last accessed time // criteria, its file or directory path must also be specified in the Paths // parameter of the operation in order for the file to be released. Value *int64 @@ -1998,8 +2001,8 @@ type FileSystem struct { // OPENZFS . FileSystemType FileSystemType - // The Lustre version of the Amazon FSx for Lustre file system, either 2.10 or 2.12 - // . + // The Lustre version of the Amazon FSx for Lustre file system, which is 2.10 , + // 2.12 , or 2.15 . FileSystemTypeVersion *string // The ID of the Key Management Service (KMS) key used to encrypt Amazon FSx file @@ -2192,10 +2195,9 @@ type LustreFileSystemConfiguration struct { // provides in-transit encryption of data and higher burst throughput capacity than // SCRATCH_1 . The PERSISTENT_1 and PERSISTENT_2 deployment type is used for // longer-term storage and workloads and encryption of data in transit. - // PERSISTENT_2 is built on Lustre v2.12 and offers higher PerUnitStorageThroughput - // (up to 1000 MB/s/TiB) along with a lower minimum storage capacity requirement - // (600 GiB). To learn more about FSx for Lustre deployment types, see FSx for - // Lustre deployment options (https://docs.aws.amazon.com/fsx/latest/LustreGuide/lustre-deployment-types.html) + // PERSISTENT_2 offers higher PerUnitStorageThroughput (up to 1000 MB/s/TiB) along + // with a lower minimum storage capacity requirement (600 GiB). To learn more about + // FSx for Lustre deployment types, see FSx for Lustre deployment options (https://docs.aws.amazon.com/fsx/latest/LustreGuide/lustre-deployment-types.html) // . The default is SCRATCH_1 . DeploymentType LustreDeploymentType @@ -2794,21 +2796,22 @@ type OpenZFSVolumeConfiguration struct { } // The configuration that specifies a minimum amount of time since last access for -// an archived file to be eligible for release from an Amazon FSx for Lustre file +// an exported file to be eligible for release from an Amazon FSx for Lustre file // system. Only files that were last accessed before this point-in-time can be // released. For example, if you specify a last accessed time criteria of 9 days, // only files that were last accessed 9.00001 or more days ago can be released. -// Only file data that has been archived can be released. Files that have not yet -// been archived, such as new or changed files that have not been exported, are not -// eligible for release. When files are released, their metadata stays on the file -// system, so they can still be accessed later. Users and applications can access a -// released file by reading the file again, which restores data from Amazon S3 to -// the FSx for Lustre file system. If a file meets the last accessed time criteria, -// its file or directory path must also be specified with the Paths parameter of -// the operation in order for the file to be released. +// Only file data that has been exported to S3 can be released. Files that have not +// yet been exported to S3, such as new or changed files that have not been +// exported, are not eligible for release. When files are released, their metadata +// stays on the file system, so they can still be accessed later. Users and +// applications can access a released file by reading the file again, which +// restores data from Amazon S3 to the FSx for Lustre file system. If a file meets +// the last accessed time criteria, its file or directory path must also be +// specified with the Paths parameter of the operation in order for the file to be +// released. type ReleaseConfiguration struct { - // Defines the point-in-time since an archived file was last accessed, in order + // Defines the point-in-time since an exported file was last accessed, in order // for that file to be eligible for release. Only files that were last accessed // before this point-in-time are eligible to be released from the file system. DurationSinceLastAccess *DurationSinceLastAccess @@ -3495,10 +3498,10 @@ type UpdateFileSystemOpenZFSConfiguration struct { // The throughput of an Amazon FSx for OpenZFS file system, measured in megabytes // per second
 (MB/s). Valid values depend on the DeploymentType you choose, as // follows: + // - For MULTI_AZ_1 and SINGLE_AZ_2 , valid values are 160, 320, 640, 1280, 2560, + // 3840, 5120, 7680, or 10240 MBps. // - For SINGLE_AZ_1 , valid values are 64, 128, 256, 512, 1024, 2048, 3072, or // 4096 MB/s. - // - For SINGLE_AZ_2 , valid values are 160, 320, 640, 1280, 2560, 3840, 5120, - // 7680, or 10240 MB/s. ThroughputCapacity *int32 // A recurring weekly time, in the format D:HH:MM . D is the day of the week, for diff --git a/service/omics/api_op_GetRun.go b/service/omics/api_op_GetRun.go index 2307bc703f5..9bd72ad1ed8 100644 --- a/service/omics/api_op_GetRun.go +++ b/service/omics/api_op_GetRun.go @@ -88,6 +88,9 @@ type GetRunOutput struct { // The run's resource digests. ResourceDigests map[string]string + // The run's retention mode. + RetentionMode types.RunRetentionMode + // The run's service role ARN. RoleArn *string diff --git a/service/omics/api_op_StartRun.go b/service/omics/api_op_StartRun.go index 89e51236a04..652a8d0157f 100644 --- a/service/omics/api_op_StartRun.go +++ b/service/omics/api_op_StartRun.go @@ -17,7 +17,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Starts a run. +// Starts a workflow run. To duplicate a run, specify the run's ID and a role ARN. +// The remaining parameters are copied from the previous run. The total number of +// runs in your account is subject to a quota per Region. To avoid needing to +// delete runs manually, you can set the retention mode to REMOVE . Runs with this +// setting are deleted automatically when the run quoata is exceeded. func (c *Client) StartRun(ctx context.Context, params *StartRunInput, optFns ...func(*Options)) (*StartRunOutput, error) { if params == nil { params = &StartRunInput{} @@ -61,10 +65,13 @@ type StartRunInput struct { // A priority for the run. Priority *int32 + // The retention mode for the run. + RetentionMode types.RunRetentionMode + // The run's group ID. RunGroupId *string - // The run's ID. + // The ID of a run to duplicate. RunId *string // A storage capacity for the run in gigabytes. @@ -76,7 +83,7 @@ type StartRunInput struct { // The run's workflow ID. WorkflowId *string - // The run's workflows type. + // The run's workflow type. WorkflowType types.WorkflowType noSmithyDocumentSerde diff --git a/service/omics/deserializers.go b/service/omics/deserializers.go index 61a2f62e64a..554ecf2e9cf 100644 --- a/service/omics/deserializers.go +++ b/service/omics/deserializers.go @@ -7145,6 +7145,15 @@ func awsRestjson1_deserializeOpDocumentGetRunOutput(v **GetRunOutput, value inte return err } + case "retentionMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RunRetentionMode to be of type string, got %T instead", value) + } + sv.RetentionMode = types.RunRetentionMode(jtv) + } + case "roleArn": if value != nil { jtv, ok := value.(string) diff --git a/service/omics/serializers.go b/service/omics/serializers.go index 746144b71b3..03a58b0a099 100644 --- a/service/omics/serializers.go +++ b/service/omics/serializers.go @@ -6138,6 +6138,11 @@ func awsRestjson1_serializeOpDocumentStartRunInput(v *StartRunInput, value smith ok.String(*v.RequestId) } + if len(v.RetentionMode) > 0 { + ok := object.Key("retentionMode") + ok.String(string(v.RetentionMode)) + } + if v.RoleArn != nil { ok := object.Key("roleArn") ok.String(*v.RoleArn) diff --git a/service/omics/types/enums.go b/service/omics/types/enums.go index 642749d8ac9..f7fdf2fedce 100644 --- a/service/omics/types/enums.go +++ b/service/omics/types/enums.go @@ -532,6 +532,24 @@ func (RunLogLevel) Values() []RunLogLevel { } } +type RunRetentionMode string + +// Enum values for RunRetentionMode +const ( + RunRetentionModeRetain RunRetentionMode = "RETAIN" + RunRetentionModeRemove RunRetentionMode = "REMOVE" +) + +// Values returns all known values for RunRetentionMode. 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 (RunRetentionMode) Values() []RunRetentionMode { + return []RunRetentionMode{ + "RETAIN", + "REMOVE", + } +} + type RunStatus string // Enum values for RunStatus diff --git a/service/sesv2/api_op_CancelExportJob.go b/service/sesv2/api_op_CancelExportJob.go new file mode 100644 index 00000000000..43d314d9e6b --- /dev/null +++ b/service/sesv2/api_op_CancelExportJob.go @@ -0,0 +1,259 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package sesv2 + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Cancels an export job. +func (c *Client) CancelExportJob(ctx context.Context, params *CancelExportJobInput, optFns ...func(*Options)) (*CancelExportJobOutput, error) { + if params == nil { + params = &CancelExportJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CancelExportJob", params, optFns, c.addOperationCancelExportJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CancelExportJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Represents a request to cancel an export job using the export job ID. +type CancelExportJobInput struct { + + // The export job ID. + // + // This member is required. + JobId *string + + noSmithyDocumentSerde +} + +// An HTTP 200 response if the request succeeds, or an error message if the +// request fails. +type CancelExportJobOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCancelExportJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCancelExportJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCancelExportJob{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addCancelExportJobResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpCancelExportJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelExportJob(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCancelExportJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ses", + OperationName: "CancelExportJob", + } +} + +type opCancelExportJobResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opCancelExportJobResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opCancelExportJobResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "ses" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "ses" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("ses") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addCancelExportJobResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opCancelExportJobResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/sesv2/api_op_CreateExportJob.go b/service/sesv2/api_op_CreateExportJob.go new file mode 100644 index 00000000000..aa0bfe075dd --- /dev/null +++ b/service/sesv2/api_op_CreateExportJob.go @@ -0,0 +1,271 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package sesv2 + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/sesv2/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an export job for a data source and destination. You can execute this +// operation no more than once per second. +func (c *Client) CreateExportJob(ctx context.Context, params *CreateExportJobInput, optFns ...func(*Options)) (*CreateExportJobOutput, error) { + if params == nil { + params = &CreateExportJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateExportJob", params, optFns, c.addOperationCreateExportJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateExportJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Represents a request to create an export job from a data source to a data +// destination. +type CreateExportJobInput struct { + + // The data source for the export job. + // + // This member is required. + ExportDataSource *types.ExportDataSource + + // The destination for the export job. + // + // This member is required. + ExportDestination *types.ExportDestination + + noSmithyDocumentSerde +} + +// An HTTP 200 response if the request succeeds, or an error message if the +// request fails. +type CreateExportJobOutput struct { + + // A string that represents the export job ID. + JobId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateExportJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateExportJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateExportJob{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addCreateExportJobResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateExportJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateExportJob(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateExportJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ses", + OperationName: "CreateExportJob", + } +} + +type opCreateExportJobResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opCreateExportJobResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opCreateExportJobResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "ses" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "ses" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("ses") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addCreateExportJobResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opCreateExportJobResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/sesv2/api_op_GetExportJob.go b/service/sesv2/api_op_GetExportJob.go new file mode 100644 index 00000000000..b848e696c91 --- /dev/null +++ b/service/sesv2/api_op_GetExportJob.go @@ -0,0 +1,290 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package sesv2 + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/sesv2/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Provides information about an export job. +func (c *Client) GetExportJob(ctx context.Context, params *GetExportJobInput, optFns ...func(*Options)) (*GetExportJobOutput, error) { + if params == nil { + params = &GetExportJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetExportJob", params, optFns, c.addOperationGetExportJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetExportJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Represents a request to retrieve information about an export job using the +// export job ID. +type GetExportJobInput struct { + + // The export job ID. + // + // This member is required. + JobId *string + + noSmithyDocumentSerde +} + +// An HTTP 200 response if the request succeeds, or an error message if the +// request fails. +type GetExportJobOutput struct { + + // The timestamp of when the export job was completed. + CompletedTimestamp *time.Time + + // The timestamp of when the export job was created. + CreatedTimestamp *time.Time + + // The data source of the export job. + ExportDataSource *types.ExportDataSource + + // The destination of the export job. + ExportDestination *types.ExportDestination + + // The type of source of the export job. + ExportSourceType types.ExportSourceType + + // The failure details about an export job. + FailureInfo *types.FailureInfo + + // The export job ID. + JobId *string + + // The status of the export job. + JobStatus types.JobStatus + + // The statistics about the export job. + Statistics *types.ExportStatistics + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetExportJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetExportJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetExportJob{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addGetExportJobResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpGetExportJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetExportJob(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetExportJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ses", + OperationName: "GetExportJob", + } +} + +type opGetExportJobResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opGetExportJobResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opGetExportJobResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "ses" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "ses" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("ses") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addGetExportJobResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opGetExportJobResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/sesv2/api_op_GetMessageInsights.go b/service/sesv2/api_op_GetMessageInsights.go new file mode 100644 index 00000000000..b4296c8ac1a --- /dev/null +++ b/service/sesv2/api_op_GetMessageInsights.go @@ -0,0 +1,280 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package sesv2 + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/sesv2/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Provides information about a specific message, including the from address, the +// subject, the recipient address, email tags, as well as events associated with +// the message. You can execute this operation no more than once per second. +func (c *Client) GetMessageInsights(ctx context.Context, params *GetMessageInsightsInput, optFns ...func(*Options)) (*GetMessageInsightsOutput, error) { + if params == nil { + params = &GetMessageInsightsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetMessageInsights", params, optFns, c.addOperationGetMessageInsightsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetMessageInsightsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to return information about a message. +type GetMessageInsightsInput struct { + + // A MessageId is a unique identifier for a message, and is returned when sending + // emails through Amazon SES. + // + // This member is required. + MessageId *string + + noSmithyDocumentSerde +} + +// Information about a message. +type GetMessageInsightsOutput struct { + + // A list of tags, in the form of name/value pairs, that were applied to the email + // you sent, along with Amazon SES Auto-Tags (https://docs.aws.amazon.com/ses/latest/dg/monitor-using-event-publishing.html) + // . + EmailTags []types.MessageTag + + // The from address used to send the message. + FromEmailAddress *string + + // A set of insights associated with the message. + Insights []types.EmailInsights + + // A unique identifier for the message. + MessageId *string + + // The subject line of the message. + Subject *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetMessageInsightsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetMessageInsights{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetMessageInsights{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addGetMessageInsightsResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpGetMessageInsightsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMessageInsights(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetMessageInsights(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ses", + OperationName: "GetMessageInsights", + } +} + +type opGetMessageInsightsResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opGetMessageInsightsResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opGetMessageInsightsResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "ses" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "ses" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("ses") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addGetMessageInsightsResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opGetMessageInsightsResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/sesv2/api_op_ListExportJobs.go b/service/sesv2/api_op_ListExportJobs.go new file mode 100644 index 00000000000..a1c368408c9 --- /dev/null +++ b/service/sesv2/api_op_ListExportJobs.go @@ -0,0 +1,370 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package sesv2 + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/sesv2/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all of the export jobs. +func (c *Client) ListExportJobs(ctx context.Context, params *ListExportJobsInput, optFns ...func(*Options)) (*ListExportJobsOutput, error) { + if params == nil { + params = &ListExportJobsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListExportJobs", params, optFns, c.addOperationListExportJobsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListExportJobsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Represents a request to list all export jobs with filters. +type ListExportJobsInput struct { + + // A value used to list export jobs that have a certain ExportSourceType . + ExportSourceType types.ExportSourceType + + // A value used to list export jobs that have a certain JobStatus . + JobStatus types.JobStatus + + // The pagination token returned from a previous call to ListExportJobs to + // indicate the position in the list of export jobs. + NextToken *string + + // Maximum number of export jobs to return at once. Use this parameter to paginate + // results. If additional export jobs exist beyond the specified limit, the + // NextToken element is sent in the response. Use the NextToken value in + // subsequent calls to ListExportJobs to retrieve additional export jobs. + PageSize *int32 + + noSmithyDocumentSerde +} + +// An HTTP 200 response if the request succeeds, or an error message if the +// request fails. +type ListExportJobsOutput struct { + + // A list of the export job summaries. + ExportJobs []types.ExportJobSummary + + // A string token indicating that there might be additional export jobs available + // to be listed. Use this token to a subsequent call to ListExportJobs with the + // same parameters to retrieve the next page of export jobs. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListExportJobsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListExportJobs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListExportJobs{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addListExportJobsResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListExportJobs(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListExportJobsAPIClient is a client that implements the ListExportJobs +// operation. +type ListExportJobsAPIClient interface { + ListExportJobs(context.Context, *ListExportJobsInput, ...func(*Options)) (*ListExportJobsOutput, error) +} + +var _ ListExportJobsAPIClient = (*Client)(nil) + +// ListExportJobsPaginatorOptions is the paginator options for ListExportJobs +type ListExportJobsPaginatorOptions struct { + // Maximum number of export jobs to return at once. Use this parameter to paginate + // results. If additional export jobs exist beyond the specified limit, the + // NextToken element is sent in the response. Use the NextToken value in + // subsequent calls to ListExportJobs to retrieve additional export 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 +} + +// ListExportJobsPaginator is a paginator for ListExportJobs +type ListExportJobsPaginator struct { + options ListExportJobsPaginatorOptions + client ListExportJobsAPIClient + params *ListExportJobsInput + nextToken *string + firstPage bool +} + +// NewListExportJobsPaginator returns a new ListExportJobsPaginator +func NewListExportJobsPaginator(client ListExportJobsAPIClient, params *ListExportJobsInput, optFns ...func(*ListExportJobsPaginatorOptions)) *ListExportJobsPaginator { + if params == nil { + params = &ListExportJobsInput{} + } + + options := ListExportJobsPaginatorOptions{} + if params.PageSize != nil { + options.Limit = *params.PageSize + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListExportJobsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListExportJobsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListExportJobs page. +func (p *ListExportJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListExportJobsOutput, 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 + + result, err := p.client.ListExportJobs(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListExportJobs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ses", + OperationName: "ListExportJobs", + } +} + +type opListExportJobsResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opListExportJobsResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opListExportJobsResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "ses" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "ses" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("ses") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addListExportJobsResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opListExportJobsResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/sesv2/deserializers.go b/service/sesv2/deserializers.go index d6f492854ac..04ff3f2e79c 100644 --- a/service/sesv2/deserializers.go +++ b/service/sesv2/deserializers.go @@ -182,6 +182,95 @@ func awsRestjson1_deserializeOpDocumentBatchGetMetricDataOutput(v **BatchGetMetr return nil } +type awsRestjson1_deserializeOpCancelExportJob struct { +} + +func (*awsRestjson1_deserializeOpCancelExportJob) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCancelExportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCancelExportJob(response, &metadata) + } + output := &CancelExportJobOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCancelExportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpCreateConfigurationSet struct { } @@ -1300,6 +1389,166 @@ func awsRestjson1_deserializeOpErrorCreateEmailTemplate(response *smithyhttp.Res } } +type awsRestjson1_deserializeOpCreateExportJob struct { +} + +func (*awsRestjson1_deserializeOpCreateExportJob) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateExportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateExportJob(response, &metadata) + } + output := &CreateExportJobOutput{} + 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_deserializeOpDocumentCreateExportJobOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateExportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateExportJobOutput(v **CreateExportJobOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateExportJobOutput + if *v == nil { + sv = &CreateExportJobOutput{} + } 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) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpCreateImportJob struct { } @@ -5370,14 +5619,14 @@ func awsRestjson1_deserializeOpDocumentGetEmailTemplateOutput(v **GetEmailTempla return nil } -type awsRestjson1_deserializeOpGetImportJob struct { +type awsRestjson1_deserializeOpGetExportJob struct { } -func (*awsRestjson1_deserializeOpGetImportJob) ID() string { +func (*awsRestjson1_deserializeOpGetExportJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetExportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5391,9 +5640,9 @@ func (m *awsRestjson1_deserializeOpGetImportJob) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetImportJob(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetExportJob(response, &metadata) } - output := &GetImportJobOutput{} + output := &GetExportJobOutput{} out.Result = output var buff [1024]byte @@ -5414,7 +5663,7 @@ func (m *awsRestjson1_deserializeOpGetImportJob) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetImportJobOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetExportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5427,7 +5676,7 @@ func (m *awsRestjson1_deserializeOpGetImportJob) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetExportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5487,7 +5736,7 @@ func awsRestjson1_deserializeOpErrorGetImportJob(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentGetImportJobOutput(v **GetImportJobOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetExportJobOutput(v **GetExportJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5500,9 +5749,9 @@ func awsRestjson1_deserializeOpDocumentGetImportJobOutput(v **GetImportJobOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetImportJobOutput + var sv *GetExportJobOutput if *v == nil { - sv = &GetImportJobOutput{} + sv = &GetExportJobOutput{} } else { sv = *v } @@ -5541,17 +5790,23 @@ func awsRestjson1_deserializeOpDocumentGetImportJobOutput(v **GetImportJobOutput } } - case "FailedRecordsCount": + case "ExportDataSource": + if err := awsRestjson1_deserializeDocumentExportDataSource(&sv.ExportDataSource, value); err != nil { + return err + } + + case "ExportDestination": + if err := awsRestjson1_deserializeDocumentExportDestination(&sv.ExportDestination, value); err != nil { + return err + } + + case "ExportSourceType": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected FailedRecordsCount to be json.Number, got %T instead", value) + return fmt.Errorf("expected ExportSourceType to be of type string, got %T instead", value) } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.FailedRecordsCount = ptr.Int32(int32(i64)) + sv.ExportSourceType = types.ExportSourceType(jtv) } case "FailureInfo": @@ -5559,16 +5814,6 @@ func awsRestjson1_deserializeOpDocumentGetImportJobOutput(v **GetImportJobOutput return err } - case "ImportDataSource": - if err := awsRestjson1_deserializeDocumentImportDataSource(&sv.ImportDataSource, value); err != nil { - return err - } - - case "ImportDestination": - if err := awsRestjson1_deserializeDocumentImportDestination(&sv.ImportDestination, value); err != nil { - return err - } - case "JobId": if value != nil { jtv, ok := value.(string) @@ -5587,17 +5832,9 @@ func awsRestjson1_deserializeOpDocumentGetImportJobOutput(v **GetImportJobOutput sv.JobStatus = types.JobStatus(jtv) } - case "ProcessedRecordsCount": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected ProcessedRecordsCount to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.ProcessedRecordsCount = ptr.Int32(int32(i64)) + case "Statistics": + if err := awsRestjson1_deserializeDocumentExportStatistics(&sv.Statistics, value); err != nil { + return err } default: @@ -5609,14 +5846,14 @@ func awsRestjson1_deserializeOpDocumentGetImportJobOutput(v **GetImportJobOutput return nil } -type awsRestjson1_deserializeOpGetSuppressedDestination struct { +type awsRestjson1_deserializeOpGetImportJob struct { } -func (*awsRestjson1_deserializeOpGetSuppressedDestination) ID() string { +func (*awsRestjson1_deserializeOpGetImportJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetSuppressedDestination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5630,9 +5867,9 @@ func (m *awsRestjson1_deserializeOpGetSuppressedDestination) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSuppressedDestination(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetImportJob(response, &metadata) } - output := &GetSuppressedDestinationOutput{} + output := &GetImportJobOutput{} out.Result = output var buff [1024]byte @@ -5653,7 +5890,7 @@ func (m *awsRestjson1_deserializeOpGetSuppressedDestination) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetSuppressedDestinationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetImportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5666,7 +5903,7 @@ func (m *awsRestjson1_deserializeOpGetSuppressedDestination) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetSuppressedDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5726,7 +5963,7 @@ func awsRestjson1_deserializeOpErrorGetSuppressedDestination(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentGetSuppressedDestinationOutput(v **GetSuppressedDestinationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetImportJobOutput(v **GetImportJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5739,20 +5976,106 @@ func awsRestjson1_deserializeOpDocumentGetSuppressedDestinationOutput(v **GetSup return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetSuppressedDestinationOutput + var sv *GetImportJobOutput if *v == nil { - sv = &GetSuppressedDestinationOutput{} + sv = &GetImportJobOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "SuppressedDestination": - if err := awsRestjson1_deserializeDocumentSuppressedDestination(&sv.SuppressedDestination, value); err != nil { + 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 "FailedRecordsCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected FailedRecordsCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FailedRecordsCount = ptr.Int32(int32(i64)) + } + + case "FailureInfo": + if err := awsRestjson1_deserializeDocumentFailureInfo(&sv.FailureInfo, value); err != nil { + return err + } + + case "ImportDataSource": + if err := awsRestjson1_deserializeDocumentImportDataSource(&sv.ImportDataSource, value); err != nil { + return err + } + + case "ImportDestination": + if err := awsRestjson1_deserializeDocumentImportDestination(&sv.ImportDestination, value); err != nil { return err } + 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 "JobStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobStatus to be of type string, got %T instead", value) + } + sv.JobStatus = types.JobStatus(jtv) + } + + case "ProcessedRecordsCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ProcessedRecordsCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ProcessedRecordsCount = ptr.Int32(int32(i64)) + } + default: _, _ = key, value @@ -5762,14 +6085,14 @@ func awsRestjson1_deserializeOpDocumentGetSuppressedDestinationOutput(v **GetSup return nil } -type awsRestjson1_deserializeOpListConfigurationSets struct { +type awsRestjson1_deserializeOpGetMessageInsights struct { } -func (*awsRestjson1_deserializeOpListConfigurationSets) ID() string { +func (*awsRestjson1_deserializeOpGetMessageInsights) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListConfigurationSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetMessageInsights) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5783,9 +6106,9 @@ func (m *awsRestjson1_deserializeOpListConfigurationSets) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListConfigurationSets(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetMessageInsights(response, &metadata) } - output := &ListConfigurationSetsOutput{} + output := &GetMessageInsightsOutput{} out.Result = output var buff [1024]byte @@ -5806,7 +6129,7 @@ func (m *awsRestjson1_deserializeOpListConfigurationSets) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListConfigurationSetsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetMessageInsightsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5819,7 +6142,7 @@ func (m *awsRestjson1_deserializeOpListConfigurationSets) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListConfigurationSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetMessageInsights(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5863,6 +6186,9 @@ func awsRestjson1_deserializeOpErrorListConfigurationSets(response *smithyhttp.R case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -5876,7 +6202,7 @@ func awsRestjson1_deserializeOpErrorListConfigurationSets(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentListConfigurationSetsOutput(v **ListConfigurationSetsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetMessageInsightsOutput(v **GetMessageInsightsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5889,27 +6215,50 @@ func awsRestjson1_deserializeOpDocumentListConfigurationSetsOutput(v **ListConfi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListConfigurationSetsOutput + var sv *GetMessageInsightsOutput if *v == nil { - sv = &ListConfigurationSetsOutput{} + sv = &GetMessageInsightsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ConfigurationSets": - if err := awsRestjson1_deserializeDocumentConfigurationSetNameList(&sv.ConfigurationSets, value); err != nil { + case "EmailTags": + if err := awsRestjson1_deserializeDocumentMessageTagList(&sv.EmailTags, value); err != nil { return err } - case "NextToken": + case "FromEmailAddress": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + return fmt.Errorf("expected InsightsEmailAddress to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.FromEmailAddress = ptr.String(jtv) + } + + case "Insights": + if err := awsRestjson1_deserializeDocumentEmailInsightsList(&sv.Insights, value); err != nil { + return err + } + + case "MessageId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutboundMessageId to be of type string, got %T instead", value) + } + sv.MessageId = ptr.String(jtv) + } + + case "Subject": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EmailSubject to be of type string, got %T instead", value) + } + sv.Subject = ptr.String(jtv) } default: @@ -5921,14 +6270,14 @@ func awsRestjson1_deserializeOpDocumentListConfigurationSetsOutput(v **ListConfi return nil } -type awsRestjson1_deserializeOpListContactLists struct { +type awsRestjson1_deserializeOpGetSuppressedDestination struct { } -func (*awsRestjson1_deserializeOpListContactLists) ID() string { +func (*awsRestjson1_deserializeOpGetSuppressedDestination) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListContactLists) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetSuppressedDestination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5942,9 +6291,9 @@ func (m *awsRestjson1_deserializeOpListContactLists) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListContactLists(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetSuppressedDestination(response, &metadata) } - output := &ListContactListsOutput{} + output := &GetSuppressedDestinationOutput{} out.Result = output var buff [1024]byte @@ -5965,7 +6314,7 @@ func (m *awsRestjson1_deserializeOpListContactLists) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListContactListsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetSuppressedDestinationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5978,7 +6327,7 @@ func (m *awsRestjson1_deserializeOpListContactLists) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListContactLists(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetSuppressedDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6022,6 +6371,9 @@ func awsRestjson1_deserializeOpErrorListContactLists(response *smithyhttp.Respon case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -6035,7 +6387,7 @@ func awsRestjson1_deserializeOpErrorListContactLists(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentListContactListsOutput(v **ListContactListsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetSuppressedDestinationOutput(v **GetSuppressedDestinationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6048,29 +6400,20 @@ func awsRestjson1_deserializeOpDocumentListContactListsOutput(v **ListContactLis return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListContactListsOutput + var sv *GetSuppressedDestinationOutput if *v == nil { - sv = &ListContactListsOutput{} + sv = &GetSuppressedDestinationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ContactLists": - if err := awsRestjson1_deserializeDocumentListOfContactLists(&sv.ContactLists, value); err != nil { + case "SuppressedDestination": + if err := awsRestjson1_deserializeDocumentSuppressedDestination(&sv.SuppressedDestination, value); err != nil { return err } - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - default: _, _ = key, value @@ -6080,14 +6423,14 @@ func awsRestjson1_deserializeOpDocumentListContactListsOutput(v **ListContactLis return nil } -type awsRestjson1_deserializeOpListContacts struct { +type awsRestjson1_deserializeOpListConfigurationSets struct { } -func (*awsRestjson1_deserializeOpListContacts) ID() string { +func (*awsRestjson1_deserializeOpListConfigurationSets) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListContacts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListConfigurationSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6101,9 +6444,9 @@ func (m *awsRestjson1_deserializeOpListContacts) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListContacts(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListConfigurationSets(response, &metadata) } - output := &ListContactsOutput{} + output := &ListConfigurationSetsOutput{} out.Result = output var buff [1024]byte @@ -6124,7 +6467,7 @@ func (m *awsRestjson1_deserializeOpListContacts) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListContactsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListConfigurationSetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6137,7 +6480,7 @@ func (m *awsRestjson1_deserializeOpListContacts) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorListContacts(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListConfigurationSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6181,9 +6524,6 @@ func awsRestjson1_deserializeOpErrorListContacts(response *smithyhttp.Response, case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -6197,7 +6537,7 @@ func awsRestjson1_deserializeOpErrorListContacts(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentListContactsOutput(v **ListContactsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListConfigurationSetsOutput(v **ListConfigurationSetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6210,17 +6550,17 @@ func awsRestjson1_deserializeOpDocumentListContactsOutput(v **ListContactsOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListContactsOutput + var sv *ListConfigurationSetsOutput if *v == nil { - sv = &ListContactsOutput{} + sv = &ListConfigurationSetsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Contacts": - if err := awsRestjson1_deserializeDocumentListOfContacts(&sv.Contacts, value); err != nil { + case "ConfigurationSets": + if err := awsRestjson1_deserializeDocumentConfigurationSetNameList(&sv.ConfigurationSets, value); err != nil { return err } @@ -6242,14 +6582,14 @@ func awsRestjson1_deserializeOpDocumentListContactsOutput(v **ListContactsOutput return nil } -type awsRestjson1_deserializeOpListCustomVerificationEmailTemplates struct { +type awsRestjson1_deserializeOpListContactLists struct { } -func (*awsRestjson1_deserializeOpListCustomVerificationEmailTemplates) ID() string { +func (*awsRestjson1_deserializeOpListContactLists) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListCustomVerificationEmailTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListContactLists) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6263,9 +6603,9 @@ func (m *awsRestjson1_deserializeOpListCustomVerificationEmailTemplates) HandleD } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListCustomVerificationEmailTemplates(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListContactLists(response, &metadata) } - output := &ListCustomVerificationEmailTemplatesOutput{} + output := &ListContactListsOutput{} out.Result = output var buff [1024]byte @@ -6286,7 +6626,7 @@ func (m *awsRestjson1_deserializeOpListCustomVerificationEmailTemplates) HandleD return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListCustomVerificationEmailTemplatesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListContactListsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6299,7 +6639,7 @@ func (m *awsRestjson1_deserializeOpListCustomVerificationEmailTemplates) HandleD return out, metadata, err } -func awsRestjson1_deserializeOpErrorListCustomVerificationEmailTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListContactLists(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6356,7 +6696,7 @@ func awsRestjson1_deserializeOpErrorListCustomVerificationEmailTemplates(respons } } -func awsRestjson1_deserializeOpDocumentListCustomVerificationEmailTemplatesOutput(v **ListCustomVerificationEmailTemplatesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListContactListsOutput(v **ListContactListsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6369,17 +6709,17 @@ func awsRestjson1_deserializeOpDocumentListCustomVerificationEmailTemplatesOutpu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListCustomVerificationEmailTemplatesOutput + var sv *ListContactListsOutput if *v == nil { - sv = &ListCustomVerificationEmailTemplatesOutput{} + sv = &ListContactListsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "CustomVerificationEmailTemplates": - if err := awsRestjson1_deserializeDocumentCustomVerificationEmailTemplatesList(&sv.CustomVerificationEmailTemplates, value); err != nil { + case "ContactLists": + if err := awsRestjson1_deserializeDocumentListOfContactLists(&sv.ContactLists, value); err != nil { return err } @@ -6401,14 +6741,14 @@ func awsRestjson1_deserializeOpDocumentListCustomVerificationEmailTemplatesOutpu return nil } -type awsRestjson1_deserializeOpListDedicatedIpPools struct { +type awsRestjson1_deserializeOpListContacts struct { } -func (*awsRestjson1_deserializeOpListDedicatedIpPools) ID() string { +func (*awsRestjson1_deserializeOpListContacts) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListDedicatedIpPools) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListContacts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6422,9 +6762,9 @@ func (m *awsRestjson1_deserializeOpListDedicatedIpPools) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListDedicatedIpPools(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListContacts(response, &metadata) } - output := &ListDedicatedIpPoolsOutput{} + output := &ListContactsOutput{} out.Result = output var buff [1024]byte @@ -6445,7 +6785,7 @@ func (m *awsRestjson1_deserializeOpListDedicatedIpPools) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListDedicatedIpPoolsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListContactsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6458,7 +6798,7 @@ func (m *awsRestjson1_deserializeOpListDedicatedIpPools) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListDedicatedIpPools(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListContacts(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6502,6 +6842,9 @@ func awsRestjson1_deserializeOpErrorListDedicatedIpPools(response *smithyhttp.Re case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -6515,7 +6858,7 @@ func awsRestjson1_deserializeOpErrorListDedicatedIpPools(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentListDedicatedIpPoolsOutput(v **ListDedicatedIpPoolsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListContactsOutput(v **ListContactsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6528,17 +6871,17 @@ func awsRestjson1_deserializeOpDocumentListDedicatedIpPoolsOutput(v **ListDedica return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListDedicatedIpPoolsOutput + var sv *ListContactsOutput if *v == nil { - sv = &ListDedicatedIpPoolsOutput{} + sv = &ListContactsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DedicatedIpPools": - if err := awsRestjson1_deserializeDocumentListOfDedicatedIpPools(&sv.DedicatedIpPools, value); err != nil { + case "Contacts": + if err := awsRestjson1_deserializeDocumentListOfContacts(&sv.Contacts, value); err != nil { return err } @@ -6560,14 +6903,14 @@ func awsRestjson1_deserializeOpDocumentListDedicatedIpPoolsOutput(v **ListDedica return nil } -type awsRestjson1_deserializeOpListDeliverabilityTestReports struct { +type awsRestjson1_deserializeOpListCustomVerificationEmailTemplates struct { } -func (*awsRestjson1_deserializeOpListDeliverabilityTestReports) ID() string { +func (*awsRestjson1_deserializeOpListCustomVerificationEmailTemplates) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListDeliverabilityTestReports) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListCustomVerificationEmailTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6581,9 +6924,9 @@ func (m *awsRestjson1_deserializeOpListDeliverabilityTestReports) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListDeliverabilityTestReports(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListCustomVerificationEmailTemplates(response, &metadata) } - output := &ListDeliverabilityTestReportsOutput{} + output := &ListCustomVerificationEmailTemplatesOutput{} out.Result = output var buff [1024]byte @@ -6604,7 +6947,7 @@ func (m *awsRestjson1_deserializeOpListDeliverabilityTestReports) HandleDeserial return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListDeliverabilityTestReportsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListCustomVerificationEmailTemplatesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6617,7 +6960,7 @@ func (m *awsRestjson1_deserializeOpListDeliverabilityTestReports) HandleDeserial return out, metadata, err } -func awsRestjson1_deserializeOpErrorListDeliverabilityTestReports(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListCustomVerificationEmailTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6661,9 +7004,6 @@ func awsRestjson1_deserializeOpErrorListDeliverabilityTestReports(response *smit case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -6677,7 +7017,7 @@ func awsRestjson1_deserializeOpErrorListDeliverabilityTestReports(response *smit } } -func awsRestjson1_deserializeOpDocumentListDeliverabilityTestReportsOutput(v **ListDeliverabilityTestReportsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListCustomVerificationEmailTemplatesOutput(v **ListCustomVerificationEmailTemplatesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6690,17 +7030,17 @@ func awsRestjson1_deserializeOpDocumentListDeliverabilityTestReportsOutput(v **L return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListDeliverabilityTestReportsOutput + var sv *ListCustomVerificationEmailTemplatesOutput if *v == nil { - sv = &ListDeliverabilityTestReportsOutput{} + sv = &ListCustomVerificationEmailTemplatesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DeliverabilityTestReports": - if err := awsRestjson1_deserializeDocumentDeliverabilityTestReports(&sv.DeliverabilityTestReports, value); err != nil { + case "CustomVerificationEmailTemplates": + if err := awsRestjson1_deserializeDocumentCustomVerificationEmailTemplatesList(&sv.CustomVerificationEmailTemplates, value); err != nil { return err } @@ -6722,14 +7062,14 @@ func awsRestjson1_deserializeOpDocumentListDeliverabilityTestReportsOutput(v **L return nil } -type awsRestjson1_deserializeOpListDomainDeliverabilityCampaigns struct { +type awsRestjson1_deserializeOpListDedicatedIpPools struct { } -func (*awsRestjson1_deserializeOpListDomainDeliverabilityCampaigns) ID() string { +func (*awsRestjson1_deserializeOpListDedicatedIpPools) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListDomainDeliverabilityCampaigns) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListDedicatedIpPools) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6743,9 +7083,9 @@ func (m *awsRestjson1_deserializeOpListDomainDeliverabilityCampaigns) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListDomainDeliverabilityCampaigns(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListDedicatedIpPools(response, &metadata) } - output := &ListDomainDeliverabilityCampaignsOutput{} + output := &ListDedicatedIpPoolsOutput{} out.Result = output var buff [1024]byte @@ -6766,7 +7106,7 @@ func (m *awsRestjson1_deserializeOpListDomainDeliverabilityCampaigns) HandleDese return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListDomainDeliverabilityCampaignsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListDedicatedIpPoolsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6779,7 +7119,7 @@ func (m *awsRestjson1_deserializeOpListDomainDeliverabilityCampaigns) HandleDese return out, metadata, err } -func awsRestjson1_deserializeOpErrorListDomainDeliverabilityCampaigns(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListDedicatedIpPools(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6823,9 +7163,6 @@ func awsRestjson1_deserializeOpErrorListDomainDeliverabilityCampaigns(response * case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -6839,7 +7176,7 @@ func awsRestjson1_deserializeOpErrorListDomainDeliverabilityCampaigns(response * } } -func awsRestjson1_deserializeOpDocumentListDomainDeliverabilityCampaignsOutput(v **ListDomainDeliverabilityCampaignsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListDedicatedIpPoolsOutput(v **ListDedicatedIpPoolsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6852,17 +7189,17 @@ func awsRestjson1_deserializeOpDocumentListDomainDeliverabilityCampaignsOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListDomainDeliverabilityCampaignsOutput + var sv *ListDedicatedIpPoolsOutput if *v == nil { - sv = &ListDomainDeliverabilityCampaignsOutput{} + sv = &ListDedicatedIpPoolsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DomainDeliverabilityCampaigns": - if err := awsRestjson1_deserializeDocumentDomainDeliverabilityCampaignList(&sv.DomainDeliverabilityCampaigns, value); err != nil { + case "DedicatedIpPools": + if err := awsRestjson1_deserializeDocumentListOfDedicatedIpPools(&sv.DedicatedIpPools, value); err != nil { return err } @@ -6884,14 +7221,14 @@ func awsRestjson1_deserializeOpDocumentListDomainDeliverabilityCampaignsOutput(v return nil } -type awsRestjson1_deserializeOpListEmailIdentities struct { +type awsRestjson1_deserializeOpListDeliverabilityTestReports struct { } -func (*awsRestjson1_deserializeOpListEmailIdentities) ID() string { +func (*awsRestjson1_deserializeOpListDeliverabilityTestReports) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListEmailIdentities) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListDeliverabilityTestReports) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6905,9 +7242,9 @@ func (m *awsRestjson1_deserializeOpListEmailIdentities) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListEmailIdentities(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListDeliverabilityTestReports(response, &metadata) } - output := &ListEmailIdentitiesOutput{} + output := &ListDeliverabilityTestReportsOutput{} out.Result = output var buff [1024]byte @@ -6928,7 +7265,7 @@ func (m *awsRestjson1_deserializeOpListEmailIdentities) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListEmailIdentitiesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListDeliverabilityTestReportsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6941,7 +7278,7 @@ func (m *awsRestjson1_deserializeOpListEmailIdentities) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListEmailIdentities(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListDeliverabilityTestReports(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6985,6 +7322,9 @@ func awsRestjson1_deserializeOpErrorListEmailIdentities(response *smithyhttp.Res case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -6998,7 +7338,7 @@ func awsRestjson1_deserializeOpErrorListEmailIdentities(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListEmailIdentitiesOutput(v **ListEmailIdentitiesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListDeliverabilityTestReportsOutput(v **ListDeliverabilityTestReportsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7011,17 +7351,17 @@ func awsRestjson1_deserializeOpDocumentListEmailIdentitiesOutput(v **ListEmailId return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEmailIdentitiesOutput + var sv *ListDeliverabilityTestReportsOutput if *v == nil { - sv = &ListEmailIdentitiesOutput{} + sv = &ListDeliverabilityTestReportsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "EmailIdentities": - if err := awsRestjson1_deserializeDocumentIdentityInfoList(&sv.EmailIdentities, value); err != nil { + case "DeliverabilityTestReports": + if err := awsRestjson1_deserializeDocumentDeliverabilityTestReports(&sv.DeliverabilityTestReports, value); err != nil { return err } @@ -7043,14 +7383,14 @@ func awsRestjson1_deserializeOpDocumentListEmailIdentitiesOutput(v **ListEmailId return nil } -type awsRestjson1_deserializeOpListEmailTemplates struct { +type awsRestjson1_deserializeOpListDomainDeliverabilityCampaigns struct { } -func (*awsRestjson1_deserializeOpListEmailTemplates) ID() string { +func (*awsRestjson1_deserializeOpListDomainDeliverabilityCampaigns) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListEmailTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListDomainDeliverabilityCampaigns) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7064,9 +7404,9 @@ func (m *awsRestjson1_deserializeOpListEmailTemplates) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListEmailTemplates(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListDomainDeliverabilityCampaigns(response, &metadata) } - output := &ListEmailTemplatesOutput{} + output := &ListDomainDeliverabilityCampaignsOutput{} out.Result = output var buff [1024]byte @@ -7087,7 +7427,7 @@ func (m *awsRestjson1_deserializeOpListEmailTemplates) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListEmailTemplatesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListDomainDeliverabilityCampaignsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7100,7 +7440,7 @@ func (m *awsRestjson1_deserializeOpListEmailTemplates) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListEmailTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListDomainDeliverabilityCampaigns(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7144,6 +7484,9 @@ func awsRestjson1_deserializeOpErrorListEmailTemplates(response *smithyhttp.Resp case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -7157,7 +7500,7 @@ func awsRestjson1_deserializeOpErrorListEmailTemplates(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentListEmailTemplatesOutput(v **ListEmailTemplatesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListDomainDeliverabilityCampaignsOutput(v **ListDomainDeliverabilityCampaignsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7170,15 +7513,20 @@ func awsRestjson1_deserializeOpDocumentListEmailTemplatesOutput(v **ListEmailTem return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEmailTemplatesOutput + var sv *ListDomainDeliverabilityCampaignsOutput if *v == nil { - sv = &ListEmailTemplatesOutput{} + sv = &ListDomainDeliverabilityCampaignsOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "DomainDeliverabilityCampaigns": + if err := awsRestjson1_deserializeDocumentDomainDeliverabilityCampaignList(&sv.DomainDeliverabilityCampaigns, value); err != nil { + return err + } + case "NextToken": if value != nil { jtv, ok := value.(string) @@ -7188,11 +7536,6 @@ func awsRestjson1_deserializeOpDocumentListEmailTemplatesOutput(v **ListEmailTem sv.NextToken = ptr.String(jtv) } - case "TemplatesMetadata": - if err := awsRestjson1_deserializeDocumentEmailTemplateMetadataList(&sv.TemplatesMetadata, value); err != nil { - return err - } - default: _, _ = key, value @@ -7202,14 +7545,14 @@ func awsRestjson1_deserializeOpDocumentListEmailTemplatesOutput(v **ListEmailTem return nil } -type awsRestjson1_deserializeOpListImportJobs struct { +type awsRestjson1_deserializeOpListEmailIdentities struct { } -func (*awsRestjson1_deserializeOpListImportJobs) ID() string { +func (*awsRestjson1_deserializeOpListEmailIdentities) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListImportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListEmailIdentities) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7223,9 +7566,9 @@ func (m *awsRestjson1_deserializeOpListImportJobs) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListImportJobs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListEmailIdentities(response, &metadata) } - output := &ListImportJobsOutput{} + output := &ListEmailIdentitiesOutput{} out.Result = output var buff [1024]byte @@ -7246,7 +7589,7 @@ func (m *awsRestjson1_deserializeOpListImportJobs) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListImportJobsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListEmailIdentitiesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7259,7 +7602,7 @@ func (m *awsRestjson1_deserializeOpListImportJobs) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorListImportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListEmailIdentities(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7316,7 +7659,7 @@ func awsRestjson1_deserializeOpErrorListImportJobs(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentListImportJobsOutput(v **ListImportJobsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListEmailIdentitiesOutput(v **ListEmailIdentitiesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7329,17 +7672,17 @@ func awsRestjson1_deserializeOpDocumentListImportJobsOutput(v **ListImportJobsOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListImportJobsOutput + var sv *ListEmailIdentitiesOutput if *v == nil { - sv = &ListImportJobsOutput{} + sv = &ListEmailIdentitiesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ImportJobs": - if err := awsRestjson1_deserializeDocumentImportJobSummaryList(&sv.ImportJobs, value); err != nil { + case "EmailIdentities": + if err := awsRestjson1_deserializeDocumentIdentityInfoList(&sv.EmailIdentities, value); err != nil { return err } @@ -7361,14 +7704,14 @@ func awsRestjson1_deserializeOpDocumentListImportJobsOutput(v **ListImportJobsOu return nil } -type awsRestjson1_deserializeOpListRecommendations struct { +type awsRestjson1_deserializeOpListEmailTemplates struct { } -func (*awsRestjson1_deserializeOpListRecommendations) ID() string { +func (*awsRestjson1_deserializeOpListEmailTemplates) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListRecommendations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListEmailTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7382,9 +7725,9 @@ func (m *awsRestjson1_deserializeOpListRecommendations) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListRecommendations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListEmailTemplates(response, &metadata) } - output := &ListRecommendationsOutput{} + output := &ListEmailTemplatesOutput{} out.Result = output var buff [1024]byte @@ -7405,7 +7748,7 @@ func (m *awsRestjson1_deserializeOpListRecommendations) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListRecommendationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListEmailTemplatesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7418,7 +7761,7 @@ func (m *awsRestjson1_deserializeOpListRecommendations) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListRecommendations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListEmailTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7462,9 +7805,6 @@ func awsRestjson1_deserializeOpErrorListRecommendations(response *smithyhttp.Res case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -7478,7 +7818,7 @@ func awsRestjson1_deserializeOpErrorListRecommendations(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListRecommendationsOutput(v **ListRecommendationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListEmailTemplatesOutput(v **ListEmailTemplatesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7491,9 +7831,9 @@ func awsRestjson1_deserializeOpDocumentListRecommendationsOutput(v **ListRecomme return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListRecommendationsOutput + var sv *ListEmailTemplatesOutput if *v == nil { - sv = &ListRecommendationsOutput{} + sv = &ListEmailTemplatesOutput{} } else { sv = *v } @@ -7509,8 +7849,8 @@ func awsRestjson1_deserializeOpDocumentListRecommendationsOutput(v **ListRecomme sv.NextToken = ptr.String(jtv) } - case "Recommendations": - if err := awsRestjson1_deserializeDocumentRecommendationsList(&sv.Recommendations, value); err != nil { + case "TemplatesMetadata": + if err := awsRestjson1_deserializeDocumentEmailTemplateMetadataList(&sv.TemplatesMetadata, value); err != nil { return err } @@ -7523,14 +7863,14 @@ func awsRestjson1_deserializeOpDocumentListRecommendationsOutput(v **ListRecomme return nil } -type awsRestjson1_deserializeOpListSuppressedDestinations struct { +type awsRestjson1_deserializeOpListExportJobs struct { } -func (*awsRestjson1_deserializeOpListSuppressedDestinations) ID() string { +func (*awsRestjson1_deserializeOpListExportJobs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListSuppressedDestinations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListExportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7544,9 +7884,9 @@ func (m *awsRestjson1_deserializeOpListSuppressedDestinations) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListSuppressedDestinations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListExportJobs(response, &metadata) } - output := &ListSuppressedDestinationsOutput{} + output := &ListExportJobsOutput{} out.Result = output var buff [1024]byte @@ -7567,7 +7907,7 @@ func (m *awsRestjson1_deserializeOpListSuppressedDestinations) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListSuppressedDestinationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListExportJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7580,7 +7920,7 @@ func (m *awsRestjson1_deserializeOpListSuppressedDestinations) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorListSuppressedDestinations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListExportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7624,9 +7964,6 @@ func awsRestjson1_deserializeOpErrorListSuppressedDestinations(response *smithyh case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -7640,7 +7977,7 @@ func awsRestjson1_deserializeOpErrorListSuppressedDestinations(response *smithyh } } -func awsRestjson1_deserializeOpDocumentListSuppressedDestinationsOutput(v **ListSuppressedDestinationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListExportJobsOutput(v **ListExportJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7653,15 +7990,20 @@ func awsRestjson1_deserializeOpDocumentListSuppressedDestinationsOutput(v **List return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListSuppressedDestinationsOutput + var sv *ListExportJobsOutput if *v == nil { - sv = &ListSuppressedDestinationsOutput{} + sv = &ListExportJobsOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "ExportJobs": + if err := awsRestjson1_deserializeDocumentExportJobSummaryList(&sv.ExportJobs, value); err != nil { + return err + } + case "NextToken": if value != nil { jtv, ok := value.(string) @@ -7671,11 +8013,6 @@ func awsRestjson1_deserializeOpDocumentListSuppressedDestinationsOutput(v **List sv.NextToken = ptr.String(jtv) } - case "SuppressedDestinationSummaries": - if err := awsRestjson1_deserializeDocumentSuppressedDestinationSummaries(&sv.SuppressedDestinationSummaries, value); err != nil { - return err - } - default: _, _ = key, value @@ -7685,14 +8022,14 @@ func awsRestjson1_deserializeOpDocumentListSuppressedDestinationsOutput(v **List return nil } -type awsRestjson1_deserializeOpListTagsForResource struct { +type awsRestjson1_deserializeOpListImportJobs struct { } -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { +func (*awsRestjson1_deserializeOpListImportJobs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListImportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7706,9 +8043,9 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListImportJobs(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListImportJobsOutput{} out.Result = output var buff [1024]byte @@ -7729,7 +8066,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListImportJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7742,7 +8079,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListImportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7786,9 +8123,6 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -7802,7 +8136,7 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListImportJobsOutput(v **ListImportJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7815,20 +8149,29 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTagsForResourceOutput + var sv *ListImportJobsOutput if *v == nil { - sv = &ListTagsForResourceOutput{} + sv = &ListImportJobsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Tags": - if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + case "ImportJobs": + if err := awsRestjson1_deserializeDocumentImportJobSummaryList(&sv.ImportJobs, value); err != nil { return err } + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -7838,14 +8181,14 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } -type awsRestjson1_deserializeOpPutAccountDedicatedIpWarmupAttributes struct { +type awsRestjson1_deserializeOpListRecommendations struct { } -func (*awsRestjson1_deserializeOpPutAccountDedicatedIpWarmupAttributes) ID() string { +func (*awsRestjson1_deserializeOpListRecommendations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutAccountDedicatedIpWarmupAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListRecommendations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7859,15 +8202,43 @@ func (m *awsRestjson1_deserializeOpPutAccountDedicatedIpWarmupAttributes) Handle } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutAccountDedicatedIpWarmupAttributes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListRecommendations(response, &metadata) } - output := &PutAccountDedicatedIpWarmupAttributesOutput{} + output := &ListRecommendationsOutput{} 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_deserializeOpDocumentListRecommendationsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutAccountDedicatedIpWarmupAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListRecommendations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7911,6 +8282,9 @@ func awsRestjson1_deserializeOpErrorPutAccountDedicatedIpWarmupAttributes(respon case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -7924,14 +8298,59 @@ func awsRestjson1_deserializeOpErrorPutAccountDedicatedIpWarmupAttributes(respon } } -type awsRestjson1_deserializeOpPutAccountDetails struct { +func awsRestjson1_deserializeOpDocumentListRecommendationsOutput(v **ListRecommendationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListRecommendationsOutput + if *v == nil { + sv = &ListRecommendationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Recommendations": + if err := awsRestjson1_deserializeDocumentRecommendationsList(&sv.Recommendations, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpPutAccountDetails) ID() string { +type awsRestjson1_deserializeOpListSuppressedDestinations struct { +} + +func (*awsRestjson1_deserializeOpListSuppressedDestinations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutAccountDetails) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListSuppressedDestinations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7945,15 +8364,43 @@ func (m *awsRestjson1_deserializeOpPutAccountDetails) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutAccountDetails(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListSuppressedDestinations(response, &metadata) } - output := &PutAccountDetailsOutput{} + output := &ListSuppressedDestinationsOutput{} 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_deserializeOpDocumentListSuppressedDestinationsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutAccountDetails(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListSuppressedDestinations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7997,8 +8444,8 @@ func awsRestjson1_deserializeOpErrorPutAccountDetails(response *smithyhttp.Respo case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -8013,14 +8460,59 @@ func awsRestjson1_deserializeOpErrorPutAccountDetails(response *smithyhttp.Respo } } -type awsRestjson1_deserializeOpPutAccountSendingAttributes struct { +func awsRestjson1_deserializeOpDocumentListSuppressedDestinationsOutput(v **ListSuppressedDestinationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListSuppressedDestinationsOutput + if *v == nil { + sv = &ListSuppressedDestinationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "SuppressedDestinationSummaries": + if err := awsRestjson1_deserializeDocumentSuppressedDestinationSummaries(&sv.SuppressedDestinationSummaries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpPutAccountSendingAttributes) ID() string { +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutAccountSendingAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8034,15 +8526,43 @@ func (m *awsRestjson1_deserializeOpPutAccountSendingAttributes) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutAccountSendingAttributes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &PutAccountSendingAttributesOutput{} + output := &ListTagsForResourceOutput{} out.Result = output + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutAccountSendingAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8086,6 +8606,9 @@ func awsRestjson1_deserializeOpErrorPutAccountSendingAttributes(response *smithy case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -8099,38 +8622,74 @@ func awsRestjson1_deserializeOpErrorPutAccountSendingAttributes(response *smithy } } -type awsRestjson1_deserializeOpPutAccountSuppressionAttributes struct { -} - -func (*awsRestjson1_deserializeOpPutAccountSuppressionAttributes) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpPutAccountSuppressionAttributes) HandleDeserialize(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 +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - response, ok := out.RawResponse.(*smithyhttp.Response) + shape, ok := value.(map[string]interface{}) if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + return fmt.Errorf("unexpected JSON type %v", value) } - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutAccountSuppressionAttributes(response, &metadata) + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v } - output := &PutAccountSuppressionAttributesOutput{} - out.Result = output - - return out, metadata, err -} -func awsRestjson1_deserializeOpErrorPutAccountSuppressionAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + for key, value := range shape { + switch key { + case "Tags": + if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutAccountDedicatedIpWarmupAttributes struct { +} + +func (*awsRestjson1_deserializeOpPutAccountDedicatedIpWarmupAttributes) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutAccountDedicatedIpWarmupAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorPutAccountDedicatedIpWarmupAttributes(response, &metadata) + } + output := &PutAccountDedicatedIpWarmupAttributesOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutAccountDedicatedIpWarmupAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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()) @@ -8185,14 +8744,14 @@ func awsRestjson1_deserializeOpErrorPutAccountSuppressionAttributes(response *sm } } -type awsRestjson1_deserializeOpPutAccountVdmAttributes struct { +type awsRestjson1_deserializeOpPutAccountDetails struct { } -func (*awsRestjson1_deserializeOpPutAccountVdmAttributes) ID() string { +func (*awsRestjson1_deserializeOpPutAccountDetails) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutAccountVdmAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutAccountDetails) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8206,15 +8765,15 @@ func (m *awsRestjson1_deserializeOpPutAccountVdmAttributes) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutAccountVdmAttributes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutAccountDetails(response, &metadata) } - output := &PutAccountVdmAttributesOutput{} + output := &PutAccountDetailsOutput{} out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutAccountVdmAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutAccountDetails(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8258,6 +8817,9 @@ func awsRestjson1_deserializeOpErrorPutAccountVdmAttributes(response *smithyhttp case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -8271,14 +8833,14 @@ func awsRestjson1_deserializeOpErrorPutAccountVdmAttributes(response *smithyhttp } } -type awsRestjson1_deserializeOpPutConfigurationSetDeliveryOptions struct { +type awsRestjson1_deserializeOpPutAccountSendingAttributes struct { } -func (*awsRestjson1_deserializeOpPutConfigurationSetDeliveryOptions) ID() string { +func (*awsRestjson1_deserializeOpPutAccountSendingAttributes) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutConfigurationSetDeliveryOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutAccountSendingAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8292,15 +8854,15 @@ func (m *awsRestjson1_deserializeOpPutConfigurationSetDeliveryOptions) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutConfigurationSetDeliveryOptions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutAccountSendingAttributes(response, &metadata) } - output := &PutConfigurationSetDeliveryOptionsOutput{} + output := &PutAccountSendingAttributesOutput{} out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutConfigurationSetDeliveryOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutAccountSendingAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8344,9 +8906,6 @@ func awsRestjson1_deserializeOpErrorPutConfigurationSetDeliveryOptions(response case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -8360,14 +8919,14 @@ func awsRestjson1_deserializeOpErrorPutConfigurationSetDeliveryOptions(response } } -type awsRestjson1_deserializeOpPutConfigurationSetReputationOptions struct { +type awsRestjson1_deserializeOpPutAccountSuppressionAttributes struct { } -func (*awsRestjson1_deserializeOpPutConfigurationSetReputationOptions) ID() string { +func (*awsRestjson1_deserializeOpPutAccountSuppressionAttributes) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutConfigurationSetReputationOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutAccountSuppressionAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8381,15 +8940,15 @@ func (m *awsRestjson1_deserializeOpPutConfigurationSetReputationOptions) HandleD } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutConfigurationSetReputationOptions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutAccountSuppressionAttributes(response, &metadata) } - output := &PutConfigurationSetReputationOptionsOutput{} + output := &PutAccountSuppressionAttributesOutput{} out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutConfigurationSetReputationOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutAccountSuppressionAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8433,9 +8992,6 @@ func awsRestjson1_deserializeOpErrorPutConfigurationSetReputationOptions(respons case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -8449,14 +9005,14 @@ func awsRestjson1_deserializeOpErrorPutConfigurationSetReputationOptions(respons } } -type awsRestjson1_deserializeOpPutConfigurationSetSendingOptions struct { +type awsRestjson1_deserializeOpPutAccountVdmAttributes struct { } -func (*awsRestjson1_deserializeOpPutConfigurationSetSendingOptions) ID() string { +func (*awsRestjson1_deserializeOpPutAccountVdmAttributes) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutConfigurationSetSendingOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutAccountVdmAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8470,15 +9026,15 @@ func (m *awsRestjson1_deserializeOpPutConfigurationSetSendingOptions) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutConfigurationSetSendingOptions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutAccountVdmAttributes(response, &metadata) } - output := &PutConfigurationSetSendingOptionsOutput{} + output := &PutAccountVdmAttributesOutput{} out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutConfigurationSetSendingOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutAccountVdmAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8522,9 +9078,6 @@ func awsRestjson1_deserializeOpErrorPutConfigurationSetSendingOptions(response * case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -8538,14 +9091,14 @@ func awsRestjson1_deserializeOpErrorPutConfigurationSetSendingOptions(response * } } -type awsRestjson1_deserializeOpPutConfigurationSetSuppressionOptions struct { +type awsRestjson1_deserializeOpPutConfigurationSetDeliveryOptions struct { } -func (*awsRestjson1_deserializeOpPutConfigurationSetSuppressionOptions) ID() string { +func (*awsRestjson1_deserializeOpPutConfigurationSetDeliveryOptions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutConfigurationSetSuppressionOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutConfigurationSetDeliveryOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8559,15 +9112,15 @@ func (m *awsRestjson1_deserializeOpPutConfigurationSetSuppressionOptions) Handle } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutConfigurationSetSuppressionOptions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutConfigurationSetDeliveryOptions(response, &metadata) } - output := &PutConfigurationSetSuppressionOptionsOutput{} + output := &PutConfigurationSetDeliveryOptionsOutput{} out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutConfigurationSetSuppressionOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutConfigurationSetDeliveryOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8627,14 +9180,14 @@ func awsRestjson1_deserializeOpErrorPutConfigurationSetSuppressionOptions(respon } } -type awsRestjson1_deserializeOpPutConfigurationSetTrackingOptions struct { +type awsRestjson1_deserializeOpPutConfigurationSetReputationOptions struct { } -func (*awsRestjson1_deserializeOpPutConfigurationSetTrackingOptions) ID() string { +func (*awsRestjson1_deserializeOpPutConfigurationSetReputationOptions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutConfigurationSetTrackingOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutConfigurationSetReputationOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8648,15 +9201,15 @@ func (m *awsRestjson1_deserializeOpPutConfigurationSetTrackingOptions) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutConfigurationSetTrackingOptions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutConfigurationSetReputationOptions(response, &metadata) } - output := &PutConfigurationSetTrackingOptionsOutput{} + output := &PutConfigurationSetReputationOptionsOutput{} out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutConfigurationSetTrackingOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutConfigurationSetReputationOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8716,14 +9269,14 @@ func awsRestjson1_deserializeOpErrorPutConfigurationSetTrackingOptions(response } } -type awsRestjson1_deserializeOpPutConfigurationSetVdmOptions struct { +type awsRestjson1_deserializeOpPutConfigurationSetSendingOptions struct { } -func (*awsRestjson1_deserializeOpPutConfigurationSetVdmOptions) ID() string { +func (*awsRestjson1_deserializeOpPutConfigurationSetSendingOptions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutConfigurationSetVdmOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutConfigurationSetSendingOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8737,15 +9290,15 @@ func (m *awsRestjson1_deserializeOpPutConfigurationSetVdmOptions) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutConfigurationSetVdmOptions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutConfigurationSetSendingOptions(response, &metadata) } - output := &PutConfigurationSetVdmOptionsOutput{} + output := &PutConfigurationSetSendingOptionsOutput{} out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutConfigurationSetVdmOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutConfigurationSetSendingOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8805,14 +9358,14 @@ func awsRestjson1_deserializeOpErrorPutConfigurationSetVdmOptions(response *smit } } -type awsRestjson1_deserializeOpPutDedicatedIpInPool struct { +type awsRestjson1_deserializeOpPutConfigurationSetSuppressionOptions struct { } -func (*awsRestjson1_deserializeOpPutDedicatedIpInPool) ID() string { +func (*awsRestjson1_deserializeOpPutConfigurationSetSuppressionOptions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutDedicatedIpInPool) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutConfigurationSetSuppressionOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8826,15 +9379,15 @@ func (m *awsRestjson1_deserializeOpPutDedicatedIpInPool) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutDedicatedIpInPool(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutConfigurationSetSuppressionOptions(response, &metadata) } - output := &PutDedicatedIpInPoolOutput{} + output := &PutConfigurationSetSuppressionOptionsOutput{} out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutDedicatedIpInPool(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutConfigurationSetSuppressionOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8894,14 +9447,14 @@ func awsRestjson1_deserializeOpErrorPutDedicatedIpInPool(response *smithyhttp.Re } } -type awsRestjson1_deserializeOpPutDedicatedIpPoolScalingAttributes struct { +type awsRestjson1_deserializeOpPutConfigurationSetTrackingOptions struct { } -func (*awsRestjson1_deserializeOpPutDedicatedIpPoolScalingAttributes) ID() string { +func (*awsRestjson1_deserializeOpPutConfigurationSetTrackingOptions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutDedicatedIpPoolScalingAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutConfigurationSetTrackingOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8915,15 +9468,15 @@ func (m *awsRestjson1_deserializeOpPutDedicatedIpPoolScalingAttributes) HandleDe } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutDedicatedIpPoolScalingAttributes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutConfigurationSetTrackingOptions(response, &metadata) } - output := &PutDedicatedIpPoolScalingAttributesOutput{} + output := &PutConfigurationSetTrackingOptionsOutput{} out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutDedicatedIpPoolScalingAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutConfigurationSetTrackingOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8967,9 +9520,6 @@ func awsRestjson1_deserializeOpErrorPutDedicatedIpPoolScalingAttributes(response case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) @@ -8986,14 +9536,14 @@ func awsRestjson1_deserializeOpErrorPutDedicatedIpPoolScalingAttributes(response } } -type awsRestjson1_deserializeOpPutDedicatedIpWarmupAttributes struct { +type awsRestjson1_deserializeOpPutConfigurationSetVdmOptions struct { } -func (*awsRestjson1_deserializeOpPutDedicatedIpWarmupAttributes) ID() string { +func (*awsRestjson1_deserializeOpPutConfigurationSetVdmOptions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutDedicatedIpWarmupAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutConfigurationSetVdmOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9007,15 +9557,15 @@ func (m *awsRestjson1_deserializeOpPutDedicatedIpWarmupAttributes) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutDedicatedIpWarmupAttributes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutConfigurationSetVdmOptions(response, &metadata) } - output := &PutDedicatedIpWarmupAttributesOutput{} + output := &PutConfigurationSetVdmOptionsOutput{} out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutDedicatedIpWarmupAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutConfigurationSetVdmOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9075,14 +9625,14 @@ func awsRestjson1_deserializeOpErrorPutDedicatedIpWarmupAttributes(response *smi } } -type awsRestjson1_deserializeOpPutDeliverabilityDashboardOption struct { +type awsRestjson1_deserializeOpPutDedicatedIpInPool struct { } -func (*awsRestjson1_deserializeOpPutDeliverabilityDashboardOption) ID() string { +func (*awsRestjson1_deserializeOpPutDedicatedIpInPool) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutDeliverabilityDashboardOption) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutDedicatedIpInPool) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9096,15 +9646,15 @@ func (m *awsRestjson1_deserializeOpPutDeliverabilityDashboardOption) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutDeliverabilityDashboardOption(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutDedicatedIpInPool(response, &metadata) } - output := &PutDeliverabilityDashboardOptionOutput{} + output := &PutDedicatedIpInPoolOutput{} out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutDeliverabilityDashboardOption(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutDedicatedIpInPool(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9145,15 +9695,9 @@ func awsRestjson1_deserializeOpErrorPutDeliverabilityDashboardOption(response *s } switch { - case strings.EqualFold("AlreadyExistsException", errorCode): - return awsRestjson1_deserializeErrorAlreadyExistsException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) @@ -9170,14 +9714,14 @@ func awsRestjson1_deserializeOpErrorPutDeliverabilityDashboardOption(response *s } } -type awsRestjson1_deserializeOpPutEmailIdentityConfigurationSetAttributes struct { +type awsRestjson1_deserializeOpPutDedicatedIpPoolScalingAttributes struct { } -func (*awsRestjson1_deserializeOpPutEmailIdentityConfigurationSetAttributes) ID() string { +func (*awsRestjson1_deserializeOpPutDedicatedIpPoolScalingAttributes) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutEmailIdentityConfigurationSetAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutDedicatedIpPoolScalingAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9191,15 +9735,15 @@ func (m *awsRestjson1_deserializeOpPutEmailIdentityConfigurationSetAttributes) H } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutEmailIdentityConfigurationSetAttributes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutDedicatedIpPoolScalingAttributes(response, &metadata) } - output := &PutEmailIdentityConfigurationSetAttributesOutput{} + output := &PutDedicatedIpPoolScalingAttributesOutput{} out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutEmailIdentityConfigurationSetAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutDedicatedIpPoolScalingAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9243,6 +9787,9 @@ func awsRestjson1_deserializeOpErrorPutEmailIdentityConfigurationSetAttributes(r case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) @@ -9259,14 +9806,14 @@ func awsRestjson1_deserializeOpErrorPutEmailIdentityConfigurationSetAttributes(r } } -type awsRestjson1_deserializeOpPutEmailIdentityDkimAttributes struct { +type awsRestjson1_deserializeOpPutDedicatedIpWarmupAttributes struct { } -func (*awsRestjson1_deserializeOpPutEmailIdentityDkimAttributes) ID() string { +func (*awsRestjson1_deserializeOpPutDedicatedIpWarmupAttributes) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutEmailIdentityDkimAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutDedicatedIpWarmupAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9280,15 +9827,15 @@ func (m *awsRestjson1_deserializeOpPutEmailIdentityDkimAttributes) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutEmailIdentityDkimAttributes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutDedicatedIpWarmupAttributes(response, &metadata) } - output := &PutEmailIdentityDkimAttributesOutput{} + output := &PutDedicatedIpWarmupAttributesOutput{} out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutEmailIdentityDkimAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutDedicatedIpWarmupAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9348,14 +9895,14 @@ func awsRestjson1_deserializeOpErrorPutEmailIdentityDkimAttributes(response *smi } } -type awsRestjson1_deserializeOpPutEmailIdentityDkimSigningAttributes struct { +type awsRestjson1_deserializeOpPutDeliverabilityDashboardOption struct { } -func (*awsRestjson1_deserializeOpPutEmailIdentityDkimSigningAttributes) ID() string { +func (*awsRestjson1_deserializeOpPutDeliverabilityDashboardOption) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutEmailIdentityDkimSigningAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutDeliverabilityDashboardOption) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9369,9 +9916,282 @@ func (m *awsRestjson1_deserializeOpPutEmailIdentityDkimSigningAttributes) Handle } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutEmailIdentityDkimSigningAttributes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutDeliverabilityDashboardOption(response, &metadata) } - output := &PutEmailIdentityDkimSigningAttributesOutput{} + output := &PutDeliverabilityDashboardOptionOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutDeliverabilityDashboardOption(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("AlreadyExistsException", errorCode): + return awsRestjson1_deserializeErrorAlreadyExistsException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpPutEmailIdentityConfigurationSetAttributes struct { +} + +func (*awsRestjson1_deserializeOpPutEmailIdentityConfigurationSetAttributes) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutEmailIdentityConfigurationSetAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorPutEmailIdentityConfigurationSetAttributes(response, &metadata) + } + output := &PutEmailIdentityConfigurationSetAttributesOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutEmailIdentityConfigurationSetAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpPutEmailIdentityDkimAttributes struct { +} + +func (*awsRestjson1_deserializeOpPutEmailIdentityDkimAttributes) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutEmailIdentityDkimAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorPutEmailIdentityDkimAttributes(response, &metadata) + } + output := &PutEmailIdentityDkimAttributesOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutEmailIdentityDkimAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpPutEmailIdentityDkimSigningAttributes struct { +} + +func (*awsRestjson1_deserializeOpPutEmailIdentityDkimSigningAttributes) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutEmailIdentityDkimSigningAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorPutEmailIdentityDkimSigningAttributes(response, &metadata) + } + output := &PutEmailIdentityDkimSigningAttributesOutput{} out.Result = output var buff [1024]byte @@ -11998,7 +12818,65 @@ func awsRestjson1_deserializeDocumentBlacklistReport(v *map[string][]types.Black return nil } -func awsRestjson1_deserializeDocumentBulkEmailEntryResult(v **types.BulkEmailEntryResult, value interface{}) error { +func awsRestjson1_deserializeDocumentBounce(v **types.Bounce, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.Bounce + if *v == nil { + sv = &types.Bounce{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BounceSubType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BounceSubType to be of type string, got %T instead", value) + } + sv.BounceSubType = ptr.String(jtv) + } + + case "BounceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BounceType to be of type string, got %T instead", value) + } + sv.BounceType = types.BounceType(jtv) + } + + case "DiagnosticCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DiagnosticCode to be of type string, got %T instead", value) + } + sv.DiagnosticCode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBulkEmailEntryResult(v **types.BulkEmailEntryResult, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12218,6 +13096,55 @@ func awsRestjson1_deserializeDocumentCloudWatchDimensionConfigurations(v *[]type return nil } +func awsRestjson1_deserializeDocumentComplaint(v **types.Complaint, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.Complaint + if *v == nil { + sv = &types.Complaint{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ComplaintFeedbackType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplaintFeedbackType to be of type string, got %T instead", value) + } + sv.ComplaintFeedbackType = ptr.String(jtv) + } + + case "ComplaintSubType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplaintSubType to be of type string, got %T instead", value) + } + sv.ComplaintSubType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentConcurrentModificationException(v **types.ConcurrentModificationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13804,6 +14731,166 @@ func awsRestjson1_deserializeDocumentDomainIspPlacements(v *[]types.DomainIspPla return nil } +func awsRestjson1_deserializeDocumentEmailAddressFilterList(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 InsightsEmailAddress to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentEmailInsights(v **types.EmailInsights, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.EmailInsights + if *v == nil { + sv = &types.EmailInsights{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Destination": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InsightsEmailAddress to be of type string, got %T instead", value) + } + sv.Destination = ptr.String(jtv) + } + + case "Events": + if err := awsRestjson1_deserializeDocumentInsightsEvents(&sv.Events, value); err != nil { + return err + } + + case "Isp": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Isp to be of type string, got %T instead", value) + } + sv.Isp = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEmailInsightsList(v *[]types.EmailInsights, 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.EmailInsights + if *v == nil { + cv = []types.EmailInsights{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EmailInsights + destAddr := &col + if err := awsRestjson1_deserializeDocumentEmailInsights(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentEmailSubjectFilterList(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 EmailSubject to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentEmailTemplateContent(v **types.EmailTemplateContent, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13938,21 +15025,492 @@ func awsRestjson1_deserializeDocumentEmailTemplateMetadataList(v *[]types.EmailT cv = *v } - for _, value := range shape { - var col types.EmailTemplateMetadata - destAddr := &col - if err := awsRestjson1_deserializeDocumentEmailTemplateMetadata(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for _, value := range shape { + var col types.EmailTemplateMetadata + destAddr := &col + if err := awsRestjson1_deserializeDocumentEmailTemplateMetadata(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentEsps(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 Esp to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentEventDestination(v **types.EventDestination, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.EventDestination + if *v == nil { + sv = &types.EventDestination{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CloudWatchDestination": + if err := awsRestjson1_deserializeDocumentCloudWatchDestination(&sv.CloudWatchDestination, value); err != nil { + return err + } + + case "Enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", value) + } + sv.Enabled = jtv + } + + case "KinesisFirehoseDestination": + if err := awsRestjson1_deserializeDocumentKinesisFirehoseDestination(&sv.KinesisFirehoseDestination, value); err != nil { + return err + } + + case "MatchingEventTypes": + if err := awsRestjson1_deserializeDocumentEventTypes(&sv.MatchingEventTypes, value); err != nil { + return err + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventDestinationName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "PinpointDestination": + if err := awsRestjson1_deserializeDocumentPinpointDestination(&sv.PinpointDestination, value); err != nil { + return err + } + + case "SnsDestination": + if err := awsRestjson1_deserializeDocumentSnsDestination(&sv.SnsDestination, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEventDestinations(v *[]types.EventDestination, 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.EventDestination + if *v == nil { + cv = []types.EventDestination{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EventDestination + destAddr := &col + if err := awsRestjson1_deserializeDocumentEventDestination(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentEventDetails(v **types.EventDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.EventDetails + if *v == nil { + sv = &types.EventDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Bounce": + if err := awsRestjson1_deserializeDocumentBounce(&sv.Bounce, value); err != nil { + return err + } + + case "Complaint": + if err := awsRestjson1_deserializeDocumentComplaint(&sv.Complaint, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEventTypes(v *[]types.EventType, 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.EventType + if *v == nil { + cv = []types.EventType{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EventType + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventType to be of type string, got %T instead", value) + } + col = types.EventType(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentExportDataSource(v **types.ExportDataSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ExportDataSource + if *v == nil { + sv = &types.ExportDataSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MessageInsightsDataSource": + if err := awsRestjson1_deserializeDocumentMessageInsightsDataSource(&sv.MessageInsightsDataSource, value); err != nil { + return err + } + + case "MetricsDataSource": + if err := awsRestjson1_deserializeDocumentMetricsDataSource(&sv.MetricsDataSource, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentExportDestination(v **types.ExportDestination, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ExportDestination + if *v == nil { + sv = &types.ExportDestination{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DataFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataFormat to be of type string, got %T instead", value) + } + sv.DataFormat = types.DataFormat(jtv) + } + + case "S3Url": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Url to be of type string, got %T instead", value) + } + sv.S3Url = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentExportDimensions(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 + mapVar := parsedVal + if err := awsRestjson1_deserializeDocumentExportDimensionValue(&mapVar, value); err != nil { + return err + } + parsedVal = mapVar + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentExportDimensionValue(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 MetricDimensionValue to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentExportJobSummary(v **types.ExportJobSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ExportJobSummary + if *v == nil { + sv = &types.ExportJobSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + 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 "ExportSourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportSourceType to be of type string, got %T instead", value) + } + sv.ExportSourceType = types.ExportSourceType(jtv) + } + + 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 "JobStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobStatus to be of type string, got %T instead", value) + } + sv.JobStatus = types.JobStatus(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentEsps(v *[]string, value interface{}) error { +func awsRestjson1_deserializeDocumentExportJobSummaryList(v *[]types.ExportJobSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -13965,22 +15523,20 @@ func awsRestjson1_deserializeDocumentEsps(v *[]string, value interface{}) error return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var cv []types.ExportJobSummary if *v == nil { - cv = []string{} + cv = []types.ExportJobSummary{} } else { cv = *v } for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Esp to be of type string, got %T instead", value) - } - col = jtv + var col types.ExportJobSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentExportJobSummary(&destAddr, value); err != nil { + return err } + col = *destAddr cv = append(cv, col) } @@ -13988,7 +15544,7 @@ func awsRestjson1_deserializeDocumentEsps(v *[]string, value interface{}) error return nil } -func awsRestjson1_deserializeDocumentEventDestination(v **types.EventDestination, value interface{}) error { +func awsRestjson1_deserializeDocumentExportMetric(v **types.ExportMetric, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14001,56 +15557,31 @@ func awsRestjson1_deserializeDocumentEventDestination(v **types.EventDestination return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EventDestination + var sv *types.ExportMetric if *v == nil { - sv = &types.EventDestination{} + sv = &types.ExportMetric{} } else { sv = *v } for key, value := range shape { switch key { - case "CloudWatchDestination": - if err := awsRestjson1_deserializeDocumentCloudWatchDestination(&sv.CloudWatchDestination, value); err != nil { - return err - } - - case "Enabled": + case "Aggregation": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", value) + return fmt.Errorf("expected MetricAggregation to be of type string, got %T instead", value) } - sv.Enabled = jtv - } - - case "KinesisFirehoseDestination": - if err := awsRestjson1_deserializeDocumentKinesisFirehoseDestination(&sv.KinesisFirehoseDestination, value); err != nil { - return err - } - - case "MatchingEventTypes": - if err := awsRestjson1_deserializeDocumentEventTypes(&sv.MatchingEventTypes, value); err != nil { - return err + sv.Aggregation = types.MetricAggregation(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EventDestinationName to be of type string, got %T instead", value) + return fmt.Errorf("expected Metric to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) - } - - case "PinpointDestination": - if err := awsRestjson1_deserializeDocumentPinpointDestination(&sv.PinpointDestination, value); err != nil { - return err - } - - case "SnsDestination": - if err := awsRestjson1_deserializeDocumentSnsDestination(&sv.SnsDestination, value); err != nil { - return err + sv.Name = types.Metric(jtv) } default: @@ -14062,7 +15593,7 @@ func awsRestjson1_deserializeDocumentEventDestination(v **types.EventDestination return nil } -func awsRestjson1_deserializeDocumentEventDestinations(v *[]types.EventDestination, value interface{}) error { +func awsRestjson1_deserializeDocumentExportMetrics(v *[]types.ExportMetric, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14075,17 +15606,17 @@ func awsRestjson1_deserializeDocumentEventDestinations(v *[]types.EventDestinati return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.EventDestination + var cv []types.ExportMetric if *v == nil { - cv = []types.EventDestination{} + cv = []types.ExportMetric{} } else { cv = *v } for _, value := range shape { - var col types.EventDestination + var col types.ExportMetric destAddr := &col - if err := awsRestjson1_deserializeDocumentEventDestination(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentExportMetric(&destAddr, value); err != nil { return err } col = *destAddr @@ -14096,7 +15627,7 @@ func awsRestjson1_deserializeDocumentEventDestinations(v *[]types.EventDestinati return nil } -func awsRestjson1_deserializeDocumentEventTypes(v *[]types.EventType, value interface{}) error { +func awsRestjson1_deserializeDocumentExportStatistics(v **types.ExportStatistics, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14104,31 +15635,52 @@ func awsRestjson1_deserializeDocumentEventTypes(v *[]types.EventType, value inte 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.EventType + var sv *types.ExportStatistics if *v == nil { - cv = []types.EventType{} + sv = &types.ExportStatistics{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.EventType - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EventType to be of type string, got %T instead", value) + for key, value := range shape { + switch key { + case "ExportedRecordsCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ExportedRecordsCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ExportedRecordsCount = ptr.Int32(int32(i64)) } - col = types.EventType(jtv) - } - cv = append(cv, col) + case "ProcessedRecordsCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ProcessedRecordsCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ProcessedRecordsCount = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } @@ -14503,40 +16055,180 @@ func awsRestjson1_deserializeDocumentImportJobSummary(v **types.ImportJobSummary sv.FailedRecordsCount = ptr.Int32(int32(i64)) } - case "ImportDestination": - if err := awsRestjson1_deserializeDocumentImportDestination(&sv.ImportDestination, value); err != nil { + case "ImportDestination": + if err := awsRestjson1_deserializeDocumentImportDestination(&sv.ImportDestination, value); err != nil { + return err + } + + 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 "JobStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobStatus to be of type string, got %T instead", value) + } + sv.JobStatus = types.JobStatus(jtv) + } + + case "ProcessedRecordsCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ProcessedRecordsCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ProcessedRecordsCount = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentImportJobSummaryList(v *[]types.ImportJobSummary, 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.ImportJobSummary + if *v == nil { + cv = []types.ImportJobSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ImportJobSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentImportJobSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentInboxPlacementTrackingOption(v **types.InboxPlacementTrackingOption, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.InboxPlacementTrackingOption + if *v == nil { + sv = &types.InboxPlacementTrackingOption{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Global": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", value) + } + sv.Global = jtv + } + + case "TrackedIsps": + if err := awsRestjson1_deserializeDocumentIspNameList(&sv.TrackedIsps, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInsightsEvent(v **types.InsightsEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.InsightsEvent + if *v == nil { + sv = &types.InsightsEvent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Details": + if err := awsRestjson1_deserializeDocumentEventDetails(&sv.Details, value); err != nil { return err } - case "JobId": + case "Timestamp": 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) - } + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Timestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - case "JobStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected JobStatus to be of type string, got %T instead", value) } - sv.JobStatus = types.JobStatus(jtv) } - case "ProcessedRecordsCount": + case "Type": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ProcessedRecordsCount to be json.Number, got %T instead", value) + return fmt.Errorf("expected EventType to be of type string, got %T instead", value) } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.ProcessedRecordsCount = ptr.Int32(int32(i64)) + sv.Type = types.EventType(jtv) } default: @@ -14548,7 +16240,7 @@ func awsRestjson1_deserializeDocumentImportJobSummary(v **types.ImportJobSummary return nil } -func awsRestjson1_deserializeDocumentImportJobSummaryList(v *[]types.ImportJobSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentInsightsEvents(v *[]types.InsightsEvent, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14561,17 +16253,17 @@ func awsRestjson1_deserializeDocumentImportJobSummaryList(v *[]types.ImportJobSu return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ImportJobSummary + var cv []types.InsightsEvent if *v == nil { - cv = []types.ImportJobSummary{} + cv = []types.InsightsEvent{} } else { cv = *v } for _, value := range shape { - var col types.ImportJobSummary + var col types.InsightsEvent destAddr := &col - if err := awsRestjson1_deserializeDocumentImportJobSummary(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentInsightsEvent(&destAddr, value); err != nil { return err } col = *destAddr @@ -14582,7 +16274,7 @@ func awsRestjson1_deserializeDocumentImportJobSummaryList(v *[]types.ImportJobSu return nil } -func awsRestjson1_deserializeDocumentInboxPlacementTrackingOption(v **types.InboxPlacementTrackingOption, value interface{}) error { +func awsRestjson1_deserializeDocumentInternalServiceErrorException(v **types.InternalServiceErrorException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14595,27 +16287,22 @@ func awsRestjson1_deserializeDocumentInboxPlacementTrackingOption(v **types.Inbo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InboxPlacementTrackingOption + var sv *types.InternalServiceErrorException if *v == nil { - sv = &types.InboxPlacementTrackingOption{} + sv = &types.InternalServiceErrorException{} } else { sv = *v } for key, value := range shape { switch key { - case "Global": + case "message": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", value) + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.Global = jtv - } - - case "TrackedIsps": - if err := awsRestjson1_deserializeDocumentIspNameList(&sv.TrackedIsps, value); err != nil { - return err + sv.Message = ptr.String(jtv) } default: @@ -14627,7 +16314,7 @@ func awsRestjson1_deserializeDocumentInboxPlacementTrackingOption(v **types.Inbo return nil } -func awsRestjson1_deserializeDocumentInternalServiceErrorException(v **types.InternalServiceErrorException, value interface{}) error { +func awsRestjson1_deserializeDocumentInvalidNextTokenException(v **types.InvalidNextTokenException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14640,9 +16327,9 @@ func awsRestjson1_deserializeDocumentInternalServiceErrorException(v **types.Int return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InternalServiceErrorException + var sv *types.InvalidNextTokenException if *v == nil { - sv = &types.InternalServiceErrorException{} + sv = &types.InvalidNextTokenException{} } else { sv = *v } @@ -14667,7 +16354,7 @@ func awsRestjson1_deserializeDocumentInternalServiceErrorException(v **types.Int return nil } -func awsRestjson1_deserializeDocumentInvalidNextTokenException(v **types.InvalidNextTokenException, value interface{}) error { +func awsRestjson1_deserializeDocumentIpList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14675,39 +16362,35 @@ func awsRestjson1_deserializeDocumentInvalidNextTokenException(v **types.Invalid 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.InvalidNextTokenException + var cv []string if *v == nil { - sv = &types.InvalidNextTokenException{} + cv = []string{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Ip to be of type string, got %T instead", value) } - - default: - _, _ = key, value - + col = jtv } + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsRestjson1_deserializeDocumentIpList(v *[]string, value interface{}) error { +func awsRestjson1_deserializeDocumentIspFilterList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14732,7 +16415,7 @@ func awsRestjson1_deserializeDocumentIpList(v *[]string, value interface{}) erro if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Ip to be of type string, got %T instead", value) + return fmt.Errorf("expected Isp to be of type string, got %T instead", value) } col = jtv } @@ -14907,6 +16590,78 @@ func awsRestjson1_deserializeDocumentKinesisFirehoseDestination(v **types.Kinesi return nil } +func awsRestjson1_deserializeDocumentLastDeliveryEventList(v *[]types.DeliveryEventType, 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.DeliveryEventType + if *v == nil { + cv = []types.DeliveryEventType{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DeliveryEventType + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeliveryEventType to be of type string, got %T instead", value) + } + col = types.DeliveryEventType(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLastEngagementEventList(v *[]types.EngagementEventType, 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.EngagementEventType + if *v == nil { + cv = []types.EngagementEventType{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EngagementEventType + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EngagementEventType to be of type string, got %T instead", value) + } + col = types.EngagementEventType(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15011,11 +16766,105 @@ func awsRestjson1_deserializeDocumentListOfContacts(v *[]types.Contact, value in cv = append(cv, col) } - *v = cv + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentListOfDedicatedIpPools(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 PoolName to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentMailFromAttributes(v **types.MailFromAttributes, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.MailFromAttributes + if *v == nil { + sv = &types.MailFromAttributes{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BehaviorOnMxFailure": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BehaviorOnMxFailure to be of type string, got %T instead", value) + } + sv.BehaviorOnMxFailure = types.BehaviorOnMxFailure(jtv) + } + + case "MailFromDomain": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MailFromDomainName to be of type string, got %T instead", value) + } + sv.MailFromDomain = ptr.String(jtv) + } + + case "MailFromDomainStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MailFromDomainStatus to be of type string, got %T instead", value) + } + sv.MailFromDomainStatus = types.MailFromDomainStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv return nil } -func awsRestjson1_deserializeDocumentListOfDedicatedIpPools(v *[]string, value interface{}) error { +func awsRestjson1_deserializeDocumentMailFromDomainNotVerifiedException(v **types.MailFromDomainNotVerifiedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15023,35 +16872,39 @@ func awsRestjson1_deserializeDocumentListOfDedicatedIpPools(v *[]string, value i return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var sv *types.MailFromDomainNotVerifiedException if *v == nil { - cv = []string{} + sv = &types.MailFromDomainNotVerifiedException{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PoolName to be of type string, got %T instead", value) + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) } - col = jtv - } - cv = append(cv, col) + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentMailFromAttributes(v **types.MailFromAttributes, value interface{}) error { +func awsRestjson1_deserializeDocumentMessageInsightsDataSource(v **types.MessageInsightsDataSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15064,40 +16917,68 @@ func awsRestjson1_deserializeDocumentMailFromAttributes(v **types.MailFromAttrib return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.MailFromAttributes + var sv *types.MessageInsightsDataSource if *v == nil { - sv = &types.MailFromAttributes{} + sv = &types.MessageInsightsDataSource{} } else { sv = *v } for key, value := range shape { switch key { - case "BehaviorOnMxFailure": + case "EndDate": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected BehaviorOnMxFailure to be of type string, got %T instead", value) + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } - sv.BehaviorOnMxFailure = types.BehaviorOnMxFailure(jtv) } - case "MailFromDomain": + case "Exclude": + if err := awsRestjson1_deserializeDocumentMessageInsightsFilters(&sv.Exclude, value); err != nil { + return err + } + + case "Include": + if err := awsRestjson1_deserializeDocumentMessageInsightsFilters(&sv.Include, value); err != nil { + return err + } + + case "MaxResults": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected MailFromDomainName to be of type string, got %T instead", value) + return fmt.Errorf("expected MessageInsightsExportMaxResults to be json.Number, got %T instead", value) } - sv.MailFromDomain = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxResults = ptr.Int32(int32(i64)) } - case "MailFromDomainStatus": + case "StartDate": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MailFromDomainStatus to be of type string, got %T instead", value) + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } - sv.MailFromDomainStatus = types.MailFromDomainStatus(jtv) } default: @@ -15109,7 +16990,7 @@ func awsRestjson1_deserializeDocumentMailFromAttributes(v **types.MailFromAttrib return nil } -func awsRestjson1_deserializeDocumentMailFromDomainNotVerifiedException(v **types.MailFromDomainNotVerifiedException, value interface{}) error { +func awsRestjson1_deserializeDocumentMessageInsightsFilters(v **types.MessageInsightsFilters, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15122,9 +17003,70 @@ func awsRestjson1_deserializeDocumentMailFromDomainNotVerifiedException(v **type return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.MailFromDomainNotVerifiedException + var sv *types.MessageInsightsFilters if *v == nil { - sv = &types.MailFromDomainNotVerifiedException{} + sv = &types.MessageInsightsFilters{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Destination": + if err := awsRestjson1_deserializeDocumentEmailAddressFilterList(&sv.Destination, value); err != nil { + return err + } + + case "FromEmailAddress": + if err := awsRestjson1_deserializeDocumentEmailAddressFilterList(&sv.FromEmailAddress, value); err != nil { + return err + } + + case "Isp": + if err := awsRestjson1_deserializeDocumentIspFilterList(&sv.Isp, value); err != nil { + return err + } + + case "LastDeliveryEvent": + if err := awsRestjson1_deserializeDocumentLastDeliveryEventList(&sv.LastDeliveryEvent, value); err != nil { + return err + } + + case "LastEngagementEvent": + if err := awsRestjson1_deserializeDocumentLastEngagementEventList(&sv.LastEngagementEvent, value); err != nil { + return err + } + + case "Subject": + if err := awsRestjson1_deserializeDocumentEmailSubjectFilterList(&sv.Subject, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMessageRejected(v **types.MessageRejected, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.MessageRejected + if *v == nil { + sv = &types.MessageRejected{} } else { sv = *v } @@ -15149,7 +17091,7 @@ func awsRestjson1_deserializeDocumentMailFromDomainNotVerifiedException(v **type return nil } -func awsRestjson1_deserializeDocumentMessageRejected(v **types.MessageRejected, value interface{}) error { +func awsRestjson1_deserializeDocumentMessageTag(v **types.MessageTag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -15162,22 +17104,31 @@ func awsRestjson1_deserializeDocumentMessageRejected(v **types.MessageRejected, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.MessageRejected + var sv *types.MessageTag if *v == nil { - sv = &types.MessageRejected{} + sv = &types.MessageTag{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "Name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected MessageTagName to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Name = ptr.String(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageTagValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) } default: @@ -15189,6 +17140,40 @@ func awsRestjson1_deserializeDocumentMessageRejected(v **types.MessageRejected, return nil } +func awsRestjson1_deserializeDocumentMessageTagList(v *[]types.MessageTag, 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.MessageTag + if *v == nil { + cv = []types.MessageTag{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MessageTag + destAddr := &col + if err := awsRestjson1_deserializeDocumentMessageTag(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentMetricDataError(v **types.MetricDataError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15365,6 +17350,88 @@ func awsRestjson1_deserializeDocumentMetricDataResultList(v *[]types.MetricDataR return nil } +func awsRestjson1_deserializeDocumentMetricsDataSource(v **types.MetricsDataSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.MetricsDataSource + if *v == nil { + sv = &types.MetricsDataSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Dimensions": + if err := awsRestjson1_deserializeDocumentExportDimensions(&sv.Dimensions, value); err != nil { + return err + } + + case "EndDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Metrics": + if err := awsRestjson1_deserializeDocumentExportMetrics(&sv.Metrics, value); err != nil { + return err + } + + case "Namespace": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MetricNamespace to be of type string, got %T instead", value) + } + sv.Namespace = types.MetricNamespace(jtv) + } + + case "StartDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartDate = 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 awsRestjson1_deserializeDocumentMetricValueList(v *[]int64, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/sesv2/generated.json b/service/sesv2/generated.json index 1f7c928fafb..2a98f96d27e 100644 --- a/service/sesv2/generated.json +++ b/service/sesv2/generated.json @@ -10,6 +10,7 @@ "api_client.go", "api_client_test.go", "api_op_BatchGetMetricData.go", + "api_op_CancelExportJob.go", "api_op_CreateConfigurationSet.go", "api_op_CreateConfigurationSetEventDestination.go", "api_op_CreateContact.go", @@ -20,6 +21,7 @@ "api_op_CreateEmailIdentity.go", "api_op_CreateEmailIdentityPolicy.go", "api_op_CreateEmailTemplate.go", + "api_op_CreateExportJob.go", "api_op_CreateImportJob.go", "api_op_DeleteConfigurationSet.go", "api_op_DeleteConfigurationSetEventDestination.go", @@ -48,7 +50,9 @@ "api_op_GetEmailIdentity.go", "api_op_GetEmailIdentityPolicies.go", "api_op_GetEmailTemplate.go", + "api_op_GetExportJob.go", "api_op_GetImportJob.go", + "api_op_GetMessageInsights.go", "api_op_GetSuppressedDestination.go", "api_op_ListConfigurationSets.go", "api_op_ListContactLists.go", @@ -59,6 +63,7 @@ "api_op_ListDomainDeliverabilityCampaigns.go", "api_op_ListEmailIdentities.go", "api_op_ListEmailTemplates.go", + "api_op_ListExportJobs.go", "api_op_ListImportJobs.go", "api_op_ListRecommendations.go", "api_op_ListSuppressedDestinations.go", diff --git a/service/sesv2/serializers.go b/service/sesv2/serializers.go index 536a20e9074..f5d9152d594 100644 --- a/service/sesv2/serializers.go +++ b/service/sesv2/serializers.go @@ -92,6 +92,71 @@ func awsRestjson1_serializeOpDocumentBatchGetMetricDataInput(v *BatchGetMetricDa return nil } +type awsRestjson1_serializeOpCancelExportJob struct { +} + +func (*awsRestjson1_serializeOpCancelExportJob) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCancelExportJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CancelExportJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/email/export-jobs/{JobId}/cancel") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCancelExportJobInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCancelExportJobInput(v *CancelExportJobInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.JobId == nil || len(*v.JobId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member JobId must not be empty")} + } + if v.JobId != nil { + if err := encoder.SetURI("JobId").String(*v.JobId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateConfigurationSet struct { } @@ -1064,6 +1129,90 @@ func awsRestjson1_serializeOpDocumentCreateEmailTemplateInput(v *CreateEmailTemp return nil } +type awsRestjson1_serializeOpCreateExportJob struct { +} + +func (*awsRestjson1_serializeOpCreateExportJob) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateExportJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateExportJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/email/export-jobs") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateExportJobInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateExportJobInput(v *CreateExportJobInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateExportJobInput(v *CreateExportJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ExportDataSource != nil { + ok := object.Key("ExportDataSource") + if err := awsRestjson1_serializeDocumentExportDataSource(v.ExportDataSource, ok); err != nil { + return err + } + } + + if v.ExportDestination != nil { + ok := object.Key("ExportDestination") + if err := awsRestjson1_serializeDocumentExportDestination(v.ExportDestination, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateImportJob struct { } @@ -2921,6 +3070,71 @@ func awsRestjson1_serializeOpHttpBindingsGetEmailTemplateInput(v *GetEmailTempla return nil } +type awsRestjson1_serializeOpGetExportJob struct { +} + +func (*awsRestjson1_serializeOpGetExportJob) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetExportJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetExportJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/email/export-jobs/{JobId}") + 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_serializeOpHttpBindingsGetExportJobInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetExportJobInput(v *GetExportJobInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.JobId == nil || len(*v.JobId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member JobId must not be empty")} + } + if v.JobId != nil { + if err := encoder.SetURI("JobId").String(*v.JobId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetImportJob struct { } @@ -2986,6 +3200,71 @@ func awsRestjson1_serializeOpHttpBindingsGetImportJobInput(v *GetImportJobInput, return nil } +type awsRestjson1_serializeOpGetMessageInsights struct { +} + +func (*awsRestjson1_serializeOpGetMessageInsights) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetMessageInsights) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetMessageInsightsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/email/insights/{MessageId}") + 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_serializeOpHttpBindingsGetMessageInsightsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetMessageInsightsInput(v *GetMessageInsightsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MessageId == nil || len(*v.MessageId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MessageId must not be empty")} + } + if v.MessageId != nil { + if err := encoder.SetURI("MessageId").String(*v.MessageId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetSuppressedDestination struct { } @@ -3571,7 +3850,71 @@ func (m *awsRestjson1_serializeOpListEmailIdentities) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v2/email/identities") + opPath, opQuery := httpbinding.SplitURI("/v2/email/identities") + 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_serializeOpHttpBindingsListEmailIdentitiesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListEmailIdentitiesInput(v *ListEmailIdentitiesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.NextToken != nil { + encoder.SetQuery("NextToken").String(*v.NextToken) + } + + if v.PageSize != nil { + encoder.SetQuery("PageSize").Integer(*v.PageSize) + } + + return nil +} + +type awsRestjson1_serializeOpListEmailTemplates struct { +} + +func (*awsRestjson1_serializeOpListEmailTemplates) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListEmailTemplates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListEmailTemplatesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v2/email/templates") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -3587,7 +3930,7 @@ func (m *awsRestjson1_serializeOpListEmailIdentities) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListEmailIdentitiesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListEmailTemplatesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3598,7 +3941,7 @@ func (m *awsRestjson1_serializeOpListEmailIdentities) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListEmailIdentitiesInput(v *ListEmailIdentitiesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListEmailTemplatesInput(v *ListEmailTemplatesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -3614,14 +3957,14 @@ func awsRestjson1_serializeOpHttpBindingsListEmailIdentitiesInput(v *ListEmailId return nil } -type awsRestjson1_serializeOpListEmailTemplates struct { +type awsRestjson1_serializeOpListExportJobs struct { } -func (*awsRestjson1_serializeOpListEmailTemplates) ID() string { +func (*awsRestjson1_serializeOpListExportJobs) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListEmailTemplates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListExportJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -3629,16 +3972,16 @@ func (m *awsRestjson1_serializeOpListEmailTemplates) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListEmailTemplatesInput) + input, ok := in.Parameters.(*ListExportJobsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v2/email/templates") + opPath, opQuery := httpbinding.SplitURI("/v2/email/list-export-jobs") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -3651,7 +3994,14 @@ func (m *awsRestjson1_serializeOpListEmailTemplates) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListEmailTemplatesInput(input, restEncoder); err != nil { + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListExportJobsInput(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} } @@ -3662,17 +4012,36 @@ func (m *awsRestjson1_serializeOpListEmailTemplates) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListEmailTemplatesInput(v *ListEmailTemplatesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListExportJobsInput(v *ListExportJobsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + return nil +} + +func awsRestjson1_serializeOpDocumentListExportJobsInput(v *ListExportJobsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ExportSourceType) > 0 { + ok := object.Key("ExportSourceType") + ok.String(string(v.ExportSourceType)) + } + + if len(v.JobStatus) > 0 { + ok := object.Key("JobStatus") + ok.String(string(v.JobStatus)) + } + if v.NextToken != nil { - encoder.SetQuery("NextToken").String(*v.NextToken) + ok := object.Key("NextToken") + ok.String(*v.NextToken) } if v.PageSize != nil { - encoder.SetQuery("PageSize").Integer(*v.PageSize) + ok := object.Key("PageSize") + ok.Integer(*v.PageSize) } return nil @@ -7344,6 +7713,17 @@ func awsRestjson1_serializeDocumentDomainDeliverabilityTrackingOptions(v []types return nil } +func awsRestjson1_serializeDocumentEmailAddressFilterList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentEmailAddressList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -7383,6 +7763,17 @@ func awsRestjson1_serializeDocumentEmailContent(v *types.EmailContent, value smi return nil } +func awsRestjson1_serializeDocumentEmailSubjectFilterList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentEmailTemplateContent(v *types.EmailTemplateContent, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -7463,6 +7854,101 @@ func awsRestjson1_serializeDocumentEventTypes(v []types.EventType, value smithyj return nil } +func awsRestjson1_serializeDocumentExportDataSource(v *types.ExportDataSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MessageInsightsDataSource != nil { + ok := object.Key("MessageInsightsDataSource") + if err := awsRestjson1_serializeDocumentMessageInsightsDataSource(v.MessageInsightsDataSource, ok); err != nil { + return err + } + } + + if v.MetricsDataSource != nil { + ok := object.Key("MetricsDataSource") + if err := awsRestjson1_serializeDocumentMetricsDataSource(v.MetricsDataSource, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentExportDestination(v *types.ExportDestination, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DataFormat) > 0 { + ok := object.Key("DataFormat") + ok.String(string(v.DataFormat)) + } + + if v.S3Url != nil { + ok := object.Key("S3Url") + ok.String(*v.S3Url) + } + + return nil +} + +func awsRestjson1_serializeDocumentExportDimensions(v map[string][]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + if vv := v[key]; vv == nil { + continue + } + if err := awsRestjson1_serializeDocumentExportDimensionValue(v[key], om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentExportDimensionValue(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentExportMetric(v *types.ExportMetric, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Aggregation) > 0 { + ok := object.Key("Aggregation") + ok.String(string(v.Aggregation)) + } + + if len(v.Name) > 0 { + ok := object.Key("Name") + ok.String(string(v.Name)) + } + + return nil +} + +func awsRestjson1_serializeDocumentExportMetrics(v []types.ExportMetric, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentExportMetric(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentGuardianAttributes(v *types.GuardianAttributes, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -7544,6 +8030,17 @@ func awsRestjson1_serializeDocumentInboxPlacementTrackingOption(v *types.InboxPl return nil } +func awsRestjson1_serializeDocumentIspFilterList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentIspNameList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -7572,6 +8069,28 @@ func awsRestjson1_serializeDocumentKinesisFirehoseDestination(v *types.KinesisFi return nil } +func awsRestjson1_serializeDocumentLastDeliveryEventList(v []types.DeliveryEventType, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentLastEngagementEventList(v []types.EngagementEventType, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + func awsRestjson1_serializeDocumentListContactsFilter(v *types.ListContactsFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -7640,6 +8159,91 @@ func awsRestjson1_serializeDocumentMessage(v *types.Message, value smithyjson.Va return nil } +func awsRestjson1_serializeDocumentMessageInsightsDataSource(v *types.MessageInsightsDataSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EndDate != nil { + ok := object.Key("EndDate") + ok.Double(smithytime.FormatEpochSeconds(*v.EndDate)) + } + + if v.Exclude != nil { + ok := object.Key("Exclude") + if err := awsRestjson1_serializeDocumentMessageInsightsFilters(v.Exclude, ok); err != nil { + return err + } + } + + if v.Include != nil { + ok := object.Key("Include") + if err := awsRestjson1_serializeDocumentMessageInsightsFilters(v.Include, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.StartDate != nil { + ok := object.Key("StartDate") + ok.Double(smithytime.FormatEpochSeconds(*v.StartDate)) + } + + return nil +} + +func awsRestjson1_serializeDocumentMessageInsightsFilters(v *types.MessageInsightsFilters, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Destination != nil { + ok := object.Key("Destination") + if err := awsRestjson1_serializeDocumentEmailAddressFilterList(v.Destination, ok); err != nil { + return err + } + } + + if v.FromEmailAddress != nil { + ok := object.Key("FromEmailAddress") + if err := awsRestjson1_serializeDocumentEmailAddressFilterList(v.FromEmailAddress, ok); err != nil { + return err + } + } + + if v.Isp != nil { + ok := object.Key("Isp") + if err := awsRestjson1_serializeDocumentIspFilterList(v.Isp, ok); err != nil { + return err + } + } + + if v.LastDeliveryEvent != nil { + ok := object.Key("LastDeliveryEvent") + if err := awsRestjson1_serializeDocumentLastDeliveryEventList(v.LastDeliveryEvent, ok); err != nil { + return err + } + } + + if v.LastEngagementEvent != nil { + ok := object.Key("LastEngagementEvent") + if err := awsRestjson1_serializeDocumentLastEngagementEventList(v.LastEngagementEvent, ok); err != nil { + return err + } + } + + if v.Subject != nil { + ok := object.Key("Subject") + if err := awsRestjson1_serializeDocumentEmailSubjectFilterList(v.Subject, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentMessageTag(v *types.MessageTag, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -7670,6 +8274,42 @@ func awsRestjson1_serializeDocumentMessageTagList(v []types.MessageTag, value sm return nil } +func awsRestjson1_serializeDocumentMetricsDataSource(v *types.MetricsDataSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Dimensions != nil { + ok := object.Key("Dimensions") + if err := awsRestjson1_serializeDocumentExportDimensions(v.Dimensions, ok); err != nil { + return err + } + } + + if v.EndDate != nil { + ok := object.Key("EndDate") + ok.Double(smithytime.FormatEpochSeconds(*v.EndDate)) + } + + if v.Metrics != nil { + ok := object.Key("Metrics") + if err := awsRestjson1_serializeDocumentExportMetrics(v.Metrics, ok); err != nil { + return err + } + } + + if len(v.Namespace) > 0 { + ok := object.Key("Namespace") + ok.String(string(v.Namespace)) + } + + if v.StartDate != nil { + ok := object.Key("StartDate") + ok.Double(smithytime.FormatEpochSeconds(*v.StartDate)) + } + + return nil +} + func awsRestjson1_serializeDocumentPinpointDestination(v *types.PinpointDestination, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/sesv2/types/enums.go b/service/sesv2/types/enums.go index 365ae732bbc..64025693ed3 100644 --- a/service/sesv2/types/enums.go +++ b/service/sesv2/types/enums.go @@ -20,6 +20,26 @@ func (BehaviorOnMxFailure) Values() []BehaviorOnMxFailure { } } +type BounceType string + +// Enum values for BounceType +const ( + BounceTypeUndetermined BounceType = "UNDETERMINED" + BounceTypeTransient BounceType = "TRANSIENT" + BounceTypePermanent BounceType = "PERMANENT" +) + +// Values returns all known values for BounceType. 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 (BounceType) Values() []BounceType { + return []BounceType{ + "UNDETERMINED", + "TRANSIENT", + "PERMANENT", + } +} + type BulkEmailStatus string // Enum values for BulkEmailStatus @@ -155,6 +175,32 @@ func (DeliverabilityTestStatus) Values() []DeliverabilityTestStatus { } } +type DeliveryEventType string + +// Enum values for DeliveryEventType +const ( + DeliveryEventTypeSend DeliveryEventType = "SEND" + DeliveryEventTypeDelivery DeliveryEventType = "DELIVERY" + DeliveryEventTypeTransientBounce DeliveryEventType = "TRANSIENT_BOUNCE" + DeliveryEventTypePermanentBounce DeliveryEventType = "PERMANENT_BOUNCE" + DeliveryEventTypeUndeterminedBounce DeliveryEventType = "UNDETERMINED_BOUNCE" + DeliveryEventTypeComplaint DeliveryEventType = "COMPLAINT" +) + +// Values returns all known values for DeliveryEventType. 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 (DeliveryEventType) Values() []DeliveryEventType { + return []DeliveryEventType{ + "SEND", + "DELIVERY", + "TRANSIENT_BOUNCE", + "PERMANENT_BOUNCE", + "UNDETERMINED_BOUNCE", + "COMPLAINT", + } +} + type DimensionValueSource string // Enum values for DimensionValueSource @@ -235,6 +281,24 @@ func (DkimStatus) Values() []DkimStatus { } } +type EngagementEventType string + +// Enum values for EngagementEventType +const ( + EngagementEventTypeOpen EngagementEventType = "OPEN" + EngagementEventTypeClick EngagementEventType = "CLICK" +) + +// Values returns all known values for EngagementEventType. 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 (EngagementEventType) Values() []EngagementEventType { + return []EngagementEventType{ + "OPEN", + "CLICK", + } +} + type EventType string // Enum values for EventType @@ -269,6 +333,24 @@ func (EventType) Values() []EventType { } } +type ExportSourceType string + +// Enum values for ExportSourceType +const ( + ExportSourceTypeMetricsData ExportSourceType = "METRICS_DATA" + ExportSourceTypeMessageInsights ExportSourceType = "MESSAGE_INSIGHTS" +) + +// Values returns all known values for ExportSourceType. 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 (ExportSourceType) Values() []ExportSourceType { + return []ExportSourceType{ + "METRICS_DATA", + "MESSAGE_INSIGHTS", + } +} + type FeatureStatus string // Enum values for FeatureStatus @@ -333,6 +415,7 @@ const ( JobStatusProcessing JobStatus = "PROCESSING" JobStatusCompleted JobStatus = "COMPLETED" JobStatusFailed JobStatus = "FAILED" + JobStatusCancelled JobStatus = "CANCELLED" ) // Values returns all known values for JobStatus. Note that this can be expanded @@ -344,6 +427,7 @@ func (JobStatus) Values() []JobStatus { "PROCESSING", "COMPLETED", "FAILED", + "CANCELLED", } } @@ -444,6 +528,24 @@ func (Metric) Values() []Metric { } } +type MetricAggregation string + +// Enum values for MetricAggregation +const ( + MetricAggregationRate MetricAggregation = "RATE" + MetricAggregationVolume MetricAggregation = "VOLUME" +) + +// Values returns all known values for MetricAggregation. 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 (MetricAggregation) Values() []MetricAggregation { + return []MetricAggregation{ + "RATE", + "VOLUME", + } +} + type MetricDimensionName string // Enum values for MetricDimensionName diff --git a/service/sesv2/types/types.go b/service/sesv2/types/types.go index 13cba1eab0b..0f4c553ad37 100644 --- a/service/sesv2/types/types.go +++ b/service/sesv2/types/types.go @@ -138,6 +138,24 @@ type Body struct { noSmithyDocumentSerde } +// Information about a Bounce event. +type Bounce struct { + + // The subtype of the bounce, as determined by SES. + BounceSubType *string + + // The type of the bounce, as determined by SES. Can be one of UNDETERMINED , + // TRANSIENT , or PERMANENT + BounceType BounceType + + // The status code issued by the reporting Message Transfer Authority (MTA). This + // field only appears if a delivery status notification (DSN) was attached to the + // bounce and the Diagnostic-Code was provided in the DSN. + DiagnosticCode *string + + noSmithyDocumentSerde +} + // An object that contains the body of the message. You can specify a template // message. type BulkEmailContent struct { @@ -270,6 +288,21 @@ type CloudWatchDimensionConfiguration struct { noSmithyDocumentSerde } +// Information about a Complaint event. +type Complaint struct { + + // The value of the Feedback-Type field from the feedback report received from the + // ISP. + ComplaintFeedbackType *string + + // Can either be null or OnAccountSuppressionList . If the value is + // OnAccountSuppressionList , SES accepted the message, but didn't attempt to send + // it because it was on the account-level suppression list. + ComplaintSubType *string + + noSmithyDocumentSerde +} + // A contact is the end-user who is receiving the email. type Contact struct { @@ -756,6 +789,22 @@ type EmailContent struct { noSmithyDocumentSerde } +// An email's insights contain metadata and delivery information about a specific +// email. +type EmailInsights struct { + + // The recipient of the email. + Destination *string + + // A list of events associated with the sent email. + Events []InsightsEvent + + // The recipient's ISP (e.g., Gmail , Yahoo , etc.). + Isp *string + + noSmithyDocumentSerde +} + // The content of the email, composed of a subject line, an HTML part, and a // text-only part. type EmailTemplateContent struct { @@ -904,13 +953,135 @@ type EventDestinationDefinition struct { noSmithyDocumentSerde } -// An object that contains the failure details about an import job. +// Contains a Bounce object if the event type is BOUNCE . Contains a Complaint +// object if the event type is COMPLAINT . +type EventDetails struct { + + // Information about a Bounce event. + Bounce *Bounce + + // Information about a Complaint event. + Complaint *Complaint + + noSmithyDocumentSerde +} + +// An object that contains details about the data source of the export job. It can +// only contain one of MetricsDataSource or MessageInsightsDataSource object. +type ExportDataSource struct { + + // An object that contains filters applied when performing the Message Insights + // export. + MessageInsightsDataSource *MessageInsightsDataSource + + // An object that contains details about the data source for the metrics export. + MetricsDataSource *MetricsDataSource + + noSmithyDocumentSerde +} + +// An object that contains details about the destination of the export job. +type ExportDestination struct { + + // The data format of the final export job file, can be one of the following: + // - CSV - A comma-separated values file. + // - JSON - A Json file. + // + // This member is required. + DataFormat DataFormat + + // An Amazon S3 pre-signed URL that points to the generated export file. + S3Url *string + + noSmithyDocumentSerde +} + +// A summary of the export job. +type ExportJobSummary struct { + + // The timestamp of when the export job was completed. + CompletedTimestamp *time.Time + + // The timestamp of when the export job was created. + CreatedTimestamp *time.Time + + // The source type of the export job. + ExportSourceType ExportSourceType + + // The export job ID. + JobId *string + + // The status of the export job. + JobStatus JobStatus + + noSmithyDocumentSerde +} + +// An object that contains a mapping between a Metric and MetricAggregation . +type ExportMetric struct { + + // The aggregation to apply to a metric, can be one of the following: + // - VOLUME - The volume of events for this metric. + // - RATE - The rate for this metric relative to the SEND metric volume. + Aggregation MetricAggregation + + // The metric to export, can be one of the following: + // - SEND - Emails sent eligible for tracking in the VDM dashboard. This excludes + // emails sent to the mailbox simulator and emails addressed to more than one + // recipient. + // - COMPLAINT - Complaints received for your account. This excludes complaints + // from the mailbox simulator, those originating from your account-level + // suppression list (if enabled), and those for emails addressed to more than one + // recipient + // - PERMANENT_BOUNCE - Permanent bounces - i.e., feedback received for emails + // sent to non-existent mailboxes. Excludes bounces from the mailbox simulator, + // those originating from your account-level suppression list (if enabled), and + // those for emails addressed to more than one recipient. + // - TRANSIENT_BOUNCE - Transient bounces - i.e., feedback received for delivery + // failures excluding issues with non-existent mailboxes. Excludes bounces from the + // mailbox simulator, and those for emails addressed to more than one recipient. + // - OPEN - Unique open events for emails including open trackers. Excludes opens + // for emails addressed to more than one recipient. + // - CLICK - Unique click events for emails including wrapped links. Excludes + // clicks for emails addressed to more than one recipient. + // - DELIVERY - Successful deliveries for email sending attempts. Excludes + // deliveries to the mailbox simulator and for emails addressed to more than one + // recipient. + // - DELIVERY_OPEN - Successful deliveries for email sending attempts. Excludes + // deliveries to the mailbox simulator, for emails addressed to more than one + // recipient, and emails without open trackers. + // - DELIVERY_CLICK - Successful deliveries for email sending attempts. Excludes + // deliveries to the mailbox simulator, for emails addressed to more than one + // recipient, and emails without click trackers. + // - DELIVERY_COMPLAINT - Successful deliveries for email sending attempts. + // Excludes deliveries to the mailbox simulator, for emails addressed to more than + // one recipient, and emails addressed to recipients hosted by ISPs with which + // Amazon SES does not have a feedback loop agreement. + Name Metric + + noSmithyDocumentSerde +} + +// Statistics about the execution of an export job. +type ExportStatistics struct { + + // The number of records that were exported to the final export file. This value + // might not be available for all export source types + ExportedRecordsCount *int32 + + // The number of records that were processed to generate the final export file. + ProcessedRecordsCount *int32 + + noSmithyDocumentSerde +} + +// An object that contains the failure details about a job. type FailureInfo struct { - // A message about why the import job failed. + // A message about why the job failed. ErrorMessage *string - // An Amazon S3 presigned URL that contains all the failed records and related + // An Amazon S3 pre-signed URL that contains all the failed records and related // information. FailedRecordsS3Url *string @@ -1019,10 +1190,14 @@ type ImportJobSummary struct { // is going to target. ImportDestination *ImportDestination - // A string that represents the import job ID. + // A string that represents a job ID. JobId *string - // The status of the import job. + // The status of a job. + // - CREATED – Job has just been created. + // - PROCESSING – Job is processing. + // - ERROR – An error occurred during processing. + // - COMPLETED – Job has completed processing successfully. JobStatus JobStatus // The current number of records processed. @@ -1047,6 +1222,38 @@ type InboxPlacementTrackingOption struct { noSmithyDocumentSerde } +// An object containing details about a specific event. +type InsightsEvent struct { + + // Details about bounce or complaint events. + Details *EventDetails + + // The timestamp of the event. + Timestamp *time.Time + + // The type of event: + // - SEND - The send request was successful and SES will attempt to deliver the + // message to the recipient’s mail server. (If account-level or global suppression + // is being used, SES will still count it as a send, but delivery is suppressed.) + // - DELIVERY - SES successfully delivered the email to the recipient's mail + // server. Excludes deliveries to the mailbox simulator, and those from emails + // addressed to more than one recipient. + // - BOUNCE - Feedback received for delivery failures. Additional details about + // the bounce are provided in the Details object. Excludes bounces from the + // mailbox simulator, and those from emails addressed to more than one recipient. + // - COMPLAINT - Complaint received for the email. Additional details about the + // complaint are provided in the Details object. This excludes complaints from + // the mailbox simulator, those originating from your account-level suppression + // list (if enabled), and those from emails addressed to more than one recipient. + // - OPEN - Open event for emails including open trackers. Excludes opens for + // emails addressed to more than one recipient. + // - CLICK - Click event for emails including wrapped links. Excludes clicks for + // emails addressed to more than one recipient. + Type EventType + + noSmithyDocumentSerde +} + // An object that describes how email sent during the predictive inbox placement // test was handled by a certain email provider. type IspPlacement struct { @@ -1162,6 +1369,69 @@ type Message struct { noSmithyDocumentSerde } +// An object that contains filters applied when performing the Message Insights +// export. +type MessageInsightsDataSource struct { + + // Represents the end date for the export interval as a timestamp. The end date is + // inclusive. + // + // This member is required. + EndDate *time.Time + + // Represents the start date for the export interval as a timestamp. The start + // date is inclusive. + // + // This member is required. + StartDate *time.Time + + // Filters for results to be excluded from the export file. + Exclude *MessageInsightsFilters + + // Filters for results to be included in the export file. + Include *MessageInsightsFilters + + // The maximum number of results. + MaxResults *int32 + + noSmithyDocumentSerde +} + +// An object containing Message Insights filters. If you specify multiple filters, +// the filters are joined by AND. If you specify multiple values for a filter, the +// values are joined by OR. Filter values are case-sensitive. FromEmailAddress , +// Destination , and Subject filters support partial match. A partial match is +// performed by using the * wildcard character placed at the beginning (suffix +// match), the end (prefix match) or both ends of the string (contains match). In +// order to match the literal characters * or \ , they must be escaped using the \ +// character. If no wildcard character is present, an exact match is performed. +type MessageInsightsFilters struct { + + // The recipient's email address. + Destination []string + + // The from address used to send the message. + FromEmailAddress []string + + // The recipient's ISP (e.g., Gmail , Yahoo , etc.). + Isp []string + + // The last delivery-related event for the email, where the ordering is as + // follows: SEND < BOUNCE < DELIVERY < COMPLAINT . + LastDeliveryEvent []DeliveryEventType + + // The last engagement-related event for the email, where the ordering is as + // follows: OPEN < CLICK . Engagement events are only available if Engagement + // tracking (https://docs.aws.amazon.com/ses/latest/dg/vdm-settings.html) is + // enabled. + LastEngagementEvent []EngagementEventType + + // The subject line of the message. + Subject []string + + noSmithyDocumentSerde +} + // Contains the name and value of a tag that you apply to an email. You can use // message tags when you publish email sending events. type MessageTag struct { @@ -1221,6 +1491,39 @@ type MetricDataResult struct { noSmithyDocumentSerde } +// An object that contains details about the data source for the metrics export. +type MetricsDataSource struct { + + // An object that contains a mapping between a MetricDimensionName and + // MetricDimensionValue to filter metrics by. Must contain a least 1 dimension but + // no more than 3 unique ones. + // + // This member is required. + Dimensions map[string][]string + + // Represents the end date for the export interval as a timestamp. + // + // This member is required. + EndDate *time.Time + + // A list of ExportMetric objects to export. + // + // This member is required. + Metrics []ExportMetric + + // The metrics namespace - e.g., VDM . + // + // This member is required. + Namespace MetricNamespace + + // Represents the start date for the export interval as a timestamp. + // + // This member is required. + StartDate *time.Time + + noSmithyDocumentSerde +} + // An object that contains information about email that was sent from the selected // domain. type OverallVolume struct { diff --git a/service/sesv2/validators.go b/service/sesv2/validators.go index bb042023a1c..19bab89b0d4 100644 --- a/service/sesv2/validators.go +++ b/service/sesv2/validators.go @@ -30,6 +30,26 @@ func (m *validateOpBatchGetMetricData) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpCancelExportJob struct { +} + +func (*validateOpCancelExportJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCancelExportJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CancelExportJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCancelExportJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateConfigurationSetEventDestination struct { } @@ -230,6 +250,26 @@ func (m *validateOpCreateEmailTemplate) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpCreateExportJob struct { +} + +func (*validateOpCreateExportJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateExportJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateExportJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateExportJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateImportJob struct { } @@ -730,6 +770,26 @@ func (m *validateOpGetEmailTemplate) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpGetExportJob struct { +} + +func (*validateOpGetExportJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetExportJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetExportJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetExportJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetImportJob struct { } @@ -750,6 +810,26 @@ func (m *validateOpGetImportJob) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpGetMessageInsights struct { +} + +func (*validateOpGetMessageInsights) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetMessageInsights) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetMessageInsightsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetMessageInsightsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetSuppressedDestination struct { } @@ -1434,6 +1514,10 @@ func addOpBatchGetMetricDataValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpBatchGetMetricData{}, middleware.After) } +func addOpCancelExportJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCancelExportJob{}, middleware.After) +} + func addOpCreateConfigurationSetEventDestinationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateConfigurationSetEventDestination{}, middleware.After) } @@ -1474,6 +1558,10 @@ func addOpCreateEmailTemplateValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpCreateEmailTemplate{}, middleware.After) } +func addOpCreateExportJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateExportJob{}, middleware.After) +} + func addOpCreateImportJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateImportJob{}, middleware.After) } @@ -1574,10 +1662,18 @@ func addOpGetEmailTemplateValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetEmailTemplate{}, middleware.After) } +func addOpGetExportJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetExportJob{}, middleware.After) +} + func addOpGetImportJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetImportJob{}, middleware.After) } +func addOpGetMessageInsightsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetMessageInsights{}, middleware.After) +} + func addOpGetSuppressedDestinationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetSuppressedDestination{}, middleware.After) } @@ -1956,6 +2052,43 @@ func validateEventDestinationDefinition(v *types.EventDestinationDefinition) err } } +func validateExportDataSource(v *types.ExportDataSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExportDataSource"} + if v.MetricsDataSource != nil { + if err := validateMetricsDataSource(v.MetricsDataSource); err != nil { + invalidParams.AddNested("MetricsDataSource", err.(smithy.InvalidParamsError)) + } + } + if v.MessageInsightsDataSource != nil { + if err := validateMessageInsightsDataSource(v.MessageInsightsDataSource); err != nil { + invalidParams.AddNested("MessageInsightsDataSource", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateExportDestination(v *types.ExportDestination) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExportDestination"} + if len(v.DataFormat) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("DataFormat")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateImportDataSource(v *types.ImportDataSource) error { if v == nil { return nil @@ -2055,6 +2188,24 @@ func validateMessage(v *types.Message) error { } } +func validateMessageInsightsDataSource(v *types.MessageInsightsDataSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MessageInsightsDataSource"} + if v.StartDate == nil { + invalidParams.Add(smithy.NewErrParamRequired("StartDate")) + } + if v.EndDate == nil { + invalidParams.Add(smithy.NewErrParamRequired("EndDate")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateMessageTag(v *types.MessageTag) error { if v == nil { return nil @@ -2090,6 +2241,33 @@ func validateMessageTagList(v []types.MessageTag) error { } } +func validateMetricsDataSource(v *types.MetricsDataSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetricsDataSource"} + if v.Dimensions == nil { + invalidParams.Add(smithy.NewErrParamRequired("Dimensions")) + } + if len(v.Namespace) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Namespace")) + } + if v.Metrics == nil { + invalidParams.Add(smithy.NewErrParamRequired("Metrics")) + } + if v.StartDate == nil { + invalidParams.Add(smithy.NewErrParamRequired("StartDate")) + } + if v.EndDate == nil { + invalidParams.Add(smithy.NewErrParamRequired("EndDate")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateRawMessage(v *types.RawMessage) error { if v == nil { return nil @@ -2292,6 +2470,21 @@ func validateOpBatchGetMetricDataInput(v *BatchGetMetricDataInput) error { } } +func validateOpCancelExportJobInput(v *CancelExportJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CancelExportJobInput"} + if v.JobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateConfigurationSetEventDestinationInput(v *CreateConfigurationSetEventDestinationInput) error { if v == nil { return nil @@ -2526,6 +2719,32 @@ func validateOpCreateEmailTemplateInput(v *CreateEmailTemplateInput) error { } } +func validateOpCreateExportJobInput(v *CreateExportJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateExportJobInput"} + if v.ExportDataSource == nil { + invalidParams.Add(smithy.NewErrParamRequired("ExportDataSource")) + } else if v.ExportDataSource != nil { + if err := validateExportDataSource(v.ExportDataSource); err != nil { + invalidParams.AddNested("ExportDataSource", err.(smithy.InvalidParamsError)) + } + } + if v.ExportDestination == nil { + invalidParams.Add(smithy.NewErrParamRequired("ExportDestination")) + } else if v.ExportDestination != nil { + if err := validateExportDestination(v.ExportDestination); err != nil { + invalidParams.AddNested("ExportDestination", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateImportJobInput(v *CreateImportJobInput) error { if v == nil { return nil @@ -2930,6 +3149,21 @@ func validateOpGetEmailTemplateInput(v *GetEmailTemplateInput) error { } } +func validateOpGetExportJobInput(v *GetExportJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetExportJobInput"} + if v.JobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetImportJobInput(v *GetImportJobInput) error { if v == nil { return nil @@ -2945,6 +3179,21 @@ func validateOpGetImportJobInput(v *GetImportJobInput) error { } } +func validateOpGetMessageInsightsInput(v *GetMessageInsightsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetMessageInsightsInput"} + if v.MessageId == nil { + invalidParams.Add(smithy.NewErrParamRequired("MessageId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetSuppressedDestinationInput(v *GetSuppressedDestinationInput) error { if v == nil { return nil