diff --git a/.changelog/1ff697ead8dd47c3ac2109306cf308a1.json b/.changelog/1ff697ead8dd47c3ac2109306cf308a1.json new file mode 100644 index 00000000000..cf5f5133812 --- /dev/null +++ b/.changelog/1ff697ead8dd47c3ac2109306cf308a1.json @@ -0,0 +1,8 @@ +{ + "id": "1ff697ea-d8dd-47c3-ac21-09306cf308a1", + "type": "documentation", + "description": "Documentation updates for AWS Signer. Adds cross-account signing constraint and definitions for cross-account actions.", + "modules": [ + "service/signer" + ] +} \ No newline at end of file diff --git a/.changelog/41575353444b40ffbf474f4155544f00.json b/.changelog/41575353444b40ffbf474f4155544f00.json new file mode 100644 index 00000000000..1cc0d8d6b2d --- /dev/null +++ b/.changelog/41575353444b40ffbf474f4155544f00.json @@ -0,0 +1,8 @@ +{ + "id": "41575353-444b-40ff-bf47-4f4155544f00", + "type": "release", + "description": "New AWS service client module", + "modules": [ + "internal/protocoltest/smithyrpcv2cbor" + ] +} \ No newline at end of file diff --git a/.changelog/4a577df5ce314fc39b265520ede217e1.json b/.changelog/4a577df5ce314fc39b265520ede217e1.json new file mode 100644 index 00000000000..c819dfba7e1 --- /dev/null +++ b/.changelog/4a577df5ce314fc39b265520ede217e1.json @@ -0,0 +1,8 @@ +{ + "id": "4a577df5-ce31-4fc3-9b26-5520ede217e1", + "type": "feature", + "description": "Release of FirewallDomainRedirectionAction parameter on the Route 53 DNS Firewall Rule. This allows customers to configure a DNS Firewall rule to inspect all the domains in the DNS redirection chain (default) , such as CNAME, ALIAS, DNAME, etc., or just the first domain and trust the rest.", + "modules": [ + "service/route53resolver" + ] +} \ No newline at end of file diff --git a/.changelog/6e2e267658674ea5b5c4b4246d6d9993.json b/.changelog/6e2e267658674ea5b5c4b4246d6d9993.json new file mode 100644 index 00000000000..a0cec21a95f --- /dev/null +++ b/.changelog/6e2e267658674ea5b5c4b4246d6d9993.json @@ -0,0 +1,8 @@ +{ + "id": "6e2e2676-5867-4ea5-b5c4-b4246d6d9993", + "type": "feature", + "description": "Due to changes made by the Amazon Alexa service, GetSipMediaApplicationAlexaSkillConfiguration and PutSipMediaApplicationAlexaSkillConfiguration APIs are no longer available for use. For more information, refer to the Alexa Smart Properties page.", + "modules": [ + "service/chimesdkvoice" + ] +} \ No newline at end of file diff --git a/.changelog/861428b0179c49218f9625f3cebad3ce.json b/.changelog/861428b0179c49218f9625f3cebad3ce.json new file mode 100644 index 00000000000..d7ee078c80f --- /dev/null +++ b/.changelog/861428b0179c49218f9625f3cebad3ce.json @@ -0,0 +1,8 @@ +{ + "id": "861428b0-179c-4921-8f96-25f3cebad3ce", + "type": "feature", + "description": "Add support for the Ruby package format.", + "modules": [ + "service/codeartifact" + ] +} \ No newline at end of file diff --git a/.changelog/8a74515985364dba8e9f33b05a9f0054.json b/.changelog/8a74515985364dba8e9f33b05a9f0054.json new file mode 100644 index 00000000000..19aa55f4190 --- /dev/null +++ b/.changelog/8a74515985364dba8e9f33b05a9f0054.json @@ -0,0 +1,8 @@ +{ + "id": "8a745159-8536-4dba-8e9f-33b05a9f0054", + "type": "feature", + "description": "AWS Firewall Manager now supports the network firewall service stream exception policy feature for accounts within your organization.", + "modules": [ + "service/fms" + ] +} \ No newline at end of file diff --git a/.changelog/a08eb6ca9e03430cb694e8ff2bae2e6d.json b/.changelog/a08eb6ca9e03430cb694e8ff2bae2e6d.json new file mode 100644 index 00000000000..33607cdf022 --- /dev/null +++ b/.changelog/a08eb6ca9e03430cb694e8ff2bae2e6d.json @@ -0,0 +1,8 @@ +{ + "id": "a08eb6ca-9e03-430c-b694-e8ff2bae2e6d", + "type": "feature", + "description": "This is a general availability (GA) release of Amazon Q Business. Q Business enables employees in an enterprise to get comprehensive answers to complex questions and take actions through a unified, intuitive web-based chat experience - using an enterprise's existing content, data, and systems.", + "modules": [ + "service/qbusiness" + ] +} \ No newline at end of file diff --git a/.changelog/a44a6e9466dc4549964dc0098be11c62.json b/.changelog/a44a6e9466dc4549964dc0098be11c62.json new file mode 100644 index 00000000000..53411bcce22 --- /dev/null +++ b/.changelog/a44a6e9466dc4549964dc0098be11c62.json @@ -0,0 +1,8 @@ +{ + "id": "a44a6e94-66dc-4549-964d-c0098be11c62", + "type": "feature", + "description": "Amazon SageMaker Training now supports the use of attribute-based access control (ABAC) roles for training job execution roles. Amazon SageMaker Inference now supports G6 instance types.", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/a7a03cebb7f34897b419e2513a4377de.json b/.changelog/a7a03cebb7f34897b419e2513a4377de.json new file mode 100644 index 00000000000..c0affe4f6d4 --- /dev/null +++ b/.changelog/a7a03cebb7f34897b419e2513a4377de.json @@ -0,0 +1,8 @@ +{ + "id": "a7a03ceb-b7f3-4897-b419-e2513a4377de", + "type": "feature", + "description": "Add support for workflow sharing and dynamic run storage", + "modules": [ + "service/omics" + ] +} \ No newline at end of file diff --git a/.changelog/c9016f3e1ca148e3818baffd152e3507.json b/.changelog/c9016f3e1ca148e3818baffd152e3507.json new file mode 100644 index 00000000000..b649a393162 --- /dev/null +++ b/.changelog/c9016f3e1ca148e3818baffd152e3507.json @@ -0,0 +1,8 @@ +{ + "id": "c9016f3e-1ca1-48e3-818b-affd152e3507", + "type": "feature", + "description": "Amazon Pinpoint has added two new features Multimedia services (MMS) and protect configurations. Use the three new MMS APIs to send media messages to a mobile phone which includes image, audio, text, or video files. Use the ten new protect configurations APIs to block messages to specific countries.", + "modules": [ + "service/pinpointsmsvoicev2" + ] +} \ No newline at end of file diff --git a/.changelog/f54fdba21c5142e3bba05754fb1b71a9.json b/.changelog/f54fdba21c5142e3bba05754fb1b71a9.json new file mode 100644 index 00000000000..8a51dfba93b --- /dev/null +++ b/.changelog/f54fdba21c5142e3bba05754fb1b71a9.json @@ -0,0 +1,8 @@ +{ + "id": "f54fdba2-1c51-42e3-bba0-5754fb1b71a9", + "type": "feature", + "description": "This release enables customers to create Route53 A and AAAA alias record types to point custom endpoint domain to OpenSearch domain's dualstack search endpoint.", + "modules": [ + "service/opensearch" + ] +} \ No newline at end of file diff --git a/.changelog/fd30799e0cc145288962c7d503e7939e.json b/.changelog/fd30799e0cc145288962c7d503e7939e.json new file mode 100644 index 00000000000..30830f7f8e7 --- /dev/null +++ b/.changelog/fd30799e0cc145288962c7d503e7939e.json @@ -0,0 +1,8 @@ +{ + "id": "fd30799e-0cc1-4528-8962-c7d503e7939e", + "type": "feature", + "description": "New Q embedding supporting Generative Q\u0026A", + "modules": [ + "service/quicksight" + ] +} \ No newline at end of file diff --git a/service/chimesdkvoice/api_op_BatchUpdatePhoneNumber.go b/service/chimesdkvoice/api_op_BatchUpdatePhoneNumber.go index cf6f5ce5240..0d41757ee39 100644 --- a/service/chimesdkvoice/api_op_BatchUpdatePhoneNumber.go +++ b/service/chimesdkvoice/api_op_BatchUpdatePhoneNumber.go @@ -11,7 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates one or more phone numbers. +// Updates phone number product types, calling names, or phone number names. You +// can update one attribute at a time for each UpdatePhoneNumberRequestItem . For +// example, you can update the product type, the calling name, or phone name. You +// cannot have a duplicate phoneNumberId in a request. func (c *Client) BatchUpdatePhoneNumber(ctx context.Context, params *BatchUpdatePhoneNumberInput, optFns ...func(*Options)) (*BatchUpdatePhoneNumberOutput, error) { if params == nil { params = &BatchUpdatePhoneNumberInput{} diff --git a/service/chimesdkvoice/api_op_GetSipMediaApplicationAlexaSkillConfiguration.go b/service/chimesdkvoice/api_op_GetSipMediaApplicationAlexaSkillConfiguration.go index 4cc0684a5db..44586974146 100644 --- a/service/chimesdkvoice/api_op_GetSipMediaApplicationAlexaSkillConfiguration.go +++ b/service/chimesdkvoice/api_op_GetSipMediaApplicationAlexaSkillConfiguration.go @@ -11,7 +11,14 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Gets the Alexa Skill configuration for the SIP media application. +// Gets the Alexa Skill configuration for the SIP media application. Due to +// changes made by the Amazon Alexa service, this API is no longer available for +// use. For more information, refer to the Alexa Smart Properties (https://developer.amazon.com/en-US/alexa/alexasmartproperties) +// page. +// +// Deprecated: Due to changes made by the Amazon Alexa service, this API is no +// longer available for use. For more information, refer to the Alexa Smart +// Properties page(https://developer.amazon.com/en-US/alexa/alexasmartproperties). func (c *Client) GetSipMediaApplicationAlexaSkillConfiguration(ctx context.Context, params *GetSipMediaApplicationAlexaSkillConfigurationInput, optFns ...func(*Options)) (*GetSipMediaApplicationAlexaSkillConfigurationOutput, error) { if params == nil { params = &GetSipMediaApplicationAlexaSkillConfigurationInput{} diff --git a/service/chimesdkvoice/api_op_PutSipMediaApplicationAlexaSkillConfiguration.go b/service/chimesdkvoice/api_op_PutSipMediaApplicationAlexaSkillConfiguration.go index 37d23648a5d..913bc4a054b 100644 --- a/service/chimesdkvoice/api_op_PutSipMediaApplicationAlexaSkillConfiguration.go +++ b/service/chimesdkvoice/api_op_PutSipMediaApplicationAlexaSkillConfiguration.go @@ -11,7 +11,14 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates the Alexa Skill configuration for the SIP media application. +// Updates the Alexa Skill configuration for the SIP media application. Due to +// changes made by the Amazon Alexa service, this API is no longer available for +// use. For more information, refer to the Alexa Smart Properties (https://developer.amazon.com/en-US/alexa/alexasmartproperties) +// page. +// +// Deprecated: Due to changes made by the Amazon Alexa service, this API is no +// longer available for use. For more information, refer to the Alexa Smart +// Properties page(https://developer.amazon.com/en-US/alexa/alexasmartproperties). func (c *Client) PutSipMediaApplicationAlexaSkillConfiguration(ctx context.Context, params *PutSipMediaApplicationAlexaSkillConfigurationInput, optFns ...func(*Options)) (*PutSipMediaApplicationAlexaSkillConfigurationOutput, error) { if params == nil { params = &PutSipMediaApplicationAlexaSkillConfigurationInput{} diff --git a/service/chimesdkvoice/api_op_UpdatePhoneNumber.go b/service/chimesdkvoice/api_op_UpdatePhoneNumber.go index bffc1246132..4990f385211 100644 --- a/service/chimesdkvoice/api_op_UpdatePhoneNumber.go +++ b/service/chimesdkvoice/api_op_UpdatePhoneNumber.go @@ -11,13 +11,13 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates phone number details, such as product type or calling name, for the -// specified phone number ID. You can update one phone number detail at a time. For -// example, you can update either the product type or the calling name in one -// action. For numbers outside the U.S., you must use the Amazon Chime SDK SIP -// Media Application Dial-In product type. Updates to outbound calling names can -// take 72 hours to complete. Pending updates to outbound calling names must be -// complete before you can request another update. +// Updates phone number details, such as product type, calling name, or phone +// number name for the specified phone number ID. You can update one phone number +// detail at a time. For example, you can update either the product type, calling +// name, or phone number name in one action. For numbers outside the U.S., you must +// use the Amazon Chime SDK SIP Media Application Dial-In product type. Updates to +// outbound calling names can take 72 hours to complete. Pending updates to +// outbound calling names must be complete before you can request another update. func (c *Client) UpdatePhoneNumber(ctx context.Context, params *UpdatePhoneNumberInput, optFns ...func(*Options)) (*UpdatePhoneNumberOutput, error) { if params == nil { params = &UpdatePhoneNumberInput{} @@ -43,7 +43,7 @@ type UpdatePhoneNumberInput struct { // The outbound calling name associated with the phone number. CallingName *string - // Specifies the name assigned to one or more phone numbers. + // Specifies the updated name assigned to one or more phone numbers. Name *string // The product type. diff --git a/service/chimesdkvoice/endpoints.go b/service/chimesdkvoice/endpoints.go index ead0d9ec2ef..bd8af584ca3 100644 --- a/service/chimesdkvoice/endpoints.go +++ b/service/chimesdkvoice/endpoints.go @@ -373,7 +373,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://voice-chime-fips.") diff --git a/service/chimesdkvoice/types/types.go b/service/chimesdkvoice/types/types.go index 5d7b2d75d1b..8b8eece7209 100644 --- a/service/chimesdkvoice/types/types.go +++ b/service/chimesdkvoice/types/types.go @@ -503,7 +503,10 @@ type SipMediaApplication struct { noSmithyDocumentSerde } -// The Alexa Skill configuration of a SIP media application. +// The Alexa Skill configuration of a SIP media application. Due to changes made +// by the Amazon Alexa service, this data type is no longer available for use. For +// more information, refer to the Alexa Smart Properties (https://developer.amazon.com/en-US/alexa/alexasmartproperties) +// page. type SipMediaApplicationAlexaSkillConfiguration struct { // The ID of the Alexa Skill configuration. diff --git a/service/codeartifact/api_op_CopyPackageVersions.go b/service/codeartifact/api_op_CopyPackageVersions.go index 9431106b452..c32e6bdd3be 100644 --- a/service/codeartifact/api_op_CopyPackageVersions.go +++ b/service/codeartifact/api_op_CopyPackageVersions.go @@ -81,8 +81,8 @@ type CopyPackageVersionsInput struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string // A list of key-value pairs. The keys are package versions and the values are diff --git a/service/codeartifact/api_op_DeletePackage.go b/service/codeartifact/api_op_DeletePackage.go index 1147f5ac8eb..5bf2dae1655 100644 --- a/service/codeartifact/api_op_DeletePackage.go +++ b/service/codeartifact/api_op_DeletePackage.go @@ -66,8 +66,8 @@ type DeletePackageInput struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string noSmithyDocumentSerde diff --git a/service/codeartifact/api_op_DeletePackageVersions.go b/service/codeartifact/api_op_DeletePackageVersions.go index 9e85c5065c3..1f79b5bdaa0 100644 --- a/service/codeartifact/api_op_DeletePackageVersions.go +++ b/service/codeartifact/api_op_DeletePackageVersions.go @@ -77,8 +77,8 @@ type DeletePackageVersionsInput struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string noSmithyDocumentSerde diff --git a/service/codeartifact/api_op_DescribePackage.go b/service/codeartifact/api_op_DescribePackage.go index cf3ad84571a..c344bb420e5 100644 --- a/service/codeartifact/api_op_DescribePackage.go +++ b/service/codeartifact/api_op_DescribePackage.go @@ -64,8 +64,8 @@ type DescribePackageInput struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string noSmithyDocumentSerde diff --git a/service/codeartifact/api_op_DescribePackageVersion.go b/service/codeartifact/api_op_DescribePackageVersion.go index 1f224baddab..bef7fbe731b 100644 --- a/service/codeartifact/api_op_DescribePackageVersion.go +++ b/service/codeartifact/api_op_DescribePackageVersion.go @@ -70,8 +70,8 @@ type DescribePackageVersionInput struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string noSmithyDocumentSerde diff --git a/service/codeartifact/api_op_DisposePackageVersions.go b/service/codeartifact/api_op_DisposePackageVersions.go index d3eb3dca30d..93beb2e357e 100644 --- a/service/codeartifact/api_op_DisposePackageVersions.go +++ b/service/codeartifact/api_op_DisposePackageVersions.go @@ -79,8 +79,8 @@ type DisposePackageVersionsInput struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string // The revisions of the package versions you want to dispose. diff --git a/service/codeartifact/api_op_GetAssociatedPackageGroup.go b/service/codeartifact/api_op_GetAssociatedPackageGroup.go index 432bbb55a3e..c41287997a9 100644 --- a/service/codeartifact/api_op_GetAssociatedPackageGroup.go +++ b/service/codeartifact/api_op_GetAssociatedPackageGroup.go @@ -67,8 +67,8 @@ type GetAssociatedPackageGroupInput struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string noSmithyDocumentSerde diff --git a/service/codeartifact/api_op_GetPackageVersionAsset.go b/service/codeartifact/api_op_GetPackageVersionAsset.go index 64a84d19dba..cf35f4bda34 100644 --- a/service/codeartifact/api_op_GetPackageVersionAsset.go +++ b/service/codeartifact/api_op_GetPackageVersionAsset.go @@ -79,8 +79,8 @@ type GetPackageVersionAssetInput struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string // The name of the package version revision that contains the requested asset. diff --git a/service/codeartifact/api_op_GetPackageVersionReadme.go b/service/codeartifact/api_op_GetPackageVersionReadme.go index 1b8590554d0..21253f07e25 100644 --- a/service/codeartifact/api_op_GetPackageVersionReadme.go +++ b/service/codeartifact/api_op_GetPackageVersionReadme.go @@ -73,8 +73,8 @@ type GetPackageVersionReadmeInput struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string noSmithyDocumentSerde @@ -91,8 +91,8 @@ type GetPackageVersionReadmeOutput struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string // The name of the package that contains the returned readme file. diff --git a/service/codeartifact/api_op_GetRepositoryEndpoint.go b/service/codeartifact/api_op_GetRepositoryEndpoint.go index c3a23b52c98..1dfe6c23205 100644 --- a/service/codeartifact/api_op_GetRepositoryEndpoint.go +++ b/service/codeartifact/api_op_GetRepositoryEndpoint.go @@ -18,6 +18,7 @@ import ( // - npm // - nuget // - pypi +// - ruby // - swift func (c *Client) GetRepositoryEndpoint(ctx context.Context, params *GetRepositoryEndpointInput, optFns ...func(*Options)) (*GetRepositoryEndpointOutput, error) { if params == nil { diff --git a/service/codeartifact/api_op_ListPackageVersionAssets.go b/service/codeartifact/api_op_ListPackageVersionAssets.go index f16ac357f4f..860944eda0d 100644 --- a/service/codeartifact/api_op_ListPackageVersionAssets.go +++ b/service/codeartifact/api_op_ListPackageVersionAssets.go @@ -75,8 +75,8 @@ type ListPackageVersionAssetsInput struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string // The token for the next set of results. Use the value returned in the previous @@ -101,8 +101,8 @@ type ListPackageVersionAssetsOutput struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string // If there are additional results, this is the token for the next set of results. diff --git a/service/codeartifact/api_op_ListPackageVersionDependencies.go b/service/codeartifact/api_op_ListPackageVersionDependencies.go index 3574d06c1e2..174d21c686b 100644 --- a/service/codeartifact/api_op_ListPackageVersionDependencies.go +++ b/service/codeartifact/api_op_ListPackageVersionDependencies.go @@ -75,8 +75,8 @@ type ListPackageVersionDependenciesInput struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string // The token for the next set of results. Use the value returned in the previous @@ -102,8 +102,8 @@ type ListPackageVersionDependenciesOutput struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string // The token for the next set of results. Use the value returned in the previous diff --git a/service/codeartifact/api_op_ListPackageVersions.go b/service/codeartifact/api_op_ListPackageVersions.go index 4e0bb412c13..1191b74b22e 100644 --- a/service/codeartifact/api_op_ListPackageVersions.go +++ b/service/codeartifact/api_op_ListPackageVersions.go @@ -71,8 +71,8 @@ type ListPackageVersionsInput struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string // The token for the next set of results. Use the value returned in the previous @@ -110,8 +110,8 @@ type ListPackageVersionsOutput struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string // If there are additional results, this is the token for the next set of results. diff --git a/service/codeartifact/api_op_ListPackages.go b/service/codeartifact/api_op_ListPackages.go index 456f0632d29..21af680ff04 100644 --- a/service/codeartifact/api_op_ListPackages.go +++ b/service/codeartifact/api_op_ListPackages.go @@ -59,8 +59,8 @@ type ListPackagesInput struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string // The token for the next set of results. Use the value returned in the previous diff --git a/service/codeartifact/api_op_PutPackageOriginConfiguration.go b/service/codeartifact/api_op_PutPackageOriginConfiguration.go index 02b18cac130..c045f41e56b 100644 --- a/service/codeartifact/api_op_PutPackageOriginConfiguration.go +++ b/service/codeartifact/api_op_PutPackageOriginConfiguration.go @@ -82,8 +82,8 @@ type PutPackageOriginConfigurationInput struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string noSmithyDocumentSerde diff --git a/service/codeartifact/api_op_UpdatePackageVersionsStatus.go b/service/codeartifact/api_op_UpdatePackageVersionsStatus.go index 5b199f21080..89f7453e073 100644 --- a/service/codeartifact/api_op_UpdatePackageVersionsStatus.go +++ b/service/codeartifact/api_op_UpdatePackageVersionsStatus.go @@ -80,8 +80,8 @@ type UpdatePackageVersionsStatusInput struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string // A map of package versions and package version revisions. The map key is the diff --git a/service/codeartifact/doc.go b/service/codeartifact/doc.go index 063510d8750..9b099a69243 100644 --- a/service/codeartifact/doc.go +++ b/service/codeartifact/doc.go @@ -14,9 +14,10 @@ // - Repository: A CodeArtifact repository contains a set of package versions (https://docs.aws.amazon.com/codeartifact/latest/ug/welcome.html#welcome-concepts-package-version) // , each of which maps to a set of assets, or files. Repositories are polyglot, so // a single repository can contain packages of any supported type. Each repository -// exposes endpoints for fetching and publishing packages using tools like the -// npm CLI, the Maven CLI ( mvn ), Python CLIs ( pip and twine ), NuGet CLIs ( -// nuget and dotnet ), and the Swift package manager ( swift ). +// exposes endpoints for fetching and publishing packages using tools such as the +// npm CLI or the Maven CLI ( mvn ). For a list of supported package managers, +// see the CodeArtifact User Guide (https://docs.aws.amazon.com/codeartifact/latest/ug/welcome.html) +// . // - Domain: Repositories are aggregated into a higher-level entity known as a // domain. All package assets and metadata are stored in the domain, but are // consumed through repositories. A given package asset, such as a Maven JAR file, @@ -31,12 +32,11 @@ // published artifacts so that teams can find and share packages across their // organization. // - Package: A package is a bundle of software and the metadata required to -// resolve dependencies and install the software. CodeArtifact supports npm (https://docs.aws.amazon.com/codeartifact/latest/ug/using-npm.html) -// , PyPI (https://docs.aws.amazon.com/codeartifact/latest/ug/using-python.html) -// , Maven (https://docs.aws.amazon.com/codeartifact/latest/ug/using-maven) , -// NuGet (https://docs.aws.amazon.com/codeartifact/latest/ug/using-nuget) , Swift (https://docs.aws.amazon.com/codeartifact/latest/ug/using-swift) -// , and generic (https://docs.aws.amazon.com/codeartifact/latest/ug/using-generic) -// package formats. In CodeArtifact, a package consists of: +// resolve dependencies and install the software. CodeArtifact supports npm, PyPI, +// Maven, NuGet, Swift, Ruby, and generic package formats. For more information +// about the supported package formats and how to use CodeArtifact with them, see +// the CodeArtifact User Guide (https://docs.aws.amazon.com/codeartifact/latest/ug/welcome.html) +// . In CodeArtifact, a package consists of: // - A name (for example, webpack is the name of a popular npm package) // - An optional namespace (for example, @types in @types/node ) // - A set of versions (for example, 1.0.0 , 1.0.1 , 1.0.2 , etc.) @@ -117,6 +117,7 @@ // - npm // - nuget // - pypi +// - ruby // - swift // - GetRepositoryPermissionsPolicy : Returns the resource policy that is set on // a repository. diff --git a/service/codeartifact/types/enums.go b/service/codeartifact/types/enums.go index e7606ebb8b3..817edc87e5b 100644 --- a/service/codeartifact/types/enums.go +++ b/service/codeartifact/types/enums.go @@ -103,6 +103,7 @@ const ( PackageFormatMaven PackageFormat = "maven" PackageFormatNuget PackageFormat = "nuget" PackageFormatGeneric PackageFormat = "generic" + PackageFormatRuby PackageFormat = "ruby" PackageFormatSwift PackageFormat = "swift" ) @@ -116,6 +117,7 @@ func (PackageFormat) Values() []PackageFormat { "maven", "nuget", "generic", + "ruby", "swift", } } diff --git a/service/codeartifact/types/types.go b/service/codeartifact/types/types.go index 611af70c17c..3c299a7c38f 100644 --- a/service/codeartifact/types/types.go +++ b/service/codeartifact/types/types.go @@ -44,8 +44,8 @@ type AssociatedPackage struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string // The name of the associated package. @@ -167,8 +167,8 @@ type PackageDependency struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string // The name of the package that this package depends on. @@ -196,8 +196,8 @@ type PackageDescription struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string // The package origin configuration for the package. @@ -384,8 +384,8 @@ type PackageSummary struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string // A PackageOriginConfiguration (https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageOriginConfiguration.html) @@ -422,8 +422,8 @@ type PackageVersionDescription struct { // - The namespace of a Maven package version is its groupId . // - The namespace of an npm or Swift package version is its scope . // - The namespace of a generic package is its namespace . - // - Python and NuGet package versions do not contain a corresponding component, - // package versions of those formats do not have a namespace. + // - Python, NuGet, and Ruby package versions do not contain a corresponding + // component, package versions of those formats do not have a namespace. Namespace *string // A PackageVersionOrigin (https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageVersionOrigin.html) diff --git a/service/fms/deserializers.go b/service/fms/deserializers.go index 8b8fc54cf81..a4b83345cf1 100644 --- a/service/fms/deserializers.go +++ b/service/fms/deserializers.go @@ -11981,6 +11981,15 @@ func awsAwsjson11_deserializeDocumentStatefulEngineOptions(v **types.StatefulEng sv.RuleOrder = types.RuleOrder(jtv) } + case "StreamExceptionPolicy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StreamExceptionPolicy to be of type string, got %T instead", value) + } + sv.StreamExceptionPolicy = types.StreamExceptionPolicy(jtv) + } + default: _, _ = key, value diff --git a/service/fms/types/enums.go b/service/fms/types/enums.go index 5dd217feb00..6066bb1ff2e 100644 --- a/service/fms/types/enums.go +++ b/service/fms/types/enums.go @@ -374,6 +374,28 @@ func (SecurityServiceType) Values() []SecurityServiceType { } } +type StreamExceptionPolicy string + +// Enum values for StreamExceptionPolicy +const ( + StreamExceptionPolicyDrop StreamExceptionPolicy = "DROP" + StreamExceptionPolicyContinue StreamExceptionPolicy = "CONTINUE" + StreamExceptionPolicyReject StreamExceptionPolicy = "REJECT" + StreamExceptionPolicyFmsIgnore StreamExceptionPolicy = "FMS_IGNORE" +) + +// Values returns all known values for StreamExceptionPolicy. 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 (StreamExceptionPolicy) Values() []StreamExceptionPolicy { + return []StreamExceptionPolicy{ + "DROP", + "CONTINUE", + "REJECT", + "FMS_IGNORE", + } +} + type TargetType string // Enum values for TargetType diff --git a/service/fms/types/types.go b/service/fms/types/types.go index 3f6de035e49..7db4a522bc1 100644 --- a/service/fms/types/types.go +++ b/service/fms/types/types.go @@ -835,13 +835,15 @@ type NetworkAclEntrySet struct { // The rules that you want to run first in the Firewall Manager managed network // ACLs. Provide these in the order in which you want them to run. Firewall Manager // will assign the specific rule numbers for you, in the network ACLs that it - // creates. + // creates. You must specify at least one first entry or one last entry in any + // network ACL policy. FirstEntries []NetworkAclEntry // The rules that you want to run last in the Firewall Manager managed network // ACLs. Provide these in the order in which you want them to run. Firewall Manager // will assign the specific rule numbers for you, in the network ACLs that it - // creates. + // creates. You must specify at least one first entry or one last entry in any + // network ACL policy. LastEntries []NetworkAclEntry noSmithyDocumentSerde @@ -2230,12 +2232,34 @@ type SecurityServicePolicyData struct { type StatefulEngineOptions struct { // Indicates how to manage the order of stateful rule evaluation for the policy. - // DEFAULT_ACTION_ORDER is the default behavior. Stateful rules are provided to the - // rule engine as Suricata compatible strings, and Suricata evaluates them based on - // certain settings. For more information, see Evaluation order for stateful rules (https://docs.aws.amazon.com/network-firewall/latest/developerguide/suricata-rule-evaluation-order.html) - // in the Network Firewall Developer Guide. + // Stateful rules are provided to the rule engine as Suricata compatible strings, + // and Suricata evaluates them based on certain settings. For more information, see + // Evaluation order for stateful rules (https://docs.aws.amazon.com/network-firewall/latest/developerguide/suricata-rule-evaluation-order.html) + // in the Network Firewall Developer Guide. Default: DEFAULT_ACTION_ORDER RuleOrder RuleOrder + // Indicates how Network Firewall should handle traffic when a network connection + // breaks midstream. + // - DROP - Fail closed and drop all subsequent traffic going to the firewall. + // - CONTINUE - Continue to apply rules to subsequent traffic without context + // from traffic before the break. This impacts the behavior of rules that depend on + // context. For example, with a stateful rule that drops HTTP traffic, Network + // Firewall won't match subsequent traffic because the it won't have the context + // from session initialization, which defines the application layer protocol as + // HTTP. However, a TCP-layer rule using a flow:stateless rule would still match, + // and so would the aws:drop_strict default action. + // - REJECT - Fail closed and drop all subsequent traffic going to the firewall. + // With this option, Network Firewall also sends a TCP reject packet back to the + // client so the client can immediately establish a new session. With the new + // session, Network Firewall will have context and will apply rules appropriately. + // For applications that are reliant on long-lived TCP connections that trigger + // Gateway Load Balancer idle timeouts, this is the recommended setting. + // - FMS_IGNORE - Firewall Manager doesn't monitor or modify the Network Firewall + // stream exception policy settings. + // For more information, see Stream exception policy in your firewall policy (https://docs.aws.amazon.com/network-firewall/latest/developerguide/stream-exception-policy.html) + // in the Network Firewall Developer Guide. Default: FMS_IGNORE + StreamExceptionPolicy StreamExceptionPolicy + noSmithyDocumentSerde } diff --git a/service/omics/api_op_AcceptShare.go b/service/omics/api_op_AcceptShare.go index 7f48de71207..b8d85c2a9f2 100644 --- a/service/omics/api_op_AcceptShare.go +++ b/service/omics/api_op_AcceptShare.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Accepts a share for an analytics store. +// Accept a resource share request. func (c *Client) AcceptShare(ctx context.Context, params *AcceptShareInput, optFns ...func(*Options)) (*AcceptShareOutput, error) { if params == nil { params = &AcceptShareInput{} @@ -29,7 +29,7 @@ func (c *Client) AcceptShare(ctx context.Context, params *AcceptShareInput, optF type AcceptShareInput struct { - // The ID for a share offer for analytics store data. + // The ID of the resource share. // // This member is required. ShareId *string @@ -39,7 +39,7 @@ type AcceptShareInput struct { type AcceptShareOutput struct { - // The status of an analytics store share. + // The status of the resource share. Status types.ShareStatus // Metadata pertaining to the operation's result. diff --git a/service/omics/api_op_CreateShare.go b/service/omics/api_op_CreateShare.go index 15e341e16c8..c25718e52e0 100644 --- a/service/omics/api_op_CreateShare.go +++ b/service/omics/api_op_CreateShare.go @@ -11,8 +11,13 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a share offer that can be accepted outside the account by a subscriber. -// The share is created by the owner and accepted by the principal subscriber. +// Creates a cross-account shared resource. The resource owner makes an offer to +// share the resource with the principal subscriber (an AWS user with a different +// account than the resource owner). The following resources support cross-account +// sharing: +// - Healthomics variant stores +// - Healthomics annotation stores +// - Private workflows func (c *Client) CreateShare(ctx context.Context, params *CreateShareInput, optFns ...func(*Options)) (*CreateShareOutput, error) { if params == nil { params = &CreateShareInput{} @@ -30,18 +35,18 @@ func (c *Client) CreateShare(ctx context.Context, params *CreateShareInput, optF type CreateShareInput struct { - // The principal subscriber is the account being given access to the analytics - // store data through the share offer. + // The principal subscriber is the account being offered shared access to the + // resource. // // This member is required. PrincipalSubscriber *string - // The resource ARN for the analytics store to be shared. + // The ARN of the resource to be shared. // // This member is required. ResourceArn *string - // A name given to the share. + // A name that the owner defines for the share. ShareName *string noSmithyDocumentSerde @@ -49,13 +54,13 @@ type CreateShareInput struct { type CreateShareOutput struct { - // An ID generated for the share. + // The ID that HealthOmics generates for the share. ShareId *string - // A name given to the share. + // The name of the share. ShareName *string - // The status of a share. + // The status of the share. Status types.ShareStatus // Metadata pertaining to the operation's result. diff --git a/service/omics/api_op_CreateWorkflow.go b/service/omics/api_op_CreateWorkflow.go index 332c556126e..50b9487966f 100644 --- a/service/omics/api_op_CreateWorkflow.go +++ b/service/omics/api_op_CreateWorkflow.go @@ -59,7 +59,7 @@ type CreateWorkflowInput struct { // A parameter template for the workflow. ParameterTemplate map[string]types.WorkflowParameter - // A storage capacity for the workflow in gibibytes. + // The storage capacity for the workflow in gibibytes. StorageCapacity *int32 // Tags for the workflow. diff --git a/service/omics/api_op_DeleteShare.go b/service/omics/api_op_DeleteShare.go index e04538b166d..d64e6d2a5a1 100644 --- a/service/omics/api_op_DeleteShare.go +++ b/service/omics/api_op_DeleteShare.go @@ -11,7 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes a share of an analytics store. +// Deletes a resource share. If you are the resource owner, the subscriber will no +// longer have access to the shared resource. If you are the subscriber, this +// operation deletes your access to the share. func (c *Client) DeleteShare(ctx context.Context, params *DeleteShareInput, optFns ...func(*Options)) (*DeleteShareOutput, error) { if params == nil { params = &DeleteShareInput{} @@ -29,7 +31,7 @@ func (c *Client) DeleteShare(ctx context.Context, params *DeleteShareInput, optF type DeleteShareInput struct { - // The ID for the share request to be deleted. + // The ID for the resource share to be deleted. // // This member is required. ShareId *string diff --git a/service/omics/api_op_GetRun.go b/service/omics/api_op_GetRun.go index 71b679d2731..abf5c43cfaa 100644 --- a/service/omics/api_op_GetRun.go +++ b/service/omics/api_op_GetRun.go @@ -16,7 +16,8 @@ import ( "time" ) -// Gets information about a workflow run. +// Gets information about a workflow run. If a workflow is shared with you, you +// cannot export information about the run. func (c *Client) GetRun(ctx context.Context, params *GetRunInput, optFns ...func(*Options)) (*GetRunOutput, error) { if params == nil { params = &GetRunInput{} @@ -119,9 +120,13 @@ type GetRunOutput struct { // The run's stop time. StopTime *time.Time - // The run's storage capacity in gigabytes. + // The run's storage capacity in gibibytes. For dynamic storage, after the run has + // completed, this value is the maximum amount of storage used during the run. StorageCapacity *int32 + // The run's storage type. + StorageType types.StorageType + // The run's tags. Tags map[string]string @@ -131,6 +136,9 @@ type GetRunOutput struct { // The run's workflow ID. WorkflowId *string + // The ID of the workflow owner. + WorkflowOwnerId *string + // The run's workflow type. WorkflowType types.WorkflowType diff --git a/service/omics/api_op_GetShare.go b/service/omics/api_op_GetShare.go index 40f188e5f86..30569007f41 100644 --- a/service/omics/api_op_GetShare.go +++ b/service/omics/api_op_GetShare.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the metadata for a share. +// Retrieves the metadata for the specified resource share. func (c *Client) GetShare(ctx context.Context, params *GetShareInput, optFns ...func(*Options)) (*GetShareOutput, error) { if params == nil { params = &GetShareInput{} @@ -29,7 +29,7 @@ func (c *Client) GetShare(ctx context.Context, params *GetShareInput, optFns ... type GetShareInput struct { - // The generated ID for a share. + // The ID of the share. // // This member is required. ShareId *string @@ -39,8 +39,8 @@ type GetShareInput struct { type GetShareOutput struct { - // An analytic store share details object. contains status, resourceArn, ownerId, - // etc. + // A resource share details object. The object includes the status, the + // resourceArn, and ownerId. Share *types.ShareDetails // Metadata pertaining to the operation's result. diff --git a/service/omics/api_op_GetWorkflow.go b/service/omics/api_op_GetWorkflow.go index 579f47a2d92..13d0ebf2377 100644 --- a/service/omics/api_op_GetWorkflow.go +++ b/service/omics/api_op_GetWorkflow.go @@ -15,7 +15,8 @@ import ( "time" ) -// Gets information about a workflow. +// Gets information about a workflow. If a workflow is shared with you, you cannot +// export the workflow. func (c *Client) GetWorkflow(ctx context.Context, params *GetWorkflowInput, optFns ...func(*Options)) (*GetWorkflowOutput, error) { if params == nil { params = &GetWorkflowInput{} @@ -44,6 +45,9 @@ type GetWorkflowInput struct { // The workflow's type. Type types.WorkflowType + // The ID of the workflow owner. + WorkflowOwnerId *string + noSmithyDocumentSerde } @@ -91,7 +95,7 @@ type GetWorkflowOutput struct { // The workflow's status message. StatusMessage *string - // The workflow's storage capacity in gigabytes. + // The workflow's storage capacity in gibibytes. StorageCapacity *int32 // The workflow's tags. diff --git a/service/omics/api_op_ListShares.go b/service/omics/api_op_ListShares.go index 32cc3cc7f74..243d6d36a54 100644 --- a/service/omics/api_op_ListShares.go +++ b/service/omics/api_op_ListShares.go @@ -11,7 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists all shares associated with an account. +// Retrieves the resource shares associated with an account. Use the filter +// parameter to retrieve a specific subset of the shares. func (c *Client) ListShares(ctx context.Context, params *ListSharesInput, optFns ...func(*Options)) (*ListSharesOutput, error) { if params == nil { params = &ListSharesInput{} @@ -29,12 +30,12 @@ func (c *Client) ListShares(ctx context.Context, params *ListSharesInput, optFns type ListSharesInput struct { - // The account that owns the analytics store shared. + // The account that owns the resource shares. // // This member is required. ResourceOwner types.ResourceOwner - // Attributes used to filter for a specific subset of shares. + // Attributes that you use to filter for a specific subset of resource shares. Filter *types.Filter // The maximum number of shares to return in one page of results. @@ -49,7 +50,7 @@ type ListSharesInput struct { type ListSharesOutput struct { - // The shares available and their meta details. + // The shares available and their metadata details. // // This member is required. Shares []types.ShareDetails diff --git a/service/omics/api_op_ListWorkflows.go b/service/omics/api_op_ListWorkflows.go index 3981f7acc2d..0de8bd68c93 100644 --- a/service/omics/api_op_ListWorkflows.go +++ b/service/omics/api_op_ListWorkflows.go @@ -32,14 +32,14 @@ type ListWorkflowsInput struct { // The maximum number of workflows to return in one page of results. MaxResults *int32 - // The workflows' name. + // Filter the list by workflow name. Name *string // Specify the pagination token from a previous request to retrieve the next page // of results. StartingToken *string - // The workflows' type. + // Filter the list by workflow type. Type types.WorkflowType noSmithyDocumentSerde @@ -47,7 +47,7 @@ type ListWorkflowsInput struct { type ListWorkflowsOutput struct { - // The workflows' items. + // A list of workflow items. Items []types.WorkflowListItem // A pagination token that's included if more results are available. diff --git a/service/omics/api_op_StartRun.go b/service/omics/api_op_StartRun.go index 1cd28ea050f..6a8d92b9201 100644 --- a/service/omics/api_op_StartRun.go +++ b/service/omics/api_op_StartRun.go @@ -13,10 +13,16 @@ import ( ) // 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. +// The remaining parameters are copied from the previous run. StartRun will not +// support re-run for a workflow that is shared with you. 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. By default, the run +// uses STATIC storage. For STATIC storage, set the storageCapacity field. You can +// set the storage type to DYNAMIC. You do not set storageCapacity , because +// HealthOmics dynamically scales the storage up or down as required. For more +// information about static and dynamic storage, see Running workflows (https://docs.aws.amazon.com/omics/latest/dev/Using-workflows.html) +// in the AWS HealthOmics User Guide. func (c *Client) StartRun(ctx context.Context, params *StartRunInput, optFns ...func(*Options)) (*StartRunOutput, error) { if params == nil { params = &StartRunInput{} @@ -69,15 +75,25 @@ type StartRunInput struct { // The ID of a run to duplicate. RunId *string - // A storage capacity for the run in gibibytes. + // A storage capacity for the run in gibibytes. This field is not required if the + // storage type is dynamic (the system ignores any value that you enter). StorageCapacity *int32 + // The run's storage type. By default, the run uses STATIC storage type, which + // allocates a fixed amount of storage. If you set the storage type to DYNAMIC, + // HealthOmics dynamically scales the storage up or down, based on file system + // utilization. + StorageType types.StorageType + // Tags for the run. Tags map[string]string // The run's workflow ID. WorkflowId *string + // The ID of the workflow owner. + WorkflowOwnerId *string + // The run's workflow type. WorkflowType types.WorkflowType diff --git a/service/omics/deserializers.go b/service/omics/deserializers.go index fbb316ee0ba..f4d6ddeb3d5 100644 --- a/service/omics/deserializers.go +++ b/service/omics/deserializers.go @@ -7284,6 +7284,15 @@ func awsRestjson1_deserializeOpDocumentGetRunOutput(v **GetRunOutput, value inte sv.StorageCapacity = ptr.Int32(int32(i64)) } + case "storageType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StorageType to be of type string, got %T instead", value) + } + sv.StorageType = types.StorageType(jtv) + } + case "tags": if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err @@ -7307,6 +7316,15 @@ func awsRestjson1_deserializeOpDocumentGetRunOutput(v **GetRunOutput, value inte sv.WorkflowId = ptr.String(jtv) } + case "workflowOwnerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkflowOwnerId to be of type string, got %T instead", value) + } + sv.WorkflowOwnerId = ptr.String(jtv) + } + case "workflowType": if value != nil { jtv, ok := value.(string) @@ -19290,6 +19308,15 @@ func awsRestjson1_deserializeDocumentRunListItem(v **types.RunListItem, value in sv.StorageCapacity = ptr.Int32(int32(i64)) } + case "storageType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StorageType to be of type string, got %T instead", value) + } + sv.StorageType = types.StorageType(jtv) + } + case "workflowId": if value != nil { jtv, ok := value.(string) @@ -19832,6 +19859,15 @@ func awsRestjson1_deserializeDocumentShareDetails(v **types.ShareDetails, value sv.ResourceArn = ptr.String(jtv) } + case "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + case "shareId": if value != nil { jtv, ok := value.(string) diff --git a/service/omics/serializers.go b/service/omics/serializers.go index 3f671526856..bb507ebf0b2 100644 --- a/service/omics/serializers.go +++ b/service/omics/serializers.go @@ -3645,6 +3645,10 @@ func awsRestjson1_serializeOpHttpBindingsGetWorkflowInput(v *GetWorkflowInput, e encoder.SetQuery("type").String(string(v.Type)) } + if v.WorkflowOwnerId != nil { + encoder.SetQuery("workflowOwnerId").String(*v.WorkflowOwnerId) + } + return nil } @@ -6168,6 +6172,11 @@ func awsRestjson1_serializeOpDocumentStartRunInput(v *StartRunInput, value smith ok.Integer(*v.StorageCapacity) } + if len(v.StorageType) > 0 { + ok := object.Key("storageType") + ok.String(string(v.StorageType)) + } + if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { @@ -6180,6 +6189,11 @@ func awsRestjson1_serializeOpDocumentStartRunInput(v *StartRunInput, value smith ok.String(*v.WorkflowId) } + if v.WorkflowOwnerId != nil { + ok := object.Key("workflowOwnerId") + ok.String(*v.WorkflowOwnerId) + } + if len(v.WorkflowType) > 0 { ok := object.Key("workflowType") ok.String(string(v.WorkflowType)) @@ -7185,6 +7199,13 @@ func awsRestjson1_serializeDocumentFilter(v *types.Filter, value smithyjson.Valu } } + if v.Type != nil { + ok := object.Key("type") + if err := awsRestjson1_serializeDocumentTypeList(v.Type, ok); err != nil { + return err + } + } + return nil } @@ -7885,6 +7906,17 @@ func awsRestjson1_serializeDocumentTsvVersionOptions(v *types.TsvVersionOptions, return nil } +func awsRestjson1_serializeDocumentTypeList(v []types.ShareResourceType, 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_serializeDocumentVariantImportItemSource(v *types.VariantImportItemSource, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/omics/types/enums.go b/service/omics/types/enums.go index fa2e1fc042f..9af12f2e8df 100644 --- a/service/omics/types/enums.go +++ b/service/omics/types/enums.go @@ -666,6 +666,29 @@ func (SchemaValueType) Values() []SchemaValueType { } } +type ShareResourceType string + +// Enum values for ShareResourceType +const ( + // The share is on a variant store + ShareResourceTypeVariantStore ShareResourceType = "VARIANT_STORE" + // The share is on an annotation store + ShareResourceTypeAnnotationStore ShareResourceType = "ANNOTATION_STORE" + // The share is on a workflow + ShareResourceTypeWorkflow ShareResourceType = "WORKFLOW" +) + +// Values returns all known values for ShareResourceType. 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 (ShareResourceType) Values() []ShareResourceType { + return []ShareResourceType{ + "VARIANT_STORE", + "ANNOTATION_STORE", + "WORKFLOW", + } +} + type ShareStatus string // Enum values for ShareStatus @@ -698,6 +721,24 @@ func (ShareStatus) Values() []ShareStatus { } } +type StorageType string + +// Enum values for StorageType +const ( + StorageTypeStatic StorageType = "STATIC" + StorageTypeDynamic StorageType = "DYNAMIC" +) + +// Values returns all known values for StorageType. 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 (StorageType) Values() []StorageType { + return []StorageType{ + "STATIC", + "DYNAMIC", + } +} + type StoreFormat string // Enum values for StoreFormat diff --git a/service/omics/types/types.go b/service/omics/types/types.go index 3cb523ce131..35988e4bb15 100644 --- a/service/omics/types/types.go +++ b/service/omics/types/types.go @@ -408,16 +408,21 @@ type FileInformation struct { noSmithyDocumentSerde } -// Use filters to focus the returned annotation store versions on a specific -// parameter, such as the status of the annotation store. +// Use filters to return a subset of resources. You can define filters for +// specific parameters, such as the resource status. type Filter struct { - // The Amazon Resource Number (Arn) for an analytics store. + // Filter based on the Amazon Resource Number (ARN) of the resource. You can + // specify up to 10 values. ResourceArns []string - // The status of an annotation store version. + // Filter based on the resource status. You can specify up to 10 values. Status []ShareStatus + // The type of resources to be filtered. You can specify one or more of the + // resource types. + Type []ShareResourceType + noSmithyDocumentSerde } @@ -1147,9 +1152,13 @@ type RunListItem struct { // When the run stopped. StopTime *time.Time - // The run's storage capacity. + // The run's storage capacity in gibibytes. For dynamic storage, after the run has + // completed, this value is the maximum amount of storage used during the run. StorageCapacity *int32 + // The run's storage type. + StorageType StorageType + // The run's workflow ID. WorkflowId *string @@ -1249,36 +1258,38 @@ type SequenceStoreS3Access struct { noSmithyDocumentSerde } -// The details of a share. +// The details of a resource share. type ShareDetails struct { - // The timestamp for when the share was created. + // The timestamp of when the resource share was created. CreationTime *time.Time - // The account ID for the data owner. The owner creates the share offer. + // The account ID for the data owner. The owner creates the resource share. OwnerId *string - // The principal subscriber is the account the analytics store data is being - // shared with. + // The principal subscriber is the account that is sharing the resource. PrincipalSubscriber *string - // The resource Arn of the analytics store being shared. + // The Arn of the shared resource. ResourceArn *string - // The ID for a share offer for an analytics store . + // The ID of the shared resource. + ResourceId *string + + // The ID of the resource share. ShareId *string - // The name of the share. + // The name of the resource share. ShareName *string - // The status of a share. + // The status of the share. Status ShareStatus - // The status message for a share. It provides more details on the status of the - // share. + // The status message for a resource share. It provides additional details about + // the share status. StatusMessage *string - // The timestamp of the share update. + // The timestamp of the resource share update. UpdateTime *time.Time noSmithyDocumentSerde diff --git a/service/opensearch/deserializers.go b/service/opensearch/deserializers.go index 8c8a709a263..4e7f4806eb7 100644 --- a/service/opensearch/deserializers.go +++ b/service/opensearch/deserializers.go @@ -14024,6 +14024,15 @@ func awsRestjson1_deserializeDocumentDomainStatus(v **types.DomainStatus, value return err } + case "DomainEndpointV2HostedZoneId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HostedZoneId to be of type string, got %T instead", value) + } + sv.DomainEndpointV2HostedZoneId = ptr.String(jtv) + } + case "DomainId": if value != nil { jtv, ok := value.(string) diff --git a/service/opensearch/types/types.go b/service/opensearch/types/types.go index 83d847ceed7..fbfbeae18ab 100644 --- a/service/opensearch/types/types.go +++ b/service/opensearch/types/types.go @@ -966,6 +966,9 @@ type DomainStatus struct { // for all traffic. DomainEndpointOptions *DomainEndpointOptions + // The DualStack Hosted Zone Id for the domain. + DomainEndpointV2HostedZoneId *string + // The status of any changes that are currently in progress for the domain. DomainProcessingStatus DomainProcessingStatusType @@ -986,8 +989,11 @@ type DomainStatus struct { EndpointV2 *string // The key-value pair that exists if the OpenSearch Service domain uses VPC - // endpoints. Example key, value : - // 'vpc','vpc-endpoint-h2dsd34efgyghrtguk5gt6j2foh4.us-east-1.es.amazonaws.com' . + // endpoints. For example: + // - IPv4 IP addresses - + // 'vpc','vpc-endpoint-h2dsd34efgyghrtguk5gt6j2foh4.us-east-1.es.amazonaws.com' + // - Dual stack IP addresses - + // 'vpcv2':'vpc-endpoint-h2dsd34efgyghrtguk5gt6j2foh4.aos.us-east-1.on.aws' Endpoints map[string]string // Version of OpenSearch or Elasticsearch that the domain is running, in the diff --git a/service/pinpointsmsvoicev2/api_op_AssociateProtectConfiguration.go b/service/pinpointsmsvoicev2/api_op_AssociateProtectConfiguration.go new file mode 100644 index 00000000000..6958f02d773 --- /dev/null +++ b/service/pinpointsmsvoicev2/api_op_AssociateProtectConfiguration.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package pinpointsmsvoicev2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Associate a protect configuration with a configuration set. This replaces the +// configuration sets current protect configuration. A configuration set can only +// be associated with one protect configuration at a time. A protect configuration +// can be associated with multiple configuration sets. +func (c *Client) AssociateProtectConfiguration(ctx context.Context, params *AssociateProtectConfigurationInput, optFns ...func(*Options)) (*AssociateProtectConfigurationOutput, error) { + if params == nil { + params = &AssociateProtectConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssociateProtectConfiguration", params, optFns, c.addOperationAssociateProtectConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssociateProtectConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssociateProtectConfigurationInput struct { + + // The name of the ConfigurationSet. + // + // This member is required. + ConfigurationSetName *string + + // The unique identifier for the protect configuration. + // + // This member is required. + ProtectConfigurationId *string + + noSmithyDocumentSerde +} + +type AssociateProtectConfigurationOutput struct { + + // The Amazon Resource Name (ARN) of the configuration set. + // + // This member is required. + ConfigurationSetArn *string + + // The name of the ConfigurationSet. + // + // This member is required. + ConfigurationSetName *string + + // The Amazon Resource Name (ARN) of the protect configuration. + // + // This member is required. + ProtectConfigurationArn *string + + // The unique identifier for the protect configuration. + // + // This member is required. + ProtectConfigurationId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssociateProtectConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpAssociateProtectConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpAssociateProtectConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateProtectConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpAssociateProtectConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateProtectConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAssociateProtectConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AssociateProtectConfiguration", + } +} diff --git a/service/pinpointsmsvoicev2/api_op_CreateEventDestination.go b/service/pinpointsmsvoicev2/api_op_CreateEventDestination.go index dcac139dcc4..681238b8a65 100644 --- a/service/pinpointsmsvoicev2/api_op_CreateEventDestination.go +++ b/service/pinpointsmsvoicev2/api_op_CreateEventDestination.go @@ -61,7 +61,7 @@ type CreateEventDestinationInput struct { ClientToken *string // An object that contains information about an event destination for logging to - // Amazon CloudWatch logs. + // Amazon CloudWatch Logs. CloudWatchLogsDestination *types.CloudWatchLogsDestination // An object that contains information about an event destination for logging to diff --git a/service/pinpointsmsvoicev2/api_op_CreateProtectConfiguration.go b/service/pinpointsmsvoicev2/api_op_CreateProtectConfiguration.go new file mode 100644 index 00000000000..d5c6a690164 --- /dev/null +++ b/service/pinpointsmsvoicev2/api_op_CreateProtectConfiguration.go @@ -0,0 +1,212 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package pinpointsmsvoicev2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Create a new protect configuration. By default all country rule sets for each +// capability are set to ALLOW . Update the country rule sets using +// UpdateProtectConfigurationCountryRuleSet . A protect configurations name is +// stored as a Tag with the key set to Name and value as the name of the protect +// configuration. +func (c *Client) CreateProtectConfiguration(ctx context.Context, params *CreateProtectConfigurationInput, optFns ...func(*Options)) (*CreateProtectConfigurationOutput, error) { + if params == nil { + params = &CreateProtectConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateProtectConfiguration", params, optFns, c.addOperationCreateProtectConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateProtectConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateProtectConfigurationInput struct { + + // Unique, case-sensitive identifier that you provide to ensure the idempotency of + // the request. If you don't specify a client token, a randomly generated token is + // used for the request to ensure idempotency. + ClientToken *string + + // When set to true deletion protection is enabled. By default this is set to + // false. + DeletionProtectionEnabled *bool + + // An array of key and value pair tags that are associated with the resource. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateProtectConfigurationOutput struct { + + // This is true if the protect configuration is set as your account default + // protect configuration. + // + // This member is required. + AccountDefault bool + + // The time when the protect configuration was created, in UNIX epoch time (https://www.epochconverter.com/) + // format. + // + // This member is required. + CreatedTimestamp *time.Time + + // When set to true deletion protection is enabled. By default this is set to + // false. + // + // This member is required. + DeletionProtectionEnabled bool + + // The Amazon Resource Name (ARN) of the protect configuration. + // + // This member is required. + ProtectConfigurationArn *string + + // The unique identifier for the protect configuration. + // + // This member is required. + ProtectConfigurationId *string + + // An array of key and value pair tags that are associated with the resource. + Tags []types.Tag + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateProtectConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateProtectConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateProtectConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateProtectConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opCreateProtectConfigurationMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateProtectConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateProtectConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateProtectConfiguration struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateProtectConfiguration) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateProtectConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateProtectConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateProtectConfigurationInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateProtectConfigurationMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateProtectConfiguration{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateProtectConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateProtectConfiguration", + } +} diff --git a/service/pinpointsmsvoicev2/api_op_DeleteAccountDefaultProtectConfiguration.go b/service/pinpointsmsvoicev2/api_op_DeleteAccountDefaultProtectConfiguration.go new file mode 100644 index 00000000000..012dbd01bdb --- /dev/null +++ b/service/pinpointsmsvoicev2/api_op_DeleteAccountDefaultProtectConfiguration.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package pinpointsmsvoicev2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes the current account default protect configuration. +func (c *Client) DeleteAccountDefaultProtectConfiguration(ctx context.Context, params *DeleteAccountDefaultProtectConfigurationInput, optFns ...func(*Options)) (*DeleteAccountDefaultProtectConfigurationOutput, error) { + if params == nil { + params = &DeleteAccountDefaultProtectConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteAccountDefaultProtectConfiguration", params, optFns, c.addOperationDeleteAccountDefaultProtectConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteAccountDefaultProtectConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteAccountDefaultProtectConfigurationInput struct { + noSmithyDocumentSerde +} + +type DeleteAccountDefaultProtectConfigurationOutput struct { + + // The Amazon Resource Name (ARN) of the account default protect configuration. + // + // This member is required. + DefaultProtectConfigurationArn *string + + // The unique identifier of the account default protect configuration. + // + // This member is required. + DefaultProtectConfigurationId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteAccountDefaultProtectConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteAccountDefaultProtectConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteAccountDefaultProtectConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAccountDefaultProtectConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAccountDefaultProtectConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteAccountDefaultProtectConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteAccountDefaultProtectConfiguration", + } +} diff --git a/service/pinpointsmsvoicev2/api_op_DeleteMediaMessageSpendLimitOverride.go b/service/pinpointsmsvoicev2/api_op_DeleteMediaMessageSpendLimitOverride.go new file mode 100644 index 00000000000..d3bf35bea67 --- /dev/null +++ b/service/pinpointsmsvoicev2/api_op_DeleteMediaMessageSpendLimitOverride.go @@ -0,0 +1,130 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package pinpointsmsvoicev2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes an account-level monthly spending limit override for sending multimedia +// messages (MMS). Deleting a spend limit override will set the EnforcedLimit to +// equal the MaxLimit , which is controlled by Amazon Web Services. For more +// information on spend limits (quotas) see Quotas for Server Migration Service (https://docs.aws.amazon.com/sms-voice/latest/userguide/quotas.html) +// in the Server Migration Service User Guide. +func (c *Client) DeleteMediaMessageSpendLimitOverride(ctx context.Context, params *DeleteMediaMessageSpendLimitOverrideInput, optFns ...func(*Options)) (*DeleteMediaMessageSpendLimitOverrideOutput, error) { + if params == nil { + params = &DeleteMediaMessageSpendLimitOverrideInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteMediaMessageSpendLimitOverride", params, optFns, c.addOperationDeleteMediaMessageSpendLimitOverrideMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteMediaMessageSpendLimitOverrideOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteMediaMessageSpendLimitOverrideInput struct { + noSmithyDocumentSerde +} + +type DeleteMediaMessageSpendLimitOverrideOutput struct { + + // The current monthly limit, in US dollars. + MonthlyLimit *int64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteMediaMessageSpendLimitOverrideMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteMediaMessageSpendLimitOverride{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteMediaMessageSpendLimitOverride{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteMediaMessageSpendLimitOverride"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteMediaMessageSpendLimitOverride(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteMediaMessageSpendLimitOverride(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteMediaMessageSpendLimitOverride", + } +} diff --git a/service/pinpointsmsvoicev2/api_op_DeleteProtectConfiguration.go b/service/pinpointsmsvoicev2/api_op_DeleteProtectConfiguration.go new file mode 100644 index 00000000000..a653c916d1f --- /dev/null +++ b/service/pinpointsmsvoicev2/api_op_DeleteProtectConfiguration.go @@ -0,0 +1,163 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package pinpointsmsvoicev2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Permanently delete the protect configuration. The protect configuration must +// have deletion protection disabled and must not be associated as the account +// default protect configuration or associated with a configuration set. +func (c *Client) DeleteProtectConfiguration(ctx context.Context, params *DeleteProtectConfigurationInput, optFns ...func(*Options)) (*DeleteProtectConfigurationOutput, error) { + if params == nil { + params = &DeleteProtectConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteProtectConfiguration", params, optFns, c.addOperationDeleteProtectConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteProtectConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteProtectConfigurationInput struct { + + // The unique identifier for the protect configuration. + // + // This member is required. + ProtectConfigurationId *string + + noSmithyDocumentSerde +} + +type DeleteProtectConfigurationOutput struct { + + // This is true if the protect configuration is set as your account default + // protect configuration. + // + // This member is required. + AccountDefault bool + + // The time when the protect configuration was created, in UNIX epoch time (https://www.epochconverter.com/) + // format. + // + // This member is required. + CreatedTimestamp *time.Time + + // The status of deletion protection for the protect configuration. When set to + // true deletion protection is enabled. By default this is set to false. + // + // This member is required. + DeletionProtectionEnabled bool + + // The Amazon Resource Name (ARN) of the protect configuration. + // + // This member is required. + ProtectConfigurationArn *string + + // The unique identifier for the protect configuration. + // + // This member is required. + ProtectConfigurationId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteProtectConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteProtectConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteProtectConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteProtectConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteProtectConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteProtectConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteProtectConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteProtectConfiguration", + } +} diff --git a/service/pinpointsmsvoicev2/api_op_DescribeProtectConfigurations.go b/service/pinpointsmsvoicev2/api_op_DescribeProtectConfigurations.go new file mode 100644 index 00000000000..0293e1b68e2 --- /dev/null +++ b/service/pinpointsmsvoicev2/api_op_DescribeProtectConfigurations.go @@ -0,0 +1,243 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package pinpointsmsvoicev2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the protect configurations that match any of filters. If a filter +// isn’t provided then all protect configurations are returned. +func (c *Client) DescribeProtectConfigurations(ctx context.Context, params *DescribeProtectConfigurationsInput, optFns ...func(*Options)) (*DescribeProtectConfigurationsOutput, error) { + if params == nil { + params = &DescribeProtectConfigurationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeProtectConfigurations", params, optFns, c.addOperationDescribeProtectConfigurationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeProtectConfigurationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeProtectConfigurationsInput struct { + + // An array of ProtectConfigurationFilter objects to filter the results. + Filters []types.ProtectConfigurationFilter + + // The maximum number of results to return per each request. + MaxResults *int32 + + // The token to be used for the next set of paginated results. You don't need to + // supply a value for this field in the initial request. + NextToken *string + + // An array of protect configuration identifiers to search for. + ProtectConfigurationIds []string + + noSmithyDocumentSerde +} + +type DescribeProtectConfigurationsOutput struct { + + // The token to be used for the next set of paginated results. You don't need to + // supply a value for this field in the initial request. + NextToken *string + + // An array of ProtectConfigurationInformation objects that contain the details + // for the request. + ProtectConfigurations []types.ProtectConfigurationInformation + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeProtectConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpDescribeProtectConfigurations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDescribeProtectConfigurations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeProtectConfigurations"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpDescribeProtectConfigurationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeProtectConfigurations(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// DescribeProtectConfigurationsAPIClient is a client that implements the +// DescribeProtectConfigurations operation. +type DescribeProtectConfigurationsAPIClient interface { + DescribeProtectConfigurations(context.Context, *DescribeProtectConfigurationsInput, ...func(*Options)) (*DescribeProtectConfigurationsOutput, error) +} + +var _ DescribeProtectConfigurationsAPIClient = (*Client)(nil) + +// DescribeProtectConfigurationsPaginatorOptions is the paginator options for +// DescribeProtectConfigurations +type DescribeProtectConfigurationsPaginatorOptions struct { + // The maximum number of results to return per each request. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeProtectConfigurationsPaginator is a paginator for +// DescribeProtectConfigurations +type DescribeProtectConfigurationsPaginator struct { + options DescribeProtectConfigurationsPaginatorOptions + client DescribeProtectConfigurationsAPIClient + params *DescribeProtectConfigurationsInput + nextToken *string + firstPage bool +} + +// NewDescribeProtectConfigurationsPaginator returns a new +// DescribeProtectConfigurationsPaginator +func NewDescribeProtectConfigurationsPaginator(client DescribeProtectConfigurationsAPIClient, params *DescribeProtectConfigurationsInput, optFns ...func(*DescribeProtectConfigurationsPaginatorOptions)) *DescribeProtectConfigurationsPaginator { + if params == nil { + params = &DescribeProtectConfigurationsInput{} + } + + options := DescribeProtectConfigurationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeProtectConfigurationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeProtectConfigurationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeProtectConfigurations page. +func (p *DescribeProtectConfigurationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeProtectConfigurationsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.DescribeProtectConfigurations(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_opDescribeProtectConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeProtectConfigurations", + } +} diff --git a/service/pinpointsmsvoicev2/api_op_DisassociateProtectConfiguration.go b/service/pinpointsmsvoicev2/api_op_DisassociateProtectConfiguration.go new file mode 100644 index 00000000000..e9f89c5aa45 --- /dev/null +++ b/service/pinpointsmsvoicev2/api_op_DisassociateProtectConfiguration.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package pinpointsmsvoicev2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Disassociate a protect configuration from a configuration set. +func (c *Client) DisassociateProtectConfiguration(ctx context.Context, params *DisassociateProtectConfigurationInput, optFns ...func(*Options)) (*DisassociateProtectConfigurationOutput, error) { + if params == nil { + params = &DisassociateProtectConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisassociateProtectConfiguration", params, optFns, c.addOperationDisassociateProtectConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisassociateProtectConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisassociateProtectConfigurationInput struct { + + // The name of the ConfigurationSet. + // + // This member is required. + ConfigurationSetName *string + + // The unique identifier for the protect configuration. + // + // This member is required. + ProtectConfigurationId *string + + noSmithyDocumentSerde +} + +type DisassociateProtectConfigurationOutput struct { + + // The Amazon Resource Name (ARN) of the configuration set. + // + // This member is required. + ConfigurationSetArn *string + + // The name of the ConfigurationSet. + // + // This member is required. + ConfigurationSetName *string + + // The Amazon Resource Name (ARN) of the protect configuration. + // + // This member is required. + ProtectConfigurationArn *string + + // The unique identifier for the protect configuration. + // + // This member is required. + ProtectConfigurationId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDisassociateProtectConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpDisassociateProtectConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDisassociateProtectConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateProtectConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpDisassociateProtectConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateProtectConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDisassociateProtectConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DisassociateProtectConfiguration", + } +} diff --git a/service/pinpointsmsvoicev2/api_op_GetProtectConfigurationCountryRuleSet.go b/service/pinpointsmsvoicev2/api_op_GetProtectConfigurationCountryRuleSet.go new file mode 100644 index 00000000000..58cb6444c7e --- /dev/null +++ b/service/pinpointsmsvoicev2/api_op_GetProtectConfigurationCountryRuleSet.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package pinpointsmsvoicev2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieve the CountryRuleSet for the specified NumberCapability from a protect +// configuration. +func (c *Client) GetProtectConfigurationCountryRuleSet(ctx context.Context, params *GetProtectConfigurationCountryRuleSetInput, optFns ...func(*Options)) (*GetProtectConfigurationCountryRuleSetOutput, error) { + if params == nil { + params = &GetProtectConfigurationCountryRuleSetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetProtectConfigurationCountryRuleSet", params, optFns, c.addOperationGetProtectConfigurationCountryRuleSetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetProtectConfigurationCountryRuleSetOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetProtectConfigurationCountryRuleSetInput struct { + + // The capability type to return the CountryRuleSet for. Valid values are SMS , + // VOICE , or MMS . + // + // This member is required. + NumberCapability types.NumberCapability + + // The unique identifier for the protect configuration. + // + // This member is required. + ProtectConfigurationId *string + + noSmithyDocumentSerde +} + +type GetProtectConfigurationCountryRuleSetOutput struct { + + // A map of ProtectConfigurationCountryRuleSetInformation objects that contain the + // details for the requested NumberCapability. The Key is the two-letter ISO + // country code. For a list of supported ISO country codes, see Supported + // countries and regions (SMS channel) (https://docs.aws.amazon.com/sms-voice/latest/userguide/phone-numbers-sms-by-country.html) + // in the Amazon Pinpoint SMS user guide. + // + // This member is required. + CountryRuleSet map[string]types.ProtectConfigurationCountryRuleSetInformation + + // The capability type associated with the returned + // ProtectConfigurationCountryRuleSetInformation objects. + // + // This member is required. + NumberCapability types.NumberCapability + + // The Amazon Resource Name (ARN) of the protect configuration. + // + // This member is required. + ProtectConfigurationArn *string + + // The unique identifier for the protect configuration. + // + // This member is required. + ProtectConfigurationId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetProtectConfigurationCountryRuleSetMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetProtectConfigurationCountryRuleSet{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetProtectConfigurationCountryRuleSet{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetProtectConfigurationCountryRuleSet"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpGetProtectConfigurationCountryRuleSetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetProtectConfigurationCountryRuleSet(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetProtectConfigurationCountryRuleSet(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetProtectConfigurationCountryRuleSet", + } +} diff --git a/service/pinpointsmsvoicev2/api_op_SendMediaMessage.go b/service/pinpointsmsvoicev2/api_op_SendMediaMessage.go new file mode 100644 index 00000000000..123cb253990 --- /dev/null +++ b/service/pinpointsmsvoicev2/api_op_SendMediaMessage.go @@ -0,0 +1,175 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package pinpointsmsvoicev2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new multimedia message (MMS) and sends it to a recipient's phone +// number. +func (c *Client) SendMediaMessage(ctx context.Context, params *SendMediaMessageInput, optFns ...func(*Options)) (*SendMediaMessageOutput, error) { + if params == nil { + params = &SendMediaMessageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SendMediaMessage", params, optFns, c.addOperationSendMediaMessageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SendMediaMessageOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SendMediaMessageInput struct { + + // The destination phone number in E.164 format. + // + // This member is required. + DestinationPhoneNumber *string + + // The origination identity of the message. This can be either the PhoneNumber, + // PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn. + // + // This member is required. + OriginationIdentity *string + + // The name of the configuration set to use. This can be either the + // ConfigurationSetName or ConfigurationSetArn. + ConfigurationSetName *string + + // You can specify custom data in this field. If you do, that data is logged to + // the event destination. + Context map[string]string + + // When set to true, the message is checked and validated, but isn't sent to the + // end recipient. + DryRun bool + + // The maximum amount that you want to spend, in US dollars, per each MMS message. + MaxPrice *string + + // An array of URLs to each media file to send. The media files have to be stored + // in a publicly available S3 bucket. Supported media file formats are listed in + // MMS file types, size and character limits (https://docs.aws.amazon.com/sms-voice/latest/userguide/mms-limitations-character.html) + // . For more information on creating an S3 bucket and managing objects, see + // Creating a bucket (https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-bucket-overview.html) + // and Uploading objects (https://docs.aws.amazon.com/AmazonS3/latest/userguide/upload-objects.html) + // in the S3 user guide. + MediaUrls []string + + // The text body of the message. + MessageBody *string + + // The unique identifier of the protect configuration to use. + ProtectConfigurationId *string + + // How long the text message is valid for. By default this is 72 hours. + TimeToLive *int32 + + noSmithyDocumentSerde +} + +type SendMediaMessageOutput struct { + + // The unique identifier for the message. + MessageId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSendMediaMessageMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpSendMediaMessage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpSendMediaMessage{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "SendMediaMessage"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpSendMediaMessageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendMediaMessage(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opSendMediaMessage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "SendMediaMessage", + } +} diff --git a/service/pinpointsmsvoicev2/api_op_SendTextMessage.go b/service/pinpointsmsvoicev2/api_op_SendTextMessage.go index 35cab1f046f..b898456e433 100644 --- a/service/pinpointsmsvoicev2/api_op_SendTextMessage.go +++ b/service/pinpointsmsvoicev2/api_op_SendTextMessage.go @@ -78,6 +78,9 @@ type SendTextMessageInput struct { // PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn. OriginationIdentity *string + // The unique identifier for the protect configuration. + ProtectConfigurationId *string + // How long the text message is valid for. By default this is 72 hours. TimeToLive *int32 diff --git a/service/pinpointsmsvoicev2/api_op_SendVoiceMessage.go b/service/pinpointsmsvoicev2/api_op_SendVoiceMessage.go index 591a1e0b538..f1414e8d695 100644 --- a/service/pinpointsmsvoicev2/api_op_SendVoiceMessage.go +++ b/service/pinpointsmsvoicev2/api_op_SendVoiceMessage.go @@ -67,6 +67,9 @@ type SendVoiceMessageInput struct { // - SSML: When used the maximum character limit is 6000 including SSML tagging. MessageBodyTextType types.VoiceMessageBodyTextType + // The unique identifier for the protect configuration. + ProtectConfigurationId *string + // How long the voice message is valid for. By default this is 72 hours. TimeToLive *int32 diff --git a/service/pinpointsmsvoicev2/api_op_SetAccountDefaultProtectConfiguration.go b/service/pinpointsmsvoicev2/api_op_SetAccountDefaultProtectConfiguration.go new file mode 100644 index 00000000000..b95278c70b3 --- /dev/null +++ b/service/pinpointsmsvoicev2/api_op_SetAccountDefaultProtectConfiguration.go @@ -0,0 +1,144 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package pinpointsmsvoicev2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Set a protect configuration as your account default. You can only have one +// account default protect configuration at a time. The current account default +// protect configuration is replaced with the provided protect configuration. +func (c *Client) SetAccountDefaultProtectConfiguration(ctx context.Context, params *SetAccountDefaultProtectConfigurationInput, optFns ...func(*Options)) (*SetAccountDefaultProtectConfigurationOutput, error) { + if params == nil { + params = &SetAccountDefaultProtectConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SetAccountDefaultProtectConfiguration", params, optFns, c.addOperationSetAccountDefaultProtectConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SetAccountDefaultProtectConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SetAccountDefaultProtectConfigurationInput struct { + + // The unique identifier for the protect configuration. + // + // This member is required. + ProtectConfigurationId *string + + noSmithyDocumentSerde +} + +type SetAccountDefaultProtectConfigurationOutput struct { + + // The Amazon Resource Name (ARN) of the account default protect configuration. + // + // This member is required. + DefaultProtectConfigurationArn *string + + // The unique identifier of the account default protect configuration. + // + // This member is required. + DefaultProtectConfigurationId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSetAccountDefaultProtectConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpSetAccountDefaultProtectConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpSetAccountDefaultProtectConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "SetAccountDefaultProtectConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpSetAccountDefaultProtectConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetAccountDefaultProtectConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opSetAccountDefaultProtectConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "SetAccountDefaultProtectConfiguration", + } +} diff --git a/service/pinpointsmsvoicev2/api_op_SetMediaMessageSpendLimitOverride.go b/service/pinpointsmsvoicev2/api_op_SetMediaMessageSpendLimitOverride.go new file mode 100644 index 00000000000..de34ced97ec --- /dev/null +++ b/service/pinpointsmsvoicev2/api_op_SetMediaMessageSpendLimitOverride.go @@ -0,0 +1,137 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package pinpointsmsvoicev2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Sets an account level monthly spend limit override for sending MMS messages. +// The requested spend limit must be less than or equal to the MaxLimit , which is +// set by Amazon Web Services. +func (c *Client) SetMediaMessageSpendLimitOverride(ctx context.Context, params *SetMediaMessageSpendLimitOverrideInput, optFns ...func(*Options)) (*SetMediaMessageSpendLimitOverrideOutput, error) { + if params == nil { + params = &SetMediaMessageSpendLimitOverrideInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SetMediaMessageSpendLimitOverride", params, optFns, c.addOperationSetMediaMessageSpendLimitOverrideMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SetMediaMessageSpendLimitOverrideOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SetMediaMessageSpendLimitOverrideInput struct { + + // The new monthly limit to enforce on text messages. + // + // This member is required. + MonthlyLimit *int64 + + noSmithyDocumentSerde +} + +type SetMediaMessageSpendLimitOverrideOutput struct { + + // The current monthly limit to enforce on sending text messages. + MonthlyLimit *int64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSetMediaMessageSpendLimitOverrideMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpSetMediaMessageSpendLimitOverride{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpSetMediaMessageSpendLimitOverride{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "SetMediaMessageSpendLimitOverride"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpSetMediaMessageSpendLimitOverrideValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetMediaMessageSpendLimitOverride(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opSetMediaMessageSpendLimitOverride(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "SetMediaMessageSpendLimitOverride", + } +} diff --git a/service/pinpointsmsvoicev2/api_op_UpdateProtectConfiguration.go b/service/pinpointsmsvoicev2/api_op_UpdateProtectConfiguration.go new file mode 100644 index 00000000000..af9977cef08 --- /dev/null +++ b/service/pinpointsmsvoicev2/api_op_UpdateProtectConfiguration.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package pinpointsmsvoicev2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Update the setting for an existing protect configuration. +func (c *Client) UpdateProtectConfiguration(ctx context.Context, params *UpdateProtectConfigurationInput, optFns ...func(*Options)) (*UpdateProtectConfigurationOutput, error) { + if params == nil { + params = &UpdateProtectConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateProtectConfiguration", params, optFns, c.addOperationUpdateProtectConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateProtectConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateProtectConfigurationInput struct { + + // The unique identifier for the protect configuration. + // + // This member is required. + ProtectConfigurationId *string + + // When set to true deletion protection is enabled. By default this is set to + // false. + DeletionProtectionEnabled *bool + + noSmithyDocumentSerde +} + +type UpdateProtectConfigurationOutput struct { + + // This is true if the protect configuration is set as your account default + // protect configuration. + // + // This member is required. + AccountDefault bool + + // The time when the protect configuration was created, in UNIX epoch time (https://www.epochconverter.com/) + // format. + // + // This member is required. + CreatedTimestamp *time.Time + + // The status of deletion protection for the protect configuration. When set to + // true deletion protection is enabled. By default this is set to false. + // + // This member is required. + DeletionProtectionEnabled bool + + // The Amazon Resource Name (ARN) of the protect configuration. + // + // This member is required. + ProtectConfigurationArn *string + + // The unique identifier for the protect configuration. + // + // This member is required. + ProtectConfigurationId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateProtectConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateProtectConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateProtectConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateProtectConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateProtectConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateProtectConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateProtectConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateProtectConfiguration", + } +} diff --git a/service/pinpointsmsvoicev2/api_op_UpdateProtectConfigurationCountryRuleSet.go b/service/pinpointsmsvoicev2/api_op_UpdateProtectConfigurationCountryRuleSet.go new file mode 100644 index 00000000000..ed29aa5d106 --- /dev/null +++ b/service/pinpointsmsvoicev2/api_op_UpdateProtectConfigurationCountryRuleSet.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package pinpointsmsvoicev2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update a country rule set to ALLOW or BLOCK messages to be sent to the +// specified destination counties. You can update one or multiple countries at a +// time. The updates are only applied to the specified NumberCapability type. +func (c *Client) UpdateProtectConfigurationCountryRuleSet(ctx context.Context, params *UpdateProtectConfigurationCountryRuleSetInput, optFns ...func(*Options)) (*UpdateProtectConfigurationCountryRuleSetOutput, error) { + if params == nil { + params = &UpdateProtectConfigurationCountryRuleSetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateProtectConfigurationCountryRuleSet", params, optFns, c.addOperationUpdateProtectConfigurationCountryRuleSetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateProtectConfigurationCountryRuleSetOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateProtectConfigurationCountryRuleSetInput struct { + + // A map of ProtectConfigurationCountryRuleSetInformation objects that contain the + // details for the requested NumberCapability. The Key is the two-letter ISO + // country code. For a list of supported ISO country codes, see Supported + // countries and regions (SMS channel) (https://docs.aws.amazon.com/sms-voice/latest/userguide/phone-numbers-sms-by-country.html) + // in the Amazon Pinpoint SMS user guide. + // + // This member is required. + CountryRuleSetUpdates map[string]types.ProtectConfigurationCountryRuleSetInformation + + // The number capability to apply the CountryRuleSetUpdates updates to. + // + // This member is required. + NumberCapability types.NumberCapability + + // The unique identifier for the protect configuration. + // + // This member is required. + ProtectConfigurationId *string + + noSmithyDocumentSerde +} + +type UpdateProtectConfigurationCountryRuleSetOutput struct { + + // An array of ProtectConfigurationCountryRuleSetInformation containing the rules + // for the NumberCapability. + // + // This member is required. + CountryRuleSet map[string]types.ProtectConfigurationCountryRuleSetInformation + + // The number capability that was updated + // + // This member is required. + NumberCapability types.NumberCapability + + // The Amazon Resource Name (ARN) of the protect configuration. + // + // This member is required. + ProtectConfigurationArn *string + + // The unique identifier for the protect configuration. + // + // This member is required. + ProtectConfigurationId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateProtectConfigurationCountryRuleSetMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateProtectConfigurationCountryRuleSet{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateProtectConfigurationCountryRuleSet{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateProtectConfigurationCountryRuleSet"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateProtectConfigurationCountryRuleSetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateProtectConfigurationCountryRuleSet(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateProtectConfigurationCountryRuleSet(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateProtectConfigurationCountryRuleSet", + } +} diff --git a/service/pinpointsmsvoicev2/deserializers.go b/service/pinpointsmsvoicev2/deserializers.go index 82c15c5d6ca..1f56390a514 100644 --- a/service/pinpointsmsvoicev2/deserializers.go +++ b/service/pinpointsmsvoicev2/deserializers.go @@ -144,14 +144,14 @@ func awsAwsjson10_deserializeOpErrorAssociateOriginationIdentity(response *smith } } -type awsAwsjson10_deserializeOpCreateConfigurationSet struct { +type awsAwsjson10_deserializeOpAssociateProtectConfiguration struct { } -func (*awsAwsjson10_deserializeOpCreateConfigurationSet) ID() string { +func (*awsAwsjson10_deserializeOpAssociateProtectConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateConfigurationSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpAssociateProtectConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -165,9 +165,9 @@ func (m *awsAwsjson10_deserializeOpCreateConfigurationSet) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateConfigurationSet(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorAssociateProtectConfiguration(response, &metadata) } - output := &CreateConfigurationSetOutput{} + output := &AssociateProtectConfigurationOutput{} out.Result = output var buff [1024]byte @@ -187,7 +187,7 @@ func (m *awsAwsjson10_deserializeOpCreateConfigurationSet) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateConfigurationSetOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentAssociateProtectConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -201,7 +201,7 @@ func (m *awsAwsjson10_deserializeOpCreateConfigurationSet) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateConfigurationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorAssociateProtectConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -247,8 +247,8 @@ func awsAwsjson10_deserializeOpErrorCreateConfigurationSet(response *smithyhttp. case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -266,14 +266,14 @@ func awsAwsjson10_deserializeOpErrorCreateConfigurationSet(response *smithyhttp. } } -type awsAwsjson10_deserializeOpCreateEventDestination struct { +type awsAwsjson10_deserializeOpCreateConfigurationSet struct { } -func (*awsAwsjson10_deserializeOpCreateEventDestination) ID() string { +func (*awsAwsjson10_deserializeOpCreateConfigurationSet) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateEventDestination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateConfigurationSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -287,9 +287,9 @@ func (m *awsAwsjson10_deserializeOpCreateEventDestination) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateEventDestination(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateConfigurationSet(response, &metadata) } - output := &CreateEventDestinationOutput{} + output := &CreateConfigurationSetOutput{} out.Result = output var buff [1024]byte @@ -309,7 +309,7 @@ func (m *awsAwsjson10_deserializeOpCreateEventDestination) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateEventDestinationOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateConfigurationSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -323,7 +323,7 @@ func (m *awsAwsjson10_deserializeOpCreateEventDestination) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateEventDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateConfigurationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -369,9 +369,6 @@ func awsAwsjson10_deserializeOpErrorCreateEventDestination(response *smithyhttp. case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -391,14 +388,14 @@ func awsAwsjson10_deserializeOpErrorCreateEventDestination(response *smithyhttp. } } -type awsAwsjson10_deserializeOpCreateOptOutList struct { +type awsAwsjson10_deserializeOpCreateEventDestination struct { } -func (*awsAwsjson10_deserializeOpCreateOptOutList) ID() string { +func (*awsAwsjson10_deserializeOpCreateEventDestination) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateOptOutList) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateEventDestination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -412,9 +409,9 @@ func (m *awsAwsjson10_deserializeOpCreateOptOutList) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateOptOutList(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateEventDestination(response, &metadata) } - output := &CreateOptOutListOutput{} + output := &CreateEventDestinationOutput{} out.Result = output var buff [1024]byte @@ -434,7 +431,7 @@ func (m *awsAwsjson10_deserializeOpCreateOptOutList) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateOptOutListOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateEventDestinationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -448,7 +445,7 @@ func (m *awsAwsjson10_deserializeOpCreateOptOutList) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateOptOutList(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateEventDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -494,6 +491,9 @@ func awsAwsjson10_deserializeOpErrorCreateOptOutList(response *smithyhttp.Respon case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -513,14 +513,14 @@ func awsAwsjson10_deserializeOpErrorCreateOptOutList(response *smithyhttp.Respon } } -type awsAwsjson10_deserializeOpCreatePool struct { +type awsAwsjson10_deserializeOpCreateOptOutList struct { } -func (*awsAwsjson10_deserializeOpCreatePool) ID() string { +func (*awsAwsjson10_deserializeOpCreateOptOutList) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreatePool) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateOptOutList) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -534,9 +534,9 @@ func (m *awsAwsjson10_deserializeOpCreatePool) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreatePool(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateOptOutList(response, &metadata) } - output := &CreatePoolOutput{} + output := &CreateOptOutListOutput{} out.Result = output var buff [1024]byte @@ -556,7 +556,7 @@ func (m *awsAwsjson10_deserializeOpCreatePool) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreatePoolOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateOptOutListOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -570,7 +570,7 @@ func (m *awsAwsjson10_deserializeOpCreatePool) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreatePool(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateOptOutList(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -616,9 +616,6 @@ func awsAwsjson10_deserializeOpErrorCreatePool(response *smithyhttp.Response, me case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -638,14 +635,14 @@ func awsAwsjson10_deserializeOpErrorCreatePool(response *smithyhttp.Response, me } } -type awsAwsjson10_deserializeOpCreateRegistration struct { +type awsAwsjson10_deserializeOpCreatePool struct { } -func (*awsAwsjson10_deserializeOpCreateRegistration) ID() string { +func (*awsAwsjson10_deserializeOpCreatePool) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateRegistration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreatePool) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -659,9 +656,9 @@ func (m *awsAwsjson10_deserializeOpCreateRegistration) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateRegistration(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreatePool(response, &metadata) } - output := &CreateRegistrationOutput{} + output := &CreatePoolOutput{} out.Result = output var buff [1024]byte @@ -681,7 +678,7 @@ func (m *awsAwsjson10_deserializeOpCreateRegistration) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateRegistrationOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreatePoolOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -695,7 +692,7 @@ func (m *awsAwsjson10_deserializeOpCreateRegistration) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateRegistration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreatePool(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -741,6 +738,9 @@ func awsAwsjson10_deserializeOpErrorCreateRegistration(response *smithyhttp.Resp case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -760,14 +760,14 @@ func awsAwsjson10_deserializeOpErrorCreateRegistration(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpCreateRegistrationAssociation struct { +type awsAwsjson10_deserializeOpCreateProtectConfiguration struct { } -func (*awsAwsjson10_deserializeOpCreateRegistrationAssociation) ID() string { +func (*awsAwsjson10_deserializeOpCreateProtectConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateRegistrationAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateProtectConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -781,9 +781,9 @@ func (m *awsAwsjson10_deserializeOpCreateRegistrationAssociation) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateRegistrationAssociation(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateProtectConfiguration(response, &metadata) } - output := &CreateRegistrationAssociationOutput{} + output := &CreateProtectConfigurationOutput{} out.Result = output var buff [1024]byte @@ -803,7 +803,7 @@ func (m *awsAwsjson10_deserializeOpCreateRegistrationAssociation) HandleDeserial return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateRegistrationAssociationOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateProtectConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -817,7 +817,7 @@ func (m *awsAwsjson10_deserializeOpCreateRegistrationAssociation) HandleDeserial return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateRegistrationAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateProtectConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -857,15 +857,9 @@ func awsAwsjson10_deserializeOpErrorCreateRegistrationAssociation(response *smit case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -885,14 +879,14 @@ func awsAwsjson10_deserializeOpErrorCreateRegistrationAssociation(response *smit } } -type awsAwsjson10_deserializeOpCreateRegistrationAttachment struct { +type awsAwsjson10_deserializeOpCreateRegistration struct { } -func (*awsAwsjson10_deserializeOpCreateRegistrationAttachment) ID() string { +func (*awsAwsjson10_deserializeOpCreateRegistration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateRegistrationAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateRegistration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -906,9 +900,9 @@ func (m *awsAwsjson10_deserializeOpCreateRegistrationAttachment) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateRegistrationAttachment(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateRegistration(response, &metadata) } - output := &CreateRegistrationAttachmentOutput{} + output := &CreateRegistrationOutput{} out.Result = output var buff [1024]byte @@ -928,7 +922,7 @@ func (m *awsAwsjson10_deserializeOpCreateRegistrationAttachment) HandleDeseriali return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateRegistrationAttachmentOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateRegistrationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -942,7 +936,7 @@ func (m *awsAwsjson10_deserializeOpCreateRegistrationAttachment) HandleDeseriali return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateRegistrationAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateRegistration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1007,14 +1001,14 @@ func awsAwsjson10_deserializeOpErrorCreateRegistrationAttachment(response *smith } } -type awsAwsjson10_deserializeOpCreateRegistrationVersion struct { +type awsAwsjson10_deserializeOpCreateRegistrationAssociation struct { } -func (*awsAwsjson10_deserializeOpCreateRegistrationVersion) ID() string { +func (*awsAwsjson10_deserializeOpCreateRegistrationAssociation) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateRegistrationVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateRegistrationAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1028,9 +1022,9 @@ func (m *awsAwsjson10_deserializeOpCreateRegistrationVersion) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateRegistrationVersion(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateRegistrationAssociation(response, &metadata) } - output := &CreateRegistrationVersionOutput{} + output := &CreateRegistrationAssociationOutput{} out.Result = output var buff [1024]byte @@ -1050,7 +1044,7 @@ func (m *awsAwsjson10_deserializeOpCreateRegistrationVersion) HandleDeserialize( return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateRegistrationVersionOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateRegistrationAssociationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1064,7 +1058,7 @@ func (m *awsAwsjson10_deserializeOpCreateRegistrationVersion) HandleDeserialize( return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateRegistrationVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateRegistrationAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1132,14 +1126,14 @@ func awsAwsjson10_deserializeOpErrorCreateRegistrationVersion(response *smithyht } } -type awsAwsjson10_deserializeOpCreateVerifiedDestinationNumber struct { +type awsAwsjson10_deserializeOpCreateRegistrationAttachment struct { } -func (*awsAwsjson10_deserializeOpCreateVerifiedDestinationNumber) ID() string { +func (*awsAwsjson10_deserializeOpCreateRegistrationAttachment) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateVerifiedDestinationNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateRegistrationAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1153,9 +1147,9 @@ func (m *awsAwsjson10_deserializeOpCreateVerifiedDestinationNumber) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateVerifiedDestinationNumber(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateRegistrationAttachment(response, &metadata) } - output := &CreateVerifiedDestinationNumberOutput{} + output := &CreateRegistrationAttachmentOutput{} out.Result = output var buff [1024]byte @@ -1175,7 +1169,7 @@ func (m *awsAwsjson10_deserializeOpCreateVerifiedDestinationNumber) HandleDeseri return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateVerifiedDestinationNumberOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateRegistrationAttachmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1189,7 +1183,7 @@ func (m *awsAwsjson10_deserializeOpCreateVerifiedDestinationNumber) HandleDeseri return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateVerifiedDestinationNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateRegistrationAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1254,14 +1248,14 @@ func awsAwsjson10_deserializeOpErrorCreateVerifiedDestinationNumber(response *sm } } -type awsAwsjson10_deserializeOpDeleteConfigurationSet struct { +type awsAwsjson10_deserializeOpCreateRegistrationVersion struct { } -func (*awsAwsjson10_deserializeOpDeleteConfigurationSet) ID() string { +func (*awsAwsjson10_deserializeOpCreateRegistrationVersion) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteConfigurationSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateRegistrationVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1275,9 +1269,9 @@ func (m *awsAwsjson10_deserializeOpDeleteConfigurationSet) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteConfigurationSet(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateRegistrationVersion(response, &metadata) } - output := &DeleteConfigurationSetOutput{} + output := &CreateRegistrationVersionOutput{} out.Result = output var buff [1024]byte @@ -1297,7 +1291,7 @@ func (m *awsAwsjson10_deserializeOpDeleteConfigurationSet) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteConfigurationSetOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateRegistrationVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1311,7 +1305,7 @@ func (m *awsAwsjson10_deserializeOpDeleteConfigurationSet) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteConfigurationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateRegistrationVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1351,12 +1345,18 @@ func awsAwsjson10_deserializeOpErrorDeleteConfigurationSet(response *smithyhttp. case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -1373,14 +1373,14 @@ func awsAwsjson10_deserializeOpErrorDeleteConfigurationSet(response *smithyhttp. } } -type awsAwsjson10_deserializeOpDeleteDefaultMessageType struct { +type awsAwsjson10_deserializeOpCreateVerifiedDestinationNumber struct { } -func (*awsAwsjson10_deserializeOpDeleteDefaultMessageType) ID() string { +func (*awsAwsjson10_deserializeOpCreateVerifiedDestinationNumber) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteDefaultMessageType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateVerifiedDestinationNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1394,9 +1394,9 @@ func (m *awsAwsjson10_deserializeOpDeleteDefaultMessageType) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteDefaultMessageType(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateVerifiedDestinationNumber(response, &metadata) } - output := &DeleteDefaultMessageTypeOutput{} + output := &CreateVerifiedDestinationNumberOutput{} out.Result = output var buff [1024]byte @@ -1416,7 +1416,7 @@ func (m *awsAwsjson10_deserializeOpDeleteDefaultMessageType) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteDefaultMessageTypeOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateVerifiedDestinationNumberOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1430,7 +1430,7 @@ func (m *awsAwsjson10_deserializeOpDeleteDefaultMessageType) HandleDeserialize(c return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteDefaultMessageType(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateVerifiedDestinationNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1470,11 +1470,14 @@ func awsAwsjson10_deserializeOpErrorDeleteDefaultMessageType(response *smithyhtt case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -1492,14 +1495,14 @@ func awsAwsjson10_deserializeOpErrorDeleteDefaultMessageType(response *smithyhtt } } -type awsAwsjson10_deserializeOpDeleteDefaultSenderId struct { +type awsAwsjson10_deserializeOpDeleteAccountDefaultProtectConfiguration struct { } -func (*awsAwsjson10_deserializeOpDeleteDefaultSenderId) ID() string { +func (*awsAwsjson10_deserializeOpDeleteAccountDefaultProtectConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteDefaultSenderId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteAccountDefaultProtectConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1513,9 +1516,9 @@ func (m *awsAwsjson10_deserializeOpDeleteDefaultSenderId) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteDefaultSenderId(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteAccountDefaultProtectConfiguration(response, &metadata) } - output := &DeleteDefaultSenderIdOutput{} + output := &DeleteAccountDefaultProtectConfigurationOutput{} out.Result = output var buff [1024]byte @@ -1535,7 +1538,7 @@ func (m *awsAwsjson10_deserializeOpDeleteDefaultSenderId) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteDefaultSenderIdOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteAccountDefaultProtectConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1549,7 +1552,7 @@ func (m *awsAwsjson10_deserializeOpDeleteDefaultSenderId) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteDefaultSenderId(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteAccountDefaultProtectConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1611,14 +1614,14 @@ func awsAwsjson10_deserializeOpErrorDeleteDefaultSenderId(response *smithyhttp.R } } -type awsAwsjson10_deserializeOpDeleteEventDestination struct { +type awsAwsjson10_deserializeOpDeleteConfigurationSet struct { } -func (*awsAwsjson10_deserializeOpDeleteEventDestination) ID() string { +func (*awsAwsjson10_deserializeOpDeleteConfigurationSet) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteEventDestination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteConfigurationSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1632,9 +1635,9 @@ func (m *awsAwsjson10_deserializeOpDeleteEventDestination) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteEventDestination(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteConfigurationSet(response, &metadata) } - output := &DeleteEventDestinationOutput{} + output := &DeleteConfigurationSetOutput{} out.Result = output var buff [1024]byte @@ -1654,7 +1657,7 @@ func (m *awsAwsjson10_deserializeOpDeleteEventDestination) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteEventDestinationOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteConfigurationSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1668,7 +1671,7 @@ func (m *awsAwsjson10_deserializeOpDeleteEventDestination) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteEventDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteConfigurationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1730,14 +1733,14 @@ func awsAwsjson10_deserializeOpErrorDeleteEventDestination(response *smithyhttp. } } -type awsAwsjson10_deserializeOpDeleteKeyword struct { +type awsAwsjson10_deserializeOpDeleteDefaultMessageType struct { } -func (*awsAwsjson10_deserializeOpDeleteKeyword) ID() string { +func (*awsAwsjson10_deserializeOpDeleteDefaultMessageType) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteKeyword) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteDefaultMessageType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1751,9 +1754,9 @@ func (m *awsAwsjson10_deserializeOpDeleteKeyword) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteKeyword(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteDefaultMessageType(response, &metadata) } - output := &DeleteKeywordOutput{} + output := &DeleteDefaultMessageTypeOutput{} out.Result = output var buff [1024]byte @@ -1773,7 +1776,7 @@ func (m *awsAwsjson10_deserializeOpDeleteKeyword) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteKeywordOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteDefaultMessageTypeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1787,7 +1790,7 @@ func (m *awsAwsjson10_deserializeOpDeleteKeyword) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteKeyword(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteDefaultMessageType(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1827,9 +1830,6 @@ func awsAwsjson10_deserializeOpErrorDeleteKeyword(response *smithyhttp.Response, case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -1852,14 +1852,14 @@ func awsAwsjson10_deserializeOpErrorDeleteKeyword(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpDeleteOptedOutNumber struct { +type awsAwsjson10_deserializeOpDeleteDefaultSenderId struct { } -func (*awsAwsjson10_deserializeOpDeleteOptedOutNumber) ID() string { +func (*awsAwsjson10_deserializeOpDeleteDefaultSenderId) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteOptedOutNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteDefaultSenderId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1873,9 +1873,9 @@ func (m *awsAwsjson10_deserializeOpDeleteOptedOutNumber) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteOptedOutNumber(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteDefaultSenderId(response, &metadata) } - output := &DeleteOptedOutNumberOutput{} + output := &DeleteDefaultSenderIdOutput{} out.Result = output var buff [1024]byte @@ -1895,7 +1895,7 @@ func (m *awsAwsjson10_deserializeOpDeleteOptedOutNumber) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteOptedOutNumberOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteDefaultSenderIdOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1909,7 +1909,7 @@ func (m *awsAwsjson10_deserializeOpDeleteOptedOutNumber) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteOptedOutNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteDefaultSenderId(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1949,9 +1949,6 @@ func awsAwsjson10_deserializeOpErrorDeleteOptedOutNumber(response *smithyhttp.Re case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -1974,14 +1971,14 @@ func awsAwsjson10_deserializeOpErrorDeleteOptedOutNumber(response *smithyhttp.Re } } -type awsAwsjson10_deserializeOpDeleteOptOutList struct { +type awsAwsjson10_deserializeOpDeleteEventDestination struct { } -func (*awsAwsjson10_deserializeOpDeleteOptOutList) ID() string { +func (*awsAwsjson10_deserializeOpDeleteEventDestination) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteOptOutList) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteEventDestination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1995,9 +1992,9 @@ func (m *awsAwsjson10_deserializeOpDeleteOptOutList) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteOptOutList(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteEventDestination(response, &metadata) } - output := &DeleteOptOutListOutput{} + output := &DeleteEventDestinationOutput{} out.Result = output var buff [1024]byte @@ -2017,7 +2014,7 @@ func (m *awsAwsjson10_deserializeOpDeleteOptOutList) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteOptOutListOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteEventDestinationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2031,7 +2028,7 @@ func (m *awsAwsjson10_deserializeOpDeleteOptOutList) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteOptOutList(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteEventDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2071,9 +2068,6 @@ func awsAwsjson10_deserializeOpErrorDeleteOptOutList(response *smithyhttp.Respon case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -2096,14 +2090,14 @@ func awsAwsjson10_deserializeOpErrorDeleteOptOutList(response *smithyhttp.Respon } } -type awsAwsjson10_deserializeOpDeletePool struct { +type awsAwsjson10_deserializeOpDeleteKeyword struct { } -func (*awsAwsjson10_deserializeOpDeletePool) ID() string { +func (*awsAwsjson10_deserializeOpDeleteKeyword) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeletePool) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteKeyword) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2117,9 +2111,9 @@ func (m *awsAwsjson10_deserializeOpDeletePool) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeletePool(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteKeyword(response, &metadata) } - output := &DeletePoolOutput{} + output := &DeleteKeywordOutput{} out.Result = output var buff [1024]byte @@ -2139,7 +2133,7 @@ func (m *awsAwsjson10_deserializeOpDeletePool) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeletePoolOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteKeywordOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2153,7 +2147,7 @@ func (m *awsAwsjson10_deserializeOpDeletePool) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeletePool(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteKeyword(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2218,14 +2212,14 @@ func awsAwsjson10_deserializeOpErrorDeletePool(response *smithyhttp.Response, me } } -type awsAwsjson10_deserializeOpDeleteRegistration struct { +type awsAwsjson10_deserializeOpDeleteMediaMessageSpendLimitOverride struct { } -func (*awsAwsjson10_deserializeOpDeleteRegistration) ID() string { +func (*awsAwsjson10_deserializeOpDeleteMediaMessageSpendLimitOverride) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteRegistration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteMediaMessageSpendLimitOverride) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2239,9 +2233,9 @@ func (m *awsAwsjson10_deserializeOpDeleteRegistration) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteRegistration(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteMediaMessageSpendLimitOverride(response, &metadata) } - output := &DeleteRegistrationOutput{} + output := &DeleteMediaMessageSpendLimitOverrideOutput{} out.Result = output var buff [1024]byte @@ -2261,7 +2255,7 @@ func (m *awsAwsjson10_deserializeOpDeleteRegistration) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteRegistrationOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteMediaMessageSpendLimitOverrideOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2275,7 +2269,7 @@ func (m *awsAwsjson10_deserializeOpDeleteRegistration) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteRegistration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteMediaMessageSpendLimitOverride(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2315,15 +2309,9 @@ func awsAwsjson10_deserializeOpErrorDeleteRegistration(response *smithyhttp.Resp case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -2340,14 +2328,14 @@ func awsAwsjson10_deserializeOpErrorDeleteRegistration(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpDeleteRegistrationAttachment struct { +type awsAwsjson10_deserializeOpDeleteOptedOutNumber struct { } -func (*awsAwsjson10_deserializeOpDeleteRegistrationAttachment) ID() string { +func (*awsAwsjson10_deserializeOpDeleteOptedOutNumber) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteRegistrationAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteOptedOutNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2361,9 +2349,9 @@ func (m *awsAwsjson10_deserializeOpDeleteRegistrationAttachment) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteRegistrationAttachment(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteOptedOutNumber(response, &metadata) } - output := &DeleteRegistrationAttachmentOutput{} + output := &DeleteOptedOutNumberOutput{} out.Result = output var buff [1024]byte @@ -2383,7 +2371,7 @@ func (m *awsAwsjson10_deserializeOpDeleteRegistrationAttachment) HandleDeseriali return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteRegistrationAttachmentOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteOptedOutNumberOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2397,7 +2385,7 @@ func (m *awsAwsjson10_deserializeOpDeleteRegistrationAttachment) HandleDeseriali return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteRegistrationAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteOptedOutNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2462,14 +2450,14 @@ func awsAwsjson10_deserializeOpErrorDeleteRegistrationAttachment(response *smith } } -type awsAwsjson10_deserializeOpDeleteRegistrationFieldValue struct { +type awsAwsjson10_deserializeOpDeleteOptOutList struct { } -func (*awsAwsjson10_deserializeOpDeleteRegistrationFieldValue) ID() string { +func (*awsAwsjson10_deserializeOpDeleteOptOutList) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteRegistrationFieldValue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteOptOutList) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2483,9 +2471,9 @@ func (m *awsAwsjson10_deserializeOpDeleteRegistrationFieldValue) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteRegistrationFieldValue(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteOptOutList(response, &metadata) } - output := &DeleteRegistrationFieldValueOutput{} + output := &DeleteOptOutListOutput{} out.Result = output var buff [1024]byte @@ -2505,7 +2493,7 @@ func (m *awsAwsjson10_deserializeOpDeleteRegistrationFieldValue) HandleDeseriali return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteRegistrationFieldValueOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteOptOutListOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2519,7 +2507,7 @@ func (m *awsAwsjson10_deserializeOpDeleteRegistrationFieldValue) HandleDeseriali return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteRegistrationFieldValue(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteOptOutList(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2584,14 +2572,14 @@ func awsAwsjson10_deserializeOpErrorDeleteRegistrationFieldValue(response *smith } } -type awsAwsjson10_deserializeOpDeleteTextMessageSpendLimitOverride struct { +type awsAwsjson10_deserializeOpDeletePool struct { } -func (*awsAwsjson10_deserializeOpDeleteTextMessageSpendLimitOverride) ID() string { +func (*awsAwsjson10_deserializeOpDeletePool) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteTextMessageSpendLimitOverride) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeletePool) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2605,9 +2593,9 @@ func (m *awsAwsjson10_deserializeOpDeleteTextMessageSpendLimitOverride) HandleDe } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteTextMessageSpendLimitOverride(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeletePool(response, &metadata) } - output := &DeleteTextMessageSpendLimitOverrideOutput{} + output := &DeletePoolOutput{} out.Result = output var buff [1024]byte @@ -2627,7 +2615,7 @@ func (m *awsAwsjson10_deserializeOpDeleteTextMessageSpendLimitOverride) HandleDe return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteTextMessageSpendLimitOverrideOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeletePoolOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2641,7 +2629,7 @@ func (m *awsAwsjson10_deserializeOpDeleteTextMessageSpendLimitOverride) HandleDe return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteTextMessageSpendLimitOverride(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeletePool(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2681,9 +2669,15 @@ func awsAwsjson10_deserializeOpErrorDeleteTextMessageSpendLimitOverride(response case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -2700,14 +2694,14 @@ func awsAwsjson10_deserializeOpErrorDeleteTextMessageSpendLimitOverride(response } } -type awsAwsjson10_deserializeOpDeleteVerifiedDestinationNumber struct { +type awsAwsjson10_deserializeOpDeleteProtectConfiguration struct { } -func (*awsAwsjson10_deserializeOpDeleteVerifiedDestinationNumber) ID() string { +func (*awsAwsjson10_deserializeOpDeleteProtectConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteVerifiedDestinationNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteProtectConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2721,9 +2715,9 @@ func (m *awsAwsjson10_deserializeOpDeleteVerifiedDestinationNumber) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteVerifiedDestinationNumber(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteProtectConfiguration(response, &metadata) } - output := &DeleteVerifiedDestinationNumberOutput{} + output := &DeleteProtectConfigurationOutput{} out.Result = output var buff [1024]byte @@ -2743,7 +2737,7 @@ func (m *awsAwsjson10_deserializeOpDeleteVerifiedDestinationNumber) HandleDeseri return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteVerifiedDestinationNumberOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteProtectConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2757,7 +2751,7 @@ func (m *awsAwsjson10_deserializeOpDeleteVerifiedDestinationNumber) HandleDeseri return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteVerifiedDestinationNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteProtectConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2822,14 +2816,14 @@ func awsAwsjson10_deserializeOpErrorDeleteVerifiedDestinationNumber(response *sm } } -type awsAwsjson10_deserializeOpDeleteVoiceMessageSpendLimitOverride struct { +type awsAwsjson10_deserializeOpDeleteRegistration struct { } -func (*awsAwsjson10_deserializeOpDeleteVoiceMessageSpendLimitOverride) ID() string { +func (*awsAwsjson10_deserializeOpDeleteRegistration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteVoiceMessageSpendLimitOverride) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteRegistration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2843,9 +2837,9 @@ func (m *awsAwsjson10_deserializeOpDeleteVoiceMessageSpendLimitOverride) HandleD } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteVoiceMessageSpendLimitOverride(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteRegistration(response, &metadata) } - output := &DeleteVoiceMessageSpendLimitOverrideOutput{} + output := &DeleteRegistrationOutput{} out.Result = output var buff [1024]byte @@ -2865,7 +2859,7 @@ func (m *awsAwsjson10_deserializeOpDeleteVoiceMessageSpendLimitOverride) HandleD return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteVoiceMessageSpendLimitOverrideOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteRegistrationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2879,7 +2873,7 @@ func (m *awsAwsjson10_deserializeOpDeleteVoiceMessageSpendLimitOverride) HandleD return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteVoiceMessageSpendLimitOverride(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteRegistration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2919,9 +2913,15 @@ func awsAwsjson10_deserializeOpErrorDeleteVoiceMessageSpendLimitOverride(respons case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -2938,14 +2938,14 @@ func awsAwsjson10_deserializeOpErrorDeleteVoiceMessageSpendLimitOverride(respons } } -type awsAwsjson10_deserializeOpDescribeAccountAttributes struct { +type awsAwsjson10_deserializeOpDeleteRegistrationAttachment struct { } -func (*awsAwsjson10_deserializeOpDescribeAccountAttributes) ID() string { +func (*awsAwsjson10_deserializeOpDeleteRegistrationAttachment) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDescribeAccountAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteRegistrationAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2959,9 +2959,9 @@ func (m *awsAwsjson10_deserializeOpDescribeAccountAttributes) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDescribeAccountAttributes(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteRegistrationAttachment(response, &metadata) } - output := &DescribeAccountAttributesOutput{} + output := &DeleteRegistrationAttachmentOutput{} out.Result = output var buff [1024]byte @@ -2981,7 +2981,7 @@ func (m *awsAwsjson10_deserializeOpDescribeAccountAttributes) HandleDeserialize( return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDescribeAccountAttributesOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteRegistrationAttachmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2995,7 +2995,7 @@ func (m *awsAwsjson10_deserializeOpDescribeAccountAttributes) HandleDeserialize( return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDescribeAccountAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteRegistrationAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3035,9 +3035,15 @@ func awsAwsjson10_deserializeOpErrorDescribeAccountAttributes(response *smithyht case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -3054,14 +3060,14 @@ func awsAwsjson10_deserializeOpErrorDescribeAccountAttributes(response *smithyht } } -type awsAwsjson10_deserializeOpDescribeAccountLimits struct { +type awsAwsjson10_deserializeOpDeleteRegistrationFieldValue struct { } -func (*awsAwsjson10_deserializeOpDescribeAccountLimits) ID() string { +func (*awsAwsjson10_deserializeOpDeleteRegistrationFieldValue) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDescribeAccountLimits) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteRegistrationFieldValue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3075,9 +3081,9 @@ func (m *awsAwsjson10_deserializeOpDescribeAccountLimits) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDescribeAccountLimits(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteRegistrationFieldValue(response, &metadata) } - output := &DescribeAccountLimitsOutput{} + output := &DeleteRegistrationFieldValueOutput{} out.Result = output var buff [1024]byte @@ -3097,7 +3103,7 @@ func (m *awsAwsjson10_deserializeOpDescribeAccountLimits) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDescribeAccountLimitsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteRegistrationFieldValueOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3111,7 +3117,7 @@ func (m *awsAwsjson10_deserializeOpDescribeAccountLimits) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDescribeAccountLimits(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteRegistrationFieldValue(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3151,9 +3157,15 @@ func awsAwsjson10_deserializeOpErrorDescribeAccountLimits(response *smithyhttp.R case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -3170,14 +3182,14 @@ func awsAwsjson10_deserializeOpErrorDescribeAccountLimits(response *smithyhttp.R } } -type awsAwsjson10_deserializeOpDescribeConfigurationSets struct { +type awsAwsjson10_deserializeOpDeleteTextMessageSpendLimitOverride struct { } -func (*awsAwsjson10_deserializeOpDescribeConfigurationSets) ID() string { +func (*awsAwsjson10_deserializeOpDeleteTextMessageSpendLimitOverride) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDescribeConfigurationSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteTextMessageSpendLimitOverride) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3191,9 +3203,9 @@ func (m *awsAwsjson10_deserializeOpDescribeConfigurationSets) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDescribeConfigurationSets(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteTextMessageSpendLimitOverride(response, &metadata) } - output := &DescribeConfigurationSetsOutput{} + output := &DeleteTextMessageSpendLimitOverrideOutput{} out.Result = output var buff [1024]byte @@ -3213,7 +3225,7 @@ func (m *awsAwsjson10_deserializeOpDescribeConfigurationSets) HandleDeserialize( return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDescribeConfigurationSetsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteTextMessageSpendLimitOverrideOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3227,7 +3239,7 @@ func (m *awsAwsjson10_deserializeOpDescribeConfigurationSets) HandleDeserialize( return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDescribeConfigurationSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteTextMessageSpendLimitOverride(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3270,9 +3282,6 @@ func awsAwsjson10_deserializeOpErrorDescribeConfigurationSets(response *smithyht case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -3289,14 +3298,14 @@ func awsAwsjson10_deserializeOpErrorDescribeConfigurationSets(response *smithyht } } -type awsAwsjson10_deserializeOpDescribeKeywords struct { +type awsAwsjson10_deserializeOpDeleteVerifiedDestinationNumber struct { } -func (*awsAwsjson10_deserializeOpDescribeKeywords) ID() string { +func (*awsAwsjson10_deserializeOpDeleteVerifiedDestinationNumber) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDescribeKeywords) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteVerifiedDestinationNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3310,9 +3319,9 @@ func (m *awsAwsjson10_deserializeOpDescribeKeywords) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDescribeKeywords(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteVerifiedDestinationNumber(response, &metadata) } - output := &DescribeKeywordsOutput{} + output := &DeleteVerifiedDestinationNumberOutput{} out.Result = output var buff [1024]byte @@ -3332,7 +3341,7 @@ func (m *awsAwsjson10_deserializeOpDescribeKeywords) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDescribeKeywordsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteVerifiedDestinationNumberOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3346,7 +3355,7 @@ func (m *awsAwsjson10_deserializeOpDescribeKeywords) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDescribeKeywords(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteVerifiedDestinationNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3386,6 +3395,9 @@ func awsAwsjson10_deserializeOpErrorDescribeKeywords(response *smithyhttp.Respon case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -3408,14 +3420,14 @@ func awsAwsjson10_deserializeOpErrorDescribeKeywords(response *smithyhttp.Respon } } -type awsAwsjson10_deserializeOpDescribeOptedOutNumbers struct { +type awsAwsjson10_deserializeOpDeleteVoiceMessageSpendLimitOverride struct { } -func (*awsAwsjson10_deserializeOpDescribeOptedOutNumbers) ID() string { +func (*awsAwsjson10_deserializeOpDeleteVoiceMessageSpendLimitOverride) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDescribeOptedOutNumbers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteVoiceMessageSpendLimitOverride) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3429,9 +3441,9 @@ func (m *awsAwsjson10_deserializeOpDescribeOptedOutNumbers) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDescribeOptedOutNumbers(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteVoiceMessageSpendLimitOverride(response, &metadata) } - output := &DescribeOptedOutNumbersOutput{} + output := &DeleteVoiceMessageSpendLimitOverrideOutput{} out.Result = output var buff [1024]byte @@ -3451,7 +3463,7 @@ func (m *awsAwsjson10_deserializeOpDescribeOptedOutNumbers) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDescribeOptedOutNumbersOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteVoiceMessageSpendLimitOverrideOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3465,7 +3477,7 @@ func (m *awsAwsjson10_deserializeOpDescribeOptedOutNumbers) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDescribeOptedOutNumbers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteVoiceMessageSpendLimitOverride(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3508,9 +3520,6 @@ func awsAwsjson10_deserializeOpErrorDescribeOptedOutNumbers(response *smithyhttp case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -3527,14 +3536,14 @@ func awsAwsjson10_deserializeOpErrorDescribeOptedOutNumbers(response *smithyhttp } } -type awsAwsjson10_deserializeOpDescribeOptOutLists struct { +type awsAwsjson10_deserializeOpDescribeAccountAttributes struct { } -func (*awsAwsjson10_deserializeOpDescribeOptOutLists) ID() string { +func (*awsAwsjson10_deserializeOpDescribeAccountAttributes) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDescribeOptOutLists) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDescribeAccountAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3548,9 +3557,9 @@ func (m *awsAwsjson10_deserializeOpDescribeOptOutLists) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDescribeOptOutLists(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDescribeAccountAttributes(response, &metadata) } - output := &DescribeOptOutListsOutput{} + output := &DescribeAccountAttributesOutput{} out.Result = output var buff [1024]byte @@ -3570,7 +3579,7 @@ func (m *awsAwsjson10_deserializeOpDescribeOptOutLists) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDescribeOptOutListsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDescribeAccountAttributesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3584,7 +3593,7 @@ func (m *awsAwsjson10_deserializeOpDescribeOptOutLists) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDescribeOptOutLists(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDescribeAccountAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3627,9 +3636,6 @@ func awsAwsjson10_deserializeOpErrorDescribeOptOutLists(response *smithyhttp.Res case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -3646,14 +3652,14 @@ func awsAwsjson10_deserializeOpErrorDescribeOptOutLists(response *smithyhttp.Res } } -type awsAwsjson10_deserializeOpDescribePhoneNumbers struct { +type awsAwsjson10_deserializeOpDescribeAccountLimits struct { } -func (*awsAwsjson10_deserializeOpDescribePhoneNumbers) ID() string { +func (*awsAwsjson10_deserializeOpDescribeAccountLimits) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDescribePhoneNumbers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDescribeAccountLimits) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3667,9 +3673,9 @@ func (m *awsAwsjson10_deserializeOpDescribePhoneNumbers) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDescribePhoneNumbers(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDescribeAccountLimits(response, &metadata) } - output := &DescribePhoneNumbersOutput{} + output := &DescribeAccountLimitsOutput{} out.Result = output var buff [1024]byte @@ -3689,7 +3695,7 @@ func (m *awsAwsjson10_deserializeOpDescribePhoneNumbers) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDescribePhoneNumbersOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDescribeAccountLimitsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3703,7 +3709,7 @@ func (m *awsAwsjson10_deserializeOpDescribePhoneNumbers) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDescribePhoneNumbers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDescribeAccountLimits(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3746,9 +3752,6 @@ func awsAwsjson10_deserializeOpErrorDescribePhoneNumbers(response *smithyhttp.Re case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -3765,14 +3768,14 @@ func awsAwsjson10_deserializeOpErrorDescribePhoneNumbers(response *smithyhttp.Re } } -type awsAwsjson10_deserializeOpDescribePools struct { +type awsAwsjson10_deserializeOpDescribeConfigurationSets struct { } -func (*awsAwsjson10_deserializeOpDescribePools) ID() string { +func (*awsAwsjson10_deserializeOpDescribeConfigurationSets) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDescribePools) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDescribeConfigurationSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3786,9 +3789,9 @@ func (m *awsAwsjson10_deserializeOpDescribePools) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDescribePools(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDescribeConfigurationSets(response, &metadata) } - output := &DescribePoolsOutput{} + output := &DescribeConfigurationSetsOutput{} out.Result = output var buff [1024]byte @@ -3808,7 +3811,7 @@ func (m *awsAwsjson10_deserializeOpDescribePools) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDescribePoolsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDescribeConfigurationSetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3822,7 +3825,7 @@ func (m *awsAwsjson10_deserializeOpDescribePools) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDescribePools(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDescribeConfigurationSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3884,14 +3887,14 @@ func awsAwsjson10_deserializeOpErrorDescribePools(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpDescribeRegistrationAttachments struct { +type awsAwsjson10_deserializeOpDescribeKeywords struct { } -func (*awsAwsjson10_deserializeOpDescribeRegistrationAttachments) ID() string { +func (*awsAwsjson10_deserializeOpDescribeKeywords) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDescribeRegistrationAttachments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDescribeKeywords) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3905,9 +3908,9 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrationAttachments) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDescribeRegistrationAttachments(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDescribeKeywords(response, &metadata) } - output := &DescribeRegistrationAttachmentsOutput{} + output := &DescribeKeywordsOutput{} out.Result = output var buff [1024]byte @@ -3927,7 +3930,7 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrationAttachments) HandleDeseri return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDescribeRegistrationAttachmentsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDescribeKeywordsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3941,7 +3944,7 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrationAttachments) HandleDeseri return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDescribeRegistrationAttachments(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDescribeKeywords(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4003,14 +4006,14 @@ func awsAwsjson10_deserializeOpErrorDescribeRegistrationAttachments(response *sm } } -type awsAwsjson10_deserializeOpDescribeRegistrationFieldDefinitions struct { +type awsAwsjson10_deserializeOpDescribeOptedOutNumbers struct { } -func (*awsAwsjson10_deserializeOpDescribeRegistrationFieldDefinitions) ID() string { +func (*awsAwsjson10_deserializeOpDescribeOptedOutNumbers) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDescribeRegistrationFieldDefinitions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDescribeOptedOutNumbers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4024,9 +4027,9 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrationFieldDefinitions) HandleD } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDescribeRegistrationFieldDefinitions(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDescribeOptedOutNumbers(response, &metadata) } - output := &DescribeRegistrationFieldDefinitionsOutput{} + output := &DescribeOptedOutNumbersOutput{} out.Result = output var buff [1024]byte @@ -4046,7 +4049,7 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrationFieldDefinitions) HandleD return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDescribeRegistrationFieldDefinitionsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDescribeOptedOutNumbersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4060,7 +4063,7 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrationFieldDefinitions) HandleD return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDescribeRegistrationFieldDefinitions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDescribeOptedOutNumbers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4103,6 +4106,9 @@ func awsAwsjson10_deserializeOpErrorDescribeRegistrationFieldDefinitions(respons case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -4119,14 +4125,14 @@ func awsAwsjson10_deserializeOpErrorDescribeRegistrationFieldDefinitions(respons } } -type awsAwsjson10_deserializeOpDescribeRegistrationFieldValues struct { +type awsAwsjson10_deserializeOpDescribeOptOutLists struct { } -func (*awsAwsjson10_deserializeOpDescribeRegistrationFieldValues) ID() string { +func (*awsAwsjson10_deserializeOpDescribeOptOutLists) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDescribeRegistrationFieldValues) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDescribeOptOutLists) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4140,9 +4146,9 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrationFieldValues) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDescribeRegistrationFieldValues(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDescribeOptOutLists(response, &metadata) } - output := &DescribeRegistrationFieldValuesOutput{} + output := &DescribeOptOutListsOutput{} out.Result = output var buff [1024]byte @@ -4162,7 +4168,7 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrationFieldValues) HandleDeseri return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDescribeRegistrationFieldValuesOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDescribeOptOutListsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4176,7 +4182,7 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrationFieldValues) HandleDeseri return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDescribeRegistrationFieldValues(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDescribeOptOutLists(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4238,14 +4244,14 @@ func awsAwsjson10_deserializeOpErrorDescribeRegistrationFieldValues(response *sm } } -type awsAwsjson10_deserializeOpDescribeRegistrations struct { +type awsAwsjson10_deserializeOpDescribePhoneNumbers struct { } -func (*awsAwsjson10_deserializeOpDescribeRegistrations) ID() string { +func (*awsAwsjson10_deserializeOpDescribePhoneNumbers) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDescribeRegistrations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDescribePhoneNumbers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4259,9 +4265,9 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrations) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDescribeRegistrations(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDescribePhoneNumbers(response, &metadata) } - output := &DescribeRegistrationsOutput{} + output := &DescribePhoneNumbersOutput{} out.Result = output var buff [1024]byte @@ -4281,7 +4287,7 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrations) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDescribeRegistrationsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDescribePhoneNumbersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4295,7 +4301,7 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrations) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDescribeRegistrations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDescribePhoneNumbers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4357,14 +4363,14 @@ func awsAwsjson10_deserializeOpErrorDescribeRegistrations(response *smithyhttp.R } } -type awsAwsjson10_deserializeOpDescribeRegistrationSectionDefinitions struct { +type awsAwsjson10_deserializeOpDescribePools struct { } -func (*awsAwsjson10_deserializeOpDescribeRegistrationSectionDefinitions) ID() string { +func (*awsAwsjson10_deserializeOpDescribePools) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDescribeRegistrationSectionDefinitions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDescribePools) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4378,9 +4384,9 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrationSectionDefinitions) Handl } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDescribeRegistrationSectionDefinitions(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDescribePools(response, &metadata) } - output := &DescribeRegistrationSectionDefinitionsOutput{} + output := &DescribePoolsOutput{} out.Result = output var buff [1024]byte @@ -4400,7 +4406,7 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrationSectionDefinitions) Handl return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDescribeRegistrationSectionDefinitionsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDescribePoolsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4414,7 +4420,7 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrationSectionDefinitions) Handl return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDescribeRegistrationSectionDefinitions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDescribePools(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4457,6 +4463,9 @@ func awsAwsjson10_deserializeOpErrorDescribeRegistrationSectionDefinitions(respo case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -4473,14 +4482,14 @@ func awsAwsjson10_deserializeOpErrorDescribeRegistrationSectionDefinitions(respo } } -type awsAwsjson10_deserializeOpDescribeRegistrationTypeDefinitions struct { +type awsAwsjson10_deserializeOpDescribeProtectConfigurations struct { } -func (*awsAwsjson10_deserializeOpDescribeRegistrationTypeDefinitions) ID() string { +func (*awsAwsjson10_deserializeOpDescribeProtectConfigurations) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDescribeRegistrationTypeDefinitions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDescribeProtectConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4494,9 +4503,9 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrationTypeDefinitions) HandleDe } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDescribeRegistrationTypeDefinitions(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDescribeProtectConfigurations(response, &metadata) } - output := &DescribeRegistrationTypeDefinitionsOutput{} + output := &DescribeProtectConfigurationsOutput{} out.Result = output var buff [1024]byte @@ -4516,7 +4525,7 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrationTypeDefinitions) HandleDe return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDescribeRegistrationTypeDefinitionsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDescribeProtectConfigurationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4530,7 +4539,7 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrationTypeDefinitions) HandleDe return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDescribeRegistrationTypeDefinitions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDescribeProtectConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4573,6 +4582,9 @@ func awsAwsjson10_deserializeOpErrorDescribeRegistrationTypeDefinitions(response case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -4589,14 +4601,14 @@ func awsAwsjson10_deserializeOpErrorDescribeRegistrationTypeDefinitions(response } } -type awsAwsjson10_deserializeOpDescribeRegistrationVersions struct { +type awsAwsjson10_deserializeOpDescribeRegistrationAttachments struct { } -func (*awsAwsjson10_deserializeOpDescribeRegistrationVersions) ID() string { +func (*awsAwsjson10_deserializeOpDescribeRegistrationAttachments) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDescribeRegistrationVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDescribeRegistrationAttachments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4610,9 +4622,9 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrationVersions) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDescribeRegistrationVersions(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDescribeRegistrationAttachments(response, &metadata) } - output := &DescribeRegistrationVersionsOutput{} + output := &DescribeRegistrationAttachmentsOutput{} out.Result = output var buff [1024]byte @@ -4632,7 +4644,7 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrationVersions) HandleDeseriali return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDescribeRegistrationVersionsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDescribeRegistrationAttachmentsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4646,7 +4658,7 @@ func (m *awsAwsjson10_deserializeOpDescribeRegistrationVersions) HandleDeseriali return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDescribeRegistrationVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDescribeRegistrationAttachments(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4708,14 +4720,14 @@ func awsAwsjson10_deserializeOpErrorDescribeRegistrationVersions(response *smith } } -type awsAwsjson10_deserializeOpDescribeSenderIds struct { +type awsAwsjson10_deserializeOpDescribeRegistrationFieldDefinitions struct { } -func (*awsAwsjson10_deserializeOpDescribeSenderIds) ID() string { +func (*awsAwsjson10_deserializeOpDescribeRegistrationFieldDefinitions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDescribeSenderIds) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDescribeRegistrationFieldDefinitions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4729,9 +4741,9 @@ func (m *awsAwsjson10_deserializeOpDescribeSenderIds) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDescribeSenderIds(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDescribeRegistrationFieldDefinitions(response, &metadata) } - output := &DescribeSenderIdsOutput{} + output := &DescribeRegistrationFieldDefinitionsOutput{} out.Result = output var buff [1024]byte @@ -4751,7 +4763,7 @@ func (m *awsAwsjson10_deserializeOpDescribeSenderIds) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDescribeSenderIdsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDescribeRegistrationFieldDefinitionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4765,7 +4777,7 @@ func (m *awsAwsjson10_deserializeOpDescribeSenderIds) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDescribeSenderIds(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDescribeRegistrationFieldDefinitions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4808,9 +4820,6 @@ func awsAwsjson10_deserializeOpErrorDescribeSenderIds(response *smithyhttp.Respo case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -4827,14 +4836,14 @@ func awsAwsjson10_deserializeOpErrorDescribeSenderIds(response *smithyhttp.Respo } } -type awsAwsjson10_deserializeOpDescribeSpendLimits struct { +type awsAwsjson10_deserializeOpDescribeRegistrationFieldValues struct { } -func (*awsAwsjson10_deserializeOpDescribeSpendLimits) ID() string { +func (*awsAwsjson10_deserializeOpDescribeRegistrationFieldValues) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDescribeSpendLimits) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDescribeRegistrationFieldValues) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4848,9 +4857,9 @@ func (m *awsAwsjson10_deserializeOpDescribeSpendLimits) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDescribeSpendLimits(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDescribeRegistrationFieldValues(response, &metadata) } - output := &DescribeSpendLimitsOutput{} + output := &DescribeRegistrationFieldValuesOutput{} out.Result = output var buff [1024]byte @@ -4870,7 +4879,7 @@ func (m *awsAwsjson10_deserializeOpDescribeSpendLimits) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDescribeSpendLimitsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDescribeRegistrationFieldValuesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4884,7 +4893,7 @@ func (m *awsAwsjson10_deserializeOpDescribeSpendLimits) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDescribeSpendLimits(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDescribeRegistrationFieldValues(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4927,6 +4936,9 @@ func awsAwsjson10_deserializeOpErrorDescribeSpendLimits(response *smithyhttp.Res case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -4943,14 +4955,14 @@ func awsAwsjson10_deserializeOpErrorDescribeSpendLimits(response *smithyhttp.Res } } -type awsAwsjson10_deserializeOpDescribeVerifiedDestinationNumbers struct { +type awsAwsjson10_deserializeOpDescribeRegistrations struct { } -func (*awsAwsjson10_deserializeOpDescribeVerifiedDestinationNumbers) ID() string { +func (*awsAwsjson10_deserializeOpDescribeRegistrations) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDescribeVerifiedDestinationNumbers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDescribeRegistrations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4964,9 +4976,9 @@ func (m *awsAwsjson10_deserializeOpDescribeVerifiedDestinationNumbers) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDescribeVerifiedDestinationNumbers(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDescribeRegistrations(response, &metadata) } - output := &DescribeVerifiedDestinationNumbersOutput{} + output := &DescribeRegistrationsOutput{} out.Result = output var buff [1024]byte @@ -4986,7 +4998,7 @@ func (m *awsAwsjson10_deserializeOpDescribeVerifiedDestinationNumbers) HandleDes return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDescribeVerifiedDestinationNumbersOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDescribeRegistrationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5000,7 +5012,7 @@ func (m *awsAwsjson10_deserializeOpDescribeVerifiedDestinationNumbers) HandleDes return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDescribeVerifiedDestinationNumbers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDescribeRegistrations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5062,14 +5074,14 @@ func awsAwsjson10_deserializeOpErrorDescribeVerifiedDestinationNumbers(response } } -type awsAwsjson10_deserializeOpDisassociateOriginationIdentity struct { +type awsAwsjson10_deserializeOpDescribeRegistrationSectionDefinitions struct { } -func (*awsAwsjson10_deserializeOpDisassociateOriginationIdentity) ID() string { +func (*awsAwsjson10_deserializeOpDescribeRegistrationSectionDefinitions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDisassociateOriginationIdentity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDescribeRegistrationSectionDefinitions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5083,9 +5095,9 @@ func (m *awsAwsjson10_deserializeOpDisassociateOriginationIdentity) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDisassociateOriginationIdentity(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDescribeRegistrationSectionDefinitions(response, &metadata) } - output := &DisassociateOriginationIdentityOutput{} + output := &DescribeRegistrationSectionDefinitionsOutput{} out.Result = output var buff [1024]byte @@ -5105,7 +5117,7 @@ func (m *awsAwsjson10_deserializeOpDisassociateOriginationIdentity) HandleDeseri return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDisassociateOriginationIdentityOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDescribeRegistrationSectionDefinitionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5119,7 +5131,7 @@ func (m *awsAwsjson10_deserializeOpDisassociateOriginationIdentity) HandleDeseri return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDisassociateOriginationIdentity(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDescribeRegistrationSectionDefinitions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5159,15 +5171,9 @@ func awsAwsjson10_deserializeOpErrorDisassociateOriginationIdentity(response *sm case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -5184,14 +5190,14 @@ func awsAwsjson10_deserializeOpErrorDisassociateOriginationIdentity(response *sm } } -type awsAwsjson10_deserializeOpDiscardRegistrationVersion struct { +type awsAwsjson10_deserializeOpDescribeRegistrationTypeDefinitions struct { } -func (*awsAwsjson10_deserializeOpDiscardRegistrationVersion) ID() string { +func (*awsAwsjson10_deserializeOpDescribeRegistrationTypeDefinitions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDiscardRegistrationVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDescribeRegistrationTypeDefinitions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5205,9 +5211,9 @@ func (m *awsAwsjson10_deserializeOpDiscardRegistrationVersion) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDiscardRegistrationVersion(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDescribeRegistrationTypeDefinitions(response, &metadata) } - output := &DiscardRegistrationVersionOutput{} + output := &DescribeRegistrationTypeDefinitionsOutput{} out.Result = output var buff [1024]byte @@ -5227,7 +5233,7 @@ func (m *awsAwsjson10_deserializeOpDiscardRegistrationVersion) HandleDeserialize return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDiscardRegistrationVersionOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDescribeRegistrationTypeDefinitionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5241,7 +5247,7 @@ func (m *awsAwsjson10_deserializeOpDiscardRegistrationVersion) HandleDeserialize return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDiscardRegistrationVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDescribeRegistrationTypeDefinitions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5281,15 +5287,9 @@ func awsAwsjson10_deserializeOpErrorDiscardRegistrationVersion(response *smithyh case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -5306,14 +5306,14 @@ func awsAwsjson10_deserializeOpErrorDiscardRegistrationVersion(response *smithyh } } -type awsAwsjson10_deserializeOpListPoolOriginationIdentities struct { +type awsAwsjson10_deserializeOpDescribeRegistrationVersions struct { } -func (*awsAwsjson10_deserializeOpListPoolOriginationIdentities) ID() string { +func (*awsAwsjson10_deserializeOpDescribeRegistrationVersions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListPoolOriginationIdentities) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDescribeRegistrationVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5327,9 +5327,9 @@ func (m *awsAwsjson10_deserializeOpListPoolOriginationIdentities) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListPoolOriginationIdentities(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDescribeRegistrationVersions(response, &metadata) } - output := &ListPoolOriginationIdentitiesOutput{} + output := &DescribeRegistrationVersionsOutput{} out.Result = output var buff [1024]byte @@ -5349,7 +5349,7 @@ func (m *awsAwsjson10_deserializeOpListPoolOriginationIdentities) HandleDeserial return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListPoolOriginationIdentitiesOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDescribeRegistrationVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5363,7 +5363,7 @@ func (m *awsAwsjson10_deserializeOpListPoolOriginationIdentities) HandleDeserial return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListPoolOriginationIdentities(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDescribeRegistrationVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5425,14 +5425,14 @@ func awsAwsjson10_deserializeOpErrorListPoolOriginationIdentities(response *smit } } -type awsAwsjson10_deserializeOpListRegistrationAssociations struct { +type awsAwsjson10_deserializeOpDescribeSenderIds struct { } -func (*awsAwsjson10_deserializeOpListRegistrationAssociations) ID() string { +func (*awsAwsjson10_deserializeOpDescribeSenderIds) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListRegistrationAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDescribeSenderIds) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5446,9 +5446,9 @@ func (m *awsAwsjson10_deserializeOpListRegistrationAssociations) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListRegistrationAssociations(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDescribeSenderIds(response, &metadata) } - output := &ListRegistrationAssociationsOutput{} + output := &DescribeSenderIdsOutput{} out.Result = output var buff [1024]byte @@ -5468,7 +5468,7 @@ func (m *awsAwsjson10_deserializeOpListRegistrationAssociations) HandleDeseriali return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListRegistrationAssociationsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDescribeSenderIdsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5482,7 +5482,7 @@ func (m *awsAwsjson10_deserializeOpListRegistrationAssociations) HandleDeseriali return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListRegistrationAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDescribeSenderIds(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5544,14 +5544,14 @@ func awsAwsjson10_deserializeOpErrorListRegistrationAssociations(response *smith } } -type awsAwsjson10_deserializeOpListTagsForResource struct { +type awsAwsjson10_deserializeOpDescribeSpendLimits struct { } -func (*awsAwsjson10_deserializeOpListTagsForResource) ID() string { +func (*awsAwsjson10_deserializeOpDescribeSpendLimits) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDescribeSpendLimits) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5565,9 +5565,9 @@ func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDescribeSpendLimits(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &DescribeSpendLimitsOutput{} out.Result = output var buff [1024]byte @@ -5587,7 +5587,7 @@ func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDescribeSpendLimitsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5601,7 +5601,7 @@ func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDescribeSpendLimits(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5644,9 +5644,6 @@ func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -5663,14 +5660,14 @@ func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -type awsAwsjson10_deserializeOpPutKeyword struct { +type awsAwsjson10_deserializeOpDescribeVerifiedDestinationNumbers struct { } -func (*awsAwsjson10_deserializeOpPutKeyword) ID() string { +func (*awsAwsjson10_deserializeOpDescribeVerifiedDestinationNumbers) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpPutKeyword) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDescribeVerifiedDestinationNumbers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5684,9 +5681,9 @@ func (m *awsAwsjson10_deserializeOpPutKeyword) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorPutKeyword(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDescribeVerifiedDestinationNumbers(response, &metadata) } - output := &PutKeywordOutput{} + output := &DescribeVerifiedDestinationNumbersOutput{} out.Result = output var buff [1024]byte @@ -5706,7 +5703,7 @@ func (m *awsAwsjson10_deserializeOpPutKeyword) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentPutKeywordOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDescribeVerifiedDestinationNumbersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5720,7 +5717,7 @@ func (m *awsAwsjson10_deserializeOpPutKeyword) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorPutKeyword(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDescribeVerifiedDestinationNumbers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5760,18 +5757,12 @@ func awsAwsjson10_deserializeOpErrorPutKeyword(response *smithyhttp.Response, me case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -5788,14 +5779,14 @@ func awsAwsjson10_deserializeOpErrorPutKeyword(response *smithyhttp.Response, me } } -type awsAwsjson10_deserializeOpPutOptedOutNumber struct { +type awsAwsjson10_deserializeOpDisassociateOriginationIdentity struct { } -func (*awsAwsjson10_deserializeOpPutOptedOutNumber) ID() string { +func (*awsAwsjson10_deserializeOpDisassociateOriginationIdentity) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpPutOptedOutNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDisassociateOriginationIdentity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5809,9 +5800,9 @@ func (m *awsAwsjson10_deserializeOpPutOptedOutNumber) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorPutOptedOutNumber(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDisassociateOriginationIdentity(response, &metadata) } - output := &PutOptedOutNumberOutput{} + output := &DisassociateOriginationIdentityOutput{} out.Result = output var buff [1024]byte @@ -5831,7 +5822,7 @@ func (m *awsAwsjson10_deserializeOpPutOptedOutNumber) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentPutOptedOutNumberOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDisassociateOriginationIdentityOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5845,7 +5836,7 @@ func (m *awsAwsjson10_deserializeOpPutOptedOutNumber) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson10_deserializeOpErrorPutOptedOutNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDisassociateOriginationIdentity(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5885,6 +5876,9 @@ func awsAwsjson10_deserializeOpErrorPutOptedOutNumber(response *smithyhttp.Respo case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -5907,14 +5901,14 @@ func awsAwsjson10_deserializeOpErrorPutOptedOutNumber(response *smithyhttp.Respo } } -type awsAwsjson10_deserializeOpPutRegistrationFieldValue struct { +type awsAwsjson10_deserializeOpDisassociateProtectConfiguration struct { } -func (*awsAwsjson10_deserializeOpPutRegistrationFieldValue) ID() string { +func (*awsAwsjson10_deserializeOpDisassociateProtectConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpPutRegistrationFieldValue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDisassociateProtectConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5928,9 +5922,9 @@ func (m *awsAwsjson10_deserializeOpPutRegistrationFieldValue) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorPutRegistrationFieldValue(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDisassociateProtectConfiguration(response, &metadata) } - output := &PutRegistrationFieldValueOutput{} + output := &DisassociateProtectConfigurationOutput{} out.Result = output var buff [1024]byte @@ -5950,7 +5944,7 @@ func (m *awsAwsjson10_deserializeOpPutRegistrationFieldValue) HandleDeserialize( return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentPutRegistrationFieldValueOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDisassociateProtectConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5964,7 +5958,7 @@ func (m *awsAwsjson10_deserializeOpPutRegistrationFieldValue) HandleDeserialize( return out, metadata, err } -func awsAwsjson10_deserializeOpErrorPutRegistrationFieldValue(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDisassociateProtectConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6029,14 +6023,14 @@ func awsAwsjson10_deserializeOpErrorPutRegistrationFieldValue(response *smithyht } } -type awsAwsjson10_deserializeOpReleasePhoneNumber struct { +type awsAwsjson10_deserializeOpDiscardRegistrationVersion struct { } -func (*awsAwsjson10_deserializeOpReleasePhoneNumber) ID() string { +func (*awsAwsjson10_deserializeOpDiscardRegistrationVersion) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpReleasePhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDiscardRegistrationVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6050,9 +6044,9 @@ func (m *awsAwsjson10_deserializeOpReleasePhoneNumber) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorReleasePhoneNumber(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDiscardRegistrationVersion(response, &metadata) } - output := &ReleasePhoneNumberOutput{} + output := &DiscardRegistrationVersionOutput{} out.Result = output var buff [1024]byte @@ -6072,7 +6066,7 @@ func (m *awsAwsjson10_deserializeOpReleasePhoneNumber) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentReleasePhoneNumberOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDiscardRegistrationVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6086,7 +6080,7 @@ func (m *awsAwsjson10_deserializeOpReleasePhoneNumber) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorReleasePhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDiscardRegistrationVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6151,14 +6145,14 @@ func awsAwsjson10_deserializeOpErrorReleasePhoneNumber(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpReleaseSenderId struct { +type awsAwsjson10_deserializeOpGetProtectConfigurationCountryRuleSet struct { } -func (*awsAwsjson10_deserializeOpReleaseSenderId) ID() string { +func (*awsAwsjson10_deserializeOpGetProtectConfigurationCountryRuleSet) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpReleaseSenderId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetProtectConfigurationCountryRuleSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6172,9 +6166,9 @@ func (m *awsAwsjson10_deserializeOpReleaseSenderId) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorReleaseSenderId(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetProtectConfigurationCountryRuleSet(response, &metadata) } - output := &ReleaseSenderIdOutput{} + output := &GetProtectConfigurationCountryRuleSetOutput{} out.Result = output var buff [1024]byte @@ -6194,7 +6188,7 @@ func (m *awsAwsjson10_deserializeOpReleaseSenderId) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentReleaseSenderIdOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetProtectConfigurationCountryRuleSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6208,7 +6202,7 @@ func (m *awsAwsjson10_deserializeOpReleaseSenderId) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson10_deserializeOpErrorReleaseSenderId(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetProtectConfigurationCountryRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6248,9 +6242,6 @@ func awsAwsjson10_deserializeOpErrorReleaseSenderId(response *smithyhttp.Respons case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -6273,14 +6264,14 @@ func awsAwsjson10_deserializeOpErrorReleaseSenderId(response *smithyhttp.Respons } } -type awsAwsjson10_deserializeOpRequestPhoneNumber struct { +type awsAwsjson10_deserializeOpListPoolOriginationIdentities struct { } -func (*awsAwsjson10_deserializeOpRequestPhoneNumber) ID() string { +func (*awsAwsjson10_deserializeOpListPoolOriginationIdentities) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpRequestPhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListPoolOriginationIdentities) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6294,9 +6285,9 @@ func (m *awsAwsjson10_deserializeOpRequestPhoneNumber) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorRequestPhoneNumber(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListPoolOriginationIdentities(response, &metadata) } - output := &RequestPhoneNumberOutput{} + output := &ListPoolOriginationIdentitiesOutput{} out.Result = output var buff [1024]byte @@ -6316,7 +6307,7 @@ func (m *awsAwsjson10_deserializeOpRequestPhoneNumber) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentRequestPhoneNumberOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListPoolOriginationIdentitiesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6330,7 +6321,7 @@ func (m *awsAwsjson10_deserializeOpRequestPhoneNumber) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorRequestPhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListPoolOriginationIdentities(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6370,18 +6361,12 @@ func awsAwsjson10_deserializeOpErrorRequestPhoneNumber(response *smithyhttp.Resp case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -6398,14 +6383,14 @@ func awsAwsjson10_deserializeOpErrorRequestPhoneNumber(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpRequestSenderId struct { +type awsAwsjson10_deserializeOpListRegistrationAssociations struct { } -func (*awsAwsjson10_deserializeOpRequestSenderId) ID() string { +func (*awsAwsjson10_deserializeOpListRegistrationAssociations) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpRequestSenderId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListRegistrationAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6419,9 +6404,9 @@ func (m *awsAwsjson10_deserializeOpRequestSenderId) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorRequestSenderId(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListRegistrationAssociations(response, &metadata) } - output := &RequestSenderIdOutput{} + output := &ListRegistrationAssociationsOutput{} out.Result = output var buff [1024]byte @@ -6441,7 +6426,7 @@ func (m *awsAwsjson10_deserializeOpRequestSenderId) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentRequestSenderIdOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListRegistrationAssociationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6455,7 +6440,7 @@ func (m *awsAwsjson10_deserializeOpRequestSenderId) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson10_deserializeOpErrorRequestSenderId(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListRegistrationAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6495,14 +6480,11 @@ func awsAwsjson10_deserializeOpErrorRequestSenderId(response *smithyhttp.Respons case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -6520,14 +6502,14 @@ func awsAwsjson10_deserializeOpErrorRequestSenderId(response *smithyhttp.Respons } } -type awsAwsjson10_deserializeOpSendDestinationNumberVerificationCode struct { +type awsAwsjson10_deserializeOpListTagsForResource struct { } -func (*awsAwsjson10_deserializeOpSendDestinationNumberVerificationCode) ID() string { +func (*awsAwsjson10_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpSendDestinationNumberVerificationCode) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6541,9 +6523,9 @@ func (m *awsAwsjson10_deserializeOpSendDestinationNumberVerificationCode) Handle } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorSendDestinationNumberVerificationCode(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &SendDestinationNumberVerificationCodeOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -6563,7 +6545,7 @@ func (m *awsAwsjson10_deserializeOpSendDestinationNumberVerificationCode) Handle return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentSendDestinationNumberVerificationCodeOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6577,7 +6559,7 @@ func (m *awsAwsjson10_deserializeOpSendDestinationNumberVerificationCode) Handle return out, metadata, err } -func awsAwsjson10_deserializeOpErrorSendDestinationNumberVerificationCode(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6617,18 +6599,12 @@ func awsAwsjson10_deserializeOpErrorSendDestinationNumberVerificationCode(respon case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -6645,14 +6621,14 @@ func awsAwsjson10_deserializeOpErrorSendDestinationNumberVerificationCode(respon } } -type awsAwsjson10_deserializeOpSendTextMessage struct { +type awsAwsjson10_deserializeOpPutKeyword struct { } -func (*awsAwsjson10_deserializeOpSendTextMessage) ID() string { +func (*awsAwsjson10_deserializeOpPutKeyword) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpSendTextMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpPutKeyword) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6666,9 +6642,9 @@ func (m *awsAwsjson10_deserializeOpSendTextMessage) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorSendTextMessage(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorPutKeyword(response, &metadata) } - output := &SendTextMessageOutput{} + output := &PutKeywordOutput{} out.Result = output var buff [1024]byte @@ -6688,7 +6664,7 @@ func (m *awsAwsjson10_deserializeOpSendTextMessage) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentSendTextMessageOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentPutKeywordOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6702,7 +6678,7 @@ func (m *awsAwsjson10_deserializeOpSendTextMessage) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson10_deserializeOpErrorSendTextMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorPutKeyword(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6770,14 +6746,14 @@ func awsAwsjson10_deserializeOpErrorSendTextMessage(response *smithyhttp.Respons } } -type awsAwsjson10_deserializeOpSendVoiceMessage struct { +type awsAwsjson10_deserializeOpPutOptedOutNumber struct { } -func (*awsAwsjson10_deserializeOpSendVoiceMessage) ID() string { +func (*awsAwsjson10_deserializeOpPutOptedOutNumber) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpSendVoiceMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpPutOptedOutNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6791,9 +6767,9 @@ func (m *awsAwsjson10_deserializeOpSendVoiceMessage) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorSendVoiceMessage(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorPutOptedOutNumber(response, &metadata) } - output := &SendVoiceMessageOutput{} + output := &PutOptedOutNumberOutput{} out.Result = output var buff [1024]byte @@ -6813,7 +6789,7 @@ func (m *awsAwsjson10_deserializeOpSendVoiceMessage) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentSendVoiceMessageOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentPutOptedOutNumberOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6827,7 +6803,7 @@ func (m *awsAwsjson10_deserializeOpSendVoiceMessage) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson10_deserializeOpErrorSendVoiceMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorPutOptedOutNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6867,18 +6843,12 @@ func awsAwsjson10_deserializeOpErrorSendVoiceMessage(response *smithyhttp.Respon case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -6895,14 +6865,14 @@ func awsAwsjson10_deserializeOpErrorSendVoiceMessage(response *smithyhttp.Respon } } -type awsAwsjson10_deserializeOpSetDefaultMessageType struct { +type awsAwsjson10_deserializeOpPutRegistrationFieldValue struct { } -func (*awsAwsjson10_deserializeOpSetDefaultMessageType) ID() string { +func (*awsAwsjson10_deserializeOpPutRegistrationFieldValue) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpSetDefaultMessageType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpPutRegistrationFieldValue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6916,9 +6886,9 @@ func (m *awsAwsjson10_deserializeOpSetDefaultMessageType) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorSetDefaultMessageType(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorPutRegistrationFieldValue(response, &metadata) } - output := &SetDefaultMessageTypeOutput{} + output := &PutRegistrationFieldValueOutput{} out.Result = output var buff [1024]byte @@ -6938,7 +6908,7 @@ func (m *awsAwsjson10_deserializeOpSetDefaultMessageType) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentSetDefaultMessageTypeOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentPutRegistrationFieldValueOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6952,7 +6922,7 @@ func (m *awsAwsjson10_deserializeOpSetDefaultMessageType) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson10_deserializeOpErrorSetDefaultMessageType(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorPutRegistrationFieldValue(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6992,6 +6962,9 @@ func awsAwsjson10_deserializeOpErrorSetDefaultMessageType(response *smithyhttp.R case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -7014,14 +6987,14 @@ func awsAwsjson10_deserializeOpErrorSetDefaultMessageType(response *smithyhttp.R } } -type awsAwsjson10_deserializeOpSetDefaultSenderId struct { +type awsAwsjson10_deserializeOpReleasePhoneNumber struct { } -func (*awsAwsjson10_deserializeOpSetDefaultSenderId) ID() string { +func (*awsAwsjson10_deserializeOpReleasePhoneNumber) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpSetDefaultSenderId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpReleasePhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7035,9 +7008,9 @@ func (m *awsAwsjson10_deserializeOpSetDefaultSenderId) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorSetDefaultSenderId(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorReleasePhoneNumber(response, &metadata) } - output := &SetDefaultSenderIdOutput{} + output := &ReleasePhoneNumberOutput{} out.Result = output var buff [1024]byte @@ -7057,7 +7030,7 @@ func (m *awsAwsjson10_deserializeOpSetDefaultSenderId) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentSetDefaultSenderIdOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentReleasePhoneNumberOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7071,7 +7044,7 @@ func (m *awsAwsjson10_deserializeOpSetDefaultSenderId) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorSetDefaultSenderId(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorReleasePhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7111,6 +7084,9 @@ func awsAwsjson10_deserializeOpErrorSetDefaultSenderId(response *smithyhttp.Resp case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -7133,14 +7109,14 @@ func awsAwsjson10_deserializeOpErrorSetDefaultSenderId(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpSetTextMessageSpendLimitOverride struct { +type awsAwsjson10_deserializeOpReleaseSenderId struct { } -func (*awsAwsjson10_deserializeOpSetTextMessageSpendLimitOverride) ID() string { +func (*awsAwsjson10_deserializeOpReleaseSenderId) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpSetTextMessageSpendLimitOverride) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpReleaseSenderId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7154,9 +7130,9 @@ func (m *awsAwsjson10_deserializeOpSetTextMessageSpendLimitOverride) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorSetTextMessageSpendLimitOverride(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorReleaseSenderId(response, &metadata) } - output := &SetTextMessageSpendLimitOverrideOutput{} + output := &ReleaseSenderIdOutput{} out.Result = output var buff [1024]byte @@ -7176,7 +7152,7 @@ func (m *awsAwsjson10_deserializeOpSetTextMessageSpendLimitOverride) HandleDeser return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentSetTextMessageSpendLimitOverrideOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentReleaseSenderIdOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7190,7 +7166,7 @@ func (m *awsAwsjson10_deserializeOpSetTextMessageSpendLimitOverride) HandleDeser return out, metadata, err } -func awsAwsjson10_deserializeOpErrorSetTextMessageSpendLimitOverride(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorReleaseSenderId(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7230,9 +7206,15 @@ func awsAwsjson10_deserializeOpErrorSetTextMessageSpendLimitOverride(response *s case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -7249,14 +7231,14 @@ func awsAwsjson10_deserializeOpErrorSetTextMessageSpendLimitOverride(response *s } } -type awsAwsjson10_deserializeOpSetVoiceMessageSpendLimitOverride struct { +type awsAwsjson10_deserializeOpRequestPhoneNumber struct { } -func (*awsAwsjson10_deserializeOpSetVoiceMessageSpendLimitOverride) ID() string { +func (*awsAwsjson10_deserializeOpRequestPhoneNumber) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpSetVoiceMessageSpendLimitOverride) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpRequestPhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7270,9 +7252,9 @@ func (m *awsAwsjson10_deserializeOpSetVoiceMessageSpendLimitOverride) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorSetVoiceMessageSpendLimitOverride(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorRequestPhoneNumber(response, &metadata) } - output := &SetVoiceMessageSpendLimitOverrideOutput{} + output := &RequestPhoneNumberOutput{} out.Result = output var buff [1024]byte @@ -7292,7 +7274,7 @@ func (m *awsAwsjson10_deserializeOpSetVoiceMessageSpendLimitOverride) HandleDese return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentSetVoiceMessageSpendLimitOverrideOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentRequestPhoneNumberOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7306,7 +7288,7 @@ func (m *awsAwsjson10_deserializeOpSetVoiceMessageSpendLimitOverride) HandleDese return out, metadata, err } -func awsAwsjson10_deserializeOpErrorSetVoiceMessageSpendLimitOverride(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorRequestPhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7346,9 +7328,18 @@ func awsAwsjson10_deserializeOpErrorSetVoiceMessageSpendLimitOverride(response * case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -7365,14 +7356,1585 @@ func awsAwsjson10_deserializeOpErrorSetVoiceMessageSpendLimitOverride(response * } } -type awsAwsjson10_deserializeOpSubmitRegistrationVersion struct { +type awsAwsjson10_deserializeOpRequestSenderId struct { } -func (*awsAwsjson10_deserializeOpSubmitRegistrationVersion) ID() string { +func (*awsAwsjson10_deserializeOpRequestSenderId) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpRequestSenderId) HandleDeserialize(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, awsAwsjson10_deserializeOpErrorRequestSenderId(response, &metadata) + } + output := &RequestSenderIdOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentRequestSenderIdOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorRequestSenderId(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpSendDestinationNumberVerificationCode struct { +} + +func (*awsAwsjson10_deserializeOpSendDestinationNumberVerificationCode) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpSendDestinationNumberVerificationCode) HandleDeserialize(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, awsAwsjson10_deserializeOpErrorSendDestinationNumberVerificationCode(response, &metadata) + } + output := &SendDestinationNumberVerificationCodeOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentSendDestinationNumberVerificationCodeOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorSendDestinationNumberVerificationCode(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpSendMediaMessage struct { +} + +func (*awsAwsjson10_deserializeOpSendMediaMessage) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpSendMediaMessage) HandleDeserialize(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, awsAwsjson10_deserializeOpErrorSendMediaMessage(response, &metadata) + } + output := &SendMediaMessageOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentSendMediaMessageOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorSendMediaMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpSendTextMessage struct { +} + +func (*awsAwsjson10_deserializeOpSendTextMessage) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpSendTextMessage) HandleDeserialize(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, awsAwsjson10_deserializeOpErrorSendTextMessage(response, &metadata) + } + output := &SendTextMessageOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentSendTextMessageOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorSendTextMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpSendVoiceMessage struct { +} + +func (*awsAwsjson10_deserializeOpSendVoiceMessage) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpSendVoiceMessage) HandleDeserialize(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, awsAwsjson10_deserializeOpErrorSendVoiceMessage(response, &metadata) + } + output := &SendVoiceMessageOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentSendVoiceMessageOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorSendVoiceMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpSetAccountDefaultProtectConfiguration struct { +} + +func (*awsAwsjson10_deserializeOpSetAccountDefaultProtectConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpSetAccountDefaultProtectConfiguration) HandleDeserialize(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, awsAwsjson10_deserializeOpErrorSetAccountDefaultProtectConfiguration(response, &metadata) + } + output := &SetAccountDefaultProtectConfigurationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentSetAccountDefaultProtectConfigurationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorSetAccountDefaultProtectConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpSetDefaultMessageType struct { +} + +func (*awsAwsjson10_deserializeOpSetDefaultMessageType) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpSetDefaultMessageType) HandleDeserialize(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, awsAwsjson10_deserializeOpErrorSetDefaultMessageType(response, &metadata) + } + output := &SetDefaultMessageTypeOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentSetDefaultMessageTypeOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorSetDefaultMessageType(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpSetDefaultSenderId struct { +} + +func (*awsAwsjson10_deserializeOpSetDefaultSenderId) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpSetDefaultSenderId) HandleDeserialize(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, awsAwsjson10_deserializeOpErrorSetDefaultSenderId(response, &metadata) + } + output := &SetDefaultSenderIdOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentSetDefaultSenderIdOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorSetDefaultSenderId(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpSetMediaMessageSpendLimitOverride struct { +} + +func (*awsAwsjson10_deserializeOpSetMediaMessageSpendLimitOverride) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpSetMediaMessageSpendLimitOverride) HandleDeserialize(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, awsAwsjson10_deserializeOpErrorSetMediaMessageSpendLimitOverride(response, &metadata) + } + output := &SetMediaMessageSpendLimitOverrideOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentSetMediaMessageSpendLimitOverrideOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorSetMediaMessageSpendLimitOverride(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpSetTextMessageSpendLimitOverride struct { +} + +func (*awsAwsjson10_deserializeOpSetTextMessageSpendLimitOverride) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpSetTextMessageSpendLimitOverride) HandleDeserialize(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, awsAwsjson10_deserializeOpErrorSetTextMessageSpendLimitOverride(response, &metadata) + } + output := &SetTextMessageSpendLimitOverrideOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentSetTextMessageSpendLimitOverrideOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorSetTextMessageSpendLimitOverride(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpSetVoiceMessageSpendLimitOverride struct { +} + +func (*awsAwsjson10_deserializeOpSetVoiceMessageSpendLimitOverride) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpSetVoiceMessageSpendLimitOverride) HandleDeserialize(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, awsAwsjson10_deserializeOpErrorSetVoiceMessageSpendLimitOverride(response, &metadata) + } + output := &SetVoiceMessageSpendLimitOverrideOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentSetVoiceMessageSpendLimitOverrideOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorSetVoiceMessageSpendLimitOverride(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpSubmitRegistrationVersion struct { +} + +func (*awsAwsjson10_deserializeOpSubmitRegistrationVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpSubmitRegistrationVersion) HandleDeserialize(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, awsAwsjson10_deserializeOpErrorSubmitRegistrationVersion(response, &metadata) + } + output := &SubmitRegistrationVersionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentSubmitRegistrationVersionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorSubmitRegistrationVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpTagResource struct { +} + +func (*awsAwsjson10_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentTagResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUntagResource struct { +} + +func (*awsAwsjson10_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpSubmitRegistrationVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7386,9 +8948,9 @@ func (m *awsAwsjson10_deserializeOpSubmitRegistrationVersion) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorSubmitRegistrationVersion(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorUntagResource(response, &metadata) } - output := &SubmitRegistrationVersionOutput{} + output := &UntagResourceOutput{} out.Result = output var buff [1024]byte @@ -7408,7 +8970,7 @@ func (m *awsAwsjson10_deserializeOpSubmitRegistrationVersion) HandleDeserialize( return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentSubmitRegistrationVersionOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentUntagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7422,7 +8984,7 @@ func (m *awsAwsjson10_deserializeOpSubmitRegistrationVersion) HandleDeserialize( return out, metadata, err } -func awsAwsjson10_deserializeOpErrorSubmitRegistrationVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7462,9 +9024,6 @@ func awsAwsjson10_deserializeOpErrorSubmitRegistrationVersion(response *smithyht case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -7487,14 +9046,14 @@ func awsAwsjson10_deserializeOpErrorSubmitRegistrationVersion(response *smithyht } } -type awsAwsjson10_deserializeOpTagResource struct { +type awsAwsjson10_deserializeOpUpdateEventDestination struct { } -func (*awsAwsjson10_deserializeOpTagResource) ID() string { +func (*awsAwsjson10_deserializeOpUpdateEventDestination) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpUpdateEventDestination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7508,9 +9067,9 @@ func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateEventDestination(response, &metadata) } - output := &TagResourceOutput{} + output := &UpdateEventDestinationOutput{} out.Result = output var buff [1024]byte @@ -7530,7 +9089,7 @@ func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentTagResourceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentUpdateEventDestinationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7544,7 +9103,7 @@ func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorUpdateEventDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7584,15 +9143,15 @@ func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, m case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -7609,14 +9168,14 @@ func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsAwsjson10_deserializeOpUntagResource struct { +type awsAwsjson10_deserializeOpUpdatePhoneNumber struct { } -func (*awsAwsjson10_deserializeOpUntagResource) ID() string { +func (*awsAwsjson10_deserializeOpUpdatePhoneNumber) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpUpdatePhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7630,9 +9189,9 @@ func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorUpdatePhoneNumber(response, &metadata) } - output := &UntagResourceOutput{} + output := &UpdatePhoneNumberOutput{} out.Result = output var buff [1024]byte @@ -7652,7 +9211,7 @@ func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUntagResourceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentUpdatePhoneNumberOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7666,7 +9225,7 @@ func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorUpdatePhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7706,6 +9265,9 @@ func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -7728,14 +9290,14 @@ func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpUpdateEventDestination struct { +type awsAwsjson10_deserializeOpUpdatePool struct { } -func (*awsAwsjson10_deserializeOpUpdateEventDestination) ID() string { +func (*awsAwsjson10_deserializeOpUpdatePool) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateEventDestination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpUpdatePool) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7749,9 +9311,9 @@ func (m *awsAwsjson10_deserializeOpUpdateEventDestination) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateEventDestination(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorUpdatePool(response, &metadata) } - output := &UpdateEventDestinationOutput{} + output := &UpdatePoolOutput{} out.Result = output var buff [1024]byte @@ -7771,7 +9333,7 @@ func (m *awsAwsjson10_deserializeOpUpdateEventDestination) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateEventDestinationOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentUpdatePoolOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7785,7 +9347,7 @@ func (m *awsAwsjson10_deserializeOpUpdateEventDestination) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateEventDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorUpdatePool(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7850,14 +9412,14 @@ func awsAwsjson10_deserializeOpErrorUpdateEventDestination(response *smithyhttp. } } -type awsAwsjson10_deserializeOpUpdatePhoneNumber struct { +type awsAwsjson10_deserializeOpUpdateProtectConfiguration struct { } -func (*awsAwsjson10_deserializeOpUpdatePhoneNumber) ID() string { +func (*awsAwsjson10_deserializeOpUpdateProtectConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdatePhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpUpdateProtectConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7871,9 +9433,9 @@ func (m *awsAwsjson10_deserializeOpUpdatePhoneNumber) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdatePhoneNumber(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateProtectConfiguration(response, &metadata) } - output := &UpdatePhoneNumberOutput{} + output := &UpdateProtectConfigurationOutput{} out.Result = output var buff [1024]byte @@ -7893,7 +9455,7 @@ func (m *awsAwsjson10_deserializeOpUpdatePhoneNumber) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdatePhoneNumberOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentUpdateProtectConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7907,7 +9469,7 @@ func (m *awsAwsjson10_deserializeOpUpdatePhoneNumber) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdatePhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorUpdateProtectConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7947,9 +9509,6 @@ func awsAwsjson10_deserializeOpErrorUpdatePhoneNumber(response *smithyhttp.Respo case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -7972,14 +9531,14 @@ func awsAwsjson10_deserializeOpErrorUpdatePhoneNumber(response *smithyhttp.Respo } } -type awsAwsjson10_deserializeOpUpdatePool struct { +type awsAwsjson10_deserializeOpUpdateProtectConfigurationCountryRuleSet struct { } -func (*awsAwsjson10_deserializeOpUpdatePool) ID() string { +func (*awsAwsjson10_deserializeOpUpdateProtectConfigurationCountryRuleSet) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdatePool) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpUpdateProtectConfigurationCountryRuleSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7993,9 +9552,9 @@ func (m *awsAwsjson10_deserializeOpUpdatePool) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdatePool(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateProtectConfigurationCountryRuleSet(response, &metadata) } - output := &UpdatePoolOutput{} + output := &UpdateProtectConfigurationCountryRuleSetOutput{} out.Result = output var buff [1024]byte @@ -8015,7 +9574,7 @@ func (m *awsAwsjson10_deserializeOpUpdatePool) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdatePoolOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentUpdateProtectConfigurationCountryRuleSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8029,7 +9588,7 @@ func (m *awsAwsjson10_deserializeOpUpdatePool) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdatePool(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorUpdateProtectConfigurationCountryRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8069,9 +9628,6 @@ func awsAwsjson10_deserializeOpErrorUpdatePool(response *smithyhttp.Response, me case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -8940,6 +10496,15 @@ func awsAwsjson10_deserializeDocumentConfigurationSetInformation(v **types.Confi return err } + case "ProtectConfigurationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtectConfigurationIdOrArn to be of type string, got %T instead", value) + } + sv.ProtectConfigurationId = ptr.String(jtv) + } + default: _, _ = key, value @@ -10086,40 +11651,232 @@ func awsAwsjson10_deserializeDocumentPoolInformation(v **types.PoolInformation, sv.SharedRoutesEnabled = jtv } - case "Status": + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PoolStatus to be of type string, got %T instead", value) + } + sv.Status = types.PoolStatus(jtv) + } + + case "TwoWayChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TwoWayChannelArn to be of type string, got %T instead", value) + } + sv.TwoWayChannelArn = ptr.String(jtv) + } + + case "TwoWayChannelRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IamRoleArn to be of type string, got %T instead", value) + } + sv.TwoWayChannelRole = ptr.String(jtv) + } + + case "TwoWayEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected PrimitiveBoolean to be of type *bool, got %T instead", value) + } + sv.TwoWayEnabled = jtv + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentPoolInformationList(v *[]types.PoolInformation, 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.PoolInformation + if *v == nil { + cv = []types.PoolInformation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PoolInformation + destAddr := &col + if err := awsAwsjson10_deserializeDocumentPoolInformation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentProtectConfigurationCountryRuleSet(v *map[string]types.ProtectConfigurationCountryRuleSetInformation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %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]types.ProtectConfigurationCountryRuleSetInformation + if *v == nil { + mv = map[string]types.ProtectConfigurationCountryRuleSetInformation{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.ProtectConfigurationCountryRuleSetInformation + mapVar := parsedVal + destAddr := &mapVar + if err := awsAwsjson10_deserializeDocumentProtectConfigurationCountryRuleSetInformation(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson10_deserializeDocumentProtectConfigurationCountryRuleSetInformation(v **types.ProtectConfigurationCountryRuleSetInformation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ProtectConfigurationCountryRuleSetInformation + if *v == nil { + sv = &types.ProtectConfigurationCountryRuleSetInformation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ProtectStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtectStatus to be of type string, got %T instead", value) + } + sv.ProtectStatus = types.ProtectStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentProtectConfigurationInformation(v **types.ProtectConfigurationInformation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ProtectConfigurationInformation + if *v == nil { + sv = &types.ProtectConfigurationInformation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccountDefault": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected PrimitiveBoolean to be of type *bool, got %T instead", value) + } + sv.AccountDefault = jtv + } + + case "CreatedTimestamp": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PoolStatus 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.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } - sv.Status = types.PoolStatus(jtv) } - case "TwoWayChannelArn": + case "DeletionProtectionEnabled": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected TwoWayChannelArn to be of type string, got %T instead", value) + return fmt.Errorf("expected PrimitiveBoolean to be of type *bool, got %T instead", value) } - sv.TwoWayChannelArn = ptr.String(jtv) + sv.DeletionProtectionEnabled = jtv } - case "TwoWayChannelRole": + case "ProtectConfigurationArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected IamRoleArn to be of type string, got %T instead", value) + return fmt.Errorf("expected ProtectConfigurationArn to be of type string, got %T instead", value) } - sv.TwoWayChannelRole = ptr.String(jtv) + sv.ProtectConfigurationArn = ptr.String(jtv) } - case "TwoWayEnabled": + case "ProtectConfigurationId": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PrimitiveBoolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected ProtectConfigurationId to be of type string, got %T instead", value) } - sv.TwoWayEnabled = jtv + sv.ProtectConfigurationId = ptr.String(jtv) } default: @@ -10131,7 +11888,7 @@ func awsAwsjson10_deserializeDocumentPoolInformation(v **types.PoolInformation, return nil } -func awsAwsjson10_deserializeDocumentPoolInformationList(v *[]types.PoolInformation, value interface{}) error { +func awsAwsjson10_deserializeDocumentProtectConfigurationInformationList(v *[]types.ProtectConfigurationInformation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10144,17 +11901,17 @@ func awsAwsjson10_deserializeDocumentPoolInformationList(v *[]types.PoolInformat return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.PoolInformation + var cv []types.ProtectConfigurationInformation if *v == nil { - cv = []types.PoolInformation{} + cv = []types.ProtectConfigurationInformation{} } else { cv = *v } for _, value := range shape { - var col types.PoolInformation + var col types.ProtectConfigurationInformation destAddr := &col - if err := awsAwsjson10_deserializeDocumentPoolInformation(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentProtectConfigurationInformation(&destAddr, value); err != nil { return err } col = *destAddr @@ -12826,6 +14583,73 @@ func awsAwsjson10_deserializeOpDocumentAssociateOriginationIdentityOutput(v **As return nil } +func awsAwsjson10_deserializeOpDocumentAssociateProtectConfigurationOutput(v **AssociateProtectConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *AssociateProtectConfigurationOutput + if *v == nil { + sv = &AssociateProtectConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConfigurationSetArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ConfigurationSetArn = ptr.String(jtv) + } + + case "ConfigurationSetName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConfigurationSetName to be of type string, got %T instead", value) + } + sv.ConfigurationSetName = ptr.String(jtv) + } + + case "ProtectConfigurationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtectConfigurationArn to be of type string, got %T instead", value) + } + sv.ProtectConfigurationArn = ptr.String(jtv) + } + + case "ProtectConfigurationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtectConfigurationId to be of type string, got %T instead", value) + } + sv.ProtectConfigurationId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentCreateConfigurationSetOutput(v **CreateConfigurationSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13171,6 +14995,94 @@ func awsAwsjson10_deserializeOpDocumentCreatePoolOutput(v **CreatePoolOutput, va return nil } +func awsAwsjson10_deserializeOpDocumentCreateProtectConfigurationOutput(v **CreateProtectConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateProtectConfigurationOutput + if *v == nil { + sv = &CreateProtectConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccountDefault": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected PrimitiveBoolean to be of type *bool, got %T instead", value) + } + sv.AccountDefault = jtv + } + + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "DeletionProtectionEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected PrimitiveBoolean to be of type *bool, got %T instead", value) + } + sv.DeletionProtectionEnabled = jtv + } + + case "ProtectConfigurationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtectConfigurationArn to be of type string, got %T instead", value) + } + sv.ProtectConfigurationArn = ptr.String(jtv) + } + + case "ProtectConfigurationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtectConfigurationId to be of type string, got %T instead", value) + } + sv.ProtectConfigurationId = ptr.String(jtv) + } + + case "Tags": + if err := awsAwsjson10_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentCreateRegistrationAssociationOutput(v **CreateRegistrationAssociationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13623,6 +15535,55 @@ func awsAwsjson10_deserializeOpDocumentCreateVerifiedDestinationNumberOutput(v * return nil } +func awsAwsjson10_deserializeOpDocumentDeleteAccountDefaultProtectConfigurationOutput(v **DeleteAccountDefaultProtectConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteAccountDefaultProtectConfigurationOutput + if *v == nil { + sv = &DeleteAccountDefaultProtectConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DefaultProtectConfigurationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtectConfigurationArn to be of type string, got %T instead", value) + } + sv.DefaultProtectConfigurationArn = ptr.String(jtv) + } + + case "DefaultProtectConfigurationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtectConfigurationId to be of type string, got %T instead", value) + } + sv.DefaultProtectConfigurationId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentDeleteConfigurationSetOutput(v **DeleteConfigurationSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13930,22 +15891,66 @@ func awsAwsjson10_deserializeOpDocumentDeleteKeywordOutput(v **DeleteKeywordOutp sv.KeywordMessage = ptr.String(jtv) } - case "OriginationIdentity": + case "OriginationIdentity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OriginationIdentity = ptr.String(jtv) + } + + case "OriginationIdentityArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OriginationIdentityArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentDeleteMediaMessageSpendLimitOverrideOutput(v **DeleteMediaMessageSpendLimitOverrideOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteMediaMessageSpendLimitOverrideOutput + if *v == nil { + sv = &DeleteMediaMessageSpendLimitOverrideOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MonthlyLimit": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected MonthlyLimit to be json.Number, got %T instead", value) } - sv.OriginationIdentity = ptr.String(jtv) - } - - case "OriginationIdentityArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + i64, err := jtv.Int64() + if err != nil { + return err } - sv.OriginationIdentityArn = ptr.String(jtv) + sv.MonthlyLimit = ptr.Int64(i64) } default: @@ -14242,6 +16247,89 @@ func awsAwsjson10_deserializeOpDocumentDeletePoolOutput(v **DeletePoolOutput, va return nil } +func awsAwsjson10_deserializeOpDocumentDeleteProtectConfigurationOutput(v **DeleteProtectConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteProtectConfigurationOutput + if *v == nil { + sv = &DeleteProtectConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccountDefault": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected PrimitiveBoolean to be of type *bool, got %T instead", value) + } + sv.AccountDefault = jtv + } + + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "DeletionProtectionEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected PrimitiveBoolean to be of type *bool, got %T instead", value) + } + sv.DeletionProtectionEnabled = jtv + } + + case "ProtectConfigurationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtectConfigurationArn to be of type string, got %T instead", value) + } + sv.ProtectConfigurationArn = ptr.String(jtv) + } + + case "ProtectConfigurationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtectConfigurationId to be of type string, got %T instead", value) + } + sv.ProtectConfigurationId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentDeleteRegistrationAttachmentOutput(v **DeleteRegistrationAttachmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15104,6 +17192,51 @@ func awsAwsjson10_deserializeOpDocumentDescribePoolsOutput(v **DescribePoolsOutp return nil } +func awsAwsjson10_deserializeOpDocumentDescribeProtectConfigurationsOutput(v **DescribeProtectConfigurationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeProtectConfigurationsOutput + if *v == nil { + sv = &DescribeProtectConfigurationsOutput{} + } 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 "ProtectConfigurations": + if err := awsAwsjson10_deserializeDocumentProtectConfigurationInformationList(&sv.ProtectConfigurations, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentDescribeRegistrationAttachmentsOutput(v **DescribeRegistrationAttachmentsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15697,6 +17830,73 @@ func awsAwsjson10_deserializeOpDocumentDisassociateOriginationIdentityOutput(v * return nil } +func awsAwsjson10_deserializeOpDocumentDisassociateProtectConfigurationOutput(v **DisassociateProtectConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DisassociateProtectConfigurationOutput + if *v == nil { + sv = &DisassociateProtectConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConfigurationSetArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ConfigurationSetArn = ptr.String(jtv) + } + + case "ConfigurationSetName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConfigurationSetName to be of type string, got %T instead", value) + } + sv.ConfigurationSetName = ptr.String(jtv) + } + + case "ProtectConfigurationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtectConfigurationArn to be of type string, got %T instead", value) + } + sv.ProtectConfigurationArn = ptr.String(jtv) + } + + case "ProtectConfigurationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtectConfigurationId to be of type string, got %T instead", value) + } + sv.ProtectConfigurationId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentDiscardRegistrationVersionOutput(v **DiscardRegistrationVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15737,31 +17937,94 @@ func awsAwsjson10_deserializeOpDocumentDiscardRegistrationVersionOutput(v **Disc sv.RegistrationId = ptr.String(jtv) } - case "RegistrationVersionStatus": + case "RegistrationVersionStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RegistrationVersionStatus to be of type string, got %T instead", value) + } + sv.RegistrationVersionStatus = types.RegistrationVersionStatus(jtv) + } + + case "RegistrationVersionStatusHistory": + if err := awsAwsjson10_deserializeDocumentRegistrationVersionStatusHistory(&sv.RegistrationVersionStatusHistory, value); err != nil { + return err + } + + case "VersionNumber": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RegistrationVersionNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.VersionNumber = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentGetProtectConfigurationCountryRuleSetOutput(v **GetProtectConfigurationCountryRuleSetOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetProtectConfigurationCountryRuleSetOutput + if *v == nil { + sv = &GetProtectConfigurationCountryRuleSetOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CountryRuleSet": + if err := awsAwsjson10_deserializeDocumentProtectConfigurationCountryRuleSet(&sv.CountryRuleSet, value); err != nil { + return err + } + + case "NumberCapability": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NumberCapability to be of type string, got %T instead", value) + } + sv.NumberCapability = types.NumberCapability(jtv) + } + + case "ProtectConfigurationArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RegistrationVersionStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected ProtectConfigurationArn to be of type string, got %T instead", value) } - sv.RegistrationVersionStatus = types.RegistrationVersionStatus(jtv) - } - - case "RegistrationVersionStatusHistory": - if err := awsAwsjson10_deserializeDocumentRegistrationVersionStatusHistory(&sv.RegistrationVersionStatusHistory, value); err != nil { - return err + sv.ProtectConfigurationArn = ptr.String(jtv) } - case "VersionNumber": + case "ProtectConfigurationId": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RegistrationVersionNumber to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected ProtectConfigurationId to be of type string, got %T instead", value) } - sv.VersionNumber = ptr.Int64(i64) + sv.ProtectConfigurationId = ptr.String(jtv) } default: @@ -16810,6 +19073,46 @@ func awsAwsjson10_deserializeOpDocumentSendDestinationNumberVerificationCodeOutp return nil } +func awsAwsjson10_deserializeOpDocumentSendMediaMessageOutput(v **SendMediaMessageOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *SendMediaMessageOutput + if *v == nil { + sv = &SendMediaMessageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MessageId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.MessageId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentSendTextMessageOutput(v **SendTextMessageOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -16890,6 +19193,55 @@ func awsAwsjson10_deserializeOpDocumentSendVoiceMessageOutput(v **SendVoiceMessa return nil } +func awsAwsjson10_deserializeOpDocumentSetAccountDefaultProtectConfigurationOutput(v **SetAccountDefaultProtectConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *SetAccountDefaultProtectConfigurationOutput + if *v == nil { + sv = &SetAccountDefaultProtectConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DefaultProtectConfigurationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtectConfigurationArn to be of type string, got %T instead", value) + } + sv.DefaultProtectConfigurationArn = ptr.String(jtv) + } + + case "DefaultProtectConfigurationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtectConfigurationId to be of type string, got %T instead", value) + } + sv.DefaultProtectConfigurationId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentSetDefaultMessageTypeOutput(v **SetDefaultMessageTypeOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -17006,6 +19358,50 @@ func awsAwsjson10_deserializeOpDocumentSetDefaultSenderIdOutput(v **SetDefaultSe return nil } +func awsAwsjson10_deserializeOpDocumentSetMediaMessageSpendLimitOverrideOutput(v **SetMediaMessageSpendLimitOverrideOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *SetMediaMessageSpendLimitOverrideOutput + if *v == nil { + sv = &SetMediaMessageSpendLimitOverrideOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MonthlyLimit": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MonthlyLimit to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MonthlyLimit = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentSetTextMessageSpendLimitOverrideOutput(v **SetTextMessageSpendLimitOverrideOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -17619,6 +20015,152 @@ func awsAwsjson10_deserializeOpDocumentUpdatePoolOutput(v **UpdatePoolOutput, va return nil } +func awsAwsjson10_deserializeOpDocumentUpdateProtectConfigurationCountryRuleSetOutput(v **UpdateProtectConfigurationCountryRuleSetOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateProtectConfigurationCountryRuleSetOutput + if *v == nil { + sv = &UpdateProtectConfigurationCountryRuleSetOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CountryRuleSet": + if err := awsAwsjson10_deserializeDocumentProtectConfigurationCountryRuleSet(&sv.CountryRuleSet, value); err != nil { + return err + } + + case "NumberCapability": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NumberCapability to be of type string, got %T instead", value) + } + sv.NumberCapability = types.NumberCapability(jtv) + } + + case "ProtectConfigurationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtectConfigurationArn to be of type string, got %T instead", value) + } + sv.ProtectConfigurationArn = ptr.String(jtv) + } + + case "ProtectConfigurationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtectConfigurationId to be of type string, got %T instead", value) + } + sv.ProtectConfigurationId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentUpdateProtectConfigurationOutput(v **UpdateProtectConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateProtectConfigurationOutput + if *v == nil { + sv = &UpdateProtectConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccountDefault": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected PrimitiveBoolean to be of type *bool, got %T instead", value) + } + sv.AccountDefault = jtv + } + + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "DeletionProtectionEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected PrimitiveBoolean to be of type *bool, got %T instead", value) + } + sv.DeletionProtectionEnabled = jtv + } + + case "ProtectConfigurationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtectConfigurationArn to be of type string, got %T instead", value) + } + sv.ProtectConfigurationArn = ptr.String(jtv) + } + + case "ProtectConfigurationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtectConfigurationId to be of type string, got %T instead", value) + } + sv.ProtectConfigurationId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentUpdateSenderIdOutput(v **UpdateSenderIdOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/pinpointsmsvoicev2/doc.go b/service/pinpointsmsvoicev2/doc.go index 838f761db3c..af972d595e8 100644 --- a/service/pinpointsmsvoicev2/doc.go +++ b/service/pinpointsmsvoicev2/doc.go @@ -9,19 +9,20 @@ // Pinpoint is an Amazon Web Services service that you can use to engage with your // recipients across multiple messaging channels. The Amazon Pinpoint SMS and // Voice, version 2 API provides programmatic access to options that are unique to -// the SMS and voice channels and supplements the resources provided by the Amazon -// Pinpoint API. If you're new to Amazon Pinpoint, it's also helpful to review the -// Amazon Pinpoint Developer Guide (https://docs.aws.amazon.com/pinpoint/latest/developerguide/welcome.html) +// the SMS and voice channels. Amazon Pinpoint SMS and Voice, version 2 resources +// such as phone numbers, sender IDs, and opt-out lists can be used by the Amazon +// Pinpoint API. If you're new to Amazon Pinpoint SMS, it's also helpful to review +// the Amazon Pinpoint SMS User Guide (https://docs.aws.amazon.com/sms-voice/latest/userguide/what-is-service.html) // . The Amazon Pinpoint Developer Guide provides tutorials, code samples, and -// procedures that demonstrate how to use Amazon Pinpoint features programmatically -// and how to integrate Amazon Pinpoint functionality into mobile apps and other -// types of applications. The guide also provides key information, such as Amazon -// Pinpoint integration with other Amazon Web Services services, and the quotas -// that apply to use of the service. Regional availability The Amazon Pinpoint SMS -// and Voice, version 2 API Reference is available in several Amazon Web Services -// Regions and it provides an endpoint for each of these Regions. For a list of all -// the Regions and endpoints where the API is currently available, see Amazon Web -// Services Service Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#pinpoint_region) +// procedures that demonstrate how to use Amazon Pinpoint SMS features +// programmatically and how to integrate Amazon Pinpoint functionality into mobile +// apps and other types of applications. The guide also provides key information, +// such as Amazon Pinpoint integration with other Amazon Web Services services, and +// the quotas that apply to use of the service. Regional availability The Amazon +// Pinpoint SMS and Voice, version 2 API Reference is available in several Amazon +// Web Services Regions and it provides an endpoint for each of these Regions. For +// a list of all the Regions and endpoints where the API is currently available, +// see Amazon Web Services Service Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#pinpoint_region) // and Amazon Pinpoint endpoints and quotas (https://docs.aws.amazon.com/general/latest/gr/pinpoint.html) // in the Amazon Web Services General Reference. To learn more about Amazon Web // Services Regions, see Managing Amazon Web Services Regions (https://docs.aws.amazon.com/general/latest/gr/rande-manage.html) diff --git a/service/pinpointsmsvoicev2/generated.json b/service/pinpointsmsvoicev2/generated.json index c881c01cdec..301f54330ed 100644 --- a/service/pinpointsmsvoicev2/generated.json +++ b/service/pinpointsmsvoicev2/generated.json @@ -9,23 +9,28 @@ "api_client.go", "api_client_test.go", "api_op_AssociateOriginationIdentity.go", + "api_op_AssociateProtectConfiguration.go", "api_op_CreateConfigurationSet.go", "api_op_CreateEventDestination.go", "api_op_CreateOptOutList.go", "api_op_CreatePool.go", + "api_op_CreateProtectConfiguration.go", "api_op_CreateRegistration.go", "api_op_CreateRegistrationAssociation.go", "api_op_CreateRegistrationAttachment.go", "api_op_CreateRegistrationVersion.go", "api_op_CreateVerifiedDestinationNumber.go", + "api_op_DeleteAccountDefaultProtectConfiguration.go", "api_op_DeleteConfigurationSet.go", "api_op_DeleteDefaultMessageType.go", "api_op_DeleteDefaultSenderId.go", "api_op_DeleteEventDestination.go", "api_op_DeleteKeyword.go", + "api_op_DeleteMediaMessageSpendLimitOverride.go", "api_op_DeleteOptOutList.go", "api_op_DeleteOptedOutNumber.go", "api_op_DeletePool.go", + "api_op_DeleteProtectConfiguration.go", "api_op_DeleteRegistration.go", "api_op_DeleteRegistrationAttachment.go", "api_op_DeleteRegistrationFieldValue.go", @@ -40,6 +45,7 @@ "api_op_DescribeOptedOutNumbers.go", "api_op_DescribePhoneNumbers.go", "api_op_DescribePools.go", + "api_op_DescribeProtectConfigurations.go", "api_op_DescribeRegistrationAttachments.go", "api_op_DescribeRegistrationFieldDefinitions.go", "api_op_DescribeRegistrationFieldValues.go", @@ -51,7 +57,9 @@ "api_op_DescribeSpendLimits.go", "api_op_DescribeVerifiedDestinationNumbers.go", "api_op_DisassociateOriginationIdentity.go", + "api_op_DisassociateProtectConfiguration.go", "api_op_DiscardRegistrationVersion.go", + "api_op_GetProtectConfigurationCountryRuleSet.go", "api_op_ListPoolOriginationIdentities.go", "api_op_ListRegistrationAssociations.go", "api_op_ListTagsForResource.go", @@ -63,10 +71,13 @@ "api_op_RequestPhoneNumber.go", "api_op_RequestSenderId.go", "api_op_SendDestinationNumberVerificationCode.go", + "api_op_SendMediaMessage.go", "api_op_SendTextMessage.go", "api_op_SendVoiceMessage.go", + "api_op_SetAccountDefaultProtectConfiguration.go", "api_op_SetDefaultMessageType.go", "api_op_SetDefaultSenderId.go", + "api_op_SetMediaMessageSpendLimitOverride.go", "api_op_SetTextMessageSpendLimitOverride.go", "api_op_SetVoiceMessageSpendLimitOverride.go", "api_op_SubmitRegistrationVersion.go", @@ -75,6 +86,8 @@ "api_op_UpdateEventDestination.go", "api_op_UpdatePhoneNumber.go", "api_op_UpdatePool.go", + "api_op_UpdateProtectConfiguration.go", + "api_op_UpdateProtectConfigurationCountryRuleSet.go", "api_op_UpdateSenderId.go", "api_op_VerifyDestinationNumber.go", "auth.go", diff --git a/service/pinpointsmsvoicev2/serializers.go b/service/pinpointsmsvoicev2/serializers.go index 4baadb3a1f8..c6c3da740ef 100644 --- a/service/pinpointsmsvoicev2/serializers.go +++ b/service/pinpointsmsvoicev2/serializers.go @@ -70,6 +70,61 @@ func (m *awsAwsjson10_serializeOpAssociateOriginationIdentity) HandleSerialize(c return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpAssociateProtectConfiguration struct { +} + +func (*awsAwsjson10_serializeOpAssociateProtectConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpAssociateProtectConfiguration) 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.(*AssociateProtectConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("PinpointSMSVoiceV2.AssociateProtectConfiguration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentAssociateProtectConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpCreateConfigurationSet struct { } @@ -290,6 +345,61 @@ func (m *awsAwsjson10_serializeOpCreatePool) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpCreateProtectConfiguration struct { +} + +func (*awsAwsjson10_serializeOpCreateProtectConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpCreateProtectConfiguration) 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.(*CreateProtectConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("PinpointSMSVoiceV2.CreateProtectConfiguration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentCreateProtectConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpCreateRegistration struct { } @@ -565,6 +675,61 @@ func (m *awsAwsjson10_serializeOpCreateVerifiedDestinationNumber) HandleSerializ return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpDeleteAccountDefaultProtectConfiguration struct { +} + +func (*awsAwsjson10_serializeOpDeleteAccountDefaultProtectConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpDeleteAccountDefaultProtectConfiguration) 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.(*DeleteAccountDefaultProtectConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("PinpointSMSVoiceV2.DeleteAccountDefaultProtectConfiguration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentDeleteAccountDefaultProtectConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpDeleteConfigurationSet struct { } @@ -840,6 +1005,61 @@ func (m *awsAwsjson10_serializeOpDeleteKeyword) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpDeleteMediaMessageSpendLimitOverride struct { +} + +func (*awsAwsjson10_serializeOpDeleteMediaMessageSpendLimitOverride) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpDeleteMediaMessageSpendLimitOverride) 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.(*DeleteMediaMessageSpendLimitOverrideInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("PinpointSMSVoiceV2.DeleteMediaMessageSpendLimitOverride") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentDeleteMediaMessageSpendLimitOverrideInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpDeleteOptedOutNumber struct { } @@ -1005,6 +1225,61 @@ func (m *awsAwsjson10_serializeOpDeletePool) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpDeleteProtectConfiguration struct { +} + +func (*awsAwsjson10_serializeOpDeleteProtectConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpDeleteProtectConfiguration) 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.(*DeleteProtectConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("PinpointSMSVoiceV2.DeleteProtectConfiguration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentDeleteProtectConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpDeleteRegistration struct { } @@ -1775,14 +2050,14 @@ func (m *awsAwsjson10_serializeOpDescribePools) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpDescribeRegistrationAttachments struct { +type awsAwsjson10_serializeOpDescribeProtectConfigurations struct { } -func (*awsAwsjson10_serializeOpDescribeRegistrationAttachments) ID() string { +func (*awsAwsjson10_serializeOpDescribeProtectConfigurations) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpDescribeRegistrationAttachments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpDescribeProtectConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1790,7 +2065,7 @@ func (m *awsAwsjson10_serializeOpDescribeRegistrationAttachments) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeRegistrationAttachmentsInput) + input, ok := in.Parameters.(*DescribeProtectConfigurationsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1811,10 +2086,10 @@ func (m *awsAwsjson10_serializeOpDescribeRegistrationAttachments) HandleSerializ return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("PinpointSMSVoiceV2.DescribeRegistrationAttachments") + httpBindingEncoder.SetHeader("X-Amz-Target").String("PinpointSMSVoiceV2.DescribeProtectConfigurations") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentDescribeRegistrationAttachmentsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentDescribeProtectConfigurationsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1830,14 +2105,69 @@ func (m *awsAwsjson10_serializeOpDescribeRegistrationAttachments) HandleSerializ return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpDescribeRegistrationFieldDefinitions struct { +type awsAwsjson10_serializeOpDescribeRegistrationAttachments struct { } -func (*awsAwsjson10_serializeOpDescribeRegistrationFieldDefinitions) ID() string { +func (*awsAwsjson10_serializeOpDescribeRegistrationAttachments) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpDescribeRegistrationFieldDefinitions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpDescribeRegistrationAttachments) 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.(*DescribeRegistrationAttachmentsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("PinpointSMSVoiceV2.DescribeRegistrationAttachments") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentDescribeRegistrationAttachmentsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpDescribeRegistrationFieldDefinitions struct { +} + +func (*awsAwsjson10_serializeOpDescribeRegistrationFieldDefinitions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpDescribeRegistrationFieldDefinitions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2380,6 +2710,61 @@ func (m *awsAwsjson10_serializeOpDisassociateOriginationIdentity) HandleSerializ return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpDisassociateProtectConfiguration struct { +} + +func (*awsAwsjson10_serializeOpDisassociateProtectConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpDisassociateProtectConfiguration) 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.(*DisassociateProtectConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("PinpointSMSVoiceV2.DisassociateProtectConfiguration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentDisassociateProtectConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpDiscardRegistrationVersion struct { } @@ -2435,6 +2820,61 @@ func (m *awsAwsjson10_serializeOpDiscardRegistrationVersion) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpGetProtectConfigurationCountryRuleSet struct { +} + +func (*awsAwsjson10_serializeOpGetProtectConfigurationCountryRuleSet) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetProtectConfigurationCountryRuleSet) 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.(*GetProtectConfigurationCountryRuleSetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("PinpointSMSVoiceV2.GetProtectConfigurationCountryRuleSet") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetProtectConfigurationCountryRuleSetInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpListPoolOriginationIdentities struct { } @@ -3040,6 +3480,61 @@ func (m *awsAwsjson10_serializeOpSendDestinationNumberVerificationCode) HandleSe return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpSendMediaMessage struct { +} + +func (*awsAwsjson10_serializeOpSendMediaMessage) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpSendMediaMessage) 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.(*SendMediaMessageInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("PinpointSMSVoiceV2.SendMediaMessage") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentSendMediaMessageInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpSendTextMessage struct { } @@ -3150,6 +3645,61 @@ func (m *awsAwsjson10_serializeOpSendVoiceMessage) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpSetAccountDefaultProtectConfiguration struct { +} + +func (*awsAwsjson10_serializeOpSetAccountDefaultProtectConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpSetAccountDefaultProtectConfiguration) 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.(*SetAccountDefaultProtectConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("PinpointSMSVoiceV2.SetAccountDefaultProtectConfiguration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentSetAccountDefaultProtectConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpSetDefaultMessageType struct { } @@ -3260,6 +3810,61 @@ func (m *awsAwsjson10_serializeOpSetDefaultSenderId) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpSetMediaMessageSpendLimitOverride struct { +} + +func (*awsAwsjson10_serializeOpSetMediaMessageSpendLimitOverride) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpSetMediaMessageSpendLimitOverride) 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.(*SetMediaMessageSpendLimitOverrideInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("PinpointSMSVoiceV2.SetMediaMessageSpendLimitOverride") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentSetMediaMessageSpendLimitOverrideInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpSetTextMessageSpendLimitOverride struct { } @@ -3700,6 +4305,116 @@ func (m *awsAwsjson10_serializeOpUpdatePool) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpUpdateProtectConfiguration struct { +} + +func (*awsAwsjson10_serializeOpUpdateProtectConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateProtectConfiguration) 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.(*UpdateProtectConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("PinpointSMSVoiceV2.UpdateProtectConfiguration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateProtectConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpUpdateProtectConfigurationCountryRuleSet struct { +} + +func (*awsAwsjson10_serializeOpUpdateProtectConfigurationCountryRuleSet) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateProtectConfigurationCountryRuleSet) 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.(*UpdateProtectConfigurationCountryRuleSetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("PinpointSMSVoiceV2.UpdateProtectConfigurationCountryRuleSet") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateProtectConfigurationCountryRuleSetInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpUpdateSenderId struct { } @@ -3995,6 +4710,17 @@ func awsAwsjson10_serializeDocumentKinesisFirehoseDestination(v *types.KinesisFi return nil } +func awsAwsjson10_serializeDocumentMediaUrlList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsAwsjson10_serializeDocumentMessageTypeList(v []types.MessageType, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -4084,7 +4810,50 @@ func awsAwsjson10_serializeDocumentOptOutListNameList(v []string, value smithyjs return nil } -func awsAwsjson10_serializeDocumentPhoneNumberFilter(v *types.PhoneNumberFilter, value smithyjson.Value) error { +func awsAwsjson10_serializeDocumentPhoneNumberFilter(v *types.PhoneNumberFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Name) > 0 { + ok := object.Key("Name") + ok.String(string(v.Name)) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson10_serializeDocumentFilterValueList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentPhoneNumberFilterList(v []types.PhoneNumberFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentPhoneNumberFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentPhoneNumberIdList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson10_serializeDocumentPoolFilter(v *types.PoolFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4103,20 +4872,20 @@ func awsAwsjson10_serializeDocumentPhoneNumberFilter(v *types.PhoneNumberFilter, return nil } -func awsAwsjson10_serializeDocumentPhoneNumberFilterList(v []types.PhoneNumberFilter, value smithyjson.Value) error { +func awsAwsjson10_serializeDocumentPoolFilterList(v []types.PoolFilter, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() - if err := awsAwsjson10_serializeDocumentPhoneNumberFilter(&v[i], av); err != nil { + if err := awsAwsjson10_serializeDocumentPoolFilter(&v[i], av); err != nil { return err } } return nil } -func awsAwsjson10_serializeDocumentPhoneNumberIdList(v []string, value smithyjson.Value) error { +func awsAwsjson10_serializeDocumentPoolIdList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -4127,7 +4896,7 @@ func awsAwsjson10_serializeDocumentPhoneNumberIdList(v []string, value smithyjso return nil } -func awsAwsjson10_serializeDocumentPoolFilter(v *types.PoolFilter, value smithyjson.Value) error { +func awsAwsjson10_serializeDocumentPoolOriginationIdentitiesFilter(v *types.PoolOriginationIdentitiesFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4146,31 +4915,46 @@ func awsAwsjson10_serializeDocumentPoolFilter(v *types.PoolFilter, value smithyj return nil } -func awsAwsjson10_serializeDocumentPoolFilterList(v []types.PoolFilter, value smithyjson.Value) error { +func awsAwsjson10_serializeDocumentPoolOriginationIdentitiesFilterList(v []types.PoolOriginationIdentitiesFilter, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() - if err := awsAwsjson10_serializeDocumentPoolFilter(&v[i], av); err != nil { + if err := awsAwsjson10_serializeDocumentPoolOriginationIdentitiesFilter(&v[i], av); err != nil { return err } } return nil } -func awsAwsjson10_serializeDocumentPoolIdList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() +func awsAwsjson10_serializeDocumentProtectConfigurationCountryRuleSet(v map[string]types.ProtectConfigurationCountryRuleSetInformation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() - for i := range v { - av := array.Value() - av.String(v[i]) + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsAwsjson10_serializeDocumentProtectConfigurationCountryRuleSetInformation(&mapVar, om); err != nil { + return err + } } return nil } -func awsAwsjson10_serializeDocumentPoolOriginationIdentitiesFilter(v *types.PoolOriginationIdentitiesFilter, value smithyjson.Value) error { +func awsAwsjson10_serializeDocumentProtectConfigurationCountryRuleSetInformation(v *types.ProtectConfigurationCountryRuleSetInformation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ProtectStatus) > 0 { + ok := object.Key("ProtectStatus") + ok.String(string(v.ProtectStatus)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentProtectConfigurationFilter(v *types.ProtectConfigurationFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4189,19 +4973,30 @@ func awsAwsjson10_serializeDocumentPoolOriginationIdentitiesFilter(v *types.Pool return nil } -func awsAwsjson10_serializeDocumentPoolOriginationIdentitiesFilterList(v []types.PoolOriginationIdentitiesFilter, value smithyjson.Value) error { +func awsAwsjson10_serializeDocumentProtectConfigurationFilterList(v []types.ProtectConfigurationFilter, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() - if err := awsAwsjson10_serializeDocumentPoolOriginationIdentitiesFilter(&v[i], av); err != nil { + if err := awsAwsjson10_serializeDocumentProtectConfigurationFilter(&v[i], av); err != nil { return err } } return nil } +func awsAwsjson10_serializeDocumentProtectConfigurationIdList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsAwsjson10_serializeDocumentRegistrationAssociationFilter(v *types.RegistrationAssociationFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4613,6 +5408,23 @@ func awsAwsjson10_serializeOpDocumentAssociateOriginationIdentityInput(v *Associ return nil } +func awsAwsjson10_serializeOpDocumentAssociateProtectConfigurationInput(v *AssociateProtectConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ConfigurationSetName != nil { + ok := object.Key("ConfigurationSetName") + ok.String(*v.ConfigurationSetName) + } + + if v.ProtectConfigurationId != nil { + ok := object.Key("ProtectConfigurationId") + ok.String(*v.ProtectConfigurationId) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentCreateConfigurationSetInput(v *CreateConfigurationSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4750,6 +5562,30 @@ func awsAwsjson10_serializeOpDocumentCreatePoolInput(v *CreatePoolInput, value s return nil } +func awsAwsjson10_serializeOpDocumentCreateProtectConfigurationInput(v *CreateProtectConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.DeletionProtectionEnabled != nil { + ok := object.Key("DeletionProtectionEnabled") + ok.Boolean(*v.DeletionProtectionEnabled) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson10_serializeOpDocumentCreateRegistrationAssociationInput(v *CreateRegistrationAssociationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4856,6 +5692,13 @@ func awsAwsjson10_serializeOpDocumentCreateVerifiedDestinationNumberInput(v *Cre return nil } +func awsAwsjson10_serializeOpDocumentDeleteAccountDefaultProtectConfigurationInput(v *DeleteAccountDefaultProtectConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + return nil +} + func awsAwsjson10_serializeOpDocumentDeleteConfigurationSetInput(v *DeleteConfigurationSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4926,6 +5769,13 @@ func awsAwsjson10_serializeOpDocumentDeleteKeywordInput(v *DeleteKeywordInput, v return nil } +func awsAwsjson10_serializeOpDocumentDeleteMediaMessageSpendLimitOverrideInput(v *DeleteMediaMessageSpendLimitOverrideInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + return nil +} + func awsAwsjson10_serializeOpDocumentDeleteOptedOutNumberInput(v *DeleteOptedOutNumberInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4967,6 +5817,18 @@ func awsAwsjson10_serializeOpDocumentDeletePoolInput(v *DeletePoolInput, value s return nil } +func awsAwsjson10_serializeOpDocumentDeleteProtectConfigurationInput(v *DeleteProtectConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ProtectConfigurationId != nil { + ok := object.Key("ProtectConfigurationId") + ok.String(*v.ProtectConfigurationId) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentDeleteRegistrationAttachmentInput(v *DeleteRegistrationAttachmentInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5257,6 +6119,37 @@ func awsAwsjson10_serializeOpDocumentDescribePoolsInput(v *DescribePoolsInput, v return nil } +func awsAwsjson10_serializeOpDocumentDescribeProtectConfigurationsInput(v *DescribeProtectConfigurationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson10_serializeDocumentProtectConfigurationFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.ProtectConfigurationIds != nil { + ok := object.Key("ProtectConfigurationIds") + if err := awsAwsjson10_serializeDocumentProtectConfigurationIdList(v.ProtectConfigurationIds, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson10_serializeOpDocumentDescribeRegistrationAttachmentsInput(v *DescribeRegistrationAttachmentsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5601,6 +6494,23 @@ func awsAwsjson10_serializeOpDocumentDisassociateOriginationIdentityInput(v *Dis return nil } +func awsAwsjson10_serializeOpDocumentDisassociateProtectConfigurationInput(v *DisassociateProtectConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ConfigurationSetName != nil { + ok := object.Key("ConfigurationSetName") + ok.String(*v.ConfigurationSetName) + } + + if v.ProtectConfigurationId != nil { + ok := object.Key("ProtectConfigurationId") + ok.String(*v.ProtectConfigurationId) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentDiscardRegistrationVersionInput(v *DiscardRegistrationVersionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5613,6 +6523,23 @@ func awsAwsjson10_serializeOpDocumentDiscardRegistrationVersionInput(v *DiscardR return nil } +func awsAwsjson10_serializeOpDocumentGetProtectConfigurationCountryRuleSetInput(v *GetProtectConfigurationCountryRuleSetInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.NumberCapability) > 0 { + ok := object.Key("NumberCapability") + ok.String(string(v.NumberCapability)) + } + + if v.ProtectConfigurationId != nil { + ok := object.Key("ProtectConfigurationId") + ok.String(*v.ProtectConfigurationId) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentListPoolOriginationIdentitiesInput(v *ListPoolOriginationIdentitiesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5938,6 +6865,67 @@ func awsAwsjson10_serializeOpDocumentSendDestinationNumberVerificationCodeInput( return nil } +func awsAwsjson10_serializeOpDocumentSendMediaMessageInput(v *SendMediaMessageInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ConfigurationSetName != nil { + ok := object.Key("ConfigurationSetName") + ok.String(*v.ConfigurationSetName) + } + + if v.Context != nil { + ok := object.Key("Context") + if err := awsAwsjson10_serializeDocumentContextMap(v.Context, ok); err != nil { + return err + } + } + + if v.DestinationPhoneNumber != nil { + ok := object.Key("DestinationPhoneNumber") + ok.String(*v.DestinationPhoneNumber) + } + + if v.DryRun { + ok := object.Key("DryRun") + ok.Boolean(v.DryRun) + } + + if v.MaxPrice != nil { + ok := object.Key("MaxPrice") + ok.String(*v.MaxPrice) + } + + if v.MediaUrls != nil { + ok := object.Key("MediaUrls") + if err := awsAwsjson10_serializeDocumentMediaUrlList(v.MediaUrls, ok); err != nil { + return err + } + } + + if v.MessageBody != nil { + ok := object.Key("MessageBody") + ok.String(*v.MessageBody) + } + + if v.OriginationIdentity != nil { + ok := object.Key("OriginationIdentity") + ok.String(*v.OriginationIdentity) + } + + if v.ProtectConfigurationId != nil { + ok := object.Key("ProtectConfigurationId") + ok.String(*v.ProtectConfigurationId) + } + + if v.TimeToLive != nil { + ok := object.Key("TimeToLive") + ok.Integer(*v.TimeToLive) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentSendTextMessageInput(v *SendTextMessageInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5996,6 +6984,11 @@ func awsAwsjson10_serializeOpDocumentSendTextMessageInput(v *SendTextMessageInpu ok.String(*v.OriginationIdentity) } + if v.ProtectConfigurationId != nil { + ok := object.Key("ProtectConfigurationId") + ok.String(*v.ProtectConfigurationId) + } + if v.TimeToLive != nil { ok := object.Key("TimeToLive") ok.Integer(*v.TimeToLive) @@ -6050,6 +7043,11 @@ func awsAwsjson10_serializeOpDocumentSendVoiceMessageInput(v *SendVoiceMessageIn ok.String(*v.OriginationIdentity) } + if v.ProtectConfigurationId != nil { + ok := object.Key("ProtectConfigurationId") + ok.String(*v.ProtectConfigurationId) + } + if v.TimeToLive != nil { ok := object.Key("TimeToLive") ok.Integer(*v.TimeToLive) @@ -6063,6 +7061,18 @@ func awsAwsjson10_serializeOpDocumentSendVoiceMessageInput(v *SendVoiceMessageIn return nil } +func awsAwsjson10_serializeOpDocumentSetAccountDefaultProtectConfigurationInput(v *SetAccountDefaultProtectConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ProtectConfigurationId != nil { + ok := object.Key("ProtectConfigurationId") + ok.String(*v.ProtectConfigurationId) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentSetDefaultMessageTypeInput(v *SetDefaultMessageTypeInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6097,6 +7107,18 @@ func awsAwsjson10_serializeOpDocumentSetDefaultSenderIdInput(v *SetDefaultSender return nil } +func awsAwsjson10_serializeOpDocumentSetMediaMessageSpendLimitOverrideInput(v *SetMediaMessageSpendLimitOverrideInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MonthlyLimit != nil { + ok := object.Key("MonthlyLimit") + ok.Long(*v.MonthlyLimit) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentSetTextMessageSpendLimitOverrideInput(v *SetTextMessageSpendLimitOverrideInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6310,6 +7332,47 @@ func awsAwsjson10_serializeOpDocumentUpdatePoolInput(v *UpdatePoolInput, value s return nil } +func awsAwsjson10_serializeOpDocumentUpdateProtectConfigurationCountryRuleSetInput(v *UpdateProtectConfigurationCountryRuleSetInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CountryRuleSetUpdates != nil { + ok := object.Key("CountryRuleSetUpdates") + if err := awsAwsjson10_serializeDocumentProtectConfigurationCountryRuleSet(v.CountryRuleSetUpdates, ok); err != nil { + return err + } + } + + if len(v.NumberCapability) > 0 { + ok := object.Key("NumberCapability") + ok.String(string(v.NumberCapability)) + } + + if v.ProtectConfigurationId != nil { + ok := object.Key("ProtectConfigurationId") + ok.String(*v.ProtectConfigurationId) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentUpdateProtectConfigurationInput(v *UpdateProtectConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DeletionProtectionEnabled != nil { + ok := object.Key("DeletionProtectionEnabled") + ok.Boolean(*v.DeletionProtectionEnabled) + } + + if v.ProtectConfigurationId != nil { + ok := object.Key("ProtectConfigurationId") + ok.String(*v.ProtectConfigurationId) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentUpdateSenderIdInput(v *UpdateSenderIdInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/pinpointsmsvoicev2/snapshot_test.go b/service/pinpointsmsvoicev2/snapshot_test.go index a669a1237b0..c30b1520e2f 100644 --- a/service/pinpointsmsvoicev2/snapshot_test.go +++ b/service/pinpointsmsvoicev2/snapshot_test.go @@ -74,6 +74,18 @@ func TestCheckSnapshot_AssociateOriginationIdentity(t *testing.T) { } } +func TestCheckSnapshot_AssociateProtectConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.AssociateProtectConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "AssociateProtectConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateConfigurationSet(t *testing.T) { svc := New(Options{}) _, err := svc.CreateConfigurationSet(context.Background(), nil, func(o *Options) { @@ -122,6 +134,18 @@ func TestCheckSnapshot_CreatePool(t *testing.T) { } } +func TestCheckSnapshot_CreateProtectConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateProtectConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateProtectConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateRegistration(t *testing.T) { svc := New(Options{}) _, err := svc.CreateRegistration(context.Background(), nil, func(o *Options) { @@ -182,6 +206,18 @@ func TestCheckSnapshot_CreateVerifiedDestinationNumber(t *testing.T) { } } +func TestCheckSnapshot_DeleteAccountDefaultProtectConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteAccountDefaultProtectConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteAccountDefaultProtectConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteConfigurationSet(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteConfigurationSet(context.Background(), nil, func(o *Options) { @@ -242,6 +278,18 @@ func TestCheckSnapshot_DeleteKeyword(t *testing.T) { } } +func TestCheckSnapshot_DeleteMediaMessageSpendLimitOverride(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteMediaMessageSpendLimitOverride(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteMediaMessageSpendLimitOverride") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteOptedOutNumber(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteOptedOutNumber(context.Background(), nil, func(o *Options) { @@ -278,6 +326,18 @@ func TestCheckSnapshot_DeletePool(t *testing.T) { } } +func TestCheckSnapshot_DeleteProtectConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteProtectConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteProtectConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteRegistration(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteRegistration(context.Background(), nil, func(o *Options) { @@ -446,6 +506,18 @@ func TestCheckSnapshot_DescribePools(t *testing.T) { } } +func TestCheckSnapshot_DescribeProtectConfigurations(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeProtectConfigurations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeProtectConfigurations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribeRegistrationAttachments(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeRegistrationAttachments(context.Background(), nil, func(o *Options) { @@ -578,6 +650,18 @@ func TestCheckSnapshot_DisassociateOriginationIdentity(t *testing.T) { } } +func TestCheckSnapshot_DisassociateProtectConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.DisassociateProtectConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DisassociateProtectConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DiscardRegistrationVersion(t *testing.T) { svc := New(Options{}) _, err := svc.DiscardRegistrationVersion(context.Background(), nil, func(o *Options) { @@ -590,6 +674,18 @@ func TestCheckSnapshot_DiscardRegistrationVersion(t *testing.T) { } } +func TestCheckSnapshot_GetProtectConfigurationCountryRuleSet(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetProtectConfigurationCountryRuleSet(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetProtectConfigurationCountryRuleSet") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListPoolOriginationIdentities(t *testing.T) { svc := New(Options{}) _, err := svc.ListPoolOriginationIdentities(context.Background(), nil, func(o *Options) { @@ -722,6 +818,18 @@ func TestCheckSnapshot_SendDestinationNumberVerificationCode(t *testing.T) { } } +func TestCheckSnapshot_SendMediaMessage(t *testing.T) { + svc := New(Options{}) + _, err := svc.SendMediaMessage(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "SendMediaMessage") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_SendTextMessage(t *testing.T) { svc := New(Options{}) _, err := svc.SendTextMessage(context.Background(), nil, func(o *Options) { @@ -746,6 +854,18 @@ func TestCheckSnapshot_SendVoiceMessage(t *testing.T) { } } +func TestCheckSnapshot_SetAccountDefaultProtectConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.SetAccountDefaultProtectConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "SetAccountDefaultProtectConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_SetDefaultMessageType(t *testing.T) { svc := New(Options{}) _, err := svc.SetDefaultMessageType(context.Background(), nil, func(o *Options) { @@ -770,6 +890,18 @@ func TestCheckSnapshot_SetDefaultSenderId(t *testing.T) { } } +func TestCheckSnapshot_SetMediaMessageSpendLimitOverride(t *testing.T) { + svc := New(Options{}) + _, err := svc.SetMediaMessageSpendLimitOverride(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "SetMediaMessageSpendLimitOverride") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_SetTextMessageSpendLimitOverride(t *testing.T) { svc := New(Options{}) _, err := svc.SetTextMessageSpendLimitOverride(context.Background(), nil, func(o *Options) { @@ -866,6 +998,30 @@ func TestCheckSnapshot_UpdatePool(t *testing.T) { } } +func TestCheckSnapshot_UpdateProtectConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateProtectConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateProtectConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_UpdateProtectConfigurationCountryRuleSet(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateProtectConfigurationCountryRuleSet(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateProtectConfigurationCountryRuleSet") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateSenderId(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateSenderId(context.Background(), nil, func(o *Options) { @@ -901,6 +1057,18 @@ func TestUpdateSnapshot_AssociateOriginationIdentity(t *testing.T) { } } +func TestUpdateSnapshot_AssociateProtectConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.AssociateProtectConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "AssociateProtectConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateConfigurationSet(t *testing.T) { svc := New(Options{}) _, err := svc.CreateConfigurationSet(context.Background(), nil, func(o *Options) { @@ -949,6 +1117,18 @@ func TestUpdateSnapshot_CreatePool(t *testing.T) { } } +func TestUpdateSnapshot_CreateProtectConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateProtectConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateProtectConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateRegistration(t *testing.T) { svc := New(Options{}) _, err := svc.CreateRegistration(context.Background(), nil, func(o *Options) { @@ -1009,6 +1189,18 @@ func TestUpdateSnapshot_CreateVerifiedDestinationNumber(t *testing.T) { } } +func TestUpdateSnapshot_DeleteAccountDefaultProtectConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteAccountDefaultProtectConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteAccountDefaultProtectConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteConfigurationSet(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteConfigurationSet(context.Background(), nil, func(o *Options) { @@ -1069,6 +1261,18 @@ func TestUpdateSnapshot_DeleteKeyword(t *testing.T) { } } +func TestUpdateSnapshot_DeleteMediaMessageSpendLimitOverride(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteMediaMessageSpendLimitOverride(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteMediaMessageSpendLimitOverride") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteOptedOutNumber(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteOptedOutNumber(context.Background(), nil, func(o *Options) { @@ -1105,6 +1309,18 @@ func TestUpdateSnapshot_DeletePool(t *testing.T) { } } +func TestUpdateSnapshot_DeleteProtectConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteProtectConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteProtectConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteRegistration(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteRegistration(context.Background(), nil, func(o *Options) { @@ -1273,6 +1489,18 @@ func TestUpdateSnapshot_DescribePools(t *testing.T) { } } +func TestUpdateSnapshot_DescribeProtectConfigurations(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeProtectConfigurations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeProtectConfigurations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribeRegistrationAttachments(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeRegistrationAttachments(context.Background(), nil, func(o *Options) { @@ -1405,6 +1633,18 @@ func TestUpdateSnapshot_DisassociateOriginationIdentity(t *testing.T) { } } +func TestUpdateSnapshot_DisassociateProtectConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.DisassociateProtectConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DisassociateProtectConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DiscardRegistrationVersion(t *testing.T) { svc := New(Options{}) _, err := svc.DiscardRegistrationVersion(context.Background(), nil, func(o *Options) { @@ -1417,6 +1657,18 @@ func TestUpdateSnapshot_DiscardRegistrationVersion(t *testing.T) { } } +func TestUpdateSnapshot_GetProtectConfigurationCountryRuleSet(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetProtectConfigurationCountryRuleSet(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetProtectConfigurationCountryRuleSet") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListPoolOriginationIdentities(t *testing.T) { svc := New(Options{}) _, err := svc.ListPoolOriginationIdentities(context.Background(), nil, func(o *Options) { @@ -1549,6 +1801,18 @@ func TestUpdateSnapshot_SendDestinationNumberVerificationCode(t *testing.T) { } } +func TestUpdateSnapshot_SendMediaMessage(t *testing.T) { + svc := New(Options{}) + _, err := svc.SendMediaMessage(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "SendMediaMessage") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_SendTextMessage(t *testing.T) { svc := New(Options{}) _, err := svc.SendTextMessage(context.Background(), nil, func(o *Options) { @@ -1573,6 +1837,18 @@ func TestUpdateSnapshot_SendVoiceMessage(t *testing.T) { } } +func TestUpdateSnapshot_SetAccountDefaultProtectConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.SetAccountDefaultProtectConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "SetAccountDefaultProtectConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_SetDefaultMessageType(t *testing.T) { svc := New(Options{}) _, err := svc.SetDefaultMessageType(context.Background(), nil, func(o *Options) { @@ -1597,6 +1873,18 @@ func TestUpdateSnapshot_SetDefaultSenderId(t *testing.T) { } } +func TestUpdateSnapshot_SetMediaMessageSpendLimitOverride(t *testing.T) { + svc := New(Options{}) + _, err := svc.SetMediaMessageSpendLimitOverride(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "SetMediaMessageSpendLimitOverride") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_SetTextMessageSpendLimitOverride(t *testing.T) { svc := New(Options{}) _, err := svc.SetTextMessageSpendLimitOverride(context.Background(), nil, func(o *Options) { @@ -1693,6 +1981,30 @@ func TestUpdateSnapshot_UpdatePool(t *testing.T) { } } +func TestUpdateSnapshot_UpdateProtectConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateProtectConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateProtectConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_UpdateProtectConfigurationCountryRuleSet(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateProtectConfigurationCountryRuleSet(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateProtectConfigurationCountryRuleSet") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateSenderId(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateSenderId(context.Background(), nil, func(o *Options) { diff --git a/service/pinpointsmsvoicev2/types/enums.go b/service/pinpointsmsvoicev2/types/enums.go index 0033f1eaca1..3427b5ee74c 100644 --- a/service/pinpointsmsvoicev2/types/enums.go +++ b/service/pinpointsmsvoicev2/types/enums.go @@ -24,7 +24,8 @@ type AccountAttributeName string // Enum values for AccountAttributeName const ( - AccountAttributeNameAccountTier AccountAttributeName = "ACCOUNT_TIER" + AccountAttributeNameAccountTier AccountAttributeName = "ACCOUNT_TIER" + AccountAttributeNameDefaultProtectConfigurationId AccountAttributeName = "DEFAULT_PROTECT_CONFIGURATION_ID" ) // Values returns all known values for AccountAttributeName. Note that this can be @@ -33,6 +34,7 @@ const ( func (AccountAttributeName) Values() []AccountAttributeName { return []AccountAttributeName{ "ACCOUNT_TIER", + "DEFAULT_PROTECT_CONFIGURATION_ID", } } @@ -108,10 +110,11 @@ type ConfigurationSetFilterName string // Enum values for ConfigurationSetFilterName const ( - ConfigurationSetFilterNameEventDestinationName ConfigurationSetFilterName = "event-destination-name" - ConfigurationSetFilterNameMatchingEventTypes ConfigurationSetFilterName = "matching-event-types" - ConfigurationSetFilterNameDefaultMessageType ConfigurationSetFilterName = "default-message-type" - ConfigurationSetFilterNameDefaultSenderId ConfigurationSetFilterName = "default-sender-id" + ConfigurationSetFilterNameEventDestinationName ConfigurationSetFilterName = "event-destination-name" + ConfigurationSetFilterNameMatchingEventTypes ConfigurationSetFilterName = "matching-event-types" + ConfigurationSetFilterNameDefaultMessageType ConfigurationSetFilterName = "default-message-type" + ConfigurationSetFilterNameDefaultSenderId ConfigurationSetFilterName = "default-sender-id" + ConfigurationSetFilterNameProtectConfigurationId ConfigurationSetFilterName = "protect-configuration-id" ) // Values returns all known values for ConfigurationSetFilterName. Note that this @@ -123,6 +126,7 @@ func (ConfigurationSetFilterName) Values() []ConfigurationSetFilterName { "matching-event-types", "default-message-type", "default-sender-id", + "protect-configuration-id", } } @@ -130,37 +134,41 @@ type ConflictExceptionReason string // Enum values for ConflictExceptionReason const ( - ConflictExceptionReasonCreateRegistrationVersionNotAllowed ConflictExceptionReason = "CREATE_REGISTRATION_VERSION_NOT_ALLOWED" - ConflictExceptionReasonDeletionProtectionEnabled ConflictExceptionReason = "DELETION_PROTECTION_ENABLED" - ConflictExceptionReasonDestinationPhoneNumberNotVerified ConflictExceptionReason = "DESTINATION_PHONE_NUMBER_NOT_VERIFIED" - ConflictExceptionReasonDestinationPhoneNumberOptedOut ConflictExceptionReason = "DESTINATION_PHONE_NUMBER_OPTED_OUT" - ConflictExceptionReasonDisassociateRegistrationNotAllowed ConflictExceptionReason = "DISASSOCIATE_REGISTRATION_NOT_ALLOWED" - ConflictExceptionReasonDiscardRegistrationVersionNotAllowed ConflictExceptionReason = "DISCARD_REGISTRATION_VERSION_NOT_ALLOWED" - ConflictExceptionReasonEditRegistrationFieldValuesNotAllowed ConflictExceptionReason = "EDIT_REGISTRATION_FIELD_VALUES_NOT_ALLOWED" - ConflictExceptionReasonEventDestinationMismatch ConflictExceptionReason = "EVENT_DESTINATION_MISMATCH" - ConflictExceptionReasonKeywordMismatch ConflictExceptionReason = "KEYWORD_MISMATCH" - ConflictExceptionReasonLastPhoneNumber ConflictExceptionReason = "LAST_PHONE_NUMBER" - ConflictExceptionReasonNumberCapabilitiesMismatch ConflictExceptionReason = "NUMBER_CAPABILITIES_MISMATCH" - ConflictExceptionReasonMessageTypeMismatch ConflictExceptionReason = "MESSAGE_TYPE_MISMATCH" - ConflictExceptionReasonNoOriginationIdentitiesFound ConflictExceptionReason = "NO_ORIGINATION_IDENTITIES_FOUND" - ConflictExceptionReasonOptOutListMismatch ConflictExceptionReason = "OPT_OUT_LIST_MISMATCH" - ConflictExceptionReasonPhoneNumberAssociatedToPool ConflictExceptionReason = "PHONE_NUMBER_ASSOCIATED_TO_POOL" - ConflictExceptionReasonPhoneNumberAssociatedToRegistration ConflictExceptionReason = "PHONE_NUMBER_ASSOCIATED_TO_REGISTRATION" - ConflictExceptionReasonPhoneNumberNotAssociatedToPool ConflictExceptionReason = "PHONE_NUMBER_NOT_ASSOCIATED_TO_POOL" - ConflictExceptionReasonPhoneNumberNotInRegistrationRegion ConflictExceptionReason = "PHONE_NUMBER_NOT_IN_REGISTRATION_REGION" - ConflictExceptionReasonRegistrationAlreadySubmitted ConflictExceptionReason = "REGISTRATION_ALREADY_SUBMITTED" - ConflictExceptionReasonRegistrationNotComplete ConflictExceptionReason = "REGISTRATION_NOT_COMPLETE" - ConflictExceptionReasonSenderIdAssociatedToPool ConflictExceptionReason = "SENDER_ID_ASSOCIATED_TO_POOL" - ConflictExceptionReasonResourceAlreadyExists ConflictExceptionReason = "RESOURCE_ALREADY_EXISTS" - ConflictExceptionReasonResourceDeletionNotAllowed ConflictExceptionReason = "RESOURCE_DELETION_NOT_ALLOWED" - ConflictExceptionReasonResourceModificationNotAllowed ConflictExceptionReason = "RESOURCE_MODIFICATION_NOT_ALLOWED" - ConflictExceptionReasonResourceNotActive ConflictExceptionReason = "RESOURCE_NOT_ACTIVE" - ConflictExceptionReasonResourceNotEmpty ConflictExceptionReason = "RESOURCE_NOT_EMPTY" - ConflictExceptionReasonSelfManagedOptOutsMismatch ConflictExceptionReason = "SELF_MANAGED_OPT_OUTS_MISMATCH" - ConflictExceptionReasonSubmitRegistrationVersionNotAllowed ConflictExceptionReason = "SUBMIT_REGISTRATION_VERSION_NOT_ALLOWED" - ConflictExceptionReasonTwoWayConfigMismatch ConflictExceptionReason = "TWO_WAY_CONFIG_MISMATCH" - ConflictExceptionReasonVerificationCodeExpired ConflictExceptionReason = "VERIFICATION_CODE_EXPIRED" - ConflictExceptionReasonVerificationAlreadyComplete ConflictExceptionReason = "VERIFICATION_ALREADY_COMPLETE" + ConflictExceptionReasonCreateRegistrationVersionNotAllowed ConflictExceptionReason = "CREATE_REGISTRATION_VERSION_NOT_ALLOWED" + ConflictExceptionReasonDeletionProtectionEnabled ConflictExceptionReason = "DELETION_PROTECTION_ENABLED" + ConflictExceptionReasonDestinationPhoneNumberNotVerified ConflictExceptionReason = "DESTINATION_PHONE_NUMBER_NOT_VERIFIED" + ConflictExceptionReasonDestinationPhoneNumberOptedOut ConflictExceptionReason = "DESTINATION_PHONE_NUMBER_OPTED_OUT" + ConflictExceptionReasonDisassociateRegistrationNotAllowed ConflictExceptionReason = "DISASSOCIATE_REGISTRATION_NOT_ALLOWED" + ConflictExceptionReasonDiscardRegistrationVersionNotAllowed ConflictExceptionReason = "DISCARD_REGISTRATION_VERSION_NOT_ALLOWED" + ConflictExceptionReasonEditRegistrationFieldValuesNotAllowed ConflictExceptionReason = "EDIT_REGISTRATION_FIELD_VALUES_NOT_ALLOWED" + ConflictExceptionReasonEventDestinationMismatch ConflictExceptionReason = "EVENT_DESTINATION_MISMATCH" + ConflictExceptionReasonKeywordMismatch ConflictExceptionReason = "KEYWORD_MISMATCH" + ConflictExceptionReasonLastPhoneNumber ConflictExceptionReason = "LAST_PHONE_NUMBER" + ConflictExceptionReasonNumberCapabilitiesMismatch ConflictExceptionReason = "NUMBER_CAPABILITIES_MISMATCH" + ConflictExceptionReasonMessageTypeMismatch ConflictExceptionReason = "MESSAGE_TYPE_MISMATCH" + ConflictExceptionReasonNoOriginationIdentitiesFound ConflictExceptionReason = "NO_ORIGINATION_IDENTITIES_FOUND" + ConflictExceptionReasonOptOutListMismatch ConflictExceptionReason = "OPT_OUT_LIST_MISMATCH" + ConflictExceptionReasonPhoneNumberAssociatedToPool ConflictExceptionReason = "PHONE_NUMBER_ASSOCIATED_TO_POOL" + ConflictExceptionReasonPhoneNumberAssociatedToRegistration ConflictExceptionReason = "PHONE_NUMBER_ASSOCIATED_TO_REGISTRATION" + ConflictExceptionReasonPhoneNumberNotAssociatedToPool ConflictExceptionReason = "PHONE_NUMBER_NOT_ASSOCIATED_TO_POOL" + ConflictExceptionReasonPhoneNumberNotInRegistrationRegion ConflictExceptionReason = "PHONE_NUMBER_NOT_IN_REGISTRATION_REGION" + ConflictExceptionReasonRegistrationAlreadySubmitted ConflictExceptionReason = "REGISTRATION_ALREADY_SUBMITTED" + ConflictExceptionReasonRegistrationNotComplete ConflictExceptionReason = "REGISTRATION_NOT_COMPLETE" + ConflictExceptionReasonSenderIdAssociatedToPool ConflictExceptionReason = "SENDER_ID_ASSOCIATED_TO_POOL" + ConflictExceptionReasonResourceAlreadyExists ConflictExceptionReason = "RESOURCE_ALREADY_EXISTS" + ConflictExceptionReasonResourceDeletionNotAllowed ConflictExceptionReason = "RESOURCE_DELETION_NOT_ALLOWED" + ConflictExceptionReasonResourceModificationNotAllowed ConflictExceptionReason = "RESOURCE_MODIFICATION_NOT_ALLOWED" + ConflictExceptionReasonResourceNotActive ConflictExceptionReason = "RESOURCE_NOT_ACTIVE" + ConflictExceptionReasonResourceNotEmpty ConflictExceptionReason = "RESOURCE_NOT_EMPTY" + ConflictExceptionReasonSelfManagedOptOutsMismatch ConflictExceptionReason = "SELF_MANAGED_OPT_OUTS_MISMATCH" + ConflictExceptionReasonSubmitRegistrationVersionNotAllowed ConflictExceptionReason = "SUBMIT_REGISTRATION_VERSION_NOT_ALLOWED" + ConflictExceptionReasonTwoWayConfigMismatch ConflictExceptionReason = "TWO_WAY_CONFIG_MISMATCH" + ConflictExceptionReasonVerificationCodeExpired ConflictExceptionReason = "VERIFICATION_CODE_EXPIRED" + ConflictExceptionReasonVerificationAlreadyComplete ConflictExceptionReason = "VERIFICATION_ALREADY_COMPLETE" + ConflictExceptionReasonProtectConfigurationIsAccountDefault ConflictExceptionReason = "PROTECT_CONFIGURATION_IS_ACCOUNT_DEFAULT" + ConflictExceptionReasonProtectConfigurationAssociatedWithConfigurationSet ConflictExceptionReason = "PROTECT_CONFIGURATION_ASSOCIATED_WITH_CONFIGURATION_SET" + ConflictExceptionReasonProtectConfigurationNotAssociatedWithConfigurationSet ConflictExceptionReason = "PROTECT_CONFIGURATION_NOT_ASSOCIATED_WITH_CONFIGURATION_SET" + ConflictExceptionReasonDestinationCountryBlockedByProtectConfiguration ConflictExceptionReason = "DESTINATION_COUNTRY_BLOCKED_BY_PROTECT_CONFIGURATION" ) // Values returns all known values for ConflictExceptionReason. Note that this can @@ -199,6 +207,10 @@ func (ConflictExceptionReason) Values() []ConflictExceptionReason { "TWO_WAY_CONFIG_MISMATCH", "VERIFICATION_CODE_EXPIRED", "VERIFICATION_ALREADY_COMPLETE", + "PROTECT_CONFIGURATION_IS_ACCOUNT_DEFAULT", + "PROTECT_CONFIGURATION_ASSOCIATED_WITH_CONFIGURATION_SET", + "PROTECT_CONFIGURATION_NOT_ASSOCIATED_WITH_CONFIGURATION_SET", + "DESTINATION_COUNTRY_BLOCKED_BY_PROTECT_CONFIGURATION", } } @@ -225,31 +237,48 @@ type EventType string // Enum values for EventType const ( - EventTypeAll EventType = "ALL" - EventTypeTextAll EventType = "TEXT_ALL" - EventTypeTextSent EventType = "TEXT_SENT" - EventTypeTextPending EventType = "TEXT_PENDING" - EventTypeTextQueued EventType = "TEXT_QUEUED" - EventTypeTextSuccessful EventType = "TEXT_SUCCESSFUL" - EventTypeTextDelivered EventType = "TEXT_DELIVERED" - EventTypeTextInvalid EventType = "TEXT_INVALID" - EventTypeTextInvalidMessage EventType = "TEXT_INVALID_MESSAGE" - EventTypeTextUnreachable EventType = "TEXT_UNREACHABLE" - EventTypeTextCarrierUnreachable EventType = "TEXT_CARRIER_UNREACHABLE" - EventTypeTextBlocked EventType = "TEXT_BLOCKED" - EventTypeTextCarrierBlocked EventType = "TEXT_CARRIER_BLOCKED" - EventTypeTextSpam EventType = "TEXT_SPAM" - EventTypeTextUnknown EventType = "TEXT_UNKNOWN" - EventTypeTextTtlExpired EventType = "TEXT_TTL_EXPIRED" - EventTypeVoiceAll EventType = "VOICE_ALL" - EventTypeVoiceInitiated EventType = "VOICE_INITIATED" - EventTypeVoiceRinging EventType = "VOICE_RINGING" - EventTypeVoiceAnswered EventType = "VOICE_ANSWERED" - EventTypeVoiceCompleted EventType = "VOICE_COMPLETED" - EventTypeVoiceBusy EventType = "VOICE_BUSY" - EventTypeVoiceNoAnswer EventType = "VOICE_NO_ANSWER" - EventTypeVoiceFailed EventType = "VOICE_FAILED" - EventTypeVoiceTtlExpired EventType = "VOICE_TTL_EXPIRED" + EventTypeAll EventType = "ALL" + EventTypeTextAll EventType = "TEXT_ALL" + EventTypeTextSent EventType = "TEXT_SENT" + EventTypeTextPending EventType = "TEXT_PENDING" + EventTypeTextQueued EventType = "TEXT_QUEUED" + EventTypeTextSuccessful EventType = "TEXT_SUCCESSFUL" + EventTypeTextDelivered EventType = "TEXT_DELIVERED" + EventTypeTextInvalid EventType = "TEXT_INVALID" + EventTypeTextInvalidMessage EventType = "TEXT_INVALID_MESSAGE" + EventTypeTextUnreachable EventType = "TEXT_UNREACHABLE" + EventTypeTextCarrierUnreachable EventType = "TEXT_CARRIER_UNREACHABLE" + EventTypeTextBlocked EventType = "TEXT_BLOCKED" + EventTypeTextCarrierBlocked EventType = "TEXT_CARRIER_BLOCKED" + EventTypeTextSpam EventType = "TEXT_SPAM" + EventTypeTextUnknown EventType = "TEXT_UNKNOWN" + EventTypeTextTtlExpired EventType = "TEXT_TTL_EXPIRED" + EventTypeVoiceAll EventType = "VOICE_ALL" + EventTypeVoiceInitiated EventType = "VOICE_INITIATED" + EventTypeVoiceRinging EventType = "VOICE_RINGING" + EventTypeVoiceAnswered EventType = "VOICE_ANSWERED" + EventTypeVoiceCompleted EventType = "VOICE_COMPLETED" + EventTypeVoiceBusy EventType = "VOICE_BUSY" + EventTypeVoiceNoAnswer EventType = "VOICE_NO_ANSWER" + EventTypeVoiceFailed EventType = "VOICE_FAILED" + EventTypeVoiceTtlExpired EventType = "VOICE_TTL_EXPIRED" + EventTypeMediaAll EventType = "MEDIA_ALL" + EventTypeMediaPending EventType = "MEDIA_PENDING" + EventTypeMediaQueued EventType = "MEDIA_QUEUED" + EventTypeMediaSuccessful EventType = "MEDIA_SUCCESSFUL" + EventTypeMediaDelivered EventType = "MEDIA_DELIVERED" + EventTypeMediaInvalid EventType = "MEDIA_INVALID" + EventTypeMediaInvalidMessage EventType = "MEDIA_INVALID_MESSAGE" + EventTypeMediaUnreachable EventType = "MEDIA_UNREACHABLE" + EventTypeMediaCarrierUnreachable EventType = "MEDIA_CARRIER_UNREACHABLE" + EventTypeMediaBlocked EventType = "MEDIA_BLOCKED" + EventTypeMediaCarrierBlocked EventType = "MEDIA_CARRIER_BLOCKED" + EventTypeMediaSpam EventType = "MEDIA_SPAM" + EventTypeMediaUnknown EventType = "MEDIA_UNKNOWN" + EventTypeMediaTtlExpired EventType = "MEDIA_TTL_EXPIRED" + EventTypeMediaFileInaccessible EventType = "MEDIA_FILE_INACCESSIBLE" + EventTypeMediaFileTypeUnsupported EventType = "MEDIA_FILE_TYPE_UNSUPPORTED" + EventTypeMediaFileSizeExceeded EventType = "MEDIA_FILE_SIZE_EXCEEDED" ) // Values returns all known values for EventType. Note that this can be expanded @@ -282,6 +311,23 @@ func (EventType) Values() []EventType { "VOICE_NO_ANSWER", "VOICE_FAILED", "VOICE_TTL_EXPIRED", + "MEDIA_ALL", + "MEDIA_PENDING", + "MEDIA_QUEUED", + "MEDIA_SUCCESSFUL", + "MEDIA_DELIVERED", + "MEDIA_INVALID", + "MEDIA_INVALID_MESSAGE", + "MEDIA_UNREACHABLE", + "MEDIA_CARRIER_UNREACHABLE", + "MEDIA_BLOCKED", + "MEDIA_CARRIER_BLOCKED", + "MEDIA_SPAM", + "MEDIA_UNKNOWN", + "MEDIA_TTL_EXPIRED", + "MEDIA_FILE_INACCESSIBLE", + "MEDIA_FILE_TYPE_UNSUPPORTED", + "MEDIA_FILE_SIZE_EXCEEDED", } } @@ -425,6 +471,7 @@ type NumberCapability string const ( NumberCapabilitySms NumberCapability = "SMS" NumberCapabilityVoice NumberCapability = "VOICE" + NumberCapabilityMms NumberCapability = "MMS" ) // Values returns all known values for NumberCapability. Note that this can be @@ -434,6 +481,7 @@ func (NumberCapability) Values() []NumberCapability { return []NumberCapability{ "SMS", "VOICE", + "MMS", } } @@ -604,6 +652,43 @@ func (PoolStatus) Values() []PoolStatus { } } +type ProtectConfigurationFilterName string + +// Enum values for ProtectConfigurationFilterName +const ( + ProtectConfigurationFilterNameAccountDefault ProtectConfigurationFilterName = "account-default" + ProtectConfigurationFilterNameDeletionProtectionEnabled ProtectConfigurationFilterName = "deletion-protection-enabled" +) + +// Values returns all known values for ProtectConfigurationFilterName. 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 (ProtectConfigurationFilterName) Values() []ProtectConfigurationFilterName { + return []ProtectConfigurationFilterName{ + "account-default", + "deletion-protection-enabled", + } +} + +type ProtectStatus string + +// Enum values for ProtectStatus +const ( + ProtectStatusAllow ProtectStatus = "ALLOW" + ProtectStatusBlock ProtectStatus = "BLOCK" +) + +// Values returns all known values for ProtectStatus. 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 (ProtectStatus) Values() []ProtectStatus { + return []ProtectStatus{ + "ALLOW", + "BLOCK", + } +} + type RegistrationAssociationBehavior string // Enum values for RegistrationAssociationBehavior @@ -833,6 +918,7 @@ const ( ResourceTypeRegistration ResourceType = "registration" ResourceTypeRegistrationAttachment ResourceType = "registration-attachment" ResourceTypeVerifiedDestinationNumber ResourceType = "verified-destination-number" + ResourceTypeProtectConfiguration ResourceType = "protect-configuration" ) // Values returns all known values for ResourceType. Note that this can be @@ -852,6 +938,7 @@ func (ResourceType) Values() []ResourceType { "registration", "registration-attachment", "verified-destination-number", + "protect-configuration", } } @@ -889,6 +976,7 @@ const ( ServiceQuotaExceededExceptionReasonEventDestinationsPerConfigurationSet ServiceQuotaExceededExceptionReason = "EVENT_DESTINATIONS_PER_CONFIGURATION_SET" ServiceQuotaExceededExceptionReasonKeywordsPerPhoneNumber ServiceQuotaExceededExceptionReason = "KEYWORDS_PER_PHONE_NUMBER" ServiceQuotaExceededExceptionReasonKeywordsPerPool ServiceQuotaExceededExceptionReason = "KEYWORDS_PER_POOL" + ServiceQuotaExceededExceptionReasonMonthlySpendLimitReachedForMedia ServiceQuotaExceededExceptionReason = "MONTHLY_SPEND_LIMIT_REACHED_FOR_MEDIA" ServiceQuotaExceededExceptionReasonMonthlySpendLimitReachedForText ServiceQuotaExceededExceptionReason = "MONTHLY_SPEND_LIMIT_REACHED_FOR_TEXT" ServiceQuotaExceededExceptionReasonMonthlySpendLimitReachedForVoice ServiceQuotaExceededExceptionReason = "MONTHLY_SPEND_LIMIT_REACHED_FOR_VOICE" ServiceQuotaExceededExceptionReasonOptOutListsPerAccount ServiceQuotaExceededExceptionReason = "OPT_OUT_LISTS_PER_ACCOUNT" @@ -904,6 +992,7 @@ const ( ServiceQuotaExceededExceptionReasonTagsPerResource ServiceQuotaExceededExceptionReason = "TAGS_PER_RESOURCE" ServiceQuotaExceededExceptionReasonVerifiedDestinationNumbersPerAccount ServiceQuotaExceededExceptionReason = "VERIFIED_DESTINATION_NUMBERS_PER_ACCOUNT" ServiceQuotaExceededExceptionReasonVerificationAttemptsPerDay ServiceQuotaExceededExceptionReason = "VERIFICATION_ATTEMPTS_PER_DAY" + ServiceQuotaExceededExceptionReasonProtectConfigurationsPerAccount ServiceQuotaExceededExceptionReason = "PROTECT_CONFIGURATIONS_PER_ACCOUNT" ) // Values returns all known values for ServiceQuotaExceededExceptionReason. Note @@ -918,6 +1007,7 @@ func (ServiceQuotaExceededExceptionReason) Values() []ServiceQuotaExceededExcept "EVENT_DESTINATIONS_PER_CONFIGURATION_SET", "KEYWORDS_PER_PHONE_NUMBER", "KEYWORDS_PER_POOL", + "MONTHLY_SPEND_LIMIT_REACHED_FOR_MEDIA", "MONTHLY_SPEND_LIMIT_REACHED_FOR_TEXT", "MONTHLY_SPEND_LIMIT_REACHED_FOR_VOICE", "OPT_OUT_LISTS_PER_ACCOUNT", @@ -933,6 +1023,7 @@ func (ServiceQuotaExceededExceptionReason) Values() []ServiceQuotaExceededExcept "TAGS_PER_RESOURCE", "VERIFIED_DESTINATION_NUMBERS_PER_ACCOUNT", "VERIFICATION_ATTEMPTS_PER_DAY", + "PROTECT_CONFIGURATIONS_PER_ACCOUNT", } } @@ -942,6 +1033,7 @@ type SpendLimitName string const ( SpendLimitNameTextMessageMonthlySpendLimit SpendLimitName = "TEXT_MESSAGE_MONTHLY_SPEND_LIMIT" SpendLimitNameVoiceMessageMonthlySpendLimit SpendLimitName = "VOICE_MESSAGE_MONTHLY_SPEND_LIMIT" + SpendLimitNameMediaMessageMonthlySpendLimit SpendLimitName = "MEDIA_MESSAGE_MONTHLY_SPEND_LIMIT" ) // Values returns all known values for SpendLimitName. Note that this can be @@ -951,6 +1043,7 @@ func (SpendLimitName) Values() []SpendLimitName { return []SpendLimitName{ "TEXT_MESSAGE_MONTHLY_SPEND_LIMIT", "VOICE_MESSAGE_MONTHLY_SPEND_LIMIT", + "MEDIA_MESSAGE_MONTHLY_SPEND_LIMIT", } } @@ -972,6 +1065,7 @@ const ( ValidationExceptionReasonInvalidRequest ValidationExceptionReason = "INVALID_REQUEST" ValidationExceptionReasonInvalidRegistrationAssociation ValidationExceptionReason = "INVALID_REGISTRATION_ASSOCIATION" ValidationExceptionReasonMaximumSizeExceeded ValidationExceptionReason = "MAXIMUM_SIZE_EXCEEDED" + ValidationExceptionReasonMediaTypeNotSupported ValidationExceptionReason = "MEDIA_TYPE_NOT_SUPPORTED" ValidationExceptionReasonMissingParameter ValidationExceptionReason = "MISSING_PARAMETER" ValidationExceptionReasonParametersCannotBeUsedTogether ValidationExceptionReason = "PARAMETERS_CANNOT_BE_USED_TOGETHER" ValidationExceptionReasonPhoneNumberCannotBeOptedIn ValidationExceptionReason = "PHONE_NUMBER_CANNOT_BE_OPTED_IN" @@ -1017,6 +1111,7 @@ func (ValidationExceptionReason) Values() []ValidationExceptionReason { "INVALID_REQUEST", "INVALID_REGISTRATION_ASSOCIATION", "MAXIMUM_SIZE_EXCEEDED", + "MEDIA_TYPE_NOT_SUPPORTED", "MISSING_PARAMETER", "PARAMETERS_CANNOT_BE_USED_TOGETHER", "PHONE_NUMBER_CANNOT_BE_OPTED_IN", diff --git a/service/pinpointsmsvoicev2/types/types.go b/service/pinpointsmsvoicev2/types/types.go index 499a38294cf..4b8fdebad95 100644 --- a/service/pinpointsmsvoicev2/types/types.go +++ b/service/pinpointsmsvoicev2/types/types.go @@ -48,8 +48,8 @@ type AccountLimit struct { // events. type CloudWatchLogsDestination struct { - // The Amazon Resource Name (ARN) of an Amazon Identity and Access Management - // (IAM) role that is able to write event data to an Amazon CloudWatch destination. + // The Amazon Resource Name (ARN) of an Identity and Access Management role that + // is able to write event data to an Amazon CloudWatch destination. // // This member is required. IamRoleArn *string @@ -112,12 +112,15 @@ type ConfigurationSetInformation struct { // The default sender ID used by the ConfigurationSet. DefaultSenderId *string + // The unique identifier for the protect configuration. + ProtectConfigurationId *string + noSmithyDocumentSerde } // Contains information about an event destination. Event destinations are // associated with configuration sets, which enable you to publish message sending -// events to CloudWatch, Kinesis Data Firehose,or Amazon SNS. +// events to CloudWatch, Kinesis Data Firehose, or Amazon SNS. type EventDestination struct { // When set to true events will be logged. @@ -189,7 +192,7 @@ type KeywordInformation struct { } // Contains the delivery stream Amazon Resource Name (ARN), and the ARN of the -// Identity and Access Management (IAM) role associated with an Kinesis Data +// Identity and Access Management (IAM) role associated with a Kinesis Data // Firehose event destination. Event destinations, such as Kinesis Data Firehose, // are associated with configuration sets, which enable you to publish message // sending events. @@ -200,8 +203,8 @@ type KinesisFirehoseDestination struct { // This member is required. DeliveryStreamArn *string - // The ARN of an Amazon Identity and Access Management (IAM) role that is able to - // write event data to an Amazon Firehose destination. + // The ARN of an Identity and Access Management role that is able to write event + // data to an Amazon Kinesis Data Firehose destination. // // This member is required. IamRoleArn *string @@ -523,6 +526,68 @@ type PoolOriginationIdentitiesFilter struct { noSmithyDocumentSerde } +// The types of statuses that can be used. +type ProtectConfigurationCountryRuleSetInformation struct { + + // The types of protection that can be used. + // + // This member is required. + ProtectStatus ProtectStatus + + noSmithyDocumentSerde +} + +// The filter definition for filtering protect configurations that meet a +// specified criteria. +type ProtectConfigurationFilter struct { + + // The name of the attribute to filter on. + // + // This member is required. + Name ProtectConfigurationFilterName + + // An array of values to filter for. + // + // This member is required. + Values []string + + noSmithyDocumentSerde +} + +// Provides information on the specified protect configuration. +type ProtectConfigurationInformation struct { + + // This is true if the protect configuration is set as your account default + // protect configuration. + // + // This member is required. + AccountDefault bool + + // The time when the protect configuration was created, in UNIX epoch time (https://www.epochconverter.com/) + // format. + // + // This member is required. + CreatedTimestamp *time.Time + + // The status of deletion protection for the protect configuration. When set to + // true deletion protection is enabled. By default this is set to false. + // + // This member is required. + DeletionProtectionEnabled bool + + // The Amazon Resource Name (ARN) of the protect configuration. + // + // This member is required. + ProtectConfigurationArn *string + + // The unique identifier for the protect configuration. + // + // This member is required. + ProtectConfigurationId *string + + noSmithyDocumentSerde +} + // The filter definition for filtering registrations that meets a specified // criteria. type RegistrationAssociationFilter struct { diff --git a/service/pinpointsmsvoicev2/validators.go b/service/pinpointsmsvoicev2/validators.go index 52744a5110a..47806359f83 100644 --- a/service/pinpointsmsvoicev2/validators.go +++ b/service/pinpointsmsvoicev2/validators.go @@ -30,6 +30,26 @@ func (m *validateOpAssociateOriginationIdentity) HandleInitialize(ctx context.Co return next.HandleInitialize(ctx, in) } +type validateOpAssociateProtectConfiguration struct { +} + +func (*validateOpAssociateProtectConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssociateProtectConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssociateProtectConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssociateProtectConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateConfigurationSet struct { } @@ -110,6 +130,26 @@ func (m *validateOpCreatePool) HandleInitialize(ctx context.Context, in middlewa return next.HandleInitialize(ctx, in) } +type validateOpCreateProtectConfiguration struct { +} + +func (*validateOpCreateProtectConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateProtectConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateProtectConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateProtectConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateRegistrationAssociation struct { } @@ -370,6 +410,26 @@ func (m *validateOpDeletePool) HandleInitialize(ctx context.Context, in middlewa return next.HandleInitialize(ctx, in) } +type validateOpDeleteProtectConfiguration struct { +} + +func (*validateOpDeleteProtectConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteProtectConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteProtectConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteProtectConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteRegistrationAttachment struct { } @@ -550,6 +610,26 @@ func (m *validateOpDescribePools) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpDescribeProtectConfigurations struct { +} + +func (*validateOpDescribeProtectConfigurations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeProtectConfigurations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeProtectConfigurationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeProtectConfigurationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeRegistrationAttachments struct { } @@ -750,6 +830,26 @@ func (m *validateOpDisassociateOriginationIdentity) HandleInitialize(ctx context return next.HandleInitialize(ctx, in) } +type validateOpDisassociateProtectConfiguration struct { +} + +func (*validateOpDisassociateProtectConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDisassociateProtectConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DisassociateProtectConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDisassociateProtectConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDiscardRegistrationVersion struct { } @@ -770,6 +870,26 @@ func (m *validateOpDiscardRegistrationVersion) HandleInitialize(ctx context.Cont return next.HandleInitialize(ctx, in) } +type validateOpGetProtectConfigurationCountryRuleSet struct { +} + +func (*validateOpGetProtectConfigurationCountryRuleSet) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetProtectConfigurationCountryRuleSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetProtectConfigurationCountryRuleSetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetProtectConfigurationCountryRuleSetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListPoolOriginationIdentities struct { } @@ -990,6 +1110,26 @@ func (m *validateOpSendDestinationNumberVerificationCode) HandleInitialize(ctx c return next.HandleInitialize(ctx, in) } +type validateOpSendMediaMessage struct { +} + +func (*validateOpSendMediaMessage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSendMediaMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SendMediaMessageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSendMediaMessageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpSendTextMessage struct { } @@ -1030,6 +1170,26 @@ func (m *validateOpSendVoiceMessage) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpSetAccountDefaultProtectConfiguration struct { +} + +func (*validateOpSetAccountDefaultProtectConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSetAccountDefaultProtectConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SetAccountDefaultProtectConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSetAccountDefaultProtectConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpSetDefaultMessageType struct { } @@ -1070,6 +1230,26 @@ func (m *validateOpSetDefaultSenderId) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpSetMediaMessageSpendLimitOverride struct { +} + +func (*validateOpSetMediaMessageSpendLimitOverride) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSetMediaMessageSpendLimitOverride) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SetMediaMessageSpendLimitOverrideInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSetMediaMessageSpendLimitOverrideInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpSetTextMessageSpendLimitOverride struct { } @@ -1230,6 +1410,46 @@ func (m *validateOpUpdatePool) HandleInitialize(ctx context.Context, in middlewa return next.HandleInitialize(ctx, in) } +type validateOpUpdateProtectConfigurationCountryRuleSet struct { +} + +func (*validateOpUpdateProtectConfigurationCountryRuleSet) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateProtectConfigurationCountryRuleSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateProtectConfigurationCountryRuleSetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateProtectConfigurationCountryRuleSetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateProtectConfiguration struct { +} + +func (*validateOpUpdateProtectConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateProtectConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateProtectConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateProtectConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateSenderId struct { } @@ -1274,6 +1494,10 @@ func addOpAssociateOriginationIdentityValidationMiddleware(stack *middleware.Sta return stack.Initialize.Add(&validateOpAssociateOriginationIdentity{}, middleware.After) } +func addOpAssociateProtectConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateProtectConfiguration{}, middleware.After) +} + func addOpCreateConfigurationSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateConfigurationSet{}, middleware.After) } @@ -1290,6 +1514,10 @@ func addOpCreatePoolValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreatePool{}, middleware.After) } +func addOpCreateProtectConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateProtectConfiguration{}, middleware.After) +} + func addOpCreateRegistrationAssociationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateRegistrationAssociation{}, middleware.After) } @@ -1342,6 +1570,10 @@ func addOpDeletePoolValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeletePool{}, middleware.After) } +func addOpDeleteProtectConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteProtectConfiguration{}, middleware.After) +} + func addOpDeleteRegistrationAttachmentValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteRegistrationAttachment{}, middleware.After) } @@ -1378,6 +1610,10 @@ func addOpDescribePoolsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribePools{}, middleware.After) } +func addOpDescribeProtectConfigurationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeProtectConfigurations{}, middleware.After) +} + func addOpDescribeRegistrationAttachmentsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeRegistrationAttachments{}, middleware.After) } @@ -1418,10 +1654,18 @@ func addOpDisassociateOriginationIdentityValidationMiddleware(stack *middleware. return stack.Initialize.Add(&validateOpDisassociateOriginationIdentity{}, middleware.After) } +func addOpDisassociateProtectConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateProtectConfiguration{}, middleware.After) +} + func addOpDiscardRegistrationVersionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDiscardRegistrationVersion{}, middleware.After) } +func addOpGetProtectConfigurationCountryRuleSetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetProtectConfigurationCountryRuleSet{}, middleware.After) +} + func addOpListPoolOriginationIdentitiesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListPoolOriginationIdentities{}, middleware.After) } @@ -1466,6 +1710,10 @@ func addOpSendDestinationNumberVerificationCodeValidationMiddleware(stack *middl return stack.Initialize.Add(&validateOpSendDestinationNumberVerificationCode{}, middleware.After) } +func addOpSendMediaMessageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSendMediaMessage{}, middleware.After) +} + func addOpSendTextMessageValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSendTextMessage{}, middleware.After) } @@ -1474,6 +1722,10 @@ func addOpSendVoiceMessageValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSendVoiceMessage{}, middleware.After) } +func addOpSetAccountDefaultProtectConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSetAccountDefaultProtectConfiguration{}, middleware.After) +} + func addOpSetDefaultMessageTypeValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSetDefaultMessageType{}, middleware.After) } @@ -1482,6 +1734,10 @@ func addOpSetDefaultSenderIdValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpSetDefaultSenderId{}, middleware.After) } +func addOpSetMediaMessageSpendLimitOverrideValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSetMediaMessageSpendLimitOverride{}, middleware.After) +} + func addOpSetTextMessageSpendLimitOverrideValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSetTextMessageSpendLimitOverride{}, middleware.After) } @@ -1514,6 +1770,14 @@ func addOpUpdatePoolValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdatePool{}, middleware.After) } +func addOpUpdateProtectConfigurationCountryRuleSetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateProtectConfigurationCountryRuleSet{}, middleware.After) +} + +func addOpUpdateProtectConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateProtectConfiguration{}, middleware.After) +} + func addOpUpdateSenderIdValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateSenderId{}, middleware.After) } @@ -1785,6 +2049,74 @@ func validatePoolOriginationIdentitiesFilterList(v []types.PoolOriginationIdenti } } +func validateProtectConfigurationCountryRuleSet(v map[string]types.ProtectConfigurationCountryRuleSetInformation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ProtectConfigurationCountryRuleSet"} + for key := range v { + value := v[key] + if err := validateProtectConfigurationCountryRuleSetInformation(&value); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%q]", key), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateProtectConfigurationCountryRuleSetInformation(v *types.ProtectConfigurationCountryRuleSetInformation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ProtectConfigurationCountryRuleSetInformation"} + if len(v.ProtectStatus) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ProtectStatus")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateProtectConfigurationFilter(v *types.ProtectConfigurationFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ProtectConfigurationFilter"} + if len(v.Name) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateProtectConfigurationFilterList(v []types.ProtectConfigurationFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ProtectConfigurationFilterList"} + for i := range v { + if err := validateProtectConfigurationFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateRegistrationAssociationFilter(v *types.RegistrationAssociationFilter) error { if v == nil { return nil @@ -2136,6 +2468,24 @@ func validateOpAssociateOriginationIdentityInput(v *AssociateOriginationIdentity } } +func validateOpAssociateProtectConfigurationInput(v *AssociateProtectConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateProtectConfigurationInput"} + if v.ProtectConfigurationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProtectConfigurationId")) + } + if v.ConfigurationSetName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConfigurationSetName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateConfigurationSetInput(v *CreateConfigurationSetInput) error { if v == nil { return nil @@ -2238,6 +2588,23 @@ func validateOpCreatePoolInput(v *CreatePoolInput) error { } } +func validateOpCreateProtectConfigurationInput(v *CreateProtectConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateProtectConfigurationInput"} + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateRegistrationAssociationInput(v *CreateRegistrationAssociationInput) error { if v == nil { return nil @@ -2457,6 +2824,21 @@ func validateOpDeletePoolInput(v *DeletePoolInput) error { } } +func validateOpDeleteProtectConfigurationInput(v *DeleteProtectConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteProtectConfigurationInput"} + if v.ProtectConfigurationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProtectConfigurationId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteRegistrationAttachmentInput(v *DeleteRegistrationAttachmentInput) error { if v == nil { return nil @@ -2611,6 +2993,23 @@ func validateOpDescribePoolsInput(v *DescribePoolsInput) error { } } +func validateOpDescribeProtectConfigurationsInput(v *DescribeProtectConfigurationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeProtectConfigurationsInput"} + if v.Filters != nil { + if err := validateProtectConfigurationFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeRegistrationAttachmentsInput(v *DescribeRegistrationAttachmentsInput) error { if v == nil { return nil @@ -2787,6 +3186,24 @@ func validateOpDisassociateOriginationIdentityInput(v *DisassociateOriginationId } } +func validateOpDisassociateProtectConfigurationInput(v *DisassociateProtectConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DisassociateProtectConfigurationInput"} + if v.ProtectConfigurationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProtectConfigurationId")) + } + if v.ConfigurationSetName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConfigurationSetName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDiscardRegistrationVersionInput(v *DiscardRegistrationVersionInput) error { if v == nil { return nil @@ -2802,6 +3219,24 @@ func validateOpDiscardRegistrationVersionInput(v *DiscardRegistrationVersionInpu } } +func validateOpGetProtectConfigurationCountryRuleSetInput(v *GetProtectConfigurationCountryRuleSetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetProtectConfigurationCountryRuleSetInput"} + if v.ProtectConfigurationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProtectConfigurationId")) + } + if len(v.NumberCapability) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("NumberCapability")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListPoolOriginationIdentitiesInput(v *ListPoolOriginationIdentitiesInput) error { if v == nil { return nil @@ -3017,6 +3452,24 @@ func validateOpSendDestinationNumberVerificationCodeInput(v *SendDestinationNumb } } +func validateOpSendMediaMessageInput(v *SendMediaMessageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SendMediaMessageInput"} + if v.DestinationPhoneNumber == nil { + invalidParams.Add(smithy.NewErrParamRequired("DestinationPhoneNumber")) + } + if v.OriginationIdentity == nil { + invalidParams.Add(smithy.NewErrParamRequired("OriginationIdentity")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpSendTextMessageInput(v *SendTextMessageInput) error { if v == nil { return nil @@ -3050,6 +3503,21 @@ func validateOpSendVoiceMessageInput(v *SendVoiceMessageInput) error { } } +func validateOpSetAccountDefaultProtectConfigurationInput(v *SetAccountDefaultProtectConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SetAccountDefaultProtectConfigurationInput"} + if v.ProtectConfigurationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProtectConfigurationId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpSetDefaultMessageTypeInput(v *SetDefaultMessageTypeInput) error { if v == nil { return nil @@ -3086,6 +3554,21 @@ func validateOpSetDefaultSenderIdInput(v *SetDefaultSenderIdInput) error { } } +func validateOpSetMediaMessageSpendLimitOverrideInput(v *SetMediaMessageSpendLimitOverrideInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SetMediaMessageSpendLimitOverrideInput"} + if v.MonthlyLimit == nil { + invalidParams.Add(smithy.NewErrParamRequired("MonthlyLimit")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpSetTextMessageSpendLimitOverrideInput(v *SetTextMessageSpendLimitOverrideInput) error { if v == nil { return nil @@ -3234,6 +3717,46 @@ func validateOpUpdatePoolInput(v *UpdatePoolInput) error { } } +func validateOpUpdateProtectConfigurationCountryRuleSetInput(v *UpdateProtectConfigurationCountryRuleSetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateProtectConfigurationCountryRuleSetInput"} + if v.ProtectConfigurationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProtectConfigurationId")) + } + if len(v.NumberCapability) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("NumberCapability")) + } + if v.CountryRuleSetUpdates == nil { + invalidParams.Add(smithy.NewErrParamRequired("CountryRuleSetUpdates")) + } else if v.CountryRuleSetUpdates != nil { + if err := validateProtectConfigurationCountryRuleSet(v.CountryRuleSetUpdates); err != nil { + invalidParams.AddNested("CountryRuleSetUpdates", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateProtectConfigurationInput(v *UpdateProtectConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateProtectConfigurationInput"} + if v.ProtectConfigurationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProtectConfigurationId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateSenderIdInput(v *UpdateSenderIdInput) error { if v == nil { return nil diff --git a/service/qbusiness/api_client.go b/service/qbusiness/api_client.go index 12582e18ea5..8e93c7c073a 100644 --- a/service/qbusiness/api_client.go +++ b/service/qbusiness/api_client.go @@ -93,6 +93,8 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf fn(&options) } + setSafeEventStreamClientLogMode(&options, opID) + finalizeOperationRetryMaxAttempts(&options, *c) finalizeClientEndpointResolverOptions(&options) diff --git a/service/qbusiness/api_op_Chat.go b/service/qbusiness/api_op_Chat.go new file mode 100644 index 00000000000..adf924458fc --- /dev/null +++ b/service/qbusiness/api_op_Chat.go @@ -0,0 +1,341 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package qbusiness + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi" + "github.com/aws/aws-sdk-go-v2/service/qbusiness/types" + "github.com/aws/smithy-go/middleware" + smithysync "github.com/aws/smithy-go/sync" + smithyhttp "github.com/aws/smithy-go/transport/http" + "sync" + "time" +) + +// Starts or continues a streaming Amazon Q Business conversation. +func (c *Client) Chat(ctx context.Context, params *ChatInput, optFns ...func(*Options)) (*ChatOutput, error) { + if params == nil { + params = &ChatInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "Chat", params, optFns, c.addOperationChatMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ChatOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ChatInput struct { + + // The identifier of the Amazon Q Business application linked to a streaming + // Amazon Q Business conversation. + // + // This member is required. + ApplicationId *string + + // A token that you provide to identify the chat input. + ClientToken *string + + // The identifier of the Amazon Q Business conversation. + ConversationId *string + + // The identifier used to associate a user message with a AI generated response. + ParentMessageId *string + + // The groups that a user associated with the chat input belongs to. + UserGroups []string + + // The identifier of the user attached to the chat input. + UserId *string + + noSmithyDocumentSerde +} + +type ChatOutput struct { + eventStream *ChatEventStream + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +// GetStream returns the type to interact with the event stream. +func (o *ChatOutput) GetStream() *ChatEventStream { + return o.eventStream +} + +func (c *Client) addOperationChatMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpChat{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpChat{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "Chat"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addEventStreamChatMiddleware(stack, options); err != nil { + return err + } + if err = smithyhttp.AddRequireMinimumProtocol(stack, 2, 0); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addStreamingEventsPayload(stack); err != nil { + return err + } + if err = addContentSHA256Header(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = eventstreamapi.AddInitializeStreamWriter(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opChatMiddleware(stack, options); err != nil { + return err + } + if err = addOpChatValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opChat(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpChat struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpChat) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpChat) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*ChatInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *ChatInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opChatMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpChat{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opChat(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "Chat", + } +} + +// ChatEventStream provides the event stream handling for the Chat operation. +// +// For testing and mocking the event stream this type should be initialized via +// the NewChatEventStream constructor function. Using the functional options +// to pass in nested mock behavior. +type ChatEventStream struct { + // ChatInputStreamWriter is the EventStream writer for the ChatInputStream events. + // This value is automatically set by the SDK when the API call is made Use this + // member when unit testing your code with the SDK to mock out the EventStream + // Writer. + // + // Must not be nil. + Writer ChatInputStreamWriter + + // ChatOutputStreamReader is the EventStream reader for the ChatOutputStream + // events. This value is automatically set by the SDK when the API call is made Use + // this member when unit testing your code with the SDK to mock out the EventStream + // Reader. + // + // Must not be nil. + Reader ChatOutputStreamReader + + done chan struct{} + closeOnce sync.Once + err *smithysync.OnceErr +} + +// NewChatEventStream initializes an ChatEventStream. +// This function should only be used for testing and mocking the ChatEventStream +// stream within your application. +// +// The Writer member must be set before writing events to the stream. +// +// The Reader member must be set before reading events from the stream. +func NewChatEventStream(optFns ...func(*ChatEventStream)) *ChatEventStream { + es := &ChatEventStream{ + done: make(chan struct{}), + err: smithysync.NewOnceErr(), + } + for _, fn := range optFns { + fn(es) + } + return es +} + +// Send writes the event to the stream blocking until the event is written. +// Returns an error if the event was not written. +func (es *ChatEventStream) Send(ctx context.Context, event types.ChatInputStream) error { + return es.Writer.Send(ctx, event) +} + +// Events returns a channel to read events from. +func (es *ChatEventStream) Events() <-chan types.ChatOutputStream { + return es.Reader.Events() +} + +// Close closes the stream. This will also cause the stream to be closed. +// Close must be called when done using the stream API. Not calling Close +// may result in resource leaks. +// +// Will close the underlying EventStream writer and reader, and no more events can be +// sent or received. +func (es *ChatEventStream) Close() error { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *ChatEventStream) safeClose() { + close(es.done) + + t := time.NewTicker(time.Second) + defer t.Stop() + writeCloseDone := make(chan error) + go func() { + if err := es.Writer.Close(); err != nil { + es.err.SetError(err) + } + close(writeCloseDone) + }() + select { + case <-t.C: + case <-writeCloseDone: + } + + es.Reader.Close() +} + +// Err returns any error that occurred while reading or writing EventStream Events +// from the service API's response. Returns nil if there were no errors. +func (es *ChatEventStream) Err() error { + if err := es.err.Err(); err != nil { + return err + } + + if err := es.Writer.Err(); err != nil { + return err + } + + if err := es.Reader.Err(); err != nil { + return err + } + + return nil +} + +func (es *ChatEventStream) waitStreamClose() { + type errorSet interface { + ErrorSet() <-chan struct{} + } + + var inputErrCh <-chan struct{} + if v, ok := es.Writer.(errorSet); ok { + inputErrCh = v.ErrorSet() + } + + var outputErrCh <-chan struct{} + if v, ok := es.Reader.(errorSet); ok { + outputErrCh = v.ErrorSet() + } + var outputClosedCh <-chan struct{} + if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok { + outputClosedCh = v.Closed() + } + + select { + case <-es.done: + case <-inputErrCh: + es.err.SetError(es.Writer.Err()) + es.Close() + + case <-outputErrCh: + es.err.SetError(es.Reader.Err()) + es.Close() + + case <-outputClosedCh: + if err := es.Reader.Err(); err != nil { + es.err.SetError(es.Reader.Err()) + } + es.Close() + + } +} diff --git a/service/qbusiness/api_op_ChatSync.go b/service/qbusiness/api_op_ChatSync.go index 6ad3e04da1c..06144d3f32e 100644 --- a/service/qbusiness/api_op_ChatSync.go +++ b/service/qbusiness/api_op_ChatSync.go @@ -46,7 +46,11 @@ type ChatSyncInput struct { // document attributes or metadata fields. AttributeFilter *types.AttributeFilter - // The chat modes available in an Amazon Q Business web experience. + // An authentication verification event response by a third party authentication + // server to Amazon Q Business. + AuthChallengeResponse *types.AuthChallengeResponse + + // The chat modes available to an Amazon Q Business end user. // - RETRIEVAL_MODE - The default chat mode for an Amazon Q Business application. // When this mode is enabled, Amazon Q Business generates responses only from data // sources connected to an Amazon Q Business application. @@ -91,6 +95,10 @@ type ChatSyncOutput struct { // Business needs to successfully complete a requested plugin action. ActionReview *types.ActionReview + // An authentication verification event activated by an end user request to use a + // custom plugin. + AuthChallengeRequest *types.AuthChallengeRequest + // The identifier of the Amazon Q Business conversation. ConversationId *string diff --git a/service/qbusiness/api_op_CreateApplication.go b/service/qbusiness/api_op_CreateApplication.go index eabec5e0d18..2af532b111b 100644 --- a/service/qbusiness/api_op_CreateApplication.go +++ b/service/qbusiness/api_op_CreateApplication.go @@ -11,7 +11,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates an Amazon Q Business application. +// Creates an Amazon Q Business application. There are new tiers for Amazon Q +// Business. Not all features in Amazon Q Business Pro are also available in Amazon +// Q Business Lite. For information on what's included in Amazon Q Business Lite +// and what's included in Amazon Q Business Pro, see Amazon Q Business tiers (https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/what-is.html#tiers) +// . You must use the Amazon Q Business console to assign subscription tiers to +// users. func (c *Client) CreateApplication(ctx context.Context, params *CreateApplicationInput, optFns ...func(*Options)) (*CreateApplicationOutput, error) { if params == nil { params = &CreateApplicationInput{} @@ -34,12 +39,6 @@ type CreateApplicationInput struct { // This member is required. DisplayName *string - // The Amazon Resource Name (ARN) of an IAM role with permissions to access your - // Amazon CloudWatch logs and metrics. - // - // This member is required. - RoleArn *string - // An option to allow end users to upload files directly during chat. AttachmentsConfiguration *types.AttachmentsConfiguration @@ -58,6 +57,10 @@ type CreateApplicationInput struct { // either creating for—or connecting to—your Amazon Q Business application. IdentityCenterInstanceArn *string + // The Amazon Resource Name (ARN) of an IAM role with permissions to access your + // Amazon CloudWatch logs and metrics. + RoleArn *string + // A list of key-value pairs that identify or categorize your Amazon Q Business // application. You can also use tags to help control access to the application. // Tag keys and values can consist of Unicode letters, digits, white space, and any diff --git a/service/qbusiness/api_op_CreateIndex.go b/service/qbusiness/api_op_CreateIndex.go index 30f6553a9b2..29c1478aaed 100644 --- a/service/qbusiness/api_op_CreateIndex.go +++ b/service/qbusiness/api_op_CreateIndex.go @@ -62,6 +62,11 @@ type CreateIndexInput struct { // = + - @. Tags []types.Tag + // The index type that's suitable for your needs. For more information on what's + // included in each type of index or index tier, see Amazon Q Business tiers (https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/what-is.html#tiers) + // . + Type types.IndexType + noSmithyDocumentSerde } diff --git a/service/qbusiness/api_op_CreatePlugin.go b/service/qbusiness/api_op_CreatePlugin.go index 7afa6d8ef7a..38757d10869 100644 --- a/service/qbusiness/api_op_CreatePlugin.go +++ b/service/qbusiness/api_op_CreatePlugin.go @@ -44,11 +44,6 @@ type CreatePluginInput struct { // This member is required. DisplayName *string - // The source URL used for plugin configuration. - // - // This member is required. - ServerUrl *string - // The type of plugin you want to create. // // This member is required. @@ -58,6 +53,12 @@ type CreatePluginInput struct { // Business plugin. ClientToken *string + // Contains configuration for a custom plugin. + CustomPluginConfiguration *types.CustomPluginConfiguration + + // The source URL used for plugin configuration. + ServerUrl *string + // A list of key-value pairs that identify or categorize the data source // connector. You can also use tags to help control access to the data source // connector. Tag keys and values can consist of Unicode letters, digits, white @@ -69,6 +70,9 @@ type CreatePluginInput struct { type CreatePluginOutput struct { + // The current status of a plugin. A plugin is modified asynchronously. + BuildStatus types.PluginBuildStatus + // The Amazon Resource Name (ARN) of a plugin. PluginArn *string diff --git a/service/qbusiness/api_op_GetIndex.go b/service/qbusiness/api_op_GetIndex.go index 2bec659abda..aba543c7394 100644 --- a/service/qbusiness/api_op_GetIndex.go +++ b/service/qbusiness/api_op_GetIndex.go @@ -85,6 +85,9 @@ type GetIndexOutput struct { // a message that explains why. Status types.IndexStatus + // The type of index attached to your Amazon Q Business application. + Type types.IndexType + // The Unix timestamp when the Amazon Q Business index was last updated. UpdatedAt *time.Time diff --git a/service/qbusiness/api_op_GetPlugin.go b/service/qbusiness/api_op_GetPlugin.go index 3947a32b7a6..a930d5b0eae 100644 --- a/service/qbusiness/api_op_GetPlugin.go +++ b/service/qbusiness/api_op_GetPlugin.go @@ -51,9 +51,15 @@ type GetPluginOutput struct { // Authentication configuration information for an Amazon Q Business plugin. AuthConfiguration types.PluginAuthConfiguration + // The current status of a plugin. A plugin is modified asynchronously. + BuildStatus types.PluginBuildStatus + // The timestamp for when the plugin was created. CreatedAt *time.Time + // Configuration information required to create a custom plugin. + CustomPluginConfiguration *types.CustomPluginConfiguration + // The name of the plugin. DisplayName *string diff --git a/service/qbusiness/api_op_GetWebExperience.go b/service/qbusiness/api_op_GetWebExperience.go index bc4dfec136a..06cd0620de0 100644 --- a/service/qbusiness/api_op_GetWebExperience.go +++ b/service/qbusiness/api_op_GetWebExperience.go @@ -52,9 +52,12 @@ type GetWebExperienceOutput struct { // The authentication configuration information for your Amazon Q Business web // experience. + // + // Deprecated: Property associated with legacy SAML IdP flow. Deprecated in favor + // of using AWS IAM Identity Center for user management. AuthenticationConfiguration types.WebExperienceAuthConfiguration - // The Unix timestamp when the retriever was created. + // The Unix timestamp when the Amazon Q Business web experience was last created. CreatedAt *time.Time // The endpoint of your Amazon Q Business web experience. @@ -83,7 +86,7 @@ type GetWebExperienceOutput struct { // The title for your Amazon Q Business web experience. Title *string - // The Unix timestamp when the data source connector was last updated. + // The Unix timestamp when the Amazon Q Business web experience was last updated. UpdatedAt *time.Time // The Amazon Resource Name (ARN) of the role with the permission to access the diff --git a/service/qbusiness/api_op_UpdateApplication.go b/service/qbusiness/api_op_UpdateApplication.go index fa2e2854098..6d03ed43d4b 100644 --- a/service/qbusiness/api_op_UpdateApplication.go +++ b/service/qbusiness/api_op_UpdateApplication.go @@ -43,6 +43,10 @@ type UpdateApplicationInput struct { // A name for the Amazon Q Business application. DisplayName *string + // The Amazon Resource Name (ARN) of the IAM Identity Center instance you are + // either creating for—or connecting to—your Amazon Q Business application. + IdentityCenterInstanceArn *string + // An Amazon Web Services Identity and Access Management (IAM) role that gives // Amazon Q Business permission to access Amazon CloudWatch logs and metrics. RoleArn *string diff --git a/service/qbusiness/api_op_UpdatePlugin.go b/service/qbusiness/api_op_UpdatePlugin.go index c58c002e8ce..065748a1e48 100644 --- a/service/qbusiness/api_op_UpdatePlugin.go +++ b/service/qbusiness/api_op_UpdatePlugin.go @@ -42,6 +42,9 @@ type UpdatePluginInput struct { // The authentication configuration the plugin is using. AuthConfiguration types.PluginAuthConfiguration + // The configuration for a custom plugin. + CustomPluginConfiguration *types.CustomPluginConfiguration + // The name of the plugin. DisplayName *string diff --git a/service/qbusiness/api_op_UpdateWebExperience.go b/service/qbusiness/api_op_UpdateWebExperience.go index 4d718d63c90..7359e35870b 100644 --- a/service/qbusiness/api_op_UpdateWebExperience.go +++ b/service/qbusiness/api_op_UpdateWebExperience.go @@ -41,8 +41,15 @@ type UpdateWebExperienceInput struct { WebExperienceId *string // The authentication configuration of the Amazon Q Business web experience. + // + // Deprecated: Property associated with legacy SAML IdP flow. Deprecated in favor + // of using AWS IAM Identity Center for user management. AuthenticationConfiguration types.WebExperienceAuthConfiguration + // The Amazon Resource Name (ARN) of the role with permission to access the Amazon + // Q Business web experience and required resources. + RoleArn *string + // Determines whether sample prompts are enabled in the web experience for an end // user. SamplePromptsControlMode types.WebExperienceSamplePromptsControlMode diff --git a/service/qbusiness/deserializers.go b/service/qbusiness/deserializers.go index c3fbe1d9adb..81a8d995dbf 100644 --- a/service/qbusiness/deserializers.go +++ b/service/qbusiness/deserializers.go @@ -7,6 +7,8 @@ import ( "context" "encoding/json" "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream" + "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/qbusiness/document" internaldocument "github.com/aws/aws-sdk-go-v2/service/qbusiness/internal/document" @@ -350,6 +352,107 @@ func awsRestjson1_deserializeOpDocumentBatchPutDocumentOutput(v **BatchPutDocume return nil } +type awsRestjson1_deserializeOpChat struct { +} + +func (*awsRestjson1_deserializeOpChat) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpChat) HandleDeserialize(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_deserializeOpErrorChat(response, &metadata) + } + output := &ChatOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorChat(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("LicenseNotFoundException", errorCode): + return awsRestjson1_deserializeErrorLicenseNotFoundException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpChatSync struct { } @@ -506,6 +609,11 @@ func awsRestjson1_deserializeOpDocumentChatSyncOutput(v **ChatSyncOutput, value return err } + case "authChallengeRequest": + if err := awsRestjson1_deserializeDocumentAuthChallengeRequest(&sv.AuthChallengeRequest, value); err != nil { + return err + } + case "conversationId": if value != nil { jtv, ok := value.(string) @@ -1246,6 +1354,15 @@ func awsRestjson1_deserializeOpDocumentCreatePluginOutput(v **CreatePluginOutput for key, value := range shape { switch key { + case "buildStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PluginBuildStatus to be of type string, got %T instead", value) + } + sv.BuildStatus = types.PluginBuildStatus(jtv) + } + case "pluginArn": if value != nil { jtv, ok := value.(string) @@ -3856,6 +3973,15 @@ func awsRestjson1_deserializeOpDocumentGetIndexOutput(v **GetIndexOutput, value sv.Status = types.IndexStatus(jtv) } + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IndexType to be of type string, got %T instead", value) + } + sv.Type = types.IndexType(jtv) + } + case "updatedAt": if value != nil { switch jtv := value.(type) { @@ -4040,6 +4166,15 @@ func awsRestjson1_deserializeOpDocumentGetPluginOutput(v **GetPluginOutput, valu return err } + case "buildStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PluginBuildStatus to be of type string, got %T instead", value) + } + sv.BuildStatus = types.PluginBuildStatus(jtv) + } + case "createdAt": if value != nil { switch jtv := value.(type) { @@ -4056,6 +4191,11 @@ func awsRestjson1_deserializeOpDocumentGetPluginOutput(v **GetPluginOutput, valu } } + case "customPluginConfiguration": + if err := awsRestjson1_deserializeDocumentCustomPluginConfiguration(&sv.CustomPluginConfiguration, value); err != nil { + return err + } + case "displayName": if value != nil { jtv, ok := value.(string) @@ -8379,12 +8519,116 @@ func awsRestjson1_deserializeOpErrorUpdateWebExperience(response *smithyhttp.Res } } -func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AccessDeniedException{} +func awsRestjson1_deserializeEventStreamChatOutputStream(v *types.ChatOutputStream, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + eventType := msg.Headers.Get(eventstreamapi.EventTypeHeader) + if eventType == nil { + return fmt.Errorf("%s event header not present", eventstreamapi.EventTypeHeader) + } + + switch { + case strings.EqualFold("actionReviewEvent", eventType.String()): + vv := &types.ChatOutputStreamMemberActionReviewEvent{} + if err := awsRestjson1_deserializeEventMessageActionReviewEvent(&vv.Value, msg); err != nil { + return err + } + *v = vv + return nil + + case strings.EqualFold("authChallengeRequestEvent", eventType.String()): + vv := &types.ChatOutputStreamMemberAuthChallengeRequestEvent{} + if err := awsRestjson1_deserializeEventMessageAuthChallengeRequestEvent(&vv.Value, msg); err != nil { + return err + } + *v = vv + return nil + + case strings.EqualFold("failedAttachmentEvent", eventType.String()): + vv := &types.ChatOutputStreamMemberFailedAttachmentEvent{} + if err := awsRestjson1_deserializeEventMessageFailedAttachmentEvent(&vv.Value, msg); err != nil { + return err + } + *v = vv + return nil + + case strings.EqualFold("metadataEvent", eventType.String()): + vv := &types.ChatOutputStreamMemberMetadataEvent{} + if err := awsRestjson1_deserializeEventMessageMetadataEvent(&vv.Value, msg); err != nil { + return err + } + *v = vv + return nil + + case strings.EqualFold("textEvent", eventType.String()): + vv := &types.ChatOutputStreamMemberTextEvent{} + if err := awsRestjson1_deserializeEventMessageTextOutputEvent(&vv.Value, msg); err != nil { + return err + } + *v = vv + return nil + + default: + buffer := bytes.NewBuffer(nil) + eventstream.NewEncoder().Encode(buffer, *msg) + *v = &types.UnknownUnionMember{ + Tag: eventType.String(), + Value: buffer.Bytes(), + } + return nil + + } +} + +func awsRestjson1_deserializeEventStreamExceptionChatOutputStream(msg *eventstream.Message) error { + exceptionType := msg.Headers.Get(eventstreamapi.ExceptionTypeHeader) + if exceptionType == nil { + return fmt.Errorf("%s event header not present", eventstreamapi.ExceptionTypeHeader) + } + + switch { + default: + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(br, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + return err + } + errorCode := "UnknownError" + errorMessage := errorCode + if ev := exceptionType.String(); len(ev) > 0 { + errorCode = ev + } else if ev := code; len(ev) > 0 { + errorCode = ev + } + if ev := message; len(ev) > 0 { + errorMessage = ev + } + return &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + + } +} + +func awsRestjson1_deserializeEventMessageTextOutputEvent(v *types.TextOutputEvent, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + br := bytes.NewReader(msg.Payload) var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(br, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -8398,29 +8642,31 @@ func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Res return err } - err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + if err := awsRestjson1_deserializeDocumentTextOutputEvent(&v, shape); err != nil { + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err } - return err - } - - errorBody.Seek(0, io.SeekStart) - return output + } + return nil } -func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ConflictException{} +func awsRestjson1_deserializeEventMessageMetadataEvent(v *types.MetadataEvent, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + br := bytes.NewReader(msg.Payload) var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(br, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -8434,29 +8680,31 @@ func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Respons return err } - err := awsRestjson1_deserializeDocumentConflictException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + if err := awsRestjson1_deserializeDocumentMetadataEvent(&v, shape); err != nil { + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err } - return err - } - - errorBody.Seek(0, io.SeekStart) - return output + } + return nil } -func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InternalServerException{} +func awsRestjson1_deserializeEventMessageActionReviewEvent(v *types.ActionReviewEvent, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + br := bytes.NewReader(msg.Payload) var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(br, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -8470,9 +8718,35 @@ func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.R return err } - err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + if err := awsRestjson1_deserializeDocumentActionReviewEvent(&v, shape); err != nil { + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } - if err != nil { + } + return nil +} + +func awsRestjson1_deserializeEventMessageFailedAttachmentEvent(v *types.FailedAttachmentEvent, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(br, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -8482,17 +8756,31 @@ func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.R return err } - errorBody.Seek(0, io.SeekStart) + if err := awsRestjson1_deserializeDocumentFailedAttachmentEvent(&v, shape); err != nil { + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } - return output + } + return nil } -func awsRestjson1_deserializeErrorLicenseNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.LicenseNotFoundException{} +func awsRestjson1_deserializeEventMessageAuthChallengeRequestEvent(v *types.AuthChallengeRequestEvent, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + br := bytes.NewReader(msg.Payload) var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(br, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -8506,7 +8794,1061 @@ func awsRestjson1_deserializeErrorLicenseNotFoundException(response *smithyhttp. return err } - err := awsRestjson1_deserializeDocumentLicenseNotFoundException(&output, shape) + if err := awsRestjson1_deserializeDocumentAuthChallengeRequestEvent(&v, shape); err != nil { + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + } + return nil +} + +func awsRestjson1_deserializeDocumentActionPayloadFieldValue(v *document.Interface, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + *v = internaldocument.NewDocumentUnmarshaler(value) + return nil +} + +func awsRestjson1_deserializeDocumentActionReviewEvent(v **types.ActionReviewEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ActionReviewEvent + if *v == nil { + sv = &types.ActionReviewEvent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "conversationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConversationId to be of type string, got %T instead", value) + } + sv.ConversationId = ptr.String(jtv) + } + + case "payload": + if err := awsRestjson1_deserializeDocumentActionReviewPayload(&sv.Payload, value); err != nil { + return err + } + + case "payloadFieldNameSeparator": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActionPayloadFieldNameSeparator to be of type string, got %T instead", value) + } + sv.PayloadFieldNameSeparator = ptr.String(jtv) + } + + case "pluginId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PluginId to be of type string, got %T instead", value) + } + sv.PluginId = ptr.String(jtv) + } + + case "pluginType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PluginType to be of type string, got %T instead", value) + } + sv.PluginType = types.PluginType(jtv) + } + + case "systemMessageId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageId to be of type string, got %T instead", value) + } + sv.SystemMessageId = ptr.String(jtv) + } + + case "userMessageId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageId to be of type string, got %T instead", value) + } + sv.UserMessageId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentActionReviewPayload(v *map[string]types.ActionReviewPayloadField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %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]types.ActionReviewPayloadField + if *v == nil { + mv = map[string]types.ActionReviewPayloadField{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.ActionReviewPayloadField + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentActionReviewPayloadField(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentActionReviewPayloadField(v **types.ActionReviewPayloadField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ActionReviewPayloadField + if *v == nil { + sv = &types.ActionReviewPayloadField{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "allowedFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AllowedFormat = ptr.String(jtv) + } + + case "allowedValues": + if err := awsRestjson1_deserializeDocumentActionReviewPayloadFieldAllowedValues(&sv.AllowedValues, value); err != nil { + return err + } + + case "displayDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DisplayDescription = ptr.String(jtv) + } + + case "displayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "displayOrder": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DisplayOrder = ptr.Int32(int32(i64)) + } + + case "required": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Required = ptr.Bool(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActionPayloadFieldType to be of type string, got %T instead", value) + } + sv.Type = types.ActionPayloadFieldType(jtv) + } + + case "value": + if err := awsRestjson1_deserializeDocumentActionPayloadFieldValue(&sv.Value, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentActionReviewPayloadFieldAllowedValue(v **types.ActionReviewPayloadFieldAllowedValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ActionReviewPayloadFieldAllowedValue + if *v == nil { + sv = &types.ActionReviewPayloadFieldAllowedValue{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "displayValue": + if err := awsRestjson1_deserializeDocumentActionPayloadFieldValue(&sv.DisplayValue, value); err != nil { + return err + } + + case "value": + if err := awsRestjson1_deserializeDocumentActionPayloadFieldValue(&sv.Value, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentActionReviewPayloadFieldAllowedValues(v *[]types.ActionReviewPayloadFieldAllowedValue, 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.ActionReviewPayloadFieldAllowedValue + if *v == nil { + cv = []types.ActionReviewPayloadFieldAllowedValue{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ActionReviewPayloadFieldAllowedValue + destAddr := &col + if err := awsRestjson1_deserializeDocumentActionReviewPayloadFieldAllowedValue(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAttachmentOutput(v **types.AttachmentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.AttachmentOutput + if *v == nil { + sv = &types.AttachmentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "error": + if err := awsRestjson1_deserializeDocumentErrorDetail(&sv.Error, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttachmentName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttachmentStatus to be of type string, got %T instead", value) + } + sv.Status = types.AttachmentStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAuthChallengeRequestEvent(v **types.AuthChallengeRequestEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.AuthChallengeRequestEvent + if *v == nil { + sv = &types.AuthChallengeRequestEvent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "authorizationUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + sv.AuthorizationUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentErrorDetail(v **types.ErrorDetail, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ErrorDetail + if *v == nil { + sv = &types.ErrorDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode = types.ErrorCode(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFailedAttachmentEvent(v **types.FailedAttachmentEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.FailedAttachmentEvent + if *v == nil { + sv = &types.FailedAttachmentEvent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "attachment": + if err := awsRestjson1_deserializeDocumentAttachmentOutput(&sv.Attachment, value); err != nil { + return err + } + + case "conversationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConversationId to be of type string, got %T instead", value) + } + sv.ConversationId = ptr.String(jtv) + } + + case "systemMessageId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageId to be of type string, got %T instead", value) + } + sv.SystemMessageId = ptr.String(jtv) + } + + case "userMessageId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageId to be of type string, got %T instead", value) + } + sv.UserMessageId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMetadataEvent(v **types.MetadataEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.MetadataEvent + if *v == nil { + sv = &types.MetadataEvent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "conversationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConversationId to be of type string, got %T instead", value) + } + sv.ConversationId = ptr.String(jtv) + } + + case "finalTextMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FinalTextMessage = ptr.String(jtv) + } + + case "sourceAttributions": + if err := awsRestjson1_deserializeDocumentSourceAttributions(&sv.SourceAttributions, value); err != nil { + return err + } + + case "systemMessageId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageId to be of type string, got %T instead", value) + } + sv.SystemMessageId = ptr.String(jtv) + } + + case "userMessageId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageId to be of type string, got %T instead", value) + } + sv.UserMessageId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSnippetExcerpt(v **types.SnippetExcerpt, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.SnippetExcerpt + if *v == nil { + sv = &types.SnippetExcerpt{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "text": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SnippetExcerptText to be of type string, got %T instead", value) + } + sv.Text = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSourceAttribution(v **types.SourceAttribution, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.SourceAttribution + if *v == nil { + sv = &types.SourceAttribution{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "citationNumber": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CitationNumber = ptr.Int32(int32(i64)) + } + + case "snippet": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Snippet = ptr.String(jtv) + } + + case "textMessageSegments": + if err := awsRestjson1_deserializeDocumentTextSegmentList(&sv.TextMessageSegments, value); err != nil { + return err + } + + case "title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + case "updatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "url": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Url = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSourceAttributions(v *[]*types.SourceAttribution, 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.SourceAttribution + if *v == nil { + cv = []*types.SourceAttribution{} + } else { + cv = *v + } + + for _, value := range shape { + var col *types.SourceAttribution + if err := awsRestjson1_deserializeDocumentSourceAttribution(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentTextOutputEvent(v **types.TextOutputEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.TextOutputEvent + if *v == nil { + sv = &types.TextOutputEvent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "conversationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConversationId to be of type string, got %T instead", value) + } + sv.ConversationId = ptr.String(jtv) + } + + case "systemMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SystemMessage = ptr.String(jtv) + } + + case "systemMessageId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageId to be of type string, got %T instead", value) + } + sv.SystemMessageId = ptr.String(jtv) + } + + case "userMessageId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageId to be of type string, got %T instead", value) + } + sv.UserMessageId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTextSegment(v **types.TextSegment, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.TextSegment + if *v == nil { + sv = &types.TextSegment{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "beginOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BeginOffset = ptr.Int32(int32(i64)) + } + + case "endOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.EndOffset = ptr.Int32(int32(i64)) + } + + case "snippetExcerpt": + if err := awsRestjson1_deserializeDocumentSnippetExcerpt(&sv.SnippetExcerpt, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTextSegmentList(v *[]types.TextSegment, 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.TextSegment + if *v == nil { + cv = []types.TextSegment{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.TextSegment + destAddr := &col + if err := awsRestjson1_deserializeDocumentTextSegment(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorLicenseNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.LicenseNotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentLicenseNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -8832,14 +10174,6 @@ func awsRestjson1_deserializeDocumentActionExecutionPayloadField(v **types.Actio return nil } -func awsRestjson1_deserializeDocumentActionPayloadFieldValue(v *document.Interface, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - *v = internaldocument.NewDocumentUnmarshaler(value) - return nil -} - func awsRestjson1_deserializeDocumentActionReview(v **types.ActionReview, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8903,7 +10237,7 @@ func awsRestjson1_deserializeDocumentActionReview(v **types.ActionReview, value return nil } -func awsRestjson1_deserializeDocumentActionReviewPayload(v *map[string]types.ActionReviewPayloadField, value interface{}) error { +func awsRestjson1_deserializeDocumentAPISchema(v *types.APISchema, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8916,181 +10250,42 @@ func awsRestjson1_deserializeDocumentActionReviewPayload(v *map[string]types.Act return fmt.Errorf("unexpected JSON type %v", value) } - var mv map[string]types.ActionReviewPayloadField - if *v == nil { - mv = map[string]types.ActionReviewPayloadField{} - } else { - mv = *v - } - + var uv types.APISchema +loop: for key, value := range shape { - var parsedVal types.ActionReviewPayloadField - mapVar := parsedVal - destAddr := &mapVar - if err := awsRestjson1_deserializeDocumentActionReviewPayloadField(&destAddr, value); err != nil { - return err + if value == nil { + continue } - parsedVal = *destAddr - mv[key] = parsedVal - - } - *v = mv - return nil -} - -func awsRestjson1_deserializeDocumentActionReviewPayloadField(v **types.ActionReviewPayloadField, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.ActionReviewPayloadField - if *v == nil { - sv = &types.ActionReviewPayloadField{} - } else { - sv = *v - } - - for key, value := range shape { switch key { - case "allowedValues": - if err := awsRestjson1_deserializeDocumentActionReviewPayloadFieldAllowedValues(&sv.AllowedValues, value); err != nil { - return err - } - - case "displayName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.DisplayName = ptr.String(jtv) - } - - case "displayOrder": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.DisplayOrder = ptr.Int32(int32(i64)) - } - - case "required": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.Required = ptr.Bool(jtv) - } - - case "type": + case "payload": + var mv string if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ActionPayloadFieldType to be of type string, got %T instead", value) + return fmt.Errorf("expected Payload to be of type string, got %T instead", value) } - sv.Type = types.ActionPayloadFieldType(jtv) - } - - case "value": - if err := awsRestjson1_deserializeDocumentActionPayloadFieldValue(&sv.Value, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentActionReviewPayloadFieldAllowedValue(v **types.ActionReviewPayloadFieldAllowedValue, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.ActionReviewPayloadFieldAllowedValue - if *v == nil { - sv = &types.ActionReviewPayloadFieldAllowedValue{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "displayValue": - if err := awsRestjson1_deserializeDocumentActionPayloadFieldValue(&sv.DisplayValue, value); err != nil { - return err + mv = jtv } + uv = &types.APISchemaMemberPayload{Value: mv} + break loop - case "value": - if err := awsRestjson1_deserializeDocumentActionPayloadFieldValue(&sv.Value, value); err != nil { + case "s3": + var mv types.S3 + destAddr := &mv + if err := awsRestjson1_deserializeDocumentS3(&destAddr, value); err != nil { return err } + mv = *destAddr + uv = &types.APISchemaMemberS3{Value: mv} + break loop default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentActionReviewPayloadFieldAllowedValues(v *[]types.ActionReviewPayloadFieldAllowedValue, 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.ActionReviewPayloadFieldAllowedValue - if *v == nil { - cv = []types.ActionReviewPayloadFieldAllowedValue{} - } else { - cv = *v - } + uv = &types.UnknownUnionMember{Tag: key} + break loop - for _, value := range shape { - var col types.ActionReviewPayloadFieldAllowedValue - destAddr := &col - if err := awsRestjson1_deserializeDocumentActionReviewPayloadFieldAllowedValue(&destAddr, value); err != nil { - return err } - col = *destAddr - cv = append(cv, col) - } - *v = cv + *v = uv return nil } @@ -9298,7 +10493,7 @@ func awsRestjson1_deserializeDocumentAppliedCreatorModeConfiguration(v **types.A return nil } -func awsRestjson1_deserializeDocumentAttachmentOutput(v **types.AttachmentOutput, value interface{}) error { +func awsRestjson1_deserializeDocumentAttachmentsOutput(v *[]types.AttachmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9306,53 +10501,33 @@ func awsRestjson1_deserializeDocumentAttachmentOutput(v **types.AttachmentOutput 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.AttachmentOutput + var cv []types.AttachmentOutput if *v == nil { - sv = &types.AttachmentOutput{} + cv = []types.AttachmentOutput{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "error": - if err := awsRestjson1_deserializeDocumentErrorDetail(&sv.Error, value); err != nil { - return err - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AttachmentName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AttachmentStatus to be of type string, got %T instead", value) - } - sv.Status = types.AttachmentStatus(jtv) - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.AttachmentOutput + destAddr := &col + if err := awsRestjson1_deserializeDocumentAttachmentOutput(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsRestjson1_deserializeDocumentAttachmentsOutput(v *[]types.AttachmentOutput, value interface{}) error { +func awsRestjson1_deserializeDocumentAuthChallengeRequest(v **types.AuthChallengeRequest, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9360,29 +10535,35 @@ func awsRestjson1_deserializeDocumentAttachmentsOutput(v *[]types.AttachmentOutp 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.AttachmentOutput + var sv *types.AuthChallengeRequest if *v == nil { - cv = []types.AttachmentOutput{} + sv = &types.AuthChallengeRequest{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.AttachmentOutput - destAddr := &col - if err := awsRestjson1_deserializeDocumentAttachmentOutput(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "authorizationUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + sv.AuthorizationUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } @@ -9749,6 +10930,60 @@ func awsRestjson1_deserializeDocumentConversations(v *[]types.Conversation, valu return nil } +func awsRestjson1_deserializeDocumentCustomPluginConfiguration(v **types.CustomPluginConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CustomPluginConfiguration + if *v == nil { + sv = &types.CustomPluginConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "apiSchema": + if err := awsRestjson1_deserializeDocumentAPISchema(&sv.ApiSchema, value); err != nil { + return err + } + + case "apiSchemaType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected APISchemaType to be of type string, got %T instead", value) + } + sv.ApiSchemaType = types.APISchemaType(jtv) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PluginDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentDataSource(v **types.DataSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10378,7 +11613,7 @@ func awsRestjson1_deserializeDocumentDocumentAttributeConfiguration(v **types.Do if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected DocumentMetadataConfigurationName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } @@ -10908,55 +12143,6 @@ func awsRestjson1_deserializeDocumentEncryptionConfiguration(v **types.Encryptio return nil } -func awsRestjson1_deserializeDocumentErrorDetail(v **types.ErrorDetail, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.ErrorDetail - if *v == nil { - sv = &types.ErrorDetail{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "errorCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) - } - sv.ErrorCode = types.ErrorCode(jtv) - } - - case "errorMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.ErrorMessage = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - func awsRestjson1_deserializeDocumentExampleChatMessages(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11894,6 +13080,37 @@ func awsRestjson1_deserializeDocumentNativeIndexConfiguration(v **types.NativeIn return nil } +func awsRestjson1_deserializeDocumentNoAuthConfiguration(v **types.NoAuthConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.NoAuthConfiguration + if *v == nil { + sv = &types.NoAuthConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentNumberAttributeBoostingConfiguration(v **types.NumberAttributeBoostingConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12014,6 +13231,15 @@ func awsRestjson1_deserializeDocumentPlugin(v **types.Plugin, value interface{}) for key, value := range shape { switch key { + case "buildStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PluginBuildStatus to be of type string, got %T instead", value) + } + sv.BuildStatus = types.PluginBuildStatus(jtv) + } + case "createdAt": if value != nil { switch jtv := value.(type) { @@ -12130,6 +13356,16 @@ loop: uv = &types.PluginAuthConfigurationMemberBasicAuthConfiguration{Value: mv} break loop + case "noAuthConfiguration": + var mv types.NoAuthConfiguration + destAddr := &mv + if err := awsRestjson1_deserializeDocumentNoAuthConfiguration(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.PluginAuthConfigurationMemberNoAuthConfiguration{Value: mv} + break loop + case "oAuth2ClientCredentialConfiguration": var mv types.OAuth2ClientCredentialConfiguration destAddr := &mv @@ -12501,13 +13737,47 @@ loop: uv = &types.UnknownUnionMember{Tag: key} break loop - } + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentRules(v *[]types.Rule, 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.Rule + if *v == nil { + cv = []types.Rule{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Rule + destAddr := &col + if err := awsRestjson1_deserializeDocumentRule(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + } - *v = uv + *v = cv return nil } -func awsRestjson1_deserializeDocumentRules(v *[]types.Rule, value interface{}) error { +func awsRestjson1_deserializeDocumentS3(v **types.S3, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12515,29 +13785,44 @@ func awsRestjson1_deserializeDocumentRules(v *[]types.Rule, value interface{}) e 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.Rule + var sv *types.S3 if *v == nil { - cv = []types.Rule{} + sv = &types.S3{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.Rule - destAddr := &col - if err := awsRestjson1_deserializeDocumentRule(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "bucket": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3BucketName to be of type string, got %T instead", value) + } + sv.Bucket = ptr.String(jtv) + } + + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3ObjectKey to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } @@ -12702,130 +13987,6 @@ func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.Ser return nil } -func awsRestjson1_deserializeDocumentSourceAttribution(v **types.SourceAttribution, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.SourceAttribution - if *v == nil { - sv = &types.SourceAttribution{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "citationNumber": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.CitationNumber = ptr.Int32(int32(i64)) - } - - case "snippet": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Snippet = ptr.String(jtv) - } - - case "textMessageSegments": - if err := awsRestjson1_deserializeDocumentTextSegmentList(&sv.TextMessageSegments, value); err != nil { - return err - } - - case "title": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Title = ptr.String(jtv) - } - - case "updatedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "url": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Url = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentSourceAttributions(v *[]*types.SourceAttribution, 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.SourceAttribution - if *v == nil { - cv = []*types.SourceAttribution{} - } else { - cv = *v - } - - for _, value := range shape { - var col *types.SourceAttribution - if err := awsRestjson1_deserializeDocumentSourceAttribution(&col, value); err != nil { - return err - } - cv = append(cv, col) - - } - *v = cv - return nil -} - func awsRestjson1_deserializeDocumentStringAttributeBoostingConfiguration(v **types.StringAttributeBoostingConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13123,97 +14284,6 @@ func awsRestjson1_deserializeDocumentTextDocumentStatistics(v **types.TextDocume return nil } -func awsRestjson1_deserializeDocumentTextSegment(v **types.TextSegment, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.TextSegment - if *v == nil { - sv = &types.TextSegment{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "beginOffset": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.BeginOffset = ptr.Int32(int32(i64)) - } - - case "endOffset": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.EndOffset = ptr.Int32(int32(i64)) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentTextSegmentList(v *[]types.TextSegment, 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.TextSegment - if *v == nil { - cv = []types.TextSegment{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.TextSegment - destAddr := &col - if err := awsRestjson1_deserializeDocumentTextSegment(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/qbusiness/doc.go b/service/qbusiness/doc.go index 5b25318756d..3994781875d 100644 --- a/service/qbusiness/doc.go +++ b/service/qbusiness/doc.go @@ -3,15 +3,14 @@ // Package qbusiness provides the API client, operations, and parameter types for // QBusiness. // -// Amazon Q is in preview release and is subject to change. This is the Amazon Q -// Business API Reference. Amazon Q Business is a fully managed, generative-AI -// powered enterprise chat assistant that you can deploy within your organization. -// Amazon Q Business enhances employee productivity by supporting key tasks such as -// question-answering, knowledge discovery, writing email messages, summarizing -// text, drafting document outlines, and brainstorming ideas. Users ask questions -// of Amazon Q Business and get answers that are presented in a conversational -// manner. For an introduction to the service, see the Amazon Q Business User -// Guide (https://docs.aws.amazon.com/amazonq/latest/business-use-dg/what-is.html) +// This is the Amazon Q Business API Reference. Amazon Q Business is a fully +// managed, generative-AI powered enterprise chat assistant that you can deploy +// within your organization. Amazon Q Business enhances employee productivity by +// supporting key tasks such as question-answering, knowledge discovery, writing +// email messages, summarizing text, drafting document outlines, and brainstorming +// ideas. Users ask questions of Amazon Q Business and get answers that are +// presented in a conversational manner. For an introduction to the service, see +// the Amazon Q Business User Guide (https://docs.aws.amazon.com/amazonq/latest/business-use-dg/what-is.html) // . For an overview of the Amazon Q Business APIs, see Overview of Amazon Q // Business API operations (https://docs.aws.amazon.com/amazonq/latest/business-use-dg/api-ref.html#api-overview) // . For information about the IAM access control permissions you need to use this diff --git a/service/qbusiness/eventstream.go b/service/qbusiness/eventstream.go new file mode 100644 index 00000000000..e00f0c2929a --- /dev/null +++ b/service/qbusiness/eventstream.go @@ -0,0 +1,561 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package qbusiness + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream" + "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" + "github.com/aws/aws-sdk-go-v2/service/qbusiness/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" + smithysync "github.com/aws/smithy-go/sync" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "io/ioutil" + "sync" + "time" +) + +// ChatInputStreamWriter provides the interface for writing events to a stream. +// +// The writer's Close method must allow multiple concurrent calls. +type ChatInputStreamWriter interface { + Send(context.Context, types.ChatInputStream) error + Close() error + Err() error +} + +// ChatOutputStreamReader provides the interface for reading events from a stream. +// +// The writer's Close method must allow multiple concurrent calls. +type ChatOutputStreamReader interface { + Events() <-chan types.ChatOutputStream + Close() error + Err() error +} + +type eventStreamSigner interface { + GetSignature(ctx context.Context, headers, payload []byte, signingTime time.Time, optFns ...func(*v4.StreamSignerOptions)) ([]byte, error) +} + +type asyncChatInputStream struct { + Event types.ChatInputStream + Result chan<- error +} + +func (e asyncChatInputStream) ReportResult(cancel <-chan struct{}, err error) bool { + select { + case e.Result <- err: + return true + + case <-cancel: + return false + + } +} + +type chatInputStreamWriter struct { + encoder *eventstream.Encoder + signer eventStreamSigner + stream chan asyncChatInputStream + serializationBuffer *bytes.Buffer + signingBuffer *bytes.Buffer + eventStream io.WriteCloser + done chan struct{} + closeOnce sync.Once + err *smithysync.OnceErr +} + +func newChatInputStreamWriter(stream io.WriteCloser, encoder *eventstream.Encoder, signer eventStreamSigner) *chatInputStreamWriter { + w := &chatInputStreamWriter{ + encoder: encoder, + signer: signer, + stream: make(chan asyncChatInputStream), + eventStream: stream, + done: make(chan struct{}), + err: smithysync.NewOnceErr(), + serializationBuffer: bytes.NewBuffer(nil), + signingBuffer: bytes.NewBuffer(nil), + } + + go w.writeStream() + + return w + +} + +func (w *chatInputStreamWriter) Send(ctx context.Context, event types.ChatInputStream) error { + return w.send(ctx, event) +} + +func (w *chatInputStreamWriter) send(ctx context.Context, event types.ChatInputStream) error { + if err := w.err.Err(); err != nil { + return err + } + + resultCh := make(chan error) + + wrapped := asyncChatInputStream{ + Event: event, + Result: resultCh, + } + + select { + case w.stream <- wrapped: + case <-ctx.Done(): + return ctx.Err() + case <-w.done: + return fmt.Errorf("stream closed, unable to send event") + + } + + select { + case err := <-resultCh: + return err + case <-ctx.Done(): + return ctx.Err() + case <-w.done: + return fmt.Errorf("stream closed, unable to send event") + + } + +} + +func (w *chatInputStreamWriter) writeStream() { + defer w.Close() + + for { + select { + case wrapper := <-w.stream: + err := w.writeEvent(wrapper.Event) + wrapper.ReportResult(w.done, err) + if err != nil { + w.err.SetError(err) + return + } + + case <-w.done: + if err := w.closeStream(); err != nil { + w.err.SetError(err) + } + return + + } + } +} + +func (w *chatInputStreamWriter) writeEvent(event types.ChatInputStream) error { + // serializedEvent returned bytes refers to an underlying byte buffer and must not + // escape this writeEvent scope without first copying. Any previous bytes stored in + // the buffer are cleared by this call. + serializedEvent, err := w.serializeEvent(event) + if err != nil { + return err + } + + // signedEvent returned bytes refers to an underlying byte buffer and must not + // escape this writeEvent scope without first copying. Any previous bytes stored in + // the buffer are cleared by this call. + signedEvent, err := w.signEvent(serializedEvent) + if err != nil { + return err + } + + // bytes are now copied to the underlying stream writer + _, err = io.Copy(w.eventStream, bytes.NewReader(signedEvent)) + return err +} + +func (w *chatInputStreamWriter) serializeEvent(event types.ChatInputStream) ([]byte, error) { + w.serializationBuffer.Reset() + + eventMessage := eventstream.Message{} + + if err := awsRestjson1_serializeEventStreamChatInputStream(event, &eventMessage); err != nil { + return nil, err + } + + if err := w.encoder.Encode(w.serializationBuffer, eventMessage); err != nil { + return nil, err + } + + return w.serializationBuffer.Bytes(), nil +} + +func (w *chatInputStreamWriter) signEvent(payload []byte) ([]byte, error) { + w.signingBuffer.Reset() + + date := time.Now().UTC() + + var msg eventstream.Message + msg.Headers.Set(eventstreamapi.DateHeader, eventstream.TimestampValue(date)) + msg.Payload = payload + + var headers bytes.Buffer + if err := eventstream.EncodeHeaders(&headers, msg.Headers); err != nil { + return nil, err + } + + sig, err := w.signer.GetSignature(context.Background(), headers.Bytes(), msg.Payload, date) + if err != nil { + return nil, err + } + + msg.Headers.Set(eventstreamapi.ChunkSignatureHeader, eventstream.BytesValue(sig)) + + if err := w.encoder.Encode(w.signingBuffer, msg); err != nil { + return nil, err + } + + return w.signingBuffer.Bytes(), nil +} + +func (w *chatInputStreamWriter) closeStream() (err error) { + defer func() { + if cErr := w.eventStream.Close(); cErr != nil && err == nil { + err = cErr + } + }() + + // Per the protocol, a signed empty message is used to indicate the end of the stream, + // and that no subsequent events will be sent. + signedEvent, err := w.signEvent([]byte{}) + if err != nil { + return err + } + + _, err = io.Copy(w.eventStream, bytes.NewReader(signedEvent)) + return err +} + +func (w *chatInputStreamWriter) ErrorSet() <-chan struct{} { + return w.err.ErrorSet() +} + +func (w *chatInputStreamWriter) Close() error { + w.closeOnce.Do(w.safeClose) + return w.Err() +} + +func (w *chatInputStreamWriter) safeClose() { + close(w.done) +} + +func (w *chatInputStreamWriter) Err() error { + return w.err.Err() +} + +type chatOutputStreamReader struct { + stream chan types.ChatOutputStream + decoder *eventstream.Decoder + eventStream io.ReadCloser + err *smithysync.OnceErr + payloadBuf []byte + done chan struct{} + closeOnce sync.Once +} + +func newChatOutputStreamReader(readCloser io.ReadCloser, decoder *eventstream.Decoder) *chatOutputStreamReader { + w := &chatOutputStreamReader{ + stream: make(chan types.ChatOutputStream), + decoder: decoder, + eventStream: readCloser, + err: smithysync.NewOnceErr(), + done: make(chan struct{}), + payloadBuf: make([]byte, 10*1024), + } + + go w.readEventStream() + + return w +} + +func (r *chatOutputStreamReader) Events() <-chan types.ChatOutputStream { + return r.stream +} + +func (r *chatOutputStreamReader) readEventStream() { + defer r.Close() + defer close(r.stream) + + for { + r.payloadBuf = r.payloadBuf[0:0] + decodedMessage, err := r.decoder.Decode(r.eventStream, r.payloadBuf) + if err != nil { + if err == io.EOF { + return + } + select { + case <-r.done: + return + default: + r.err.SetError(err) + return + } + } + + event, err := r.deserializeEventMessage(&decodedMessage) + if err != nil { + r.err.SetError(err) + return + } + + select { + case r.stream <- event: + case <-r.done: + return + } + + } +} + +func (r *chatOutputStreamReader) deserializeEventMessage(msg *eventstream.Message) (types.ChatOutputStream, error) { + messageType := msg.Headers.Get(eventstreamapi.MessageTypeHeader) + if messageType == nil { + return nil, fmt.Errorf("%s event header not present", eventstreamapi.MessageTypeHeader) + } + + switch messageType.String() { + case eventstreamapi.EventMessageType: + var v types.ChatOutputStream + if err := awsRestjson1_deserializeEventStreamChatOutputStream(&v, msg); err != nil { + return nil, err + } + return v, nil + + case eventstreamapi.ExceptionMessageType: + return nil, awsRestjson1_deserializeEventStreamExceptionChatOutputStream(msg) + + case eventstreamapi.ErrorMessageType: + errorCode := "UnknownError" + errorMessage := errorCode + if header := msg.Headers.Get(eventstreamapi.ErrorCodeHeader); header != nil { + errorCode = header.String() + } + if header := msg.Headers.Get(eventstreamapi.ErrorMessageHeader); header != nil { + errorMessage = header.String() + } + return nil, &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + + default: + mc := msg.Clone() + return nil, &UnknownEventMessageError{ + Type: messageType.String(), + Message: &mc, + } + + } +} + +func (r *chatOutputStreamReader) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() +} + +func (r *chatOutputStreamReader) Close() error { + r.closeOnce.Do(r.safeClose) + return r.Err() +} + +func (r *chatOutputStreamReader) safeClose() { + close(r.done) + r.eventStream.Close() + +} + +func (r *chatOutputStreamReader) Err() error { + return r.err.Err() +} + +func (r *chatOutputStreamReader) Closed() <-chan struct{} { + return r.done +} + +type awsRestjson1_deserializeOpEventStreamChat struct { + LogEventStreamWrites bool + LogEventStreamReads bool +} + +func (*awsRestjson1_deserializeOpEventStreamChat) ID() string { + return "OperationEventStreamDeserializer" +} + +func (m *awsRestjson1_deserializeOpEventStreamChat) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + defer func() { + if err == nil { + return + } + m.closeResponseBody(out) + }() + + logger := middleware.GetLogger(ctx) + + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type: %T", in.Request) + } + _ = request + + if err := eventstreamapi.ApplyHTTPTransportFixes(request); err != nil { + return out, metadata, err + } + + requestSignature, err := v4.GetSignedRequestSignature(request.Request) + if err != nil { + return out, metadata, fmt.Errorf("failed to get event stream seed signature: %v", err) + } + + identity := getIdentity(ctx) + if identity == nil { + return out, metadata, fmt.Errorf("no identity") + } + + creds, ok := identity.(*internalauthsmithy.CredentialsAdapter) + if !ok { + return out, metadata, fmt.Errorf("identity is not sigv4 credentials") + } + + rscheme := getResolvedAuthScheme(ctx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + name, ok := smithyhttp.GetSigV4SigningName(&rscheme.SignerProperties) + if !ok { + return out, metadata, fmt.Errorf("no sigv4 signing name") + } + + region, ok := smithyhttp.GetSigV4SigningRegion(&rscheme.SignerProperties) + if !ok { + return out, metadata, fmt.Errorf("no sigv4 signing region") + } + + signer := v4.NewStreamSigner(creds.Credentials, name, region, requestSignature) + + eventWriter := newChatInputStreamWriter( + eventstreamapi.GetInputStreamWriter(ctx), + eventstream.NewEncoder(func(options *eventstream.EncoderOptions) { + options.Logger = logger + options.LogMessages = m.LogEventStreamWrites + + }), + signer, + ) + defer func() { + if err == nil { + return + } + _ = eventWriter.Close() + }() + + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + deserializeOutput, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type: %T", out.RawResponse) + } + _ = deserializeOutput + + output, ok := out.Result.(*ChatOutput) + if out.Result != nil && !ok { + return out, metadata, fmt.Errorf("unexpected output result type: %T", out.Result) + } else if out.Result == nil { + output = &ChatOutput{} + out.Result = output + } + + eventReader := newChatOutputStreamReader( + deserializeOutput.Body, + eventstream.NewDecoder(func(options *eventstream.DecoderOptions) { + options.Logger = logger + options.LogMessages = m.LogEventStreamReads + + }), + ) + defer func() { + if err == nil { + return + } + _ = eventReader.Close() + }() + + output.eventStream = NewChatEventStream(func(stream *ChatEventStream) { + stream.Writer = eventWriter + stream.Reader = eventReader + }) + + go output.eventStream.waitStreamClose() + + return out, metadata, nil +} + +func (*awsRestjson1_deserializeOpEventStreamChat) closeResponseBody(out middleware.DeserializeOutput) { + if resp, ok := out.RawResponse.(*smithyhttp.Response); ok && resp != nil && resp.Body != nil { + _, _ = io.Copy(ioutil.Discard, resp.Body) + _ = resp.Body.Close() + } +} + +func addEventStreamChatMiddleware(stack *middleware.Stack, options Options) error { + if err := stack.Deserialize.Insert(&awsRestjson1_deserializeOpEventStreamChat{ + LogEventStreamWrites: options.ClientLogMode.IsRequestEventMessage(), + LogEventStreamReads: options.ClientLogMode.IsResponseEventMessage(), + }, "OperationDeserializer", middleware.Before); err != nil { + return err + } + return nil + +} + +// UnknownEventMessageError provides an error when a message is received from the stream, +// but the reader is unable to determine what kind of message it is. +type UnknownEventMessageError struct { + Type string + Message *eventstream.Message +} + +// Error retruns the error message string. +func (e *UnknownEventMessageError) Error() string { + return "unknown event stream message type, " + e.Type +} + +func setSafeEventStreamClientLogMode(o *Options, operation string) { + switch operation { + case "Chat": + toggleEventStreamClientLogMode(o, true, true) + return + + default: + return + + } +} +func toggleEventStreamClientLogMode(o *Options, request, response bool) { + mode := o.ClientLogMode + + if request && mode.IsRequestWithBody() { + mode.ClearRequestWithBody() + mode |= aws.LogRequest + } + + if response && mode.IsResponseWithBody() { + mode.ClearResponseWithBody() + mode |= aws.LogResponse + } + + o.ClientLogMode = mode + +} diff --git a/service/qbusiness/generated.json b/service/qbusiness/generated.json index c748aec4cfb..ebe7aaf3d9a 100644 --- a/service/qbusiness/generated.json +++ b/service/qbusiness/generated.json @@ -1,6 +1,7 @@ { "dependencies": { "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream": "v0.0.0-00010101000000-000000000000", "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", "github.com/aws/smithy-go": "v1.4.0" @@ -10,6 +11,7 @@ "api_client_test.go", "api_op_BatchDeleteDocument.go", "api_op_BatchPutDocument.go", + "api_op_Chat.go", "api_op_ChatSync.go", "api_op_CreateApplication.go", "api_op_CreateDataSource.go", @@ -71,6 +73,7 @@ "endpoints.go", "endpoints_config_test.go", "endpoints_test.go", + "eventstream.go", "generated.json", "internal/document/document.go", "internal/document/document_test.go", diff --git a/service/qbusiness/go.mod b/service/qbusiness/go.mod index 3241dbe8d3a..e9816a365d1 100644 --- a/service/qbusiness/go.mod +++ b/service/qbusiness/go.mod @@ -4,6 +4,7 @@ go 1.20 require ( github.com/aws/aws-sdk-go-v2 v1.26.1 + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 github.com/aws/smithy-go v1.20.2 @@ -11,6 +12,8 @@ require ( replace github.com/aws/aws-sdk-go-v2 => ../../ +replace github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream => ../../aws/protocol/eventstream/ + replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../internal/configsources/ replace github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => ../../internal/endpoints/v2/ diff --git a/service/qbusiness/serializers.go b/service/qbusiness/serializers.go index b21cd0e8d17..c540a40dabf 100644 --- a/service/qbusiness/serializers.go +++ b/service/qbusiness/serializers.go @@ -6,6 +6,8 @@ import ( "bytes" "context" "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream" + "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi" "github.com/aws/aws-sdk-go-v2/service/qbusiness/document" internaldocument "github.com/aws/aws-sdk-go-v2/service/qbusiness/internal/document" "github.com/aws/aws-sdk-go-v2/service/qbusiness/types" @@ -230,6 +232,95 @@ func awsRestjson1_serializeOpDocumentBatchPutDocumentInput(v *BatchPutDocumentIn return nil } +type awsRestjson1_serializeOpChat struct { +} + +func (*awsRestjson1_serializeOpChat) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpChat) 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.(*ChatInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/applications/{applicationId}/conversations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsChatInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/vnd.amazon.eventstream") + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsChatInput(v *ChatInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApplicationId == nil || len(*v.ApplicationId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member applicationId must not be empty")} + } + if v.ApplicationId != nil { + if err := encoder.SetURI("applicationId").String(*v.ApplicationId); err != nil { + return err + } + } + + if v.ClientToken != nil { + encoder.SetQuery("clientToken").String(*v.ClientToken) + } + + if v.ConversationId != nil { + encoder.SetQuery("conversationId").String(*v.ConversationId) + } + + if v.ParentMessageId != nil { + encoder.SetQuery("parentMessageId").String(*v.ParentMessageId) + } + + if v.UserGroups != nil { + for i := range v.UserGroups { + encoder.AddQuery("userGroups").String(v.UserGroups[i]) + } + } + + if v.UserId != nil { + encoder.SetQuery("userId").String(*v.UserId) + } + + return nil +} + type awsRestjson1_serializeOpChatSync struct { } @@ -341,6 +432,13 @@ func awsRestjson1_serializeOpDocumentChatSyncInput(v *ChatSyncInput, value smith } } + if v.AuthChallengeResponse != nil { + ok := object.Key("authChallengeResponse") + if err := awsRestjson1_serializeDocumentAuthChallengeResponse(v.AuthChallengeResponse, ok); err != nil { + return err + } + } + if len(v.ChatMode) > 0 { ok := object.Key("chatMode") ok.String(string(v.ChatMode)) @@ -746,6 +844,11 @@ func awsRestjson1_serializeOpDocumentCreateIndexInput(v *CreateIndexInput, value } } + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + return nil } @@ -841,6 +944,13 @@ func awsRestjson1_serializeOpDocumentCreatePluginInput(v *CreatePluginInput, val ok.String(*v.ClientToken) } + if v.CustomPluginConfiguration != nil { + ok := object.Key("customPluginConfiguration") + if err := awsRestjson1_serializeDocumentCustomPluginConfiguration(v.CustomPluginConfiguration, ok); err != nil { + return err + } + } + if v.DisplayName != nil { ok := object.Key("displayName") ok.String(*v.DisplayName) @@ -4231,6 +4341,11 @@ func awsRestjson1_serializeOpDocumentUpdateApplicationInput(v *UpdateApplication ok.String(*v.DisplayName) } + if v.IdentityCenterInstanceArn != nil { + ok := object.Key("identityCenterInstanceArn") + ok.String(*v.IdentityCenterInstanceArn) + } + if v.RoleArn != nil { ok := object.Key("roleArn") ok.String(*v.RoleArn) @@ -4714,6 +4829,13 @@ func awsRestjson1_serializeOpDocumentUpdatePluginInput(v *UpdatePluginInput, val } } + if v.CustomPluginConfiguration != nil { + ok := object.Key("customPluginConfiguration") + if err := awsRestjson1_serializeDocumentCustomPluginConfiguration(v.CustomPluginConfiguration, ok); err != nil { + return err + } + } + if v.DisplayName != nil { ok := object.Key("displayName") ok.String(*v.DisplayName) @@ -5043,6 +5165,11 @@ func awsRestjson1_serializeOpDocumentUpdateWebExperienceInput(v *UpdateWebExperi } } + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + if len(v.SamplePromptsControlMode) > 0 { ok := object.Key("samplePromptsControlMode") ok.String(string(v.SamplePromptsControlMode)) @@ -5066,58 +5193,132 @@ func awsRestjson1_serializeOpDocumentUpdateWebExperienceInput(v *UpdateWebExperi return nil } -func awsRestjson1_serializeDocumentAccessConfiguration(v *types.AccessConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() +func awsRestjson1_serializeEventStreamChatInputStream(v types.ChatInputStream, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + switch vv := v.(type) { + case *types.ChatInputStreamMemberConfigurationEvent: + msg.Headers.Set(eventstreamapi.EventTypeHeader, eventstream.StringValue("configurationEvent")) + return awsRestjson1_serializeEventMessageConfigurationEvent(&vv.Value, msg) + + case *types.ChatInputStreamMemberTextEvent: + msg.Headers.Set(eventstreamapi.EventTypeHeader, eventstream.StringValue("textEvent")) + return awsRestjson1_serializeEventMessageTextInputEvent(&vv.Value, msg) + + case *types.ChatInputStreamMemberAttachmentEvent: + msg.Headers.Set(eventstreamapi.EventTypeHeader, eventstream.StringValue("attachmentEvent")) + return awsRestjson1_serializeEventMessageAttachmentInputEvent(&vv.Value, msg) + + case *types.ChatInputStreamMemberActionExecutionEvent: + msg.Headers.Set(eventstreamapi.EventTypeHeader, eventstream.StringValue("actionExecutionEvent")) + return awsRestjson1_serializeEventMessageActionExecutionEvent(&vv.Value, msg) + + case *types.ChatInputStreamMemberEndOfInputEvent: + msg.Headers.Set(eventstreamapi.EventTypeHeader, eventstream.StringValue("endOfInputEvent")) + return awsRestjson1_serializeEventMessageEndOfInputEvent(&vv.Value, msg) + + case *types.ChatInputStreamMemberAuthChallengeResponseEvent: + msg.Headers.Set(eventstreamapi.EventTypeHeader, eventstream.StringValue("authChallengeResponseEvent")) + return awsRestjson1_serializeEventMessageAuthChallengeResponseEvent(&vv.Value, msg) + + default: + return fmt.Errorf("unexpected event message type: %v", v) - if v.AccessControls != nil { - ok := object.Key("accessControls") - if err := awsRestjson1_serializeDocumentAccessControls(v.AccessControls, ok); err != nil { - return err - } + } +} +func awsRestjson1_serializeEventMessageActionExecutionEvent(v *types.ActionExecutionEvent, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) } - if len(v.MemberRelation) > 0 { - ok := object.Key("memberRelation") - ok.String(string(v.MemberRelation)) + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set(eventstreamapi.ContentTypeHeader, eventstream.StringValue("application/json")) + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentActionExecutionEvent(v, jsonEncoder.Value); err != nil { + return err + } + msg.Payload = jsonEncoder.Bytes() + return nil +} + +func awsRestjson1_serializeEventMessageAttachmentInputEvent(v *types.AttachmentInputEvent, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) } + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set(eventstreamapi.ContentTypeHeader, eventstream.StringValue("application/json")) + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentAttachmentInputEvent(v, jsonEncoder.Value); err != nil { + return err + } + msg.Payload = jsonEncoder.Bytes() return nil } -func awsRestjson1_serializeDocumentAccessControl(v *types.AccessControl, value smithyjson.Value) error { - object := value.Object() - defer object.Close() +func awsRestjson1_serializeEventMessageAuthChallengeResponseEvent(v *types.AuthChallengeResponseEvent, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } - if len(v.MemberRelation) > 0 { - ok := object.Key("memberRelation") - ok.String(string(v.MemberRelation)) + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set(eventstreamapi.ContentTypeHeader, eventstream.StringValue("application/json")) + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentAuthChallengeResponseEvent(v, jsonEncoder.Value); err != nil { + return err + } + msg.Payload = jsonEncoder.Bytes() + return nil +} + +func awsRestjson1_serializeEventMessageConfigurationEvent(v *types.ConfigurationEvent, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) } - if v.Principals != nil { - ok := object.Key("principals") - if err := awsRestjson1_serializeDocumentPrincipals(v.Principals, ok); err != nil { - return err - } + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set(eventstreamapi.ContentTypeHeader, eventstream.StringValue("application/json")) + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentConfigurationEvent(v, jsonEncoder.Value); err != nil { + return err + } + msg.Payload = jsonEncoder.Bytes() + return nil +} + +func awsRestjson1_serializeEventMessageEndOfInputEvent(v *types.EndOfInputEvent, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) } + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set(eventstreamapi.ContentTypeHeader, eventstream.StringValue("application/json")) + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentEndOfInputEvent(v, jsonEncoder.Value); err != nil { + return err + } + msg.Payload = jsonEncoder.Bytes() return nil } -func awsRestjson1_serializeDocumentAccessControls(v []types.AccessControl, value smithyjson.Value) error { - array := value.Array() - defer array.Close() +func awsRestjson1_serializeEventMessageTextInputEvent(v *types.TextInputEvent, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentAccessControl(&v[i], av); err != nil { - return err - } + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set(eventstreamapi.ContentTypeHeader, eventstream.StringValue("application/json")) + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentTextInputEvent(v, jsonEncoder.Value); err != nil { + return err } + msg.Payload = jsonEncoder.Bytes() return nil } -func awsRestjson1_serializeDocumentActionExecution(v *types.ActionExecution, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentActionExecutionEvent(v *types.ActionExecutionEvent, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5201,28 +5402,17 @@ func awsRestjson1_serializeDocumentAttachmentInput(v *types.AttachmentInput, val return nil } -func awsRestjson1_serializeDocumentAttachmentsConfiguration(v *types.AttachmentsConfiguration, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentAttachmentInputEvent(v *types.AttachmentInputEvent, value smithyjson.Value) error { object := value.Object() defer object.Close() - if len(v.AttachmentsControlMode) > 0 { - ok := object.Key("attachmentsControlMode") - ok.String(string(v.AttachmentsControlMode)) - } - - return nil -} - -func awsRestjson1_serializeDocumentAttachmentsInput(v []types.AttachmentInput, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentAttachmentInput(&v[i], av); err != nil { + if v.Attachment != nil { + ok := object.Key("attachment") + if err := awsRestjson1_serializeDocumentAttachmentInput(v.Attachment, ok); err != nil { return err } } + return nil } @@ -5316,57 +5506,28 @@ func awsRestjson1_serializeDocumentAttributeFilters(v []types.AttributeFilter, v return nil } -func awsRestjson1_serializeDocumentBasicAuthConfiguration(v *types.BasicAuthConfiguration, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentAuthChallengeResponseEvent(v *types.AuthChallengeResponseEvent, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.RoleArn != nil { - ok := object.Key("roleArn") - ok.String(*v.RoleArn) - } - - if v.SecretArn != nil { - ok := object.Key("secretArn") - ok.String(*v.SecretArn) + if v.ResponseMap != nil { + ok := object.Key("responseMap") + if err := awsRestjson1_serializeDocumentAuthorizationResponseMap(v.ResponseMap, ok); err != nil { + return err + } } return nil } -func awsRestjson1_serializeDocumentBlockedPhrases(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_serializeDocumentBlockedPhrasesConfigurationUpdate(v *types.BlockedPhrasesConfigurationUpdate, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentAuthorizationResponseMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.BlockedPhrasesToCreateOrUpdate != nil { - ok := object.Key("blockedPhrasesToCreateOrUpdate") - if err := awsRestjson1_serializeDocumentBlockedPhrases(v.BlockedPhrasesToCreateOrUpdate, ok); err != nil { - return err - } - } - - if v.BlockedPhrasesToDelete != nil { - ok := object.Key("blockedPhrasesToDelete") - if err := awsRestjson1_serializeDocumentBlockedPhrases(v.BlockedPhrasesToDelete, ok); err != nil { - return err - } - } - - if v.SystemMessageOverride != nil { - ok := object.Key("systemMessageOverride") - ok.String(*v.SystemMessageOverride) + for key := range v { + om := object.Key(key) + om.String(v[key]) } - return nil } @@ -5388,19 +5549,326 @@ func awsRestjson1_serializeDocumentChatModeConfiguration(v types.ChatModeConfigu return nil } -func awsRestjson1_serializeDocumentContentBlockerRule(v *types.ContentBlockerRule, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentConfigurationEvent(v *types.ConfigurationEvent, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.SystemMessageOverride != nil { - ok := object.Key("systemMessageOverride") - ok.String(*v.SystemMessageOverride) + if v.AttributeFilter != nil { + ok := object.Key("attributeFilter") + if err := awsRestjson1_serializeDocumentAttributeFilter(v.AttributeFilter, ok); err != nil { + return err + } } - return nil -} - -func awsRestjson1_serializeDocumentContentRetrievalRule(v *types.ContentRetrievalRule, value smithyjson.Value) error { + if len(v.ChatMode) > 0 { + ok := object.Key("chatMode") + ok.String(string(v.ChatMode)) + } + + if v.ChatModeConfiguration != nil { + ok := object.Key("chatModeConfiguration") + if err := awsRestjson1_serializeDocumentChatModeConfiguration(v.ChatModeConfiguration, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentDocumentAttribute(v *types.DocumentAttribute, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Value != nil { + ok := object.Key("value") + if err := awsRestjson1_serializeDocumentDocumentAttributeValue(v.Value, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentDocumentAttributeStringListValue(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_serializeDocumentDocumentAttributeValue(v types.DocumentAttributeValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.DocumentAttributeValueMemberDateValue: + av := object.Key("dateValue") + av.Double(smithytime.FormatEpochSeconds(uv.Value)) + + case *types.DocumentAttributeValueMemberLongValue: + av := object.Key("longValue") + av.Long(uv.Value) + + case *types.DocumentAttributeValueMemberStringListValue: + av := object.Key("stringListValue") + if err := awsRestjson1_serializeDocumentDocumentAttributeStringListValue(uv.Value, av); err != nil { + return err + } + + case *types.DocumentAttributeValueMemberStringValue: + av := object.Key("stringValue") + av.String(uv.Value) + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + +func awsRestjson1_serializeDocumentEndOfInputEvent(v *types.EndOfInputEvent, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + return nil +} + +func awsRestjson1_serializeDocumentPluginConfiguration(v *types.PluginConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PluginId != nil { + ok := object.Key("pluginId") + ok.String(*v.PluginId) + } + + return nil +} + +func awsRestjson1_serializeDocumentTextInputEvent(v *types.TextInputEvent, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.UserMessage != nil { + ok := object.Key("userMessage") + ok.String(*v.UserMessage) + } + + return nil +} + +func awsRestjson1_serializeDocumentAccessConfiguration(v *types.AccessConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccessControls != nil { + ok := object.Key("accessControls") + if err := awsRestjson1_serializeDocumentAccessControls(v.AccessControls, ok); err != nil { + return err + } + } + + if len(v.MemberRelation) > 0 { + ok := object.Key("memberRelation") + ok.String(string(v.MemberRelation)) + } + + return nil +} + +func awsRestjson1_serializeDocumentAccessControl(v *types.AccessControl, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.MemberRelation) > 0 { + ok := object.Key("memberRelation") + ok.String(string(v.MemberRelation)) + } + + if v.Principals != nil { + ok := object.Key("principals") + if err := awsRestjson1_serializeDocumentPrincipals(v.Principals, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentAccessControls(v []types.AccessControl, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentAccessControl(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentActionExecution(v *types.ActionExecution, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Payload != nil { + ok := object.Key("payload") + if err := awsRestjson1_serializeDocumentActionExecutionPayload(v.Payload, ok); err != nil { + return err + } + } + + if v.PayloadFieldNameSeparator != nil { + ok := object.Key("payloadFieldNameSeparator") + ok.String(*v.PayloadFieldNameSeparator) + } + + if v.PluginId != nil { + ok := object.Key("pluginId") + ok.String(*v.PluginId) + } + + return nil +} + +func awsRestjson1_serializeDocumentAPISchema(v types.APISchema, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.APISchemaMemberPayload: + av := object.Key("payload") + av.String(uv.Value) + + case *types.APISchemaMemberS3: + av := object.Key("s3") + if err := awsRestjson1_serializeDocumentS3(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + +func awsRestjson1_serializeDocumentAttachmentsConfiguration(v *types.AttachmentsConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.AttachmentsControlMode) > 0 { + ok := object.Key("attachmentsControlMode") + ok.String(string(v.AttachmentsControlMode)) + } + + return nil +} + +func awsRestjson1_serializeDocumentAttachmentsInput(v []types.AttachmentInput, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentAttachmentInput(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentAuthChallengeResponse(v *types.AuthChallengeResponse, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ResponseMap != nil { + ok := object.Key("responseMap") + if err := awsRestjson1_serializeDocumentAuthorizationResponseMap(v.ResponseMap, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentBasicAuthConfiguration(v *types.BasicAuthConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + if v.SecretArn != nil { + ok := object.Key("secretArn") + ok.String(*v.SecretArn) + } + + return nil +} + +func awsRestjson1_serializeDocumentBlockedPhrases(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_serializeDocumentBlockedPhrasesConfigurationUpdate(v *types.BlockedPhrasesConfigurationUpdate, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BlockedPhrasesToCreateOrUpdate != nil { + ok := object.Key("blockedPhrasesToCreateOrUpdate") + if err := awsRestjson1_serializeDocumentBlockedPhrases(v.BlockedPhrasesToCreateOrUpdate, ok); err != nil { + return err + } + } + + if v.BlockedPhrasesToDelete != nil { + ok := object.Key("blockedPhrasesToDelete") + if err := awsRestjson1_serializeDocumentBlockedPhrases(v.BlockedPhrasesToDelete, ok); err != nil { + return err + } + } + + if v.SystemMessageOverride != nil { + ok := object.Key("systemMessageOverride") + ok.String(*v.SystemMessageOverride) + } + + return nil +} + +func awsRestjson1_serializeDocumentContentBlockerRule(v *types.ContentBlockerRule, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SystemMessageOverride != nil { + ok := object.Key("systemMessageOverride") + ok.String(*v.SystemMessageOverride) + } + + return nil +} + +func awsRestjson1_serializeDocumentContentRetrievalRule(v *types.ContentRetrievalRule, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5426,6 +5894,30 @@ func awsRestjson1_serializeDocumentCreatorModeConfiguration(v *types.CreatorMode return nil } +func awsRestjson1_serializeDocumentCustomPluginConfiguration(v *types.CustomPluginConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApiSchema != nil { + ok := object.Key("apiSchema") + if err := awsRestjson1_serializeDocumentAPISchema(v.ApiSchema, ok); err != nil { + return err + } + } + + if len(v.ApiSchemaType) > 0 { + ok := object.Key("apiSchemaType") + ok.String(string(v.ApiSchemaType)) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + return nil +} + func awsRestjson1_serializeDocumentDataSourceConfiguration(v document.Interface, value smithyjson.Value) error { if v == nil { return nil @@ -5554,25 +6046,6 @@ func awsRestjson1_serializeDocumentDocument(v *types.Document, value smithyjson. return nil } -func awsRestjson1_serializeDocumentDocumentAttribute(v *types.DocumentAttribute, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Name != nil { - ok := object.Key("name") - ok.String(*v.Name) - } - - if v.Value != nil { - ok := object.Key("value") - if err := awsRestjson1_serializeDocumentDocumentAttributeValue(v.Value, ok); err != nil { - return err - } - } - - return nil -} - func awsRestjson1_serializeDocumentDocumentAttributeBoostingConfiguration(v types.DocumentAttributeBoostingConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5697,17 +6170,6 @@ func awsRestjson1_serializeDocumentDocumentAttributes(v []types.DocumentAttribut return nil } -func awsRestjson1_serializeDocumentDocumentAttributeStringListValue(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_serializeDocumentDocumentAttributeTarget(v *types.DocumentAttributeTarget, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5732,36 +6194,6 @@ func awsRestjson1_serializeDocumentDocumentAttributeTarget(v *types.DocumentAttr return nil } -func awsRestjson1_serializeDocumentDocumentAttributeValue(v types.DocumentAttributeValue, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - switch uv := v.(type) { - case *types.DocumentAttributeValueMemberDateValue: - av := object.Key("dateValue") - av.Double(smithytime.FormatEpochSeconds(uv.Value)) - - case *types.DocumentAttributeValueMemberLongValue: - av := object.Key("longValue") - av.Long(uv.Value) - - case *types.DocumentAttributeValueMemberStringListValue: - av := object.Key("stringListValue") - if err := awsRestjson1_serializeDocumentDocumentAttributeStringListValue(uv.Value, av); err != nil { - return err - } - - case *types.DocumentAttributeValueMemberStringValue: - av := object.Key("stringValue") - av.String(uv.Value) - - default: - return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) - - } - return nil -} - func awsRestjson1_serializeDocumentDocumentContent(v types.DocumentContent, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6097,6 +6529,13 @@ func awsRestjson1_serializeDocumentNativeIndexConfiguration(v *types.NativeIndex return nil } +func awsRestjson1_serializeDocumentNoAuthConfiguration(v *types.NoAuthConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + return nil +} + func awsRestjson1_serializeDocumentNumberAttributeBoostingConfiguration(v *types.NumberAttributeBoostingConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6142,6 +6581,12 @@ func awsRestjson1_serializeDocumentPluginAuthConfiguration(v types.PluginAuthCon return err } + case *types.PluginAuthConfigurationMemberNoAuthConfiguration: + av := object.Key("noAuthConfiguration") + if err := awsRestjson1_serializeDocumentNoAuthConfiguration(&uv.Value, av); err != nil { + return err + } + case *types.PluginAuthConfigurationMemberOAuth2ClientCredentialConfiguration: av := object.Key("oAuth2ClientCredentialConfiguration") if err := awsRestjson1_serializeDocumentOAuth2ClientCredentialConfiguration(&uv.Value, av); err != nil { @@ -6155,18 +6600,6 @@ func awsRestjson1_serializeDocumentPluginAuthConfiguration(v types.PluginAuthCon return nil } -func awsRestjson1_serializeDocumentPluginConfiguration(v *types.PluginConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.PluginId != nil { - ok := object.Key("pluginId") - ok.String(*v.PluginId) - } - - return nil -} - func awsRestjson1_serializeDocumentPrincipal(v types.Principal, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/qbusiness/snapshot_test.go b/service/qbusiness/snapshot_test.go index c16c540908c..9e7ef9125d7 100644 --- a/service/qbusiness/snapshot_test.go +++ b/service/qbusiness/snapshot_test.go @@ -86,6 +86,18 @@ func TestCheckSnapshot_BatchPutDocument(t *testing.T) { } } +func TestCheckSnapshot_Chat(t *testing.T) { + svc := New(Options{}) + _, err := svc.Chat(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "Chat") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ChatSync(t *testing.T) { svc := New(Options{}) _, err := svc.ChatSync(context.Background(), nil, func(o *Options) { @@ -745,6 +757,18 @@ func TestUpdateSnapshot_BatchPutDocument(t *testing.T) { } } +func TestUpdateSnapshot_Chat(t *testing.T) { + svc := New(Options{}) + _, err := svc.Chat(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "Chat") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ChatSync(t *testing.T) { svc := New(Options{}) _, err := svc.ChatSync(context.Background(), nil, func(o *Options) { diff --git a/service/qbusiness/types/enums.go b/service/qbusiness/types/enums.go index 1a70a2d407a..5cda9a81f8d 100644 --- a/service/qbusiness/types/enums.go +++ b/service/qbusiness/types/enums.go @@ -24,6 +24,22 @@ func (ActionPayloadFieldType) Values() []ActionPayloadFieldType { } } +type APISchemaType string + +// Enum values for APISchemaType +const ( + APISchemaTypeOpenApiV3 APISchemaType = "OPEN_API_V3" +) + +// Values returns all known values for APISchemaType. 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 (APISchemaType) Values() []APISchemaType { + return []APISchemaType{ + "OPEN_API_V3", + } +} + type ApplicationStatus string // Enum values for ApplicationStatus @@ -430,6 +446,24 @@ func (IndexStatus) Values() []IndexStatus { } } +type IndexType string + +// Enum values for IndexType +const ( + IndexTypeEnterprise IndexType = "ENTERPRISE" + IndexTypeStarter IndexType = "STARTER" +) + +// Values returns all known values for IndexType. 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 (IndexType) Values() []IndexType { + return []IndexType{ + "ENTERPRISE", + "STARTER", + } +} + type MemberRelation string // Enum values for MemberRelation @@ -558,6 +592,34 @@ func (NumberAttributeBoostingType) Values() []NumberAttributeBoostingType { } } +type PluginBuildStatus string + +// Enum values for PluginBuildStatus +const ( + PluginBuildStatusReady PluginBuildStatus = "READY" + PluginBuildStatusCreateInProgress PluginBuildStatus = "CREATE_IN_PROGRESS" + PluginBuildStatusCreateFailed PluginBuildStatus = "CREATE_FAILED" + PluginBuildStatusUpdateInProgress PluginBuildStatus = "UPDATE_IN_PROGRESS" + PluginBuildStatusUpdateFailed PluginBuildStatus = "UPDATE_FAILED" + PluginBuildStatusDeleteInProgress PluginBuildStatus = "DELETE_IN_PROGRESS" + PluginBuildStatusDeleteFailed PluginBuildStatus = "DELETE_FAILED" +) + +// Values returns all known values for PluginBuildStatus. 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 (PluginBuildStatus) Values() []PluginBuildStatus { + return []PluginBuildStatus{ + "READY", + "CREATE_IN_PROGRESS", + "CREATE_FAILED", + "UPDATE_IN_PROGRESS", + "UPDATE_FAILED", + "DELETE_IN_PROGRESS", + "DELETE_FAILED", + } +} + type PluginState string // Enum values for PluginState @@ -584,6 +646,7 @@ const ( PluginTypeSalesforce PluginType = "SALESFORCE" PluginTypeJira PluginType = "JIRA" PluginTypeZendesk PluginType = "ZENDESK" + PluginTypeCustom PluginType = "CUSTOM" ) // Values returns all known values for PluginType. Note that this can be expanded @@ -595,6 +658,7 @@ func (PluginType) Values() []PluginType { "SALESFORCE", "JIRA", "ZENDESK", + "CUSTOM", } } diff --git a/service/qbusiness/types/types.go b/service/qbusiness/types/types.go index a1581533b93..eb26724a619 100644 --- a/service/qbusiness/types/types.go +++ b/service/qbusiness/types/types.go @@ -63,6 +63,30 @@ type ActionExecution struct { noSmithyDocumentSerde } +// A request from an end user signalling an intent to perform an Amazon Q Business +// plugin action during a streaming chat. +type ActionExecutionEvent struct { + + // A mapping of field names to the field values in input that an end user provides + // to Amazon Q Business requests to perform their plugin action. + // + // This member is required. + Payload map[string]ActionExecutionPayloadField + + // A string used to retain information about the hierarchical contexts within a + // action execution event payload. + // + // This member is required. + PayloadFieldNameSeparator *string + + // The identifier of the plugin for which the action is being requested. + // + // This member is required. + PluginId *string + + noSmithyDocumentSerde +} + // A user input field in an plugin action execution payload. type ActionExecutionPayloadField struct { @@ -97,13 +121,57 @@ type ActionReview struct { noSmithyDocumentSerde } +// An output event that Amazon Q Business returns to an user who wants to perform +// a plugin action during a streaming chat conversation. It contains information +// about the selected action with a list of possible user input fields, some +// pre-populated by Amazon Q Business. +type ActionReviewEvent struct { + + // The identifier of the conversation with which the action review event is + // associated. + ConversationId *string + + // Field values that an end user needs to provide to Amazon Q Business for Amazon + // Q Business to perform the requested plugin action. + Payload map[string]ActionReviewPayloadField + + // A string used to retain information about the hierarchical contexts within an + // action review event payload. + PayloadFieldNameSeparator *string + + // The identifier of the plugin associated with the action review event. + PluginId *string + + // The type of plugin. + PluginType PluginType + + // The identifier of an Amazon Q Business AI generated associated with the action + // review event. + SystemMessageId *string + + // The identifier of the conversation with which the plugin action is associated. + UserMessageId *string + + noSmithyDocumentSerde +} + // A user input field in an plugin action review payload. type ActionReviewPayloadField struct { + // The expected data format for the action review input field value. For example, + // in PTO request, from and to would be of datetime allowed format. + AllowedFormat *string + // Information about the field values that an end user can use to provide to // Amazon Q Business for Amazon Q Business to perform the requested plugin action. AllowedValues []ActionReviewPayloadFieldAllowedValue + // The field level description of each action review input field. This could be an + // explanation of the field. In the Amazon Q Business web experience, these + // descriptions could be used to display as tool tips to help users understand the + // field. + DisplayDescription *string + // The name of the field. DisplayName *string @@ -135,6 +203,39 @@ type ActionReviewPayloadFieldAllowedValue struct { noSmithyDocumentSerde } +// Contains details about the OpenAPI schema for a custom plugin. For more +// information, see custom plugin OpenAPI schemas (https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/custom-plugin.html#plugins-api-schema) +// . You can either include the schema directly in the payload field or you can +// upload it to an S3 bucket and specify the S3 bucket location in the s3 field. +// +// The following types satisfy this interface: +// +// APISchemaMemberPayload +// APISchemaMemberS3 +type APISchema interface { + isAPISchema() +} + +// The JSON or YAML-formatted payload defining the OpenAPI schema for a custom +// plugin. +type APISchemaMemberPayload struct { + Value string + + noSmithyDocumentSerde +} + +func (*APISchemaMemberPayload) isAPISchema() {} + +// Contains details about the S3 object containing the OpenAPI schema for a custom +// plugin. The schema could be in either JSON or YAML format. +type APISchemaMemberS3 struct { + Value S3 + + noSmithyDocumentSerde +} + +func (*APISchemaMemberS3) isAPISchema() {} + // Summary information for an Amazon Q Business application. type Application struct { @@ -201,6 +302,16 @@ type AttachmentInput struct { noSmithyDocumentSerde } +// A file input event activated by a end user request to upload files into their +// web experience chat. +type AttachmentInputEvent struct { + + // A file directly uploaded into a web experience chat. + Attachment *AttachmentInput + + noSmithyDocumentSerde +} + // The details of a file uploaded during chat. type AttachmentOutput struct { @@ -278,6 +389,57 @@ type AttributeFilter struct { noSmithyDocumentSerde } +// A request made by Amazon Q Business to a third paty authentication server to +// authenticate a custom plugin user. +type AuthChallengeRequest struct { + + // The URL sent by Amazon Q Business to the third party authentication server to + // authenticate a custom plugin user through an OAuth protocol. + // + // This member is required. + AuthorizationUrl *string + + noSmithyDocumentSerde +} + +// An authentication verification event activated by an end user request to use a +// custom plugin. +type AuthChallengeRequestEvent struct { + + // The URL sent by Amazon Q Business to a third party authentication server in + // response to an authentication verification event activated by an end user + // request to use a custom plugin. + // + // This member is required. + AuthorizationUrl *string + + noSmithyDocumentSerde +} + +// Contains details of the authentication information received from a third party +// authentication server in response to an authentication challenge. +type AuthChallengeResponse struct { + + // The mapping of key-value pairs in an authentication challenge response. + // + // This member is required. + ResponseMap map[string]string + + noSmithyDocumentSerde +} + +// An authentication verification event response by a third party authentication +// server to Amazon Q Business. +type AuthChallengeResponseEvent struct { + + // The mapping of key-value pairs in an authentication challenge response. + // + // This member is required. + ResponseMap map[string]string + + noSmithyDocumentSerde +} + // Information about the basic authentication credentials used to configure a // plugin. type BasicAuthConfiguration struct { @@ -328,6 +490,77 @@ type BlockedPhrasesConfigurationUpdate struct { noSmithyDocumentSerde } +// The streaming input for the Chat API. +// +// The following types satisfy this interface: +// +// ChatInputStreamMemberActionExecutionEvent +// ChatInputStreamMemberAttachmentEvent +// ChatInputStreamMemberAuthChallengeResponseEvent +// ChatInputStreamMemberConfigurationEvent +// ChatInputStreamMemberEndOfInputEvent +// ChatInputStreamMemberTextEvent +type ChatInputStream interface { + isChatInputStream() +} + +// A request from an end user to perform an Amazon Q Business plugin action. +type ChatInputStreamMemberActionExecutionEvent struct { + Value ActionExecutionEvent + + noSmithyDocumentSerde +} + +func (*ChatInputStreamMemberActionExecutionEvent) isChatInputStream() {} + +// A request by an end user to upload a file during chat. +type ChatInputStreamMemberAttachmentEvent struct { + Value AttachmentInputEvent + + noSmithyDocumentSerde +} + +func (*ChatInputStreamMemberAttachmentEvent) isChatInputStream() {} + +// An authentication verification event response by a third party authentication +// server to Amazon Q Business. +type ChatInputStreamMemberAuthChallengeResponseEvent struct { + Value AuthChallengeResponseEvent + + noSmithyDocumentSerde +} + +func (*ChatInputStreamMemberAuthChallengeResponseEvent) isChatInputStream() {} + +// A configuration event activated by an end user request to select a specific +// chat mode. +type ChatInputStreamMemberConfigurationEvent struct { + Value ConfigurationEvent + + noSmithyDocumentSerde +} + +func (*ChatInputStreamMemberConfigurationEvent) isChatInputStream() {} + +// The end of the streaming input for the Chat API. +type ChatInputStreamMemberEndOfInputEvent struct { + Value EndOfInputEvent + + noSmithyDocumentSerde +} + +func (*ChatInputStreamMemberEndOfInputEvent) isChatInputStream() {} + +// Information about the payload of the ChatInputStream event containing the end +// user message input. +type ChatInputStreamMemberTextEvent struct { + Value TextInputEvent + + noSmithyDocumentSerde +} + +func (*ChatInputStreamMemberTextEvent) isChatInputStream() {} + // Configuration information for Amazon Q Business conversation modes. For more // information, see Admin controls and guardrails (https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/guardrails.html) // and Conversation settings (https://docs.aws.amazon.com/amazonq/latest/business-use-dg/using-web-experience.html#chat-source-scope) @@ -349,6 +582,99 @@ type ChatModeConfigurationMemberPluginConfiguration struct { func (*ChatModeConfigurationMemberPluginConfiguration) isChatModeConfiguration() {} +// The streaming output for the Chat API. +// +// The following types satisfy this interface: +// +// ChatOutputStreamMemberActionReviewEvent +// ChatOutputStreamMemberAuthChallengeRequestEvent +// ChatOutputStreamMemberFailedAttachmentEvent +// ChatOutputStreamMemberMetadataEvent +// ChatOutputStreamMemberTextEvent +type ChatOutputStream interface { + isChatOutputStream() +} + +// A request from Amazon Q Business to the end user for information Amazon Q +// Business needs to successfully complete a requested plugin action. +type ChatOutputStreamMemberActionReviewEvent struct { + Value ActionReviewEvent + + noSmithyDocumentSerde +} + +func (*ChatOutputStreamMemberActionReviewEvent) isChatOutputStream() {} + +// An authentication verification event activated by an end user request to use a +// custom plugin. +type ChatOutputStreamMemberAuthChallengeRequestEvent struct { + Value AuthChallengeRequestEvent + + noSmithyDocumentSerde +} + +func (*ChatOutputStreamMemberAuthChallengeRequestEvent) isChatOutputStream() {} + +// A failed file upload event during a web experience chat. +type ChatOutputStreamMemberFailedAttachmentEvent struct { + Value FailedAttachmentEvent + + noSmithyDocumentSerde +} + +func (*ChatOutputStreamMemberFailedAttachmentEvent) isChatOutputStream() {} + +// A metadata event for a AI-generated text output message in a Amazon Q Business +// conversation. +type ChatOutputStreamMemberMetadataEvent struct { + Value MetadataEvent + + noSmithyDocumentSerde +} + +func (*ChatOutputStreamMemberMetadataEvent) isChatOutputStream() {} + +// Information about the payload of the ChatOutputStream event containing the +// AI-generated message output. +type ChatOutputStreamMemberTextEvent struct { + Value TextOutputEvent + + noSmithyDocumentSerde +} + +func (*ChatOutputStreamMemberTextEvent) isChatOutputStream() {} + +// A configuration event activated by an end user request to select a specific +// chat mode. +type ConfigurationEvent struct { + + // Enables filtering of responses based on document attributes or metadata fields. + AttributeFilter *AttributeFilter + + // The chat modes available to an Amazon Q Business end user. + // - RETRIEVAL_MODE - The default chat mode for an Amazon Q Business application. + // When this mode is enabled, Amazon Q Business generates responses only from data + // sources connected to an Amazon Q Business application. + // - CREATOR_MODE - By selecting this mode, users can choose to generate + // responses only from the LLM knowledge, without consulting connected data + // sources, for a chat request. + // - PLUGIN_MODE - By selecting this mode, users can choose to use plugins in + // chat. + // For more information, see Admin controls and guardrails (https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/guardrails.html) + // , Plugins (https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/plugins.html) + // , and Conversation settings (https://docs.aws.amazon.com/amazonq/latest/business-use-dg/using-web-experience.html#chat-source-scope) + // . + ChatMode ChatMode + + // Configuration information for Amazon Q Business conversation modes. For more + // information, see Admin controls and guardrails (https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/guardrails.html) + // and Conversation settings (https://docs.aws.amazon.com/amazonq/latest/business-use-dg/using-web-experience.html#chat-source-scope) + // . + ChatModeConfiguration ChatModeConfiguration + + noSmithyDocumentSerde +} + // A rule for configuring how Amazon Q Business responds when it encounters a a // blocked topic. You can configure a custom message to inform your end users that // they have asked about a restricted topic and suggest any next steps they should @@ -403,6 +729,28 @@ type CreatorModeConfiguration struct { noSmithyDocumentSerde } +// Configuration information required to create a custom plugin. +type CustomPluginConfiguration struct { + + // Contains either details about the S3 object containing the OpenAPI schema for + // the action group or the JSON or YAML-formatted payload defining the schema. + // + // This member is required. + ApiSchema APISchema + + // The type of OpenAPI schema to use. + // + // This member is required. + ApiSchemaType APISchemaType + + // A description for your custom plugin configuration. + // + // This member is required. + Description *string + + noSmithyDocumentSerde +} + // A data source in an Amazon Q Business application. type DataSource struct { @@ -673,8 +1021,8 @@ type DocumentAttributeCondition struct { // The identifier of the document attribute used for the condition. For example, // 'Source_URI' could be an identifier for the attribute or metadata field that - // contains source URIs associated with the documents. Amazon Kendra currently does - // not support _document_body as an attribute key used for the condition. + // contains source URIs associated with the documents. Amazon Q Business currently + // does not support _document_body as an attribute key used for the condition. // // This member is required. Operator DocumentEnrichmentConditionOperator @@ -856,29 +1204,25 @@ type DocumentEnrichmentConfiguration struct { // Provides the configuration information for invoking a Lambda function in Lambda // to alter document metadata and content when ingesting documents into Amazon Q - // Business. You can configure your Lambda function using - // PreExtractionHookConfiguration (https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DocumentEnrichmentConfiguration.html) - // if you want to apply advanced alterations on the original or raw documents. If - // you want to apply advanced alterations on the Amazon Q Business structured - // documents, you must configure your Lambda function using - // PostExtractionHookConfiguration (https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DocumentEnrichmentConfiguration.html) - // . You can only invoke one Lambda function. However, this function can invoke - // other functions it requires. For more information, see Custom document - // enrichment (https://docs.aws.amazon.com/amazonq/latest/business-use-dg/custom-document-enrichment.html) + // Business. You can configure your Lambda function using the + // PreExtractionHookConfiguration parameter if you want to apply advanced + // alterations on the original or raw documents. If you want to apply advanced + // alterations on the Amazon Q Business structured documents, you must configure + // your Lambda function using PostExtractionHookConfiguration . You can only invoke + // one Lambda function. However, this function can invoke other functions it + // requires. For more information, see Custom document enrichment (https://docs.aws.amazon.com/amazonq/latest/business-use-dg/custom-document-enrichment.html) // . PostExtractionHookConfiguration *HookConfiguration // Provides the configuration information for invoking a Lambda function in Lambda // to alter document metadata and content when ingesting documents into Amazon Q - // Business. You can configure your Lambda function using - // PreExtractionHookConfiguration (https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DocumentEnrichmentConfiguration.html) - // if you want to apply advanced alterations on the original or raw documents. If - // you want to apply advanced alterations on the Amazon Q Business structured - // documents, you must configure your Lambda function using - // PostExtractionHookConfiguration (https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DocumentEnrichmentConfiguration.html) - // . You can only invoke one Lambda function. However, this function can invoke - // other functions it requires. For more information, see Custom document - // enrichment (https://docs.aws.amazon.com/amazonq/latest/business-use-dg/custom-document-enrichment.html) + // Business. You can configure your Lambda function using the + // PreExtractionHookConfiguration parameter if you want to apply advanced + // alterations on the original or raw documents. If you want to apply advanced + // alterations on the Amazon Q Business structured documents, you must configure + // your Lambda function using PostExtractionHookConfiguration . You can only invoke + // one Lambda function. However, this function can invoke other functions it + // requires. For more information, see Custom document enrichment (https://docs.aws.amazon.com/amazonq/latest/business-use-dg/custom-document-enrichment.html) // . PreExtractionHookConfiguration *HookConfiguration @@ -909,6 +1253,11 @@ type EncryptionConfiguration struct { noSmithyDocumentSerde } +// The end of the streaming input for the Chat API. +type EndOfInputEvent struct { + noSmithyDocumentSerde +} + // Provides information about a data source sync error. type ErrorDetail struct { @@ -921,6 +1270,24 @@ type ErrorDetail struct { noSmithyDocumentSerde } +// A failed file upload during web experience chat. +type FailedAttachmentEvent struct { + + // The details of a file uploaded during chat. + Attachment *AttachmentOutput + + // The identifier of the conversation associated with the failed file upload. + ConversationId *string + + // The identifier of the AI-generated message associated with the file upload. + SystemMessageId *string + + // The identifier of the end user chat message associated with the file upload. + UserMessageId *string + + noSmithyDocumentSerde +} + // A list of documents that could not be removed from an Amazon Q Business index. // Each entry contains an error message that indicates why the document couldn't be // removed from the index. @@ -982,15 +1349,13 @@ type GroupSummary struct { // Provides the configuration information for invoking a Lambda function in Lambda // to alter document metadata and content when ingesting documents into Amazon Q -// Business. You can configure your Lambda function using -// PreExtractionHookConfiguration (https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DocumentEnrichmentConfiguration.html) -// if you want to apply advanced alterations on the original or raw documents. If -// you want to apply advanced alterations on the Amazon Q Business structured -// documents, you must configure your Lambda function using -// PostExtractionHookConfiguration (https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DocumentEnrichmentConfiguration.html) -// . You can only invoke one Lambda function. However, this function can invoke -// other functions it requires. For more information, see Custom document -// enrichment (https://docs.aws.amazon.com/amazonq/latest/business-use-dg/custom-document-enrichment.html) +// Business. You can configure your Lambda function using the +// PreExtractionHookConfiguration parameter if you want to apply advanced +// alterations on the original or raw documents. If you want to apply advanced +// alterations on the Amazon Q Business structured documents, you must configure +// your Lambda function using PostExtractionHookConfiguration . You can only invoke +// one Lambda function. However, this function can invoke other functions it +// requires. For more information, see Custom document enrichment (https://docs.aws.amazon.com/amazonq/latest/business-use-dg/custom-document-enrichment.html) // . type HookConfiguration struct { @@ -1197,6 +1562,31 @@ type MessageUsefulnessFeedback struct { noSmithyDocumentSerde } +// A metadata event for a AI-generated text output message in a Amazon Q Business +// conversation, containing associated metadata generated. +type MetadataEvent struct { + + // The identifier of the conversation with which the generated metadata is + // associated. + ConversationId *string + + // The final text output message generated by the system. + FinalTextMessage *string + + // The source documents used to generate the conversation response. + SourceAttributions []*SourceAttribution + + // The identifier of an Amazon Q Business AI generated message within the + // conversation. + SystemMessageId *string + + // The identifier of an Amazon Q Business end user text input message within the + // conversation. + UserMessageId *string + + noSmithyDocumentSerde +} + // Configuration information for an Amazon Q Business index. type NativeIndexConfiguration struct { @@ -1212,6 +1602,12 @@ type NativeIndexConfiguration struct { noSmithyDocumentSerde } +// Information about invoking a custom plugin without any authentication or +// authorization requirement. +type NoAuthConfiguration struct { + noSmithyDocumentSerde +} + // Provides information on boosting NUMBER type document attributes. For more // information on how boosting document attributes work in Amazon Q Business, see // Boosting using document attributes (https://docs.aws.amazon.com/amazonq/latest/business-use-dg/metadata-boosting.html) @@ -1252,6 +1648,9 @@ type OAuth2ClientCredentialConfiguration struct { // Information about an Amazon Q Business plugin and its configuration. type Plugin struct { + // The status of the plugin. + BuildStatus PluginBuildStatus + // The timestamp for when the plugin was created. CreatedAt *time.Time @@ -1281,6 +1680,7 @@ type Plugin struct { // The following types satisfy this interface: // // PluginAuthConfigurationMemberBasicAuthConfiguration +// PluginAuthConfigurationMemberNoAuthConfiguration // PluginAuthConfigurationMemberOAuth2ClientCredentialConfiguration type PluginAuthConfiguration interface { isPluginAuthConfiguration() @@ -1296,6 +1696,15 @@ type PluginAuthConfigurationMemberBasicAuthConfiguration struct { func (*PluginAuthConfigurationMemberBasicAuthConfiguration) isPluginAuthConfiguration() {} +// Information about invoking a custom plugin without any authentication. +type PluginAuthConfigurationMemberNoAuthConfiguration struct { + Value NoAuthConfiguration + + noSmithyDocumentSerde +} + +func (*PluginAuthConfigurationMemberNoAuthConfiguration) isPluginAuthConfiguration() {} + // Information about the OAuth 2.0 authentication credential/token used to // configure a plugin. type PluginAuthConfigurationMemberOAuth2ClientCredentialConfiguration struct { @@ -1534,6 +1943,17 @@ type SamlConfiguration struct { noSmithyDocumentSerde } +// Contains the relevant text excerpt from a source that was used to generate a +// citation text segment in an Amazon Q Business chat response. +type SnippetExcerpt struct { + + // The relevant text excerpt from a source that was used to generate a citation + // text segment in an Amazon Q chat response. + Text *string + + noSmithyDocumentSerde +} + // The documents used to generate an Amazon Q Business web experience response. type SourceAttribution struct { @@ -1635,6 +2055,37 @@ type TextDocumentStatistics struct { noSmithyDocumentSerde } +// An input event for a end user message in an Amazon Q Business web experience. +type TextInputEvent struct { + + // A user message in a text message input event. + // + // This member is required. + UserMessage *string + + noSmithyDocumentSerde +} + +// An output event for an AI-generated response in an Amazon Q Business web +// experience. +type TextOutputEvent struct { + + // The identifier of the conversation with which the text output event is + // associated. + ConversationId *string + + // An AI-generated message in a TextOutputEvent . + SystemMessage *string + + // The identifier of an AI-generated message in a TextOutputEvent . + SystemMessageId *string + + // The identifier of an end user message in a TextOutputEvent . + UserMessageId *string + + noSmithyDocumentSerde +} + // Provides information about a text extract in a chat response that can be // attributed to a source document. type TextSegment struct { @@ -1647,6 +2098,10 @@ type TextSegment struct { // ends. EndOffset *int32 + // The relevant text excerpt from a source that was used to generate a citation + // text segment in an Amazon Q Business chat response. + SnippetExcerpt *SnippetExcerpt + noSmithyDocumentSerde } @@ -1775,7 +2230,10 @@ type UnknownUnionMember struct { noSmithyDocumentSerde } +func (*UnknownUnionMember) isAPISchema() {} +func (*UnknownUnionMember) isChatInputStream() {} func (*UnknownUnionMember) isChatModeConfiguration() {} +func (*UnknownUnionMember) isChatOutputStream() {} func (*UnknownUnionMember) isDocumentAttributeBoostingConfiguration() {} func (*UnknownUnionMember) isDocumentAttributeValue() {} func (*UnknownUnionMember) isDocumentContent() {} diff --git a/service/qbusiness/types/types_exported_test.go b/service/qbusiness/types/types_exported_test.go index ea8313a3da6..13529aa1b9b 100644 --- a/service/qbusiness/types/types_exported_test.go +++ b/service/qbusiness/types/types_exported_test.go @@ -8,6 +8,66 @@ import ( "time" ) +func ExampleAPISchema_outputUsage() { + var union types.APISchema + // type switches can be used to check the union value + switch v := union.(type) { + case *types.APISchemaMemberPayload: + _ = v.Value // Value is string + + case *types.APISchemaMemberS3: + _ = v.Value // Value is types.S3 + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *string +var _ *types.S3 + +func ExampleChatInputStream_outputUsage() { + var union types.ChatInputStream + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ChatInputStreamMemberActionExecutionEvent: + _ = v.Value // Value is types.ActionExecutionEvent + + case *types.ChatInputStreamMemberAttachmentEvent: + _ = v.Value // Value is types.AttachmentInputEvent + + case *types.ChatInputStreamMemberAuthChallengeResponseEvent: + _ = v.Value // Value is types.AuthChallengeResponseEvent + + case *types.ChatInputStreamMemberConfigurationEvent: + _ = v.Value // Value is types.ConfigurationEvent + + case *types.ChatInputStreamMemberEndOfInputEvent: + _ = v.Value // Value is types.EndOfInputEvent + + case *types.ChatInputStreamMemberTextEvent: + _ = v.Value // Value is types.TextInputEvent + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.EndOfInputEvent +var _ *types.ActionExecutionEvent +var _ *types.TextInputEvent +var _ *types.AttachmentInputEvent +var _ *types.ConfigurationEvent +var _ *types.AuthChallengeResponseEvent + func ExampleChatModeConfiguration_outputUsage() { var union types.ChatModeConfiguration // type switches can be used to check the union value @@ -26,6 +86,40 @@ func ExampleChatModeConfiguration_outputUsage() { var _ *types.PluginConfiguration +func ExampleChatOutputStream_outputUsage() { + var union types.ChatOutputStream + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ChatOutputStreamMemberActionReviewEvent: + _ = v.Value // Value is types.ActionReviewEvent + + case *types.ChatOutputStreamMemberAuthChallengeRequestEvent: + _ = v.Value // Value is types.AuthChallengeRequestEvent + + case *types.ChatOutputStreamMemberFailedAttachmentEvent: + _ = v.Value // Value is types.FailedAttachmentEvent + + case *types.ChatOutputStreamMemberMetadataEvent: + _ = v.Value // Value is types.MetadataEvent + + case *types.ChatOutputStreamMemberTextEvent: + _ = v.Value // Value is types.TextOutputEvent + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.AuthChallengeRequestEvent +var _ *types.FailedAttachmentEvent +var _ *types.ActionReviewEvent +var _ *types.MetadataEvent +var _ *types.TextOutputEvent + func ExampleDocumentAttributeBoostingConfiguration_outputUsage() { var union types.DocumentAttributeBoostingConfiguration // type switches can be used to check the union value @@ -115,6 +209,9 @@ func ExamplePluginAuthConfiguration_outputUsage() { case *types.PluginAuthConfigurationMemberBasicAuthConfiguration: _ = v.Value // Value is types.BasicAuthConfiguration + case *types.PluginAuthConfigurationMemberNoAuthConfiguration: + _ = v.Value // Value is types.NoAuthConfiguration + case *types.PluginAuthConfigurationMemberOAuth2ClientCredentialConfiguration: _ = v.Value // Value is types.OAuth2ClientCredentialConfiguration @@ -129,6 +226,7 @@ func ExamplePluginAuthConfiguration_outputUsage() { var _ *types.BasicAuthConfiguration var _ *types.OAuth2ClientCredentialConfiguration +var _ *types.NoAuthConfiguration func ExamplePrincipal_outputUsage() { var union types.Principal diff --git a/service/qbusiness/validators.go b/service/qbusiness/validators.go index c1b97085e15..359cf140029 100644 --- a/service/qbusiness/validators.go +++ b/service/qbusiness/validators.go @@ -50,6 +50,26 @@ func (m *validateOpBatchPutDocument) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpChat struct { +} + +func (*validateOpChat) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpChat) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ChatInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpChatInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpChatSync struct { } @@ -1098,6 +1118,10 @@ func addOpBatchPutDocumentValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpBatchPutDocument{}, middleware.After) } +func addOpChatValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpChat{}, middleware.After) +} + func addOpChatSyncValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpChatSync{}, middleware.After) } @@ -1386,6 +1410,31 @@ func validateActionExecution(v *types.ActionExecution) error { } } +func validateActionExecutionEvent(v *types.ActionExecutionEvent) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ActionExecutionEvent"} + if v.PluginId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PluginId")) + } + if v.Payload == nil { + invalidParams.Add(smithy.NewErrParamRequired("Payload")) + } else if v.Payload != nil { + if err := validateActionExecutionPayload(v.Payload); err != nil { + invalidParams.AddNested("Payload", err.(smithy.InvalidParamsError)) + } + } + if v.PayloadFieldNameSeparator == nil { + invalidParams.Add(smithy.NewErrParamRequired("PayloadFieldNameSeparator")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateActionExecutionPayload(v map[string]types.ActionExecutionPayloadField) error { if v == nil { return nil @@ -1419,6 +1468,25 @@ func validateActionExecutionPayloadField(v *types.ActionExecutionPayloadField) e } } +func validateAPISchema(v types.APISchema) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "APISchema"} + switch uv := v.(type) { + case *types.APISchemaMemberS3: + if err := validateS3(&uv.Value); err != nil { + invalidParams.AddNested("[s3]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateAttachmentInput(v *types.AttachmentInput) error { if v == nil { return nil @@ -1437,6 +1505,23 @@ func validateAttachmentInput(v *types.AttachmentInput) error { } } +func validateAttachmentInputEvent(v *types.AttachmentInputEvent) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AttachmentInputEvent"} + if v.Attachment != nil { + if err := validateAttachmentInput(v.Attachment); err != nil { + invalidParams.AddNested("Attachment", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateAttachmentsConfiguration(v *types.AttachmentsConfiguration) error { if v == nil { return nil @@ -1548,6 +1633,36 @@ func validateAttributeFilters(v []types.AttributeFilter) error { } } +func validateAuthChallengeResponse(v *types.AuthChallengeResponse) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AuthChallengeResponse"} + if v.ResponseMap == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResponseMap")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAuthChallengeResponseEvent(v *types.AuthChallengeResponseEvent) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AuthChallengeResponseEvent"} + if v.ResponseMap == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResponseMap")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateBasicAuthConfiguration(v *types.BasicAuthConfiguration) error { if v == nil { return nil @@ -1566,6 +1681,45 @@ func validateBasicAuthConfiguration(v *types.BasicAuthConfiguration) error { } } +func validateChatInputStream(v types.ChatInputStream) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ChatInputStream"} + switch uv := v.(type) { + case *types.ChatInputStreamMemberActionExecutionEvent: + if err := validateActionExecutionEvent(&uv.Value); err != nil { + invalidParams.AddNested("[actionExecutionEvent]", err.(smithy.InvalidParamsError)) + } + + case *types.ChatInputStreamMemberAttachmentEvent: + if err := validateAttachmentInputEvent(&uv.Value); err != nil { + invalidParams.AddNested("[attachmentEvent]", err.(smithy.InvalidParamsError)) + } + + case *types.ChatInputStreamMemberAuthChallengeResponseEvent: + if err := validateAuthChallengeResponseEvent(&uv.Value); err != nil { + invalidParams.AddNested("[authChallengeResponseEvent]", err.(smithy.InvalidParamsError)) + } + + case *types.ChatInputStreamMemberConfigurationEvent: + if err := validateConfigurationEvent(&uv.Value); err != nil { + invalidParams.AddNested("[configurationEvent]", err.(smithy.InvalidParamsError)) + } + + case *types.ChatInputStreamMemberTextEvent: + if err := validateTextInputEvent(&uv.Value); err != nil { + invalidParams.AddNested("[textEvent]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateChatModeConfiguration(v types.ChatModeConfiguration) error { if v == nil { return nil @@ -1585,6 +1739,28 @@ func validateChatModeConfiguration(v types.ChatModeConfiguration) error { } } +func validateConfigurationEvent(v *types.ConfigurationEvent) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ConfigurationEvent"} + if v.ChatModeConfiguration != nil { + if err := validateChatModeConfiguration(v.ChatModeConfiguration); err != nil { + invalidParams.AddNested("ChatModeConfiguration", err.(smithy.InvalidParamsError)) + } + } + if v.AttributeFilter != nil { + if err := validateAttributeFilter(v.AttributeFilter); err != nil { + invalidParams.AddNested("AttributeFilter", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateCreatorModeConfiguration(v *types.CreatorModeConfiguration) error { if v == nil { return nil @@ -1600,6 +1776,31 @@ func validateCreatorModeConfiguration(v *types.CreatorModeConfiguration) error { } } +func validateCustomPluginConfiguration(v *types.CustomPluginConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CustomPluginConfiguration"} + if v.Description == nil { + invalidParams.Add(smithy.NewErrParamRequired("Description")) + } + if len(v.ApiSchemaType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ApiSchemaType")) + } + if v.ApiSchema == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApiSchema")) + } else if v.ApiSchema != nil { + if err := validateAPISchema(v.ApiSchema); err != nil { + invalidParams.AddNested("ApiSchema", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateDataSourceVpcConfiguration(v *types.DataSourceVpcConfiguration) error { if v == nil { return nil @@ -2380,6 +2581,21 @@ func validateTags(v []types.Tag) error { } } +func validateTextInputEvent(v *types.TextInputEvent) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TextInputEvent"} + if v.UserMessage == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserMessage")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateTopicConfiguration(v *types.TopicConfiguration) error { if v == nil { return nil @@ -2520,6 +2736,21 @@ func validateOpBatchPutDocumentInput(v *BatchPutDocumentInput) error { } } +func validateOpChatInput(v *ChatInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ChatInput"} + if v.ApplicationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpChatSyncInput(v *ChatSyncInput) error { if v == nil { return nil @@ -2538,6 +2769,11 @@ func validateOpChatSyncInput(v *ChatSyncInput) error { invalidParams.AddNested("ActionExecution", err.(smithy.InvalidParamsError)) } } + if v.AuthChallengeResponse != nil { + if err := validateAuthChallengeResponse(v.AuthChallengeResponse); err != nil { + invalidParams.AddNested("AuthChallengeResponse", err.(smithy.InvalidParamsError)) + } + } if v.AttributeFilter != nil { if err := validateAttributeFilter(v.AttributeFilter); err != nil { invalidParams.AddNested("AttributeFilter", err.(smithy.InvalidParamsError)) @@ -2563,9 +2799,6 @@ func validateOpCreateApplicationInput(v *CreateApplicationInput) error { if v.DisplayName == nil { invalidParams.Add(smithy.NewErrParamRequired("DisplayName")) } - if v.RoleArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) - } if v.Tags != nil { if err := validateTags(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) @@ -2659,9 +2892,6 @@ func validateOpCreatePluginInput(v *CreatePluginInput) error { if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) } - if v.ServerUrl == nil { - invalidParams.Add(smithy.NewErrParamRequired("ServerUrl")) - } if v.AuthConfiguration == nil { invalidParams.Add(smithy.NewErrParamRequired("AuthConfiguration")) } else if v.AuthConfiguration != nil { @@ -2669,6 +2899,11 @@ func validateOpCreatePluginInput(v *CreatePluginInput) error { invalidParams.AddNested("AuthConfiguration", err.(smithy.InvalidParamsError)) } } + if v.CustomPluginConfiguration != nil { + if err := validateCustomPluginConfiguration(v.CustomPluginConfiguration); err != nil { + invalidParams.AddNested("CustomPluginConfiguration", err.(smithy.InvalidParamsError)) + } + } if v.Tags != nil { if err := validateTags(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) @@ -3534,6 +3769,11 @@ func validateOpUpdatePluginInput(v *UpdatePluginInput) error { if v.PluginId == nil { invalidParams.Add(smithy.NewErrParamRequired("PluginId")) } + if v.CustomPluginConfiguration != nil { + if err := validateCustomPluginConfiguration(v.CustomPluginConfiguration); err != nil { + invalidParams.AddNested("CustomPluginConfiguration", err.(smithy.InvalidParamsError)) + } + } if v.AuthConfiguration != nil { if err := validatePluginAuthConfiguration(v.AuthConfiguration); err != nil { invalidParams.AddNested("AuthConfiguration", err.(smithy.InvalidParamsError)) diff --git a/service/quicksight/api_op_CreateAccountSubscription.go b/service/quicksight/api_op_CreateAccountSubscription.go index 81baea920c1..5b890f2ba1b 100644 --- a/service/quicksight/api_op_CreateAccountSubscription.go +++ b/service/quicksight/api_op_CreateAccountSubscription.go @@ -70,17 +70,6 @@ type CreateAccountSubscriptionInput struct { // This member is required. AwsAccountId *string - // The edition of Amazon QuickSight that you want your account to have. Currently, - // you can choose from ENTERPRISE or ENTERPRISE_AND_Q . If you choose - // ENTERPRISE_AND_Q , the following parameters are required: - // - FirstName - // - LastName - // - EmailAddress - // - ContactNumber - // - // This member is required. - Edition types.Edition - // The email address that you want Amazon QuickSight to send notifications to // regarding your Amazon QuickSight account or Amazon QuickSight subscription. // @@ -92,16 +81,29 @@ type CreateAccountSubscriptionInput struct { ActiveDirectoryName *string // The admin group associated with your Active Directory or IAM Identity Center - // account. This field is required if ACTIVE_DIRECTORY or IAM_IDENTITY_CENTER is - // the selected authentication method of the new Amazon QuickSight account. For - // more information about using IAM Identity Center in Amazon QuickSight, see - // Using IAM Identity Center with Amazon QuickSight Enterprise Edition (https://docs.aws.amazon.com/quicksight/latest/user/sec-identity-management-identity-center.html) + // account. Either this field or the AdminProGroup field is required if + // ACTIVE_DIRECTORY or IAM_IDENTITY_CENTER is the selected authentication method + // of the new Amazon QuickSight account. For more information about using IAM + // Identity Center in Amazon QuickSight, see Using IAM Identity Center with Amazon + // QuickSight Enterprise Edition (https://docs.aws.amazon.com/quicksight/latest/user/sec-identity-management-identity-center.html) // in the Amazon QuickSight User Guide. For more information about using Active // Directory in Amazon QuickSight, see Using Active Directory with Amazon // QuickSight Enterprise Edition (https://docs.aws.amazon.com/quicksight/latest/user/aws-directory-service.html) // in the Amazon QuickSight User Guide. AdminGroup []string + // The admin pro group associated with your Active Directory or IAM Identity + // Center account. Either this field or the AdminGroup field is required if + // ACTIVE_DIRECTORY or IAM_IDENTITY_CENTER is the selected authentication method + // of the new Amazon QuickSight account. For more information about using IAM + // Identity Center in Amazon QuickSight, see Using IAM Identity Center with Amazon + // QuickSight Enterprise Edition (https://docs.aws.amazon.com/quicksight/latest/user/sec-identity-management-identity-center.html) + // in the Amazon QuickSight User Guide. For more information about using Active + // Directory in Amazon QuickSight, see Using Active Directory with Amazon + // QuickSight Enterprise Edition (https://docs.aws.amazon.com/quicksight/latest/user/aws-directory-service.html) + // in the Amazon QuickSight User Guide. + AdminProGroup []string + // The author group associated with your Active Directory or IAM Identity Center // account. For more information about using IAM Identity Center in Amazon // QuickSight, see Using IAM Identity Center with Amazon QuickSight Enterprise @@ -112,6 +114,16 @@ type CreateAccountSubscriptionInput struct { // in the Amazon QuickSight User Guide. AuthorGroup []string + // The author pro group associated with your Active Directory or IAM Identity + // Center account. For more information about using IAM Identity Center in Amazon + // QuickSight, see Using IAM Identity Center with Amazon QuickSight Enterprise + // Edition (https://docs.aws.amazon.com/quicksight/latest/user/sec-identity-management-identity-center.html) + // in the Amazon QuickSight User Guide. For more information about using Active + // Directory in Amazon QuickSight, see Using Active Directory with Amazon + // QuickSight Enterprise Edition (https://docs.aws.amazon.com/quicksight/latest/user/aws-directory-service.html) + // in the Amazon QuickSight User Guide. + AuthorProGroup []string + // A 10-digit phone number for the author of the Amazon QuickSight account to use // for future communications. This field is required if ENTERPPRISE_AND_Q is the // selected edition of the new Amazon QuickSight account. @@ -121,6 +133,15 @@ type CreateAccountSubscriptionInput struct { // account. DirectoryId *string + // The edition of Amazon QuickSight that you want your account to have. Currently, + // you can choose from ENTERPRISE or ENTERPRISE_AND_Q . If you choose + // ENTERPRISE_AND_Q , the following parameters are required: + // - FirstName + // - LastName + // - EmailAddress + // - ContactNumber + Edition types.Edition + // The email address of the author of the Amazon QuickSight account to use for // future communications. This field is required if ENTERPPRISE_AND_Q is the // selected edition of the new Amazon QuickSight account. @@ -149,6 +170,16 @@ type CreateAccountSubscriptionInput struct { // in the Amazon QuickSight User Guide. ReaderGroup []string + // The reader pro group associated with your Active Directory or IAM Identity + // Center account. For more information about using IAM Identity Center in Amazon + // QuickSight, see Using IAM Identity Center with Amazon QuickSight Enterprise + // Edition (https://docs.aws.amazon.com/quicksight/latest/user/sec-identity-management-identity-center.html) + // in the Amazon QuickSight User Guide. For more information about using Active + // Directory in Amazon QuickSight, see Using Active Directory with Amazon + // QuickSight Enterprise Edition (https://docs.aws.amazon.com/quicksight/latest/user/aws-directory-service.html) + // in the Amazon QuickSight User Guide. + ReaderProGroup []string + // The realm of the Active Directory that is associated with your Amazon // QuickSight account. This field is required if ACTIVE_DIRECTORY is the selected // authentication method of the new Amazon QuickSight account. diff --git a/service/quicksight/api_op_GenerateEmbedUrlForRegisteredUser.go b/service/quicksight/api_op_GenerateEmbedUrlForRegisteredUser.go index b7088b98c55..fcaf2ec9590 100644 --- a/service/quicksight/api_op_GenerateEmbedUrlForRegisteredUser.go +++ b/service/quicksight/api_op_GenerateEmbedUrlForRegisteredUser.go @@ -53,9 +53,10 @@ type GenerateEmbedUrlForRegisteredUserInput struct { // This member is required. AwsAccountId *string - // The experience you are embedding. For registered users, you can embed Amazon - // QuickSight dashboards, Amazon QuickSight visuals, the Amazon QuickSight Q search - // bar, or the entire Amazon QuickSight console. + // The experience that you want to embed. For registered users, you can embed + // Amazon QuickSight dashboards, Amazon QuickSight visuals, the Amazon QuickSight Q + // search bar, the Amazon QuickSight Generative Q&A experience, or the entire + // Amazon QuickSight console. // // This member is required. ExperienceConfiguration *types.RegisteredUserEmbeddingExperienceConfiguration @@ -83,8 +84,8 @@ type GenerateEmbedUrlForRegisteredUserInput struct { type GenerateEmbedUrlForRegisteredUserOutput struct { - // The embed URL for the Amazon QuickSight dashboard, visual, Q search bar, or - // console. + // The embed URL for the Amazon QuickSight dashboard, visual, Q search bar, + // Generative Q&A experience, or console. // // This member is required. EmbedUrl *string diff --git a/service/quicksight/api_op_RegisterUser.go b/service/quicksight/api_op_RegisterUser.go index bd55f8b11a9..483ecbf057e 100644 --- a/service/quicksight/api_op_RegisterUser.go +++ b/service/quicksight/api_op_RegisterUser.go @@ -50,11 +50,8 @@ type RegisterUserInput struct { // This member is required. Email *string - // Amazon QuickSight supports several ways of managing the identity of users. This - // parameter accepts two values: - // - IAM : A user whose identity maps to an existing IAM user or role. - // - QUICKSIGHT : A user whose identity is owned and managed internally by Amazon - // QuickSight. + // The identity type that your Amazon QuickSight account uses to manage the + // identity of users. // // This member is required. IdentityType types.IdentityType @@ -98,8 +95,9 @@ type RegisterUserInput struct { // QuickSight user. Amazon QuickSight custom permissions are applied through IAM // policies. Therefore, they override the permissions typically granted by // assigning Amazon QuickSight users to one of the default security cohorts in - // Amazon QuickSight (admin, author, reader). This feature is available only to - // Amazon QuickSight Enterprise edition subscriptions. + // Amazon QuickSight (admin, author, reader, admin pro, author pro, reader pro). + // This feature is available only to Amazon QuickSight Enterprise edition + // subscriptions. CustomPermissionsName *string // The type of supported external login provider that provides identity to let a diff --git a/service/quicksight/api_op_UpdateSPICECapacityConfiguration.go b/service/quicksight/api_op_UpdateSPICECapacityConfiguration.go new file mode 100644 index 00000000000..1fff0ed81fa --- /dev/null +++ b/service/quicksight/api_op_UpdateSPICECapacityConfiguration.go @@ -0,0 +1,150 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the SPICE capacity configuration for a Amazon QuickSight account. +func (c *Client) UpdateSPICECapacityConfiguration(ctx context.Context, params *UpdateSPICECapacityConfigurationInput, optFns ...func(*Options)) (*UpdateSPICECapacityConfigurationOutput, error) { + if params == nil { + params = &UpdateSPICECapacityConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateSPICECapacityConfiguration", params, optFns, c.addOperationUpdateSPICECapacityConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateSPICECapacityConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateSPICECapacityConfigurationInput struct { + + // The ID of the Amazon Web Services account that contains the SPICE configuration + // that you want to update. + // + // This member is required. + AwsAccountId *string + + // Determines how SPICE capacity can be purchased. The following options are + // available. + // - MANUAL : SPICE capacity can only be purchased manually. + // - AUTO_PURCHASE : Extra SPICE capacity is automatically purchased on your + // behalf as needed. SPICE capacity can also be purchased manually with this + // option. + // + // This member is required. + PurchaseMode types.PurchaseMode + + noSmithyDocumentSerde +} + +type UpdateSPICECapacityConfigurationOutput struct { + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The HTTP status of the request. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateSPICECapacityConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateSPICECapacityConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateSPICECapacityConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateSPICECapacityConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateSPICECapacityConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSPICECapacityConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateSPICECapacityConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateSPICECapacityConfiguration", + } +} diff --git a/service/quicksight/api_op_UpdateUser.go b/service/quicksight/api_op_UpdateUser.go index 095b935441c..966128ca48c 100644 --- a/service/quicksight/api_op_UpdateUser.go +++ b/service/quicksight/api_op_UpdateUser.go @@ -53,6 +53,15 @@ type UpdateUserInput struct { // dashboards. // - ADMIN : A user who is an author, who can also manage Amazon QuickSight // settings. + // - READER_PRO : Reader Pro adds Generative BI capabilities to the Reader role. + // Reader Pros have access to Amazon Q Business, can build stories with Amazon Q, + // and can generate executive summaries from dashboards. + // - AUTHOR_PRO : Author Pro adds Generative BI capabilities to the Author role. + // Author Pros can author dashboards with natural language with Amazon Q, build + // stories with Amazon Q, create Topics for Q&A, and generate executive summaries + // from dashboards. + // - ADMIN_PRO : Admin Pros are Author Pros who can also manage Amazon QuickSight + // administrative settings. Admin Pro users are billed at Author Pro pricing. // The name of the Amazon QuickSight role is invisible to the user except for the // console screens dealing with permissions. // diff --git a/service/quicksight/deserializers.go b/service/quicksight/deserializers.go index 719087bd838..53641efdcc3 100644 --- a/service/quicksight/deserializers.go +++ b/service/quicksight/deserializers.go @@ -31972,6 +31972,183 @@ func awsRestjson1_deserializeOpDocumentUpdateRoleCustomPermissionOutput(v **Upda return nil } +type awsRestjson1_deserializeOpUpdateSPICECapacityConfiguration struct { +} + +func (*awsRestjson1_deserializeOpUpdateSPICECapacityConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateSPICECapacityConfiguration) HandleDeserialize(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_deserializeOpErrorUpdateSPICECapacityConfiguration(response, &metadata) + } + output := &UpdateSPICECapacityConfigurationOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsUpdateSPICECapacityConfigurationOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateSPICECapacityConfigurationOutput(&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_deserializeOpErrorUpdateSPICECapacityConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsUpdateSPICECapacityConfigurationOutput(v *UpdateSPICECapacityConfigurationOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentUpdateSPICECapacityConfigurationOutput(v **UpdateSPICECapacityConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateSPICECapacityConfigurationOutput + if *v == nil { + sv = &UpdateSPICECapacityConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpUpdateTemplate struct { } @@ -57052,6 +57229,55 @@ func awsRestjson1_deserializeDocumentGaugeChartArcConditionalFormatting(v **type return nil } +func awsRestjson1_deserializeDocumentGaugeChartColorConfiguration(v **types.GaugeChartColorConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.GaugeChartColorConfiguration + if *v == nil { + sv = &types.GaugeChartColorConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BackgroundColor": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HexColor to be of type string, got %T instead", value) + } + sv.BackgroundColor = ptr.String(jtv) + } + + case "ForegroundColor": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HexColor to be of type string, got %T instead", value) + } + sv.ForegroundColor = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentGaugeChartConditionalFormatting(v **types.GaugeChartConditionalFormatting, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -57185,6 +57411,11 @@ func awsRestjson1_deserializeDocumentGaugeChartConfiguration(v **types.GaugeChar for key, value := range shape { switch key { + case "ColorConfiguration": + if err := awsRestjson1_deserializeDocumentGaugeChartColorConfiguration(&sv.ColorConfiguration, value); err != nil { + return err + } + case "DataLabels": if err := awsRestjson1_deserializeDocumentDataLabelOptions(&sv.DataLabels, value); err != nil { return err @@ -82866,6 +83097,15 @@ func awsRestjson1_deserializeDocumentTopicSummary(v **types.TopicSummary, value sv.TopicId = ptr.String(jtv) } + case "UserExperienceVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TopicUserExperienceVersion to be of type string, got %T instead", value) + } + sv.UserExperienceVersion = types.TopicUserExperienceVersion(jtv) + } + default: _, _ = key, value diff --git a/service/quicksight/generated.json b/service/quicksight/generated.json index 82630c46afd..a7e5da2c364 100644 --- a/service/quicksight/generated.json +++ b/service/quicksight/generated.json @@ -168,6 +168,7 @@ "api_op_UpdatePublicSharingSettings.go", "api_op_UpdateRefreshSchedule.go", "api_op_UpdateRoleCustomPermission.go", + "api_op_UpdateSPICECapacityConfiguration.go", "api_op_UpdateTemplate.go", "api_op_UpdateTemplateAlias.go", "api_op_UpdateTemplatePermissions.go", diff --git a/service/quicksight/serializers.go b/service/quicksight/serializers.go index 1012f5d80de..fa934de6467 100644 --- a/service/quicksight/serializers.go +++ b/service/quicksight/serializers.go @@ -298,6 +298,13 @@ func awsRestjson1_serializeOpDocumentCreateAccountSubscriptionInput(v *CreateAcc } } + if v.AdminProGroup != nil { + ok := object.Key("AdminProGroup") + if err := awsRestjson1_serializeDocumentGroupsList(v.AdminProGroup, ok); err != nil { + return err + } + } + if len(v.AuthenticationMethod) > 0 { ok := object.Key("AuthenticationMethod") ok.String(string(v.AuthenticationMethod)) @@ -310,6 +317,13 @@ func awsRestjson1_serializeOpDocumentCreateAccountSubscriptionInput(v *CreateAcc } } + if v.AuthorProGroup != nil { + ok := object.Key("AuthorProGroup") + if err := awsRestjson1_serializeDocumentGroupsList(v.AuthorProGroup, ok); err != nil { + return err + } + } + if v.ContactNumber != nil { ok := object.Key("ContactNumber") ok.String(*v.ContactNumber) @@ -357,6 +371,13 @@ func awsRestjson1_serializeOpDocumentCreateAccountSubscriptionInput(v *CreateAcc } } + if v.ReaderProGroup != nil { + ok := object.Key("ReaderProGroup") + if err := awsRestjson1_serializeDocumentGroupsList(v.ReaderProGroup, ok); err != nil { + return err + } + } + if v.Realm != nil { ok := object.Key("Realm") ok.String(*v.Realm) @@ -14621,6 +14642,94 @@ func awsRestjson1_serializeOpDocumentUpdateRoleCustomPermissionInput(v *UpdateRo return nil } +type awsRestjson1_serializeOpUpdateSPICECapacityConfiguration struct { +} + +func (*awsRestjson1_serializeOpUpdateSPICECapacityConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateSPICECapacityConfiguration) 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.(*UpdateSPICECapacityConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/spice-capacity-configuration") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateSPICECapacityConfigurationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateSPICECapacityConfigurationInput(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_serializeOpHttpBindingsUpdateSPICECapacityConfigurationInput(v *UpdateSPICECapacityConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateSPICECapacityConfigurationInput(v *UpdateSPICECapacityConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.PurchaseMode) > 0 { + ok := object.Key("PurchaseMode") + ok.String(string(v.PurchaseMode)) + } + + return nil +} + type awsRestjson1_serializeOpUpdateTemplate struct { } @@ -16212,6 +16321,13 @@ func awsRestjson1_serializeDocumentAnonymousUserEmbeddingExperienceConfiguration } } + if v.GenerativeQnA != nil { + ok := object.Key("GenerativeQnA") + if err := awsRestjson1_serializeDocumentAnonymousUserGenerativeQnAEmbeddingConfiguration(v.GenerativeQnA, ok); err != nil { + return err + } + } + if v.QSearchBar != nil { ok := object.Key("QSearchBar") if err := awsRestjson1_serializeDocumentAnonymousUserQSearchBarEmbeddingConfiguration(v.QSearchBar, ok); err != nil { @@ -16222,6 +16338,18 @@ func awsRestjson1_serializeDocumentAnonymousUserEmbeddingExperienceConfiguration return nil } +func awsRestjson1_serializeDocumentAnonymousUserGenerativeQnAEmbeddingConfiguration(v *types.AnonymousUserGenerativeQnAEmbeddingConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InitialTopicId != nil { + ok := object.Key("InitialTopicId") + ok.String(*v.InitialTopicId) + } + + return nil +} + func awsRestjson1_serializeDocumentAnonymousUserQSearchBarEmbeddingConfiguration(v *types.AnonymousUserQSearchBarEmbeddingConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -25158,6 +25286,23 @@ func awsRestjson1_serializeDocumentGaugeChartArcConditionalFormatting(v *types.G return nil } +func awsRestjson1_serializeDocumentGaugeChartColorConfiguration(v *types.GaugeChartColorConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BackgroundColor != nil { + ok := object.Key("BackgroundColor") + ok.String(*v.BackgroundColor) + } + + if v.ForegroundColor != nil { + ok := object.Key("ForegroundColor") + ok.String(*v.ForegroundColor) + } + + return nil +} + func awsRestjson1_serializeDocumentGaugeChartConditionalFormatting(v *types.GaugeChartConditionalFormatting, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -25210,6 +25355,13 @@ func awsRestjson1_serializeDocumentGaugeChartConfiguration(v *types.GaugeChartCo object := value.Object() defer object.Close() + if v.ColorConfiguration != nil { + ok := object.Key("ColorConfiguration") + if err := awsRestjson1_serializeDocumentGaugeChartColorConfiguration(v.ColorConfiguration, ok); err != nil { + return err + } + } + if v.DataLabels != nil { ok := object.Key("DataLabels") if err := awsRestjson1_serializeDocumentDataLabelOptions(v.DataLabels, ok); err != nil { @@ -31573,6 +31725,13 @@ func awsRestjson1_serializeDocumentRegisteredUserEmbeddingExperienceConfiguratio } } + if v.GenerativeQnA != nil { + ok := object.Key("GenerativeQnA") + if err := awsRestjson1_serializeDocumentRegisteredUserGenerativeQnAEmbeddingConfiguration(v.GenerativeQnA, ok); err != nil { + return err + } + } + if v.QSearchBar != nil { ok := object.Key("QSearchBar") if err := awsRestjson1_serializeDocumentRegisteredUserQSearchBarEmbeddingConfiguration(v.QSearchBar, ok); err != nil { @@ -31590,6 +31749,18 @@ func awsRestjson1_serializeDocumentRegisteredUserEmbeddingExperienceConfiguratio return nil } +func awsRestjson1_serializeDocumentRegisteredUserGenerativeQnAEmbeddingConfiguration(v *types.RegisteredUserGenerativeQnAEmbeddingConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InitialTopicId != nil { + ok := object.Key("InitialTopicId") + ok.String(*v.InitialTopicId) + } + + return nil +} + func awsRestjson1_serializeDocumentRegisteredUserQSearchBarEmbeddingConfiguration(v *types.RegisteredUserQSearchBarEmbeddingConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/quicksight/snapshot_test.go b/service/quicksight/snapshot_test.go index a527574be6f..f9dad090428 100644 --- a/service/quicksight/snapshot_test.go +++ b/service/quicksight/snapshot_test.go @@ -1982,6 +1982,18 @@ func TestCheckSnapshot_UpdateRoleCustomPermission(t *testing.T) { } } +func TestCheckSnapshot_UpdateSPICECapacityConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateSPICECapacityConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateSPICECapacityConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateTemplate(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateTemplate(context.Background(), nil, func(o *Options) { @@ -4033,6 +4045,18 @@ func TestUpdateSnapshot_UpdateRoleCustomPermission(t *testing.T) { } } +func TestUpdateSnapshot_UpdateSPICECapacityConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateSPICECapacityConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateSPICECapacityConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateTemplate(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateTemplate(context.Background(), nil, func(o *Options) { diff --git a/service/quicksight/types/enums.go b/service/quicksight/types/enums.go index b8dc1035986..b9aaefba04e 100644 --- a/service/quicksight/types/enums.go +++ b/service/quicksight/types/enums.go @@ -3039,6 +3039,24 @@ func (PropertyUsage) Values() []PropertyUsage { } } +type PurchaseMode string + +// Enum values for PurchaseMode +const ( + PurchaseModeManual PurchaseMode = "MANUAL" + PurchaseModeAutoPurchase PurchaseMode = "AUTO_PURCHASE" +) + +// Values returns all known values for PurchaseMode. 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 (PurchaseMode) Values() []PurchaseMode { + return []PurchaseMode{ + "MANUAL", + "AUTO_PURCHASE", + } +} + type RadarChartAxesRangeScale string // Enum values for RadarChartAxesRangeScale @@ -3298,9 +3316,12 @@ type Role string // Enum values for Role const ( - RoleAdmin Role = "ADMIN" - RoleAuthor Role = "AUTHOR" - RoleReader Role = "READER" + RoleAdmin Role = "ADMIN" + RoleAuthor Role = "AUTHOR" + RoleReader Role = "READER" + RoleAdminPro Role = "ADMIN_PRO" + RoleAuthorPro Role = "AUTHOR_PRO" + RoleReaderPro Role = "READER_PRO" ) // Values returns all known values for Role. Note that this can be expanded in the @@ -3311,6 +3332,9 @@ func (Role) Values() []Role { "ADMIN", "AUTHOR", "READER", + "ADMIN_PRO", + "AUTHOR_PRO", + "READER_PRO", } } @@ -4325,6 +4349,9 @@ const ( UserRoleReader UserRole = "READER" UserRoleRestrictedAuthor UserRole = "RESTRICTED_AUTHOR" UserRoleRestrictedReader UserRole = "RESTRICTED_READER" + UserRoleAdminPro UserRole = "ADMIN_PRO" + UserRoleAuthorPro UserRole = "AUTHOR_PRO" + UserRoleReaderPro UserRole = "READER_PRO" ) // Values returns all known values for UserRole. Note that this can be expanded in @@ -4337,6 +4364,9 @@ func (UserRole) Values() []UserRole { "READER", "RESTRICTED_AUTHOR", "RESTRICTED_READER", + "ADMIN_PRO", + "AUTHOR_PRO", + "READER_PRO", } } diff --git a/service/quicksight/types/types.go b/service/quicksight/types/types.go index 967708c9b45..03179156fc5 100644 --- a/service/quicksight/types/types.go +++ b/service/quicksight/types/types.go @@ -439,21 +439,41 @@ type AnonymousUserEmbeddingExperienceConfiguration struct { // The type of embedding experience. In this case, Amazon QuickSight visuals. DashboardVisual *AnonymousUserDashboardVisualEmbeddingConfiguration + // The Generative Q&A experience that you want to use for anonymous user embedding. + GenerativeQnA *AnonymousUserGenerativeQnAEmbeddingConfiguration + // The Q search bar that you want to use for anonymous user embedding. QSearchBar *AnonymousUserQSearchBarEmbeddingConfiguration noSmithyDocumentSerde } +// The settings that you want to use for the Generative Q&A experience. +type AnonymousUserGenerativeQnAEmbeddingConfiguration struct { + + // The Amazon QuickSight Q topic ID of the new reader experience topic that you + // want the anonymous user to see first. This ID is included in the output URL. + // When the URL in response is accessed, Amazon QuickSight renders the Generative + // Q&A experience with this new reader experience topic pre selected. The Amazon + // Resource Name (ARN) of this Q new reader experience topic must be included in + // the AuthorizedResourceArns parameter. Otherwise, the request fails with an + // InvalidParameterValueException error. + // + // This member is required. + InitialTopicId *string + + noSmithyDocumentSerde +} + // The settings that you want to use with the Q search bar. type AnonymousUserQSearchBarEmbeddingConfiguration struct { - // The QuickSight Q topic ID of the topic that you want the anonymous user to see - // first. This ID is included in the output URL. When the URL in response is - // accessed, Amazon QuickSight renders the Q search bar with this topic - // pre-selected. The Amazon Resource Name (ARN) of this Q topic must be included in - // the AuthorizedResourceArns parameter. Otherwise, the request will fail with - // InvalidParameterValueException . + // The Amazon QuickSight Q topic ID of the legacy topic that you want the + // anonymous user to see first. This ID is included in the output URL. When the URL + // in response is accessed, Amazon QuickSight renders the Q search bar with this + // legacy topic pre-selected. The Amazon Resource Name (ARN) of this Q legacy topic + // must be included in the AuthorizedResourceArns parameter. Otherwise, the + // request fails with an InvalidParameterValueException error. // // This member is required. InitialTopicId *string @@ -6591,6 +6611,18 @@ type GaugeChartArcConditionalFormatting struct { noSmithyDocumentSerde } +// The color configuration of a GaugeChartVisual . +type GaugeChartColorConfiguration struct { + + // The background color configuration of a GaugeChartVisual . + BackgroundColor *string + + // The foreground color configuration of a GaugeChartVisual . + ForegroundColor *string + + noSmithyDocumentSerde +} + // The conditional formatting of a GaugeChartVisual . type GaugeChartConditionalFormatting struct { @@ -6615,6 +6647,9 @@ type GaugeChartConditionalFormattingOption struct { // The configuration of a GaugeChartVisual . type GaugeChartConfiguration struct { + // The color configuration of a GaugeChartVisual . + ColorConfiguration *GaugeChartColorConfiguration + // The data label configuration of a GaugeChartVisual . DataLabels *DataLabelOptions @@ -10632,6 +10667,12 @@ type RegisteredUserEmbeddingExperienceConfiguration struct { // The type of embedding experience. In this case, Amazon QuickSight visuals. DashboardVisual *RegisteredUserDashboardVisualEmbeddingConfiguration + // The configuration details for embedding the Generative Q&A experience. For more + // information about embedding the Generative Q&A experience, see Embedding + // Overview (https://docs.aws.amazon.com/quicksight/latest/user/embedding-overview.html) + // in the Amazon QuickSight User Guide. + GenerativeQnA *RegisteredUserGenerativeQnAEmbeddingConfiguration + // The configuration details for embedding the Q search bar. For more information // about embedding the Q search bar, see Embedding Overview (https://docs.aws.amazon.com/quicksight/latest/user/embedding-overview.html) // in the Amazon QuickSight User Guide. @@ -10663,16 +10704,36 @@ type RegisteredUserEmbeddingExperienceConfiguration struct { noSmithyDocumentSerde } +// An object that provides information about the configuration of a Generative Q&A +// experience. +type RegisteredUserGenerativeQnAEmbeddingConfiguration struct { + + // The ID of the new Q reader experience topic that you want to make the starting + // topic in the Generative Q&A experience. You can find a topic ID by navigating to + // the Topics pane in the Amazon QuickSight application and opening a topic. The ID + // is in the URL for the topic that you open. If you don't specify an initial topic + // or you specify a legacy topic, a list of all shared new reader experience topics + // is shown in the Generative Q&A experience for your readers. When you select an + // initial new reader experience topic, you can specify whether or not readers are + // allowed to select other new reader experience topics from the available ones in + // the list. + InitialTopicId *string + + noSmithyDocumentSerde +} + // Information about the Q search bar embedding experience. type RegisteredUserQSearchBarEmbeddingConfiguration struct { - // The ID of the Q topic that you want to make the starting topic in the Q search - // bar. You can find a topic ID by navigating to the Topics pane in the Amazon - // QuickSight application and opening a topic. The ID is in the URL for the topic - // that you open. If you don't specify an initial topic, a list of all shared - // topics is shown in the Q bar for your readers. When you select an initial topic, - // you can specify whether or not readers are allowed to select other topics from - // the available ones in the list. + // The ID of the legacy Q topic that you want to use as the starting topic in the + // Q search bar. To locate the topic ID of the topic that you want to use, open the + // Amazon QuickSight console (https://quicksight.aws.amazon.com/) , navigate to the + // Topics pane, and choose thre topic that you want to use. The TopicID is located + // in the URL of the topic that opens. When you select an initial topic, you can + // specify whether or not readers are allowed to select other topics from the list + // of available topics. If you don't specify an initial topic or if you specify a + // new reader experience topic, a list of all shared legacy topics is shown in the + // Q bar. InitialTopicId *string noSmithyDocumentSerde @@ -13991,6 +14052,9 @@ type TopicSummary struct { // Amazon Web Services account. TopicId *string + // The user experience version of the topic. + UserExperienceVersion TopicUserExperienceVersion + noSmithyDocumentSerde } @@ -14500,6 +14564,15 @@ type User struct { // dashboards. // - ADMIN : A user who is an author, who can also manage Amazon Amazon // QuickSight settings. + // - READER_PRO : Reader Pro adds Generative BI capabilities to the Reader role. + // Reader Pros have access to Amazon Q Business, can build stories with Amazon Q, + // and can generate executive summaries from dashboards. + // - AUTHOR_PRO : Author Pro adds Generative BI capabilities to the Author role. + // Author Pros can author dashboards with natural language with Amazon Q, build + // stories with Amazon Q, create Topics for Q&A, and generate executive summaries + // from dashboards. + // - ADMIN_PRO : Admin Pros are Author Pros who can also manage Amazon QuickSight + // administrative settings. Admin Pro users are billed at Author Pro pricing. // - RESTRICTED_READER : This role isn't currently available for use. // - RESTRICTED_AUTHOR : This role isn't currently available for use. Role UserRole diff --git a/service/quicksight/validators.go b/service/quicksight/validators.go index 42fadb0369d..1d4e07accfa 100644 --- a/service/quicksight/validators.go +++ b/service/quicksight/validators.go @@ -3210,6 +3210,26 @@ func (m *validateOpUpdateRoleCustomPermission) HandleInitialize(ctx context.Cont return next.HandleInitialize(ctx, in) } +type validateOpUpdateSPICECapacityConfiguration struct { +} + +func (*validateOpUpdateSPICECapacityConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateSPICECapacityConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateSPICECapacityConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateSPICECapacityConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateTemplateAlias struct { } @@ -4070,6 +4090,10 @@ func addOpUpdateRoleCustomPermissionValidationMiddleware(stack *middleware.Stack return stack.Initialize.Add(&validateOpUpdateRoleCustomPermission{}, middleware.After) } +func addOpUpdateSPICECapacityConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateSPICECapacityConfiguration{}, middleware.After) +} + func addOpUpdateTemplateAliasValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateTemplateAlias{}, middleware.After) } @@ -4344,6 +4368,26 @@ func validateAnonymousUserEmbeddingExperienceConfiguration(v *types.AnonymousUse invalidParams.AddNested("QSearchBar", err.(smithy.InvalidParamsError)) } } + if v.GenerativeQnA != nil { + if err := validateAnonymousUserGenerativeQnAEmbeddingConfiguration(v.GenerativeQnA); err != nil { + invalidParams.AddNested("GenerativeQnA", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAnonymousUserGenerativeQnAEmbeddingConfiguration(v *types.AnonymousUserGenerativeQnAEmbeddingConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AnonymousUserGenerativeQnAEmbeddingConfiguration"} + if v.InitialTopicId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InitialTopicId")) + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -17737,9 +17781,6 @@ func validateOpCreateAccountSubscriptionInput(v *CreateAccountSubscriptionInput) return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateAccountSubscriptionInput"} - if len(v.Edition) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Edition")) - } if len(v.AuthenticationMethod) == 0 { invalidParams.Add(smithy.NewErrParamRequired("AuthenticationMethod")) } @@ -21220,6 +21261,24 @@ func validateOpUpdateRoleCustomPermissionInput(v *UpdateRoleCustomPermissionInpu } } +func validateOpUpdateSPICECapacityConfigurationInput(v *UpdateSPICECapacityConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateSPICECapacityConfigurationInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if len(v.PurchaseMode) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("PurchaseMode")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateTemplateAliasInput(v *UpdateTemplateAliasInput) error { if v == nil { return nil diff --git a/service/route53resolver/api_op_CreateFirewallRule.go b/service/route53resolver/api_op_CreateFirewallRule.go index bc19471ea99..55f7b54a7f6 100644 --- a/service/route53resolver/api_op_CreateFirewallRule.go +++ b/service/route53resolver/api_op_CreateFirewallRule.go @@ -101,6 +101,15 @@ type CreateFirewallRuleInput struct { // This setting is required if the rule action setting is BLOCK . BlockResponse types.BlockResponse + // How you want the the rule to evaluate DNS redirection in the DNS redirection + // chain, such as CNAME, DNAME, ot ALIAS. Inspect_Redirection_Domain (Default) + // inspects all domains in the redirection chain. The individual domains in the + // redirection chain must be added to the allow domain list. + // Trust_Redirection_Domain inspects only the first domain in the redirection + // chain. You don't need to add the subsequent domains in the redirection list to + // the domain alloww list. + FirewallDomainRedirectionAction types.FirewallDomainRedirectionAction + // The DNS query type you want the rule to evaluate. Allowed values are; // - A: Returns an IPv4 address. // - AAAA: Returns an Ipv6 address. @@ -115,6 +124,10 @@ type CreateFirewallRuleInput struct { // - SPF: Lists the servers authorized to send emails from a domain. // - SRV: Application specific values that identify servers. // - TXT: Verifies email senders and application-specific values. + // - A query type you define by using the DNS type ID, for example 28 for AAAA. + // The values must be defined as TYPENUMBER, where the NUMBER can be 1-65334, for + // example, TYPE28. For more information, see List of DNS record types (https://en.wikipedia.org/wiki/List_of_DNS_record_types) + // . Qtype *string noSmithyDocumentSerde diff --git a/service/route53resolver/api_op_CreateResolverEndpoint.go b/service/route53resolver/api_op_CreateResolverEndpoint.go index d695bd0c055..cd07a478846 100644 --- a/service/route53resolver/api_op_CreateResolverEndpoint.go +++ b/service/route53resolver/api_op_CreateResolverEndpoint.go @@ -63,7 +63,13 @@ type CreateResolverEndpointInput struct { // rules (for inbound Resolver endpoints) or outbound rules (for outbound Resolver // endpoints). Inbound and outbound rules must allow TCP and UDP access. For // inbound access, open port 53. For outbound access, open the port that you're - // using for DNS queries on your network. + // using for DNS queries on your network. Some security group rules will cause your + // connection to be tracked. For outbound resolver endpoint, it can potentially + // impact the maximum queries per second from outbound endpoint to your target name + // server. For inbound resolver endpoint, it can bring down the overall maximum + // queries per second per IP address to as low as 1500. To avoid connection + // tracking caused by security group, see Untracked connections (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-connection-tracking.html#untracked-connectionsl) + // . // // This member is required. SecurityGroupIds []string diff --git a/service/route53resolver/api_op_DeleteFirewallRule.go b/service/route53resolver/api_op_DeleteFirewallRule.go index 9e80fc2a8bc..aff1baa3930 100644 --- a/service/route53resolver/api_op_DeleteFirewallRule.go +++ b/service/route53resolver/api_op_DeleteFirewallRule.go @@ -55,6 +55,10 @@ type DeleteFirewallRuleInput struct { // - SPF: Lists the servers authorized to send emails from a domain. // - SRV: Application specific values that identify servers. // - TXT: Verifies email senders and application-specific values. + // - A query type you define by using the DNS type ID, for example 28 for AAAA. + // The values must be defined as TYPENUMBER, where the NUMBER can be 1-65334, for + // example, TYPE28. For more information, see List of DNS record types (https://en.wikipedia.org/wiki/List_of_DNS_record_types) + // . Qtype *string noSmithyDocumentSerde diff --git a/service/route53resolver/api_op_UpdateFirewallRule.go b/service/route53resolver/api_op_UpdateFirewallRule.go index 9a9dab31beb..e035b2a26ab 100644 --- a/service/route53resolver/api_op_UpdateFirewallRule.go +++ b/service/route53resolver/api_op_UpdateFirewallRule.go @@ -71,6 +71,15 @@ type UpdateFirewallRuleInput struct { // custom handling details in the rule's BlockOverride* settings. BlockResponse types.BlockResponse + // How you want the the rule to evaluate DNS redirection in the DNS redirection + // chain, such as CNAME, DNAME, ot ALIAS. Inspect_Redirection_Domain (Default) + // inspects all domains in the redirection chain. The individual domains in the + // redirection chain must be added to the allow domain list. + // Trust_Redirection_Domain inspects only the first domain in the redirection + // chain. You don't need to add the subsequent domains in the domain in the + // redirection list to the domain alloww list. + FirewallDomainRedirectionAction types.FirewallDomainRedirectionAction + // The name of the rule. Name *string @@ -96,6 +105,10 @@ type UpdateFirewallRuleInput struct { // - SPF: Lists the servers authorized to send emails from a domain. // - SRV: Application specific values that identify servers. // - TXT: Verifies email senders and application-specific values. + // - A query type you define by using the DNS type ID, for example 28 for AAAA. + // The values must be defined as TYPENUMBER, where the NUMBER can be 1-65334, for + // example, TYPE28. For more information, see List of DNS record types (https://en.wikipedia.org/wiki/List_of_DNS_record_types) + // . Qtype *string noSmithyDocumentSerde diff --git a/service/route53resolver/deserializers.go b/service/route53resolver/deserializers.go index 0315b935b33..8af95d20006 100644 --- a/service/route53resolver/deserializers.go +++ b/service/route53resolver/deserializers.go @@ -9390,6 +9390,15 @@ func awsAwsjson11_deserializeDocumentFirewallRule(v **types.FirewallRule, value sv.FirewallDomainListId = ptr.String(jtv) } + case "FirewallDomainRedirectionAction": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FirewallDomainRedirectionAction to be of type string, got %T instead", value) + } + sv.FirewallDomainRedirectionAction = types.FirewallDomainRedirectionAction(jtv) + } + case "FirewallRuleGroupId": if value != nil { jtv, ok := value.(string) diff --git a/service/route53resolver/serializers.go b/service/route53resolver/serializers.go index fac1e630f8b..384da6e98ab 100644 --- a/service/route53resolver/serializers.go +++ b/service/route53resolver/serializers.go @@ -4216,6 +4216,11 @@ func awsAwsjson11_serializeOpDocumentCreateFirewallRuleInput(v *CreateFirewallRu ok.String(*v.FirewallDomainListId) } + if len(v.FirewallDomainRedirectionAction) > 0 { + ok := object.Key("FirewallDomainRedirectionAction") + ok.String(string(v.FirewallDomainRedirectionAction)) + } + if v.FirewallRuleGroupId != nil { ok := object.Key("FirewallRuleGroupId") ok.String(*v.FirewallRuleGroupId) @@ -5359,6 +5364,11 @@ func awsAwsjson11_serializeOpDocumentUpdateFirewallRuleInput(v *UpdateFirewallRu ok.String(*v.FirewallDomainListId) } + if len(v.FirewallDomainRedirectionAction) > 0 { + ok := object.Key("FirewallDomainRedirectionAction") + ok.String(string(v.FirewallDomainRedirectionAction)) + } + if v.FirewallRuleGroupId != nil { ok := object.Key("FirewallRuleGroupId") ok.String(*v.FirewallRuleGroupId) diff --git a/service/route53resolver/types/enums.go b/service/route53resolver/types/enums.go index d08d7235348..29fabf0eae4 100644 --- a/service/route53resolver/types/enums.go +++ b/service/route53resolver/types/enums.go @@ -119,6 +119,25 @@ func (FirewallDomainListStatus) Values() []FirewallDomainListStatus { } } +type FirewallDomainRedirectionAction string + +// Enum values for FirewallDomainRedirectionAction +const ( + FirewallDomainRedirectionActionInspectRedirectionDomain FirewallDomainRedirectionAction = "INSPECT_REDIRECTION_DOMAIN" + FirewallDomainRedirectionActionTrustRedirectionDomain FirewallDomainRedirectionAction = "TRUST_REDIRECTION_DOMAIN" +) + +// Values returns all known values for FirewallDomainRedirectionAction. 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 (FirewallDomainRedirectionAction) Values() []FirewallDomainRedirectionAction { + return []FirewallDomainRedirectionAction{ + "INSPECT_REDIRECTION_DOMAIN", + "TRUST_REDIRECTION_DOMAIN", + } +} + type FirewallDomainUpdateOperation string // Enum values for FirewallDomainUpdateOperation diff --git a/service/route53resolver/types/errors.go b/service/route53resolver/types/errors.go index 20d87349919..40cb1cc194e 100644 --- a/service/route53resolver/types/errors.go +++ b/service/route53resolver/types/errors.go @@ -8,7 +8,8 @@ import ( ) // The current account doesn't have the IAM permissions required to perform the -// specified Resolver operation. +// specified Resolver operation. This error can also be thrown when a customer has +// reached the 5120 character limit for a resource policy for CloudWatch Logs. type AccessDeniedException struct { Message *string diff --git a/service/route53resolver/types/types.go b/service/route53resolver/types/types.go index 7612589d8a9..1f155adca9d 100644 --- a/service/route53resolver/types/types.go +++ b/service/route53resolver/types/types.go @@ -279,6 +279,15 @@ type FirewallRule struct { // The ID of the domain list that's used in the rule. FirewallDomainListId *string + // How you want the the rule to evaluate DNS redirection in the DNS redirection + // chain, such as CNAME, DNAME, ot ALIAS. Inspect_Redirection_Domain (Default) + // inspects all domains in the redirection chain. The individual domains in the + // redirection chain must be added to the allow domain list. + // Trust_Redirection_Domain inspects only the first domain in the redirection + // chain. You don't need to add the subsequent domains in the domain in the + // redirection list to the domain alloww list. + FirewallDomainRedirectionAction FirewallDomainRedirectionAction + // The unique identifier of the firewall rule group of the rule. FirewallRuleGroupId *string @@ -308,6 +317,10 @@ type FirewallRule struct { // - SPF: Lists the servers authorized to send emails from a domain. // - SRV: Application specific values that identify servers. // - TXT: Verifies email senders and application-specific values. + // - A query type you define by using the DNS type ID, for example 28 for AAAA. + // The values must be defined as TYPENUMBER, where the NUMBER can be 1-65334, for + // example, TYPE28. For more information, see List of DNS record types (https://en.wikipedia.org/wiki/List_of_DNS_record_types) + // . Qtype *string noSmithyDocumentSerde diff --git a/service/sagemaker/api_op_CreateTrainingJob.go b/service/sagemaker/api_op_CreateTrainingJob.go index 73ebca51c68..b183e314ecd 100644 --- a/service/sagemaker/api_op_CreateTrainingJob.go +++ b/service/sagemaker/api_op_CreateTrainingJob.go @@ -223,6 +223,10 @@ type CreateTrainingJobInput struct { // InternalServerError . RetryStrategy *types.RetryStrategy + // Contains information about attribute-based access control (ABAC) for the + // training job. + SessionChainingConfig *types.SessionChainingConfig + // An array of key-value pairs. You can use tags to categorize your Amazon Web // Services resources in different ways, for example, by purpose, owner, or // environment. For more information, see Tagging Amazon Web Services Resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) diff --git a/service/sagemaker/serializers.go b/service/sagemaker/serializers.go index 561f20d711a..1ca154d7e9e 100644 --- a/service/sagemaker/serializers.go +++ b/service/sagemaker/serializers.go @@ -26644,6 +26644,18 @@ func awsAwsjson11_serializeDocumentServiceCatalogProvisioningUpdateDetails(v *ty return nil } +func awsAwsjson11_serializeDocumentSessionChainingConfig(v *types.SessionChainingConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EnableSessionTagChaining != nil { + ok := object.Key("EnableSessionTagChaining") + ok.Boolean(*v.EnableSessionTagChaining) + } + + return nil +} + func awsAwsjson11_serializeDocumentShadowModeConfig(v *types.ShadowModeConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -30977,6 +30989,13 @@ func awsAwsjson11_serializeOpDocumentCreateTrainingJobInput(v *CreateTrainingJob ok.String(*v.RoleArn) } + if v.SessionChainingConfig != nil { + ok := object.Key("SessionChainingConfig") + if err := awsAwsjson11_serializeDocumentSessionChainingConfig(v.SessionChainingConfig, ok); err != nil { + return err + } + } + if v.StoppingCondition != nil { ok := object.Key("StoppingCondition") if err := awsAwsjson11_serializeDocumentStoppingCondition(v.StoppingCondition, ok); err != nil { diff --git a/service/sagemaker/types/enums.go b/service/sagemaker/types/enums.go index 5dbbf339ec7..228a1c15eaf 100644 --- a/service/sagemaker/types/enums.go +++ b/service/sagemaker/types/enums.go @@ -4851,6 +4851,14 @@ const ( ProductionVariantInstanceTypeMlG516xlarge ProductionVariantInstanceType = "ml.g5.16xlarge" ProductionVariantInstanceTypeMlG524xlarge ProductionVariantInstanceType = "ml.g5.24xlarge" ProductionVariantInstanceTypeMlG548xlarge ProductionVariantInstanceType = "ml.g5.48xlarge" + ProductionVariantInstanceTypeMlG6Xlarge ProductionVariantInstanceType = "ml.g6.xlarge" + ProductionVariantInstanceTypeMlG62xlarge ProductionVariantInstanceType = "ml.g6.2xlarge" + ProductionVariantInstanceTypeMlG64xlarge ProductionVariantInstanceType = "ml.g6.4xlarge" + ProductionVariantInstanceTypeMlG68xlarge ProductionVariantInstanceType = "ml.g6.8xlarge" + ProductionVariantInstanceTypeMlG612xlarge ProductionVariantInstanceType = "ml.g6.12xlarge" + ProductionVariantInstanceTypeMlG616xlarge ProductionVariantInstanceType = "ml.g6.16xlarge" + ProductionVariantInstanceTypeMlG624xlarge ProductionVariantInstanceType = "ml.g6.24xlarge" + ProductionVariantInstanceTypeMlG648xlarge ProductionVariantInstanceType = "ml.g6.48xlarge" ProductionVariantInstanceTypeMlP4d24xlarge ProductionVariantInstanceType = "ml.p4d.24xlarge" ProductionVariantInstanceTypeMlC7gLarge ProductionVariantInstanceType = "ml.c7g.large" ProductionVariantInstanceTypeMlC7gXlarge ProductionVariantInstanceType = "ml.c7g.xlarge" @@ -5036,6 +5044,14 @@ func (ProductionVariantInstanceType) Values() []ProductionVariantInstanceType { "ml.g5.16xlarge", "ml.g5.24xlarge", "ml.g5.48xlarge", + "ml.g6.xlarge", + "ml.g6.2xlarge", + "ml.g6.4xlarge", + "ml.g6.8xlarge", + "ml.g6.12xlarge", + "ml.g6.16xlarge", + "ml.g6.24xlarge", + "ml.g6.48xlarge", "ml.p4d.24xlarge", "ml.c7g.large", "ml.c7g.xlarge", diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index 7897be435da..10bbefa71b8 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -13901,6 +13901,18 @@ type ServiceCatalogProvisioningUpdateDetails struct { noSmithyDocumentSerde } +// Contains information about attribute-based access control (ABAC) for a training +// job. +type SessionChainingConfig struct { + + // Set to True to allow SageMaker to extract session tags from a training job + // creation role and reuse these tags when assuming the training job execution + // role. + EnableSessionTagChaining *bool + + noSmithyDocumentSerde +} + // The configuration of ShadowMode inference experiment type, which specifies a // production variant to take all the inference requests, and a shadow variant to // which Amazon SageMaker replicates a percentage of the inference requests. For diff --git a/service/signer/api_op_AddProfilePermission.go b/service/signer/api_op_AddProfilePermission.go index 3b6816d5237..2290398815d 100644 --- a/service/signer/api_op_AddProfilePermission.go +++ b/service/signer/api_op_AddProfilePermission.go @@ -28,7 +28,18 @@ func (c *Client) AddProfilePermission(ctx context.Context, params *AddProfilePer type AddProfilePermissionInput struct { - // The AWS Signer action permitted as part of cross-account permissions. + // For cross-account signing. Grant a designated account permission to perform one + // or more of the following actions. Each action is associated with a specific + // API's operations. For more information about cross-account signing, see Using + // cross-account signing with signing profiles (https://docs.aws.amazon.com/signer/latest/developerguide/signing-profile-cross-account.html) + // in the AWS Signer Developer Guide. You can designate the following actions to an + // account. + // - signer:StartSigningJob . This action isn't supported for container image + // workflows. For details, see StartSigningJob . + // - signer:SignPayload . This action isn't supported for AWS Lambda workflows. + // For details, see SignPayload + // - signer:GetSigningProfile . For details, see GetSigningProfile . + // - signer:RevokeSignature . For details, see RevokeSignature . // // This member is required. Action *string diff --git a/service/signer/api_op_StartSigningJob.go b/service/signer/api_op_StartSigningJob.go index 887e6d1f299..3c24b5c43df 100644 --- a/service/signer/api_op_StartSigningJob.go +++ b/service/signer/api_op_StartSigningJob.go @@ -22,6 +22,8 @@ import ( // destination bucket to write your signed code. // - You specify the name of the source and destination buckets when calling the // StartSigningJob operation. +// - You must ensure the S3 buckets are from the same Region as the signing +// profile. Cross-Region signing isn't supported. // - You must also specify a request token that identifies your request to // Signer. //