repo_name
stringlengths 1
52
| repo_creator
stringclasses 6
values | programming_language
stringclasses 4
values | code
stringlengths 0
9.68M
| num_lines
int64 1
234k
|
---|---|---|---|---|
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes a configuration set. Configuration sets enable you to publish email
// sending events. For information about using configuration sets, see the Amazon
// SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html)
// . You can execute this operation no more than once per second.
func (c *Client) DeleteConfigurationSet(ctx context.Context, params *DeleteConfigurationSetInput, optFns ...func(*Options)) (*DeleteConfigurationSetOutput, error) {
if params == nil {
params = &DeleteConfigurationSetInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteConfigurationSet", params, optFns, c.addOperationDeleteConfigurationSetMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteConfigurationSetOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to delete a configuration set. Configuration sets enable
// you to publish email sending events. For information about using configuration
// sets, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html)
// .
type DeleteConfigurationSetInput struct {
// The name of the configuration set to delete.
//
// This member is required.
ConfigurationSetName *string
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type DeleteConfigurationSetOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteConfigurationSetMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteConfigurationSet{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteConfigurationSet{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteConfigurationSetValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteConfigurationSet(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteConfigurationSet(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteConfigurationSet",
}
}
| 128 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes a configuration set event destination. Configuration set event
// destinations are associated with configuration sets, which enable you to publish
// email sending events. For information about using configuration sets, see the
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html)
// . You can execute this operation no more than once per second.
func (c *Client) DeleteConfigurationSetEventDestination(ctx context.Context, params *DeleteConfigurationSetEventDestinationInput, optFns ...func(*Options)) (*DeleteConfigurationSetEventDestinationOutput, error) {
if params == nil {
params = &DeleteConfigurationSetEventDestinationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteConfigurationSetEventDestination", params, optFns, c.addOperationDeleteConfigurationSetEventDestinationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteConfigurationSetEventDestinationOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to delete a configuration set event destination.
// Configuration set event destinations are associated with configuration sets,
// which enable you to publish email sending events. For information about using
// configuration sets, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html)
// .
type DeleteConfigurationSetEventDestinationInput struct {
// The name of the configuration set from which to delete the event destination.
//
// This member is required.
ConfigurationSetName *string
// The name of the event destination to delete.
//
// This member is required.
EventDestinationName *string
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type DeleteConfigurationSetEventDestinationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteConfigurationSetEventDestinationMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteConfigurationSetEventDestination{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteConfigurationSetEventDestination{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteConfigurationSetEventDestinationValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteConfigurationSetEventDestination(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteConfigurationSetEventDestination(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteConfigurationSetEventDestination",
}
}
| 135 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes an association between a configuration set and a custom domain for open
// and click event tracking. By default, images and links used for tracking open
// and click events are hosted on domains operated by Amazon SES. You can configure
// a subdomain of your own to handle these events. For information about using
// custom domains, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html)
// . Deleting this kind of association will result in emails sent using the
// specified configuration set to capture open and click events using the standard,
// Amazon SES-operated domains.
func (c *Client) DeleteConfigurationSetTrackingOptions(ctx context.Context, params *DeleteConfigurationSetTrackingOptionsInput, optFns ...func(*Options)) (*DeleteConfigurationSetTrackingOptionsOutput, error) {
if params == nil {
params = &DeleteConfigurationSetTrackingOptionsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteConfigurationSetTrackingOptions", params, optFns, c.addOperationDeleteConfigurationSetTrackingOptionsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteConfigurationSetTrackingOptionsOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to delete open and click tracking options in a
// configuration set.
type DeleteConfigurationSetTrackingOptionsInput struct {
// The name of the configuration set from which you want to delete the tracking
// options.
//
// This member is required.
ConfigurationSetName *string
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type DeleteConfigurationSetTrackingOptionsOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteConfigurationSetTrackingOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteConfigurationSetTrackingOptions{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteConfigurationSetTrackingOptions{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteConfigurationSetTrackingOptionsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteConfigurationSetTrackingOptions(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteConfigurationSetTrackingOptions(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteConfigurationSetTrackingOptions",
}
}
| 131 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes an existing custom verification email template. For more information
// about custom verification email templates, see Using Custom Verification Email
// Templates (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html)
// in the Amazon SES Developer Guide. You can execute this operation no more than
// once per second.
func (c *Client) DeleteCustomVerificationEmailTemplate(ctx context.Context, params *DeleteCustomVerificationEmailTemplateInput, optFns ...func(*Options)) (*DeleteCustomVerificationEmailTemplateOutput, error) {
if params == nil {
params = &DeleteCustomVerificationEmailTemplateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteCustomVerificationEmailTemplate", params, optFns, c.addOperationDeleteCustomVerificationEmailTemplateMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteCustomVerificationEmailTemplateOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to delete an existing custom verification email template.
type DeleteCustomVerificationEmailTemplateInput struct {
// The name of the custom verification email template that you want to delete.
//
// This member is required.
TemplateName *string
noSmithyDocumentSerde
}
type DeleteCustomVerificationEmailTemplateOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteCustomVerificationEmailTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteCustomVerificationEmailTemplate{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteCustomVerificationEmailTemplate{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteCustomVerificationEmailTemplateValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCustomVerificationEmailTemplate(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteCustomVerificationEmailTemplate(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteCustomVerificationEmailTemplate",
}
}
| 125 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes the specified identity (an email address or a domain) from the list of
// verified identities. You can execute this operation no more than once per
// second.
func (c *Client) DeleteIdentity(ctx context.Context, params *DeleteIdentityInput, optFns ...func(*Options)) (*DeleteIdentityOutput, error) {
if params == nil {
params = &DeleteIdentityInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteIdentity", params, optFns, c.addOperationDeleteIdentityMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteIdentityOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to delete one of your Amazon SES identities (an email
// address or domain).
type DeleteIdentityInput struct {
// The identity to be removed from the list of identities for the AWS Account.
//
// This member is required.
Identity *string
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type DeleteIdentityOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteIdentityMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteIdentity{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteIdentity{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteIdentityValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteIdentity(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteIdentity(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteIdentity",
}
}
| 125 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes the specified sending authorization policy for the given identity (an
// email address or a domain). This API returns successfully even if a policy with
// the specified name does not exist. This API is for the identity owner only. If
// you have not verified the identity, this API will return an error. Sending
// authorization is a feature that enables an identity owner to authorize other
// senders to use its identities. For information about using sending
// authorization, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// . You can execute this operation no more than once per second.
func (c *Client) DeleteIdentityPolicy(ctx context.Context, params *DeleteIdentityPolicyInput, optFns ...func(*Options)) (*DeleteIdentityPolicyOutput, error) {
if params == nil {
params = &DeleteIdentityPolicyInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteIdentityPolicy", params, optFns, c.addOperationDeleteIdentityPolicyMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteIdentityPolicyOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to delete a sending authorization policy for an identity.
// Sending authorization is an Amazon SES feature that enables you to authorize
// other senders to use your identities. For information, see the Amazon SES
// Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// .
type DeleteIdentityPolicyInput struct {
// The identity that is associated with the policy that you want to delete. You
// can specify the identity by using its name or by using its Amazon Resource Name
// (ARN). Examples: [email protected] , example.com ,
// arn:aws:ses:us-east-1:123456789012:identity/example.com . To successfully call
// this API, you must own the identity.
//
// This member is required.
Identity *string
// The name of the policy to be deleted.
//
// This member is required.
PolicyName *string
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type DeleteIdentityPolicyOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteIdentityPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteIdentityPolicy{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteIdentityPolicy{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteIdentityPolicyValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteIdentityPolicy(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteIdentityPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteIdentityPolicy",
}
}
| 142 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes the specified IP address filter. For information about managing IP
// address filters, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-ip-filters.html)
// . You can execute this operation no more than once per second.
func (c *Client) DeleteReceiptFilter(ctx context.Context, params *DeleteReceiptFilterInput, optFns ...func(*Options)) (*DeleteReceiptFilterOutput, error) {
if params == nil {
params = &DeleteReceiptFilterInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteReceiptFilter", params, optFns, c.addOperationDeleteReceiptFilterMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteReceiptFilterOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to delete an IP address filter. You use IP address filters
// when you receive email with Amazon SES. For more information, see the Amazon
// SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html)
// .
type DeleteReceiptFilterInput struct {
// The name of the IP address filter to delete.
//
// This member is required.
FilterName *string
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type DeleteReceiptFilterOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteReceiptFilterMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteReceiptFilter{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteReceiptFilter{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteReceiptFilterValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteReceiptFilter(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteReceiptFilter(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteReceiptFilter",
}
}
| 127 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes the specified receipt rule. For information about managing receipt
// rules, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rules.html)
// . You can execute this operation no more than once per second.
func (c *Client) DeleteReceiptRule(ctx context.Context, params *DeleteReceiptRuleInput, optFns ...func(*Options)) (*DeleteReceiptRuleOutput, error) {
if params == nil {
params = &DeleteReceiptRuleInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteReceiptRule", params, optFns, c.addOperationDeleteReceiptRuleMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteReceiptRuleOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to delete a receipt rule. You use receipt rules to receive
// email with Amazon SES. For more information, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html)
// .
type DeleteReceiptRuleInput struct {
// The name of the receipt rule to delete.
//
// This member is required.
RuleName *string
// The name of the receipt rule set that contains the receipt rule to delete.
//
// This member is required.
RuleSetName *string
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type DeleteReceiptRuleOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteReceiptRuleMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteReceiptRule{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteReceiptRule{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteReceiptRuleValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteReceiptRule(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteReceiptRule(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteReceiptRule",
}
}
| 131 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes the specified receipt rule set and all of the receipt rules it
// contains. The currently active rule set cannot be deleted. For information about
// managing receipt rule sets, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html)
// . You can execute this operation no more than once per second.
func (c *Client) DeleteReceiptRuleSet(ctx context.Context, params *DeleteReceiptRuleSetInput, optFns ...func(*Options)) (*DeleteReceiptRuleSetOutput, error) {
if params == nil {
params = &DeleteReceiptRuleSetInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteReceiptRuleSet", params, optFns, c.addOperationDeleteReceiptRuleSetMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteReceiptRuleSetOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to delete a receipt rule set and all of the receipt rules
// it contains. You use receipt rule sets to receive email with Amazon SES. For
// more information, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html)
// .
type DeleteReceiptRuleSetInput struct {
// The name of the receipt rule set to delete.
//
// This member is required.
RuleSetName *string
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type DeleteReceiptRuleSetOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteReceiptRuleSetMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteReceiptRuleSet{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteReceiptRuleSet{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteReceiptRuleSetValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteReceiptRuleSet(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteReceiptRuleSet(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteReceiptRuleSet",
}
}
| 128 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes an email template. You can execute this operation no more than once per
// second.
func (c *Client) DeleteTemplate(ctx context.Context, params *DeleteTemplateInput, optFns ...func(*Options)) (*DeleteTemplateOutput, error) {
if params == nil {
params = &DeleteTemplateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteTemplate", params, optFns, c.addOperationDeleteTemplateMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteTemplateOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to delete an email template. For more information, see the
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html)
// .
type DeleteTemplateInput struct {
// The name of the template to be deleted.
//
// This member is required.
TemplateName *string
noSmithyDocumentSerde
}
type DeleteTemplateOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteTemplate{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteTemplate{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteTemplateValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTemplate(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteTemplate(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteTemplate",
}
}
| 124 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deprecated. Use the DeleteIdentity operation to delete email addresses and
// domains.
func (c *Client) DeleteVerifiedEmailAddress(ctx context.Context, params *DeleteVerifiedEmailAddressInput, optFns ...func(*Options)) (*DeleteVerifiedEmailAddressOutput, error) {
if params == nil {
params = &DeleteVerifiedEmailAddressInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteVerifiedEmailAddress", params, optFns, c.addOperationDeleteVerifiedEmailAddressMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteVerifiedEmailAddressOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to delete an email address from the list of email
// addresses you have attempted to verify under your AWS account.
type DeleteVerifiedEmailAddressInput struct {
// An email address to be removed from the list of verified addresses.
//
// This member is required.
EmailAddress *string
noSmithyDocumentSerde
}
type DeleteVerifiedEmailAddressOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteVerifiedEmailAddressMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteVerifiedEmailAddress{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteVerifiedEmailAddress{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteVerifiedEmailAddressValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVerifiedEmailAddress(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteVerifiedEmailAddress(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteVerifiedEmailAddress",
}
}
| 123 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns the metadata and receipt rules for the receipt rule set that is
// currently active. For information about setting up receipt rule sets, see the
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rule-set.html)
// . You can execute this operation no more than once per second.
func (c *Client) DescribeActiveReceiptRuleSet(ctx context.Context, params *DescribeActiveReceiptRuleSetInput, optFns ...func(*Options)) (*DescribeActiveReceiptRuleSetOutput, error) {
if params == nil {
params = &DescribeActiveReceiptRuleSetInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeActiveReceiptRuleSet", params, optFns, c.addOperationDescribeActiveReceiptRuleSetMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeActiveReceiptRuleSetOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to return the metadata and receipt rules for the receipt
// rule set that is currently active. You use receipt rule sets to receive email
// with Amazon SES. For more information, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html)
// .
type DescribeActiveReceiptRuleSetInput struct {
noSmithyDocumentSerde
}
// Represents the metadata and receipt rules for the receipt rule set that is
// currently active.
type DescribeActiveReceiptRuleSetOutput struct {
// The metadata for the currently active receipt rule set. The metadata consists
// of the rule set name and a timestamp of when the rule set was created.
Metadata *types.ReceiptRuleSetMetadata
// The receipt rules that belong to the active rule set.
Rules []types.ReceiptRule
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeActiveReceiptRuleSetMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeActiveReceiptRuleSet{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeActiveReceiptRuleSet{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeActiveReceiptRuleSet(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDescribeActiveReceiptRuleSet(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DescribeActiveReceiptRuleSet",
}
}
| 129 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns the details of the specified configuration set. For information about
// using configuration sets, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html)
// . You can execute this operation no more than once per second.
func (c *Client) DescribeConfigurationSet(ctx context.Context, params *DescribeConfigurationSetInput, optFns ...func(*Options)) (*DescribeConfigurationSetOutput, error) {
if params == nil {
params = &DescribeConfigurationSetInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeConfigurationSet", params, optFns, c.addOperationDescribeConfigurationSetMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeConfigurationSetOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to return the details of a configuration set.
// Configuration sets enable you to publish email sending events. For information
// about using configuration sets, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html)
// .
type DescribeConfigurationSetInput struct {
// The name of the configuration set to describe.
//
// This member is required.
ConfigurationSetName *string
// A list of configuration set attributes to return.
ConfigurationSetAttributeNames []types.ConfigurationSetAttribute
noSmithyDocumentSerde
}
// Represents the details of a configuration set. Configuration sets enable you to
// publish email sending events. For information about using configuration sets,
// see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html)
// .
type DescribeConfigurationSetOutput struct {
// The configuration set object associated with the specified configuration set.
ConfigurationSet *types.ConfigurationSet
// Specifies whether messages that use the configuration set are required to use
// Transport Layer Security (TLS).
DeliveryOptions *types.DeliveryOptions
// A list of event destinations associated with the configuration set.
EventDestinations []types.EventDestination
// An object that represents the reputation settings for the configuration set.
ReputationOptions *types.ReputationOptions
// The name of the custom open and click tracking domain associated with the
// configuration set.
TrackingOptions *types.TrackingOptions
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeConfigurationSetMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeConfigurationSet{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeConfigurationSet{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDescribeConfigurationSetValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConfigurationSet(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDescribeConfigurationSet(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DescribeConfigurationSet",
}
}
| 152 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns the details of the specified receipt rule. For information about
// setting up receipt rules, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rules.html)
// . You can execute this operation no more than once per second.
func (c *Client) DescribeReceiptRule(ctx context.Context, params *DescribeReceiptRuleInput, optFns ...func(*Options)) (*DescribeReceiptRuleOutput, error) {
if params == nil {
params = &DescribeReceiptRuleInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeReceiptRule", params, optFns, c.addOperationDescribeReceiptRuleMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeReceiptRuleOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to return the details of a receipt rule. You use receipt
// rules to receive email with Amazon SES. For more information, see the Amazon
// SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html)
// .
type DescribeReceiptRuleInput struct {
// The name of the receipt rule.
//
// This member is required.
RuleName *string
// The name of the receipt rule set that the receipt rule belongs to.
//
// This member is required.
RuleSetName *string
noSmithyDocumentSerde
}
// Represents the details of a receipt rule.
type DescribeReceiptRuleOutput struct {
// A data structure that contains the specified receipt rule's name, actions,
// recipients, domains, enabled status, scan status, and Transport Layer Security
// (TLS) policy.
Rule *types.ReceiptRule
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeReceiptRuleMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeReceiptRule{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeReceiptRule{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDescribeReceiptRuleValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReceiptRule(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDescribeReceiptRule(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DescribeReceiptRule",
}
}
| 139 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns the details of the specified receipt rule set. For information about
// managing receipt rule sets, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html)
// . You can execute this operation no more than once per second.
func (c *Client) DescribeReceiptRuleSet(ctx context.Context, params *DescribeReceiptRuleSetInput, optFns ...func(*Options)) (*DescribeReceiptRuleSetOutput, error) {
if params == nil {
params = &DescribeReceiptRuleSetInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeReceiptRuleSet", params, optFns, c.addOperationDescribeReceiptRuleSetMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeReceiptRuleSetOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to return the details of a receipt rule set. You use
// receipt rule sets to receive email with Amazon SES. For more information, see
// the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html)
// .
type DescribeReceiptRuleSetInput struct {
// The name of the receipt rule set to describe.
//
// This member is required.
RuleSetName *string
noSmithyDocumentSerde
}
// Represents the details of the specified receipt rule set.
type DescribeReceiptRuleSetOutput struct {
// The metadata for the receipt rule set, which consists of the rule set name and
// the timestamp of when the rule set was created.
Metadata *types.ReceiptRuleSetMetadata
// A list of the receipt rules that belong to the specified receipt rule set.
Rules []types.ReceiptRule
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeReceiptRuleSetMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeReceiptRuleSet{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeReceiptRuleSet{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDescribeReceiptRuleSetValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReceiptRuleSet(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDescribeReceiptRuleSet(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DescribeReceiptRuleSet",
}
}
| 136 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns the email sending status of the Amazon SES account for the current
// region. You can execute this operation no more than once per second.
func (c *Client) GetAccountSendingEnabled(ctx context.Context, params *GetAccountSendingEnabledInput, optFns ...func(*Options)) (*GetAccountSendingEnabledOutput, error) {
if params == nil {
params = &GetAccountSendingEnabledInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetAccountSendingEnabled", params, optFns, c.addOperationGetAccountSendingEnabledMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetAccountSendingEnabledOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetAccountSendingEnabledInput struct {
noSmithyDocumentSerde
}
// Represents a request to return the email sending status for your Amazon SES
// account in the current AWS Region.
type GetAccountSendingEnabledOutput struct {
// Describes whether email sending is enabled or disabled for your Amazon SES
// account in the current AWS Region.
Enabled bool
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetAccountSendingEnabledMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetAccountSendingEnabled{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetAccountSendingEnabled{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountSendingEnabled(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetAccountSendingEnabled(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "GetAccountSendingEnabled",
}
}
| 119 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns the custom email verification template for the template name you
// specify. For more information about custom verification email templates, see
// Using Custom Verification Email Templates (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html)
// in the Amazon SES Developer Guide. You can execute this operation no more than
// once per second.
func (c *Client) GetCustomVerificationEmailTemplate(ctx context.Context, params *GetCustomVerificationEmailTemplateInput, optFns ...func(*Options)) (*GetCustomVerificationEmailTemplateOutput, error) {
if params == nil {
params = &GetCustomVerificationEmailTemplateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetCustomVerificationEmailTemplate", params, optFns, c.addOperationGetCustomVerificationEmailTemplateMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetCustomVerificationEmailTemplateOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to retrieve an existing custom verification email template.
type GetCustomVerificationEmailTemplateInput struct {
// The name of the custom verification email template that you want to retrieve.
//
// This member is required.
TemplateName *string
noSmithyDocumentSerde
}
// The content of the custom verification email template.
type GetCustomVerificationEmailTemplateOutput struct {
// The URL that the recipient of the verification email is sent to if his or her
// address is not successfully verified.
FailureRedirectionURL *string
// The email address that the custom verification email is sent from.
FromEmailAddress *string
// The URL that the recipient of the verification email is sent to if his or her
// address is successfully verified.
SuccessRedirectionURL *string
// The content of the custom verification email.
TemplateContent *string
// The name of the custom verification email template.
TemplateName *string
// The subject line of the custom verification email.
TemplateSubject *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetCustomVerificationEmailTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetCustomVerificationEmailTemplate{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetCustomVerificationEmailTemplate{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetCustomVerificationEmailTemplateValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCustomVerificationEmailTemplate(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetCustomVerificationEmailTemplate(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "GetCustomVerificationEmailTemplate",
}
}
| 147 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns the current status of Easy DKIM signing for an entity. For domain name
// identities, this operation also returns the DKIM tokens that are required for
// Easy DKIM signing, and whether Amazon SES has successfully verified that these
// tokens have been published. This operation takes a list of identities as input
// and returns the following information for each:
// - Whether Easy DKIM signing is enabled or disabled.
// - A set of DKIM tokens that represent the identity. If the identity is an
// email address, the tokens represent the domain of that address.
// - Whether Amazon SES has successfully verified the DKIM tokens published in
// the domain's DNS. This information is only returned for domain name identities,
// not for email addresses.
//
// This operation is throttled at one request per second and can only get DKIM
// attributes for up to 100 identities at a time. For more information about
// creating DNS records using DKIM tokens, go to the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim-dns-records.html)
// .
func (c *Client) GetIdentityDkimAttributes(ctx context.Context, params *GetIdentityDkimAttributesInput, optFns ...func(*Options)) (*GetIdentityDkimAttributesOutput, error) {
if params == nil {
params = &GetIdentityDkimAttributesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetIdentityDkimAttributes", params, optFns, c.addOperationGetIdentityDkimAttributesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetIdentityDkimAttributesOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request for the status of Amazon SES Easy DKIM signing for an
// identity. For domain identities, this request also returns the DKIM tokens that
// are required for Easy DKIM signing, and whether Amazon SES successfully verified
// that these tokens were published. For more information about Easy DKIM, see the
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html)
// .
type GetIdentityDkimAttributesInput struct {
// A list of one or more verified identities - email addresses, domains, or both.
//
// This member is required.
Identities []string
noSmithyDocumentSerde
}
// Represents the status of Amazon SES Easy DKIM signing for an identity. For
// domain identities, this response also contains the DKIM tokens that are required
// for Easy DKIM signing, and whether Amazon SES successfully verified that these
// tokens were published.
type GetIdentityDkimAttributesOutput struct {
// The DKIM attributes for an email address or a domain.
//
// This member is required.
DkimAttributes map[string]types.IdentityDkimAttributes
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetIdentityDkimAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetIdentityDkimAttributes{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetIdentityDkimAttributes{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetIdentityDkimAttributesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIdentityDkimAttributes(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetIdentityDkimAttributes(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "GetIdentityDkimAttributes",
}
}
| 152 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns the custom MAIL FROM attributes for a list of identities (email
// addresses : domains). This operation is throttled at one request per second and
// can only get custom MAIL FROM attributes for up to 100 identities at a time.
func (c *Client) GetIdentityMailFromDomainAttributes(ctx context.Context, params *GetIdentityMailFromDomainAttributesInput, optFns ...func(*Options)) (*GetIdentityMailFromDomainAttributesOutput, error) {
if params == nil {
params = &GetIdentityMailFromDomainAttributesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetIdentityMailFromDomainAttributes", params, optFns, c.addOperationGetIdentityMailFromDomainAttributesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetIdentityMailFromDomainAttributesOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to return the Amazon SES custom MAIL FROM attributes for a
// list of identities. For information about using a custom MAIL FROM domain, see
// the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from.html)
// .
type GetIdentityMailFromDomainAttributesInput struct {
// A list of one or more identities.
//
// This member is required.
Identities []string
noSmithyDocumentSerde
}
// Represents the custom MAIL FROM attributes for a list of identities.
type GetIdentityMailFromDomainAttributesOutput struct {
// A map of identities to custom MAIL FROM attributes.
//
// This member is required.
MailFromDomainAttributes map[string]types.IdentityMailFromDomainAttributes
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetIdentityMailFromDomainAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetIdentityMailFromDomainAttributes{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetIdentityMailFromDomainAttributes{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetIdentityMailFromDomainAttributesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIdentityMailFromDomainAttributes(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetIdentityMailFromDomainAttributes(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "GetIdentityMailFromDomainAttributes",
}
}
| 134 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Given a list of verified identities (email addresses and/or domains), returns a
// structure describing identity notification attributes. This operation is
// throttled at one request per second and can only get notification attributes for
// up to 100 identities at a time. For more information about using notifications
// with Amazon SES, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html)
// .
func (c *Client) GetIdentityNotificationAttributes(ctx context.Context, params *GetIdentityNotificationAttributesInput, optFns ...func(*Options)) (*GetIdentityNotificationAttributesOutput, error) {
if params == nil {
params = &GetIdentityNotificationAttributesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetIdentityNotificationAttributes", params, optFns, c.addOperationGetIdentityNotificationAttributesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetIdentityNotificationAttributesOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to return the notification attributes for a list of
// identities you verified with Amazon SES. For information about Amazon SES
// notifications, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html)
// .
type GetIdentityNotificationAttributesInput struct {
// A list of one or more identities. You can specify an identity by using its name
// or by using its Amazon Resource Name (ARN). Examples: [email protected] ,
// example.com , arn:aws:ses:us-east-1:123456789012:identity/example.com .
//
// This member is required.
Identities []string
noSmithyDocumentSerde
}
// Represents the notification attributes for a list of identities.
type GetIdentityNotificationAttributesOutput struct {
// A map of Identity to IdentityNotificationAttributes.
//
// This member is required.
NotificationAttributes map[string]types.IdentityNotificationAttributes
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetIdentityNotificationAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetIdentityNotificationAttributes{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetIdentityNotificationAttributes{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetIdentityNotificationAttributesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIdentityNotificationAttributes(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetIdentityNotificationAttributes(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "GetIdentityNotificationAttributes",
}
}
| 139 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns the requested sending authorization policies for the given identity (an
// email address or a domain). The policies are returned as a map of policy names
// to policy contents. You can retrieve a maximum of 20 policies at a time. This
// API is for the identity owner only. If you have not verified the identity, this
// API will return an error. Sending authorization is a feature that enables an
// identity owner to authorize other senders to use its identities. For information
// about using sending authorization, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// . You can execute this operation no more than once per second.
func (c *Client) GetIdentityPolicies(ctx context.Context, params *GetIdentityPoliciesInput, optFns ...func(*Options)) (*GetIdentityPoliciesOutput, error) {
if params == nil {
params = &GetIdentityPoliciesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetIdentityPolicies", params, optFns, c.addOperationGetIdentityPoliciesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetIdentityPoliciesOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to return the requested sending authorization policies for
// an identity. Sending authorization is an Amazon SES feature that enables you to
// authorize other senders to use your identities. For information, see the Amazon
// SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// .
type GetIdentityPoliciesInput struct {
// The identity for which the policies will be retrieved. You can specify an
// identity by using its name or by using its Amazon Resource Name (ARN). Examples:
// [email protected] , example.com ,
// arn:aws:ses:us-east-1:123456789012:identity/example.com . To successfully call
// this API, you must own the identity.
//
// This member is required.
Identity *string
// A list of the names of policies to be retrieved. You can retrieve a maximum of
// 20 policies at a time. If you do not know the names of the policies that are
// attached to the identity, you can use ListIdentityPolicies .
//
// This member is required.
PolicyNames []string
noSmithyDocumentSerde
}
// Represents the requested sending authorization policies.
type GetIdentityPoliciesOutput struct {
// A map of policy names to policies.
//
// This member is required.
Policies map[string]string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetIdentityPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetIdentityPolicies{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetIdentityPolicies{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetIdentityPoliciesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIdentityPolicies(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetIdentityPolicies(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "GetIdentityPolicies",
}
}
| 150 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithytime "github.com/aws/smithy-go/time"
smithyhttp "github.com/aws/smithy-go/transport/http"
smithywaiter "github.com/aws/smithy-go/waiter"
"github.com/jmespath/go-jmespath"
"time"
)
// Given a list of identities (email addresses and/or domains), returns the
// verification status and (for domain identities) the verification token for each
// identity. The verification status of an email address is "Pending" until the
// email address owner clicks the link within the verification email that Amazon
// SES sent to that address. If the email address owner clicks the link within 24
// hours, the verification status of the email address changes to "Success". If the
// link is not clicked within 24 hours, the verification status changes to
// "Failed." In that case, if you still want to verify the email address, you must
// restart the verification process from the beginning. For domain identities, the
// domain's verification status is "Pending" as Amazon SES searches for the
// required TXT record in the DNS settings of the domain. When Amazon SES detects
// the record, the domain's verification status changes to "Success". If Amazon SES
// is unable to detect the record within 72 hours, the domain's verification status
// changes to "Failed." In that case, if you still want to verify the domain, you
// must restart the verification process from the beginning. This operation is
// throttled at one request per second and can only get verification attributes for
// up to 100 identities at a time.
func (c *Client) GetIdentityVerificationAttributes(ctx context.Context, params *GetIdentityVerificationAttributesInput, optFns ...func(*Options)) (*GetIdentityVerificationAttributesOutput, error) {
if params == nil {
params = &GetIdentityVerificationAttributesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetIdentityVerificationAttributes", params, optFns, c.addOperationGetIdentityVerificationAttributesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetIdentityVerificationAttributesOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to return the Amazon SES verification status of a list of
// identities. For domain identities, this request also returns the verification
// token. For information about verifying identities with Amazon SES, see the
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html)
// .
type GetIdentityVerificationAttributesInput struct {
// A list of identities.
//
// This member is required.
Identities []string
noSmithyDocumentSerde
}
// The Amazon SES verification status of a list of identities. For domain
// identities, this response also contains the verification token.
type GetIdentityVerificationAttributesOutput struct {
// A map of Identities to IdentityVerificationAttributes objects.
//
// This member is required.
VerificationAttributes map[string]types.IdentityVerificationAttributes
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetIdentityVerificationAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetIdentityVerificationAttributes{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetIdentityVerificationAttributes{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetIdentityVerificationAttributesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIdentityVerificationAttributes(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
// GetIdentityVerificationAttributesAPIClient is a client that implements the
// GetIdentityVerificationAttributes operation.
type GetIdentityVerificationAttributesAPIClient interface {
GetIdentityVerificationAttributes(context.Context, *GetIdentityVerificationAttributesInput, ...func(*Options)) (*GetIdentityVerificationAttributesOutput, error)
}
var _ GetIdentityVerificationAttributesAPIClient = (*Client)(nil)
// IdentityExistsWaiterOptions are waiter options for IdentityExistsWaiter
type IdentityExistsWaiterOptions struct {
// Set of options to modify how an operation is invoked. These apply to all
// operations invoked for this client. Use functional options on operation call to
// modify this list for per operation behavior.
APIOptions []func(*middleware.Stack) error
// MinDelay is the minimum amount of time to delay between retries. If unset,
// IdentityExistsWaiter will use default minimum delay of 3 seconds. Note that
// MinDelay must resolve to a value lesser than or equal to the MaxDelay.
MinDelay time.Duration
// MaxDelay is the maximum amount of time to delay between retries. If unset or
// set to zero, IdentityExistsWaiter will use default max delay of 120 seconds.
// Note that MaxDelay must resolve to value greater than or equal to the MinDelay.
MaxDelay time.Duration
// LogWaitAttempts is used to enable logging for waiter retry attempts
LogWaitAttempts bool
// Retryable is function that can be used to override the service defined
// waiter-behavior based on operation output, or returned error. This function is
// used by the waiter to decide if a state is retryable or a terminal state. By
// default service-modeled logic will populate this option. This option can thus be
// used to define a custom waiter state with fall-back to service-modeled waiter
// state mutators.The function returns an error in case of a failure state. In case
// of retry state, this function returns a bool value of true and nil error, while
// in case of success it returns a bool value of false and nil error.
Retryable func(context.Context, *GetIdentityVerificationAttributesInput, *GetIdentityVerificationAttributesOutput, error) (bool, error)
}
// IdentityExistsWaiter defines the waiters for IdentityExists
type IdentityExistsWaiter struct {
client GetIdentityVerificationAttributesAPIClient
options IdentityExistsWaiterOptions
}
// NewIdentityExistsWaiter constructs a IdentityExistsWaiter.
func NewIdentityExistsWaiter(client GetIdentityVerificationAttributesAPIClient, optFns ...func(*IdentityExistsWaiterOptions)) *IdentityExistsWaiter {
options := IdentityExistsWaiterOptions{}
options.MinDelay = 3 * time.Second
options.MaxDelay = 120 * time.Second
options.Retryable = identityExistsStateRetryable
for _, fn := range optFns {
fn(&options)
}
return &IdentityExistsWaiter{
client: client,
options: options,
}
}
// Wait calls the waiter function for IdentityExists waiter. The maxWaitDur is the
// maximum wait duration the waiter will wait. The maxWaitDur is required and must
// be greater than zero.
func (w *IdentityExistsWaiter) Wait(ctx context.Context, params *GetIdentityVerificationAttributesInput, maxWaitDur time.Duration, optFns ...func(*IdentityExistsWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for IdentityExists waiter and returns
// the output of the successful operation. The maxWaitDur is the maximum wait
// duration the waiter will wait. The maxWaitDur is required and must be greater
// than zero.
func (w *IdentityExistsWaiter) WaitForOutput(ctx context.Context, params *GetIdentityVerificationAttributesInput, maxWaitDur time.Duration, optFns ...func(*IdentityExistsWaiterOptions)) (*GetIdentityVerificationAttributesOutput, error) {
if maxWaitDur <= 0 {
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
for _, fn := range optFns {
fn(&options)
}
if options.MaxDelay <= 0 {
options.MaxDelay = 120 * time.Second
}
if options.MinDelay > options.MaxDelay {
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
defer cancelFn()
logger := smithywaiter.Logger{}
remainingTime := maxWaitDur
var attempt int64
for {
attempt++
apiOptions := options.APIOptions
start := time.Now()
if options.LogWaitAttempts {
logger.Attempt = attempt
apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
apiOptions = append(apiOptions, logger.AddLogger)
}
out, err := w.client.GetIdentityVerificationAttributes(ctx, params, func(o *Options) {
o.APIOptions = append(o.APIOptions, apiOptions...)
})
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return nil, err
}
if !retryable {
return out, nil
}
remainingTime -= time.Since(start)
if remainingTime < options.MinDelay || remainingTime <= 0 {
break
}
// compute exponential backoff between waiter retries
delay, err := smithywaiter.ComputeDelay(
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return nil, fmt.Errorf("exceeded max wait time for IdentityExists waiter")
}
func identityExistsStateRetryable(ctx context.Context, input *GetIdentityVerificationAttributesInput, output *GetIdentityVerificationAttributesOutput, err error) (bool, error) {
if err == nil {
pathValue, err := jmespath.Search("VerificationAttributes.*.VerificationStatus", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "Success"
var match = true
listOfValues, ok := pathValue.([]interface{})
if !ok {
return false, fmt.Errorf("waiter comparator expected list got %T", pathValue)
}
if len(listOfValues) == 0 {
match = false
}
for _, v := range listOfValues {
value, ok := v.(string)
if !ok {
return false, fmt.Errorf("waiter comparator expected string value, got %T", pathValue)
}
if string(value) != expectedValue {
match = false
}
}
if match {
return false, nil
}
}
return true, nil
}
func newServiceMetadataMiddleware_opGetIdentityVerificationAttributes(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "GetIdentityVerificationAttributes",
}
}
| 338 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Provides the sending limits for the Amazon SES account. You can execute this
// operation no more than once per second.
func (c *Client) GetSendQuota(ctx context.Context, params *GetSendQuotaInput, optFns ...func(*Options)) (*GetSendQuotaOutput, error) {
if params == nil {
params = &GetSendQuotaInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetSendQuota", params, optFns, c.addOperationGetSendQuotaMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetSendQuotaOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetSendQuotaInput struct {
noSmithyDocumentSerde
}
// Represents your Amazon SES daily sending quota, maximum send rate, and the
// number of emails you have sent in the last 24 hours.
type GetSendQuotaOutput struct {
// The maximum number of emails the user is allowed to send in a 24-hour interval.
// A value of -1 signifies an unlimited quota.
Max24HourSend float64
// The maximum number of emails that Amazon SES can accept from the user's account
// per second. The rate at which Amazon SES accepts the user's messages might be
// less than the maximum send rate.
MaxSendRate float64
// The number of emails sent during the previous 24 hours.
SentLast24Hours float64
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetSendQuotaMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetSendQuota{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetSendQuota{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSendQuota(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetSendQuota(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "GetSendQuota",
}
}
| 127 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Provides sending statistics for the current AWS Region. The result is a list of
// data points, representing the last two weeks of sending activity. Each data
// point in the list contains statistics for a 15-minute period of time. You can
// execute this operation no more than once per second.
func (c *Client) GetSendStatistics(ctx context.Context, params *GetSendStatisticsInput, optFns ...func(*Options)) (*GetSendStatisticsOutput, error) {
if params == nil {
params = &GetSendStatisticsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetSendStatistics", params, optFns, c.addOperationGetSendStatisticsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetSendStatisticsOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetSendStatisticsInput struct {
noSmithyDocumentSerde
}
// Represents a list of data points. This list contains aggregated data from the
// previous two weeks of your sending activity with Amazon SES.
type GetSendStatisticsOutput struct {
// A list of data points, each of which represents 15 minutes of activity.
SendDataPoints []types.SendDataPoint
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetSendStatisticsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetSendStatistics{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetSendStatistics{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSendStatistics(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetSendStatistics(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "GetSendStatistics",
}
}
| 121 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Displays the template object (which includes the Subject line, HTML part and
// text part) for the template you specify. You can execute this operation no more
// than once per second.
func (c *Client) GetTemplate(ctx context.Context, params *GetTemplateInput, optFns ...func(*Options)) (*GetTemplateOutput, error) {
if params == nil {
params = &GetTemplateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetTemplate", params, optFns, c.addOperationGetTemplateMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetTemplateOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetTemplateInput struct {
// The name of the template you want to retrieve.
//
// This member is required.
TemplateName *string
noSmithyDocumentSerde
}
type GetTemplateOutput struct {
// The content of the email, composed of a subject line, an HTML part, and a
// text-only part.
Template *types.Template
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpGetTemplate{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetTemplate{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetTemplateValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTemplate(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetTemplate(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "GetTemplate",
}
}
| 128 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Provides a list of the configuration sets associated with your Amazon SES
// account in the current AWS Region. For information about using configuration
// sets, see Monitoring Your Amazon SES Sending Activity (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html)
// in the Amazon SES Developer Guide. You can execute this operation no more than
// once per second. This operation will return up to 1,000 configuration sets each
// time it is run. If your Amazon SES account has more than 1,000 configuration
// sets, this operation will also return a NextToken element. You can then execute
// the ListConfigurationSets operation again, passing the NextToken parameter and
// the value of the NextToken element to retrieve additional results.
func (c *Client) ListConfigurationSets(ctx context.Context, params *ListConfigurationSetsInput, optFns ...func(*Options)) (*ListConfigurationSetsOutput, error) {
if params == nil {
params = &ListConfigurationSetsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListConfigurationSets", params, optFns, c.addOperationListConfigurationSetsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListConfigurationSetsOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to list the configuration sets associated with your AWS
// account. Configuration sets enable you to publish email sending events. For
// information about using configuration sets, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html)
// .
type ListConfigurationSetsInput struct {
// The number of configuration sets to return.
MaxItems *int32
// A token returned from a previous call to ListConfigurationSets to indicate the
// position of the configuration set in the configuration set list.
NextToken *string
noSmithyDocumentSerde
}
// A list of configuration sets associated with your AWS account. Configuration
// sets enable you to publish email sending events. For information about using
// configuration sets, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html)
// .
type ListConfigurationSetsOutput struct {
// A list of configuration sets.
ConfigurationSets []types.ConfigurationSet
// A token indicating that there are additional configuration sets available to be
// listed. Pass this token to successive calls of ListConfigurationSets .
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListConfigurationSetsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpListConfigurationSets{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListConfigurationSets{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConfigurationSets(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListConfigurationSets(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "ListConfigurationSets",
}
}
| 144 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the existing custom verification email templates for your account in the
// current AWS Region. For more information about custom verification email
// templates, see Using Custom Verification Email Templates (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html)
// in the Amazon SES Developer Guide. You can execute this operation no more than
// once per second.
func (c *Client) ListCustomVerificationEmailTemplates(ctx context.Context, params *ListCustomVerificationEmailTemplatesInput, optFns ...func(*Options)) (*ListCustomVerificationEmailTemplatesOutput, error) {
if params == nil {
params = &ListCustomVerificationEmailTemplatesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListCustomVerificationEmailTemplates", params, optFns, c.addOperationListCustomVerificationEmailTemplatesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListCustomVerificationEmailTemplatesOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to list the existing custom verification email templates
// for your account. For more information about custom verification email
// templates, see Using Custom Verification Email Templates (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html)
// in the Amazon SES Developer Guide.
type ListCustomVerificationEmailTemplatesInput struct {
// The maximum number of custom verification email templates to return. This value
// must be at least 1 and less than or equal to 50. If you do not specify a value,
// or if you specify a value less than 1 or greater than 50, the operation will
// return up to 50 results.
MaxResults *int32
// An array the contains the name and creation time stamp for each template in
// your Amazon SES account.
NextToken *string
noSmithyDocumentSerde
}
// A paginated list of custom verification email templates.
type ListCustomVerificationEmailTemplatesOutput struct {
// A list of the custom verification email templates that exist in your account.
CustomVerificationEmailTemplates []types.CustomVerificationEmailTemplate
// A token indicating that there are additional custom verification email
// templates available to be listed. Pass this token to a subsequent call to
// ListTemplates to retrieve the next 50 custom verification email templates.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListCustomVerificationEmailTemplatesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpListCustomVerificationEmailTemplates{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListCustomVerificationEmailTemplates{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCustomVerificationEmailTemplates(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
// ListCustomVerificationEmailTemplatesAPIClient is a client that implements the
// ListCustomVerificationEmailTemplates operation.
type ListCustomVerificationEmailTemplatesAPIClient interface {
ListCustomVerificationEmailTemplates(context.Context, *ListCustomVerificationEmailTemplatesInput, ...func(*Options)) (*ListCustomVerificationEmailTemplatesOutput, error)
}
var _ ListCustomVerificationEmailTemplatesAPIClient = (*Client)(nil)
// ListCustomVerificationEmailTemplatesPaginatorOptions is the paginator options
// for ListCustomVerificationEmailTemplates
type ListCustomVerificationEmailTemplatesPaginatorOptions struct {
// The maximum number of custom verification email templates to return. This value
// must be at least 1 and less than or equal to 50. If you do not specify a value,
// or if you specify a value less than 1 or greater than 50, the operation will
// return up to 50 results.
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
}
// ListCustomVerificationEmailTemplatesPaginator is a paginator for
// ListCustomVerificationEmailTemplates
type ListCustomVerificationEmailTemplatesPaginator struct {
options ListCustomVerificationEmailTemplatesPaginatorOptions
client ListCustomVerificationEmailTemplatesAPIClient
params *ListCustomVerificationEmailTemplatesInput
nextToken *string
firstPage bool
}
// NewListCustomVerificationEmailTemplatesPaginator returns a new
// ListCustomVerificationEmailTemplatesPaginator
func NewListCustomVerificationEmailTemplatesPaginator(client ListCustomVerificationEmailTemplatesAPIClient, params *ListCustomVerificationEmailTemplatesInput, optFns ...func(*ListCustomVerificationEmailTemplatesPaginatorOptions)) *ListCustomVerificationEmailTemplatesPaginator {
if params == nil {
params = &ListCustomVerificationEmailTemplatesInput{}
}
options := ListCustomVerificationEmailTemplatesPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListCustomVerificationEmailTemplatesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListCustomVerificationEmailTemplatesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListCustomVerificationEmailTemplates page.
func (p *ListCustomVerificationEmailTemplatesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCustomVerificationEmailTemplatesOutput, 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.ListCustomVerificationEmailTemplates(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_opListCustomVerificationEmailTemplates(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "ListCustomVerificationEmailTemplates",
}
}
| 238 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a list containing all of the identities (email addresses and domains)
// for your AWS account in the current AWS Region, regardless of verification
// status. You can execute this operation no more than once per second.
func (c *Client) ListIdentities(ctx context.Context, params *ListIdentitiesInput, optFns ...func(*Options)) (*ListIdentitiesOutput, error) {
if params == nil {
params = &ListIdentitiesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListIdentities", params, optFns, c.addOperationListIdentitiesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListIdentitiesOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to return a list of all identities (email addresses and
// domains) that you have attempted to verify under your AWS account, regardless of
// verification status.
type ListIdentitiesInput struct {
// The type of the identities to list. Possible values are "EmailAddress" and
// "Domain". If this parameter is omitted, then all identities will be listed.
IdentityType types.IdentityType
// The maximum number of identities per page. Possible values are 1-1000 inclusive.
MaxItems *int32
// The token to use for pagination.
NextToken *string
noSmithyDocumentSerde
}
// A list of all identities that you have attempted to verify under your AWS
// account, regardless of verification status.
type ListIdentitiesOutput struct {
// A list of identities.
//
// This member is required.
Identities []string
// The token used for pagination.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListIdentitiesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpListIdentities{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListIdentities{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIdentities(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
// ListIdentitiesAPIClient is a client that implements the ListIdentities
// operation.
type ListIdentitiesAPIClient interface {
ListIdentities(context.Context, *ListIdentitiesInput, ...func(*Options)) (*ListIdentitiesOutput, error)
}
var _ ListIdentitiesAPIClient = (*Client)(nil)
// ListIdentitiesPaginatorOptions is the paginator options for ListIdentities
type ListIdentitiesPaginatorOptions struct {
// The maximum number of identities per page. Possible values are 1-1000 inclusive.
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
}
// ListIdentitiesPaginator is a paginator for ListIdentities
type ListIdentitiesPaginator struct {
options ListIdentitiesPaginatorOptions
client ListIdentitiesAPIClient
params *ListIdentitiesInput
nextToken *string
firstPage bool
}
// NewListIdentitiesPaginator returns a new ListIdentitiesPaginator
func NewListIdentitiesPaginator(client ListIdentitiesAPIClient, params *ListIdentitiesInput, optFns ...func(*ListIdentitiesPaginatorOptions)) *ListIdentitiesPaginator {
if params == nil {
params = &ListIdentitiesInput{}
}
options := ListIdentitiesPaginatorOptions{}
if params.MaxItems != nil {
options.Limit = *params.MaxItems
}
for _, fn := range optFns {
fn(&options)
}
return &ListIdentitiesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListIdentitiesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListIdentities page.
func (p *ListIdentitiesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListIdentitiesOutput, 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.MaxItems = limit
result, err := p.client.ListIdentities(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_opListIdentities(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "ListIdentities",
}
}
| 230 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a list of sending authorization policies that are attached to the given
// identity (an email address or a domain). This API returns only a list. If you
// want the actual policy content, you can use GetIdentityPolicies . This API is
// for the identity owner only. If you have not verified the identity, this API
// will return an error. Sending authorization is a feature that enables an
// identity owner to authorize other senders to use its identities. For information
// about using sending authorization, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// . You can execute this operation no more than once per second.
func (c *Client) ListIdentityPolicies(ctx context.Context, params *ListIdentityPoliciesInput, optFns ...func(*Options)) (*ListIdentityPoliciesOutput, error) {
if params == nil {
params = &ListIdentityPoliciesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListIdentityPolicies", params, optFns, c.addOperationListIdentityPoliciesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListIdentityPoliciesOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to return a list of sending authorization policies that
// are attached to an identity. Sending authorization is an Amazon SES feature that
// enables you to authorize other senders to use your identities. For information,
// see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// .
type ListIdentityPoliciesInput struct {
// The identity that is associated with the policy for which the policies will be
// listed. You can specify an identity by using its name or by using its Amazon
// Resource Name (ARN). Examples: [email protected] , example.com ,
// arn:aws:ses:us-east-1:123456789012:identity/example.com . To successfully call
// this API, you must own the identity.
//
// This member is required.
Identity *string
noSmithyDocumentSerde
}
// A list of names of sending authorization policies that apply to an identity.
type ListIdentityPoliciesOutput struct {
// A list of names of policies that apply to the specified identity.
//
// This member is required.
PolicyNames []string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListIdentityPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpListIdentityPolicies{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListIdentityPolicies{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListIdentityPoliciesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIdentityPolicies(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListIdentityPolicies(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "ListIdentityPolicies",
}
}
| 143 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the IP address filters associated with your AWS account in the current
// AWS Region. For information about managing IP address filters, see the Amazon
// SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-ip-filters.html)
// . You can execute this operation no more than once per second.
func (c *Client) ListReceiptFilters(ctx context.Context, params *ListReceiptFiltersInput, optFns ...func(*Options)) (*ListReceiptFiltersOutput, error) {
if params == nil {
params = &ListReceiptFiltersInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListReceiptFilters", params, optFns, c.addOperationListReceiptFiltersMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListReceiptFiltersOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to list the IP address filters that exist under your AWS
// account. You use IP address filters when you receive email with Amazon SES. For
// more information, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html)
// .
type ListReceiptFiltersInput struct {
noSmithyDocumentSerde
}
// A list of IP address filters that exist under your AWS account.
type ListReceiptFiltersOutput struct {
// A list of IP address filter data structures, which each consist of a name, an
// IP address range, and whether to allow or block mail from it.
Filters []types.ReceiptFilter
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListReceiptFiltersMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpListReceiptFilters{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListReceiptFilters{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReceiptFilters(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListReceiptFilters(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "ListReceiptFilters",
}
}
| 125 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the receipt rule sets that exist under your AWS account in the current
// AWS Region. If there are additional receipt rule sets to be retrieved, you will
// receive a NextToken that you can provide to the next call to ListReceiptRuleSets
// to retrieve the additional entries. For information about managing receipt rule
// sets, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html)
// . You can execute this operation no more than once per second.
func (c *Client) ListReceiptRuleSets(ctx context.Context, params *ListReceiptRuleSetsInput, optFns ...func(*Options)) (*ListReceiptRuleSetsOutput, error) {
if params == nil {
params = &ListReceiptRuleSetsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListReceiptRuleSets", params, optFns, c.addOperationListReceiptRuleSetsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListReceiptRuleSetsOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to list the receipt rule sets that exist under your AWS
// account. You use receipt rule sets to receive email with Amazon SES. For more
// information, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html)
// .
type ListReceiptRuleSetsInput struct {
// A token returned from a previous call to ListReceiptRuleSets to indicate the
// position in the receipt rule set list.
NextToken *string
noSmithyDocumentSerde
}
// A list of receipt rule sets that exist under your AWS account.
type ListReceiptRuleSetsOutput struct {
// A token indicating that there are additional receipt rule sets available to be
// listed. Pass this token to successive calls of ListReceiptRuleSets to retrieve
// up to 100 receipt rule sets at a time.
NextToken *string
// The metadata for the currently active receipt rule set. The metadata consists
// of the rule set name and the timestamp of when the rule set was created.
RuleSets []types.ReceiptRuleSetMetadata
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListReceiptRuleSetsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpListReceiptRuleSets{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListReceiptRuleSets{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReceiptRuleSets(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListReceiptRuleSets(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "ListReceiptRuleSets",
}
}
| 137 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the email templates present in your Amazon SES account in the current AWS
// Region. You can execute this operation no more than once per second.
func (c *Client) ListTemplates(ctx context.Context, params *ListTemplatesInput, optFns ...func(*Options)) (*ListTemplatesOutput, error) {
if params == nil {
params = &ListTemplatesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListTemplates", params, optFns, c.addOperationListTemplatesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListTemplatesOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListTemplatesInput struct {
// The maximum number of templates to return. This value must be at least 1 and
// less than or equal to 10. If you do not specify a value, or if you specify a
// value less than 1 or greater than 10, the operation will return up to 10
// results.
MaxItems *int32
// A token returned from a previous call to ListTemplates to indicate the position
// in the list of email templates.
NextToken *string
noSmithyDocumentSerde
}
type ListTemplatesOutput struct {
// A token indicating that there are additional email templates available to be
// listed. Pass this token to a subsequent call to ListTemplates to retrieve the
// next 50 email templates.
NextToken *string
// An array the contains the name and creation time stamp for each template in
// your Amazon SES account.
TemplatesMetadata []types.TemplateMetadata
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListTemplatesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpListTemplates{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListTemplates{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTemplates(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListTemplates(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "ListTemplates",
}
}
| 134 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deprecated. Use the ListIdentities operation to list the email addresses and
// domains associated with your account.
func (c *Client) ListVerifiedEmailAddresses(ctx context.Context, params *ListVerifiedEmailAddressesInput, optFns ...func(*Options)) (*ListVerifiedEmailAddressesOutput, error) {
if params == nil {
params = &ListVerifiedEmailAddressesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListVerifiedEmailAddresses", params, optFns, c.addOperationListVerifiedEmailAddressesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListVerifiedEmailAddressesOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListVerifiedEmailAddressesInput struct {
noSmithyDocumentSerde
}
// A list of email addresses that you have verified with Amazon SES under your AWS
// account.
type ListVerifiedEmailAddressesOutput struct {
// A list of email addresses that have been verified.
VerifiedEmailAddresses []string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListVerifiedEmailAddressesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpListVerifiedEmailAddresses{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListVerifiedEmailAddresses{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVerifiedEmailAddresses(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListVerifiedEmailAddresses(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "ListVerifiedEmailAddresses",
}
}
| 118 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Adds or updates the delivery options for a configuration set.
func (c *Client) PutConfigurationSetDeliveryOptions(ctx context.Context, params *PutConfigurationSetDeliveryOptionsInput, optFns ...func(*Options)) (*PutConfigurationSetDeliveryOptionsOutput, error) {
if params == nil {
params = &PutConfigurationSetDeliveryOptionsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "PutConfigurationSetDeliveryOptions", params, optFns, c.addOperationPutConfigurationSetDeliveryOptionsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*PutConfigurationSetDeliveryOptionsOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to modify the delivery options for a configuration set.
type PutConfigurationSetDeliveryOptionsInput struct {
// The name of the configuration set that you want to specify the delivery options
// for.
//
// This member is required.
ConfigurationSetName *string
// Specifies whether messages that use the configuration set are required to use
// Transport Layer Security (TLS).
DeliveryOptions *types.DeliveryOptions
noSmithyDocumentSerde
}
// An HTTP 200 response if the request succeeds, or an error message if the
// request fails.
type PutConfigurationSetDeliveryOptionsOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationPutConfigurationSetDeliveryOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpPutConfigurationSetDeliveryOptions{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPutConfigurationSetDeliveryOptions{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpPutConfigurationSetDeliveryOptionsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutConfigurationSetDeliveryOptions(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opPutConfigurationSetDeliveryOptions(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "PutConfigurationSetDeliveryOptions",
}
}
| 129 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Adds or updates a sending authorization policy for the specified identity (an
// email address or a domain). This API is for the identity owner only. If you have
// not verified the identity, this API will return an error. Sending authorization
// is a feature that enables an identity owner to authorize other senders to use
// its identities. For information about using sending authorization, see the
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// . You can execute this operation no more than once per second.
func (c *Client) PutIdentityPolicy(ctx context.Context, params *PutIdentityPolicyInput, optFns ...func(*Options)) (*PutIdentityPolicyOutput, error) {
if params == nil {
params = &PutIdentityPolicyInput{}
}
result, metadata, err := c.invokeOperation(ctx, "PutIdentityPolicy", params, optFns, c.addOperationPutIdentityPolicyMiddlewares)
if err != nil {
return nil, err
}
out := result.(*PutIdentityPolicyOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to add or update a sending authorization policy for an
// identity. Sending authorization is an Amazon SES feature that enables you to
// authorize other senders to use your identities. For information, see the Amazon
// SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// .
type PutIdentityPolicyInput struct {
// The identity that the policy will apply to. You can specify an identity by
// using its name or by using its Amazon Resource Name (ARN). Examples:
// [email protected] , example.com ,
// arn:aws:ses:us-east-1:123456789012:identity/example.com . To successfully call
// this API, you must own the identity.
//
// This member is required.
Identity *string
// The text of the policy in JSON format. The policy cannot exceed 4 KB. For
// information about the syntax of sending authorization policies, see the Amazon
// SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization-policies.html)
// .
//
// This member is required.
Policy *string
// The name of the policy. The policy name cannot exceed 64 characters and can
// only include alphanumeric characters, dashes, and underscores.
//
// This member is required.
PolicyName *string
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type PutIdentityPolicyOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationPutIdentityPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpPutIdentityPolicy{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPutIdentityPolicy{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpPutIdentityPolicyValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutIdentityPolicy(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opPutIdentityPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "PutIdentityPolicy",
}
}
| 150 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Reorders the receipt rules within a receipt rule set. All of the rules in the
// rule set must be represented in this request. That is, this API will return an
// error if the reorder request doesn't explicitly position all of the rules. For
// information about managing receipt rule sets, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html)
// . You can execute this operation no more than once per second.
func (c *Client) ReorderReceiptRuleSet(ctx context.Context, params *ReorderReceiptRuleSetInput, optFns ...func(*Options)) (*ReorderReceiptRuleSetOutput, error) {
if params == nil {
params = &ReorderReceiptRuleSetInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ReorderReceiptRuleSet", params, optFns, c.addOperationReorderReceiptRuleSetMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ReorderReceiptRuleSetOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to reorder the receipt rules within a receipt rule set.
// You use receipt rule sets to receive email with Amazon SES. For more
// information, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html)
// .
type ReorderReceiptRuleSetInput struct {
// A list of the specified receipt rule set's receipt rules in the order that you
// want to put them.
//
// This member is required.
RuleNames []string
// The name of the receipt rule set to reorder.
//
// This member is required.
RuleSetName *string
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type ReorderReceiptRuleSetOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationReorderReceiptRuleSetMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpReorderReceiptRuleSet{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpReorderReceiptRuleSet{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpReorderReceiptRuleSetValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReorderReceiptRuleSet(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opReorderReceiptRuleSet(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "ReorderReceiptRuleSet",
}
}
| 135 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Generates and sends a bounce message to the sender of an email you received
// through Amazon SES. You can only use this API on an email up to 24 hours after
// you receive it. You cannot use this API to send generic bounces for mail that
// was not received by Amazon SES. For information about receiving email through
// Amazon SES, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html)
// . You can execute this operation no more than once per second.
func (c *Client) SendBounce(ctx context.Context, params *SendBounceInput, optFns ...func(*Options)) (*SendBounceOutput, error) {
if params == nil {
params = &SendBounceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SendBounce", params, optFns, c.addOperationSendBounceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SendBounceOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to send a bounce message to the sender of an email you
// received through Amazon SES.
type SendBounceInput struct {
// The address to use in the "From" header of the bounce message. This must be an
// identity that you have verified with Amazon SES.
//
// This member is required.
BounceSender *string
// A list of recipients of the bounced message, including the information required
// to create the Delivery Status Notifications (DSNs) for the recipients. You must
// specify at least one BouncedRecipientInfo in the list.
//
// This member is required.
BouncedRecipientInfoList []types.BouncedRecipientInfo
// The message ID of the message to be bounced.
//
// This member is required.
OriginalMessageId *string
// This parameter is used only for sending authorization. It is the ARN of the
// identity that is associated with the sending authorization policy that permits
// you to use the address in the "From" header of the bounce. For more information
// about sending authorization, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// .
BounceSenderArn *string
// Human-readable text for the bounce message to explain the failure. If not
// specified, the text will be auto-generated based on the bounced recipient
// information.
Explanation *string
// Message-related DSN fields. If not specified, Amazon SES will choose the values.
MessageDsn *types.MessageDsn
noSmithyDocumentSerde
}
// Represents a unique message ID.
type SendBounceOutput struct {
// The message ID of the bounce message.
MessageId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSendBounceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpSendBounce{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSendBounce{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpSendBounceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendBounce(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opSendBounce(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "SendBounce",
}
}
| 161 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Composes an email message to multiple destinations. The message body is created
// using an email template. In order to send email using the SendBulkTemplatedEmail
// operation, your call to the API must meet the following requirements:
// - The call must refer to an existing email template. You can create email
// templates using the CreateTemplate operation.
// - The message must be sent from a verified email address or domain.
// - If your account is still in the Amazon SES sandbox, you may only send to
// verified addresses or domains, or to email addresses associated with the Amazon
// SES Mailbox Simulator. For more information, see Verifying Email Addresses
// and Domains (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html)
// in the Amazon SES Developer Guide.
// - The maximum message size is 10 MB.
// - Each Destination parameter must include at least one recipient email
// address. The recipient address can be a To: address, a CC: address, or a BCC:
// address. If a recipient email address is invalid (that is, it is not in the
// format UserName@[SubDomain.]Domain.TopLevelDomain), the entire message will be
// rejected, even if the message contains other recipients that are valid.
// - The message may not include more than 50 recipients, across the To:, CC:
// and BCC: fields. If you need to send an email message to a larger audience, you
// can divide your recipient list into groups of 50 or fewer, and then call the
// SendBulkTemplatedEmail operation several times to send the message to each
// group.
// - The number of destinations you can contact in a single call to the API may
// be limited by your account's maximum sending rate.
func (c *Client) SendBulkTemplatedEmail(ctx context.Context, params *SendBulkTemplatedEmailInput, optFns ...func(*Options)) (*SendBulkTemplatedEmailOutput, error) {
if params == nil {
params = &SendBulkTemplatedEmailInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SendBulkTemplatedEmail", params, optFns, c.addOperationSendBulkTemplatedEmailMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SendBulkTemplatedEmailOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to send a templated email to multiple destinations using
// Amazon SES. For more information, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html)
// .
type SendBulkTemplatedEmailInput struct {
// One or more Destination objects. All of the recipients in a Destination will
// receive the same version of the email. You can specify up to 50 Destination
// objects within a Destinations array.
//
// This member is required.
Destinations []types.BulkEmailDestination
// The email address that is sending the email. This email address must be either
// individually verified with Amazon SES, or from a domain that has been verified
// with Amazon SES. For information about verifying identities, see the Amazon SES
// Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html)
// . If you are sending on behalf of another user and have been permitted to do so
// by a sending authorization policy, then you must also specify the SourceArn
// parameter. For more information about sending authorization, see the Amazon SES
// Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// . Amazon SES does not support the SMTPUTF8 extension, as described in RFC6531 (https://tools.ietf.org/html/rfc6531)
// . For this reason, the local part of a source email address (the part of the
// email address that precedes the @ sign) may only contain 7-bit ASCII characters (https://en.wikipedia.org/wiki/Email_address#Local-part)
// . If the domain part of an address (the part after the @ sign) contains
// non-ASCII characters, they must be encoded using Punycode, as described in
// RFC3492 (https://tools.ietf.org/html/rfc3492.html) . The sender name (also known
// as the friendly name) may contain non-ASCII characters. These characters must be
// encoded using MIME encoded-word syntax, as described in RFC 2047 (https://tools.ietf.org/html/rfc2047)
// . MIME encoded-word syntax uses the following form:
// =?charset?encoding?encoded-text?= .
//
// This member is required.
Source *string
// The template to use when sending this email.
//
// This member is required.
Template *string
// The name of the configuration set to use when you send an email using
// SendBulkTemplatedEmail .
ConfigurationSetName *string
// A list of tags, in the form of name/value pairs, to apply to an email that you
// send to a destination using SendBulkTemplatedEmail .
DefaultTags []types.MessageTag
// A list of replacement values to apply to the template when replacement data is
// not specified in a Destination object. These values act as a default or fallback
// option when no other data is available. The template data is a JSON object,
// typically consisting of key-value pairs in which the keys correspond to
// replacement tags in the email template.
DefaultTemplateData *string
// The reply-to email address(es) for the message. If the recipient replies to the
// message, each reply-to address will receive the reply.
ReplyToAddresses []string
// The email address that bounces and complaints will be forwarded to when
// feedback forwarding is enabled. If the message cannot be delivered to the
// recipient, then an error message will be returned from the recipient's ISP; this
// message will then be forwarded to the email address specified by the ReturnPath
// parameter. The ReturnPath parameter is never overwritten. This email address
// must be either individually verified with Amazon SES, or from a domain that has
// been verified with Amazon SES.
ReturnPath *string
// This parameter is used only for sending authorization. It is the ARN of the
// identity that is associated with the sending authorization policy that permits
// you to use the email address specified in the ReturnPath parameter. For
// example, if the owner of example.com (which has ARN
// arn:aws:ses:us-east-1:123456789012:identity/example.com ) attaches a policy to
// it that authorizes you to use [email protected] , then you would specify the
// ReturnPathArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com ,
// and the ReturnPath to be [email protected] . For more information about
// sending authorization, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// .
ReturnPathArn *string
// This parameter is used only for sending authorization. It is the ARN of the
// identity that is associated with the sending authorization policy that permits
// you to send for the email address specified in the Source parameter. For
// example, if the owner of example.com (which has ARN
// arn:aws:ses:us-east-1:123456789012:identity/example.com ) attaches a policy to
// it that authorizes you to send from [email protected] , then you would specify
// the SourceArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com ,
// and the Source to be [email protected] . For more information about sending
// authorization, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// .
SourceArn *string
// The ARN of the template to use when sending this email.
TemplateArn *string
noSmithyDocumentSerde
}
type SendBulkTemplatedEmailOutput struct {
// The unique message identifier returned from the SendBulkTemplatedEmail action.
//
// This member is required.
Status []types.BulkEmailDestinationStatus
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSendBulkTemplatedEmailMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpSendBulkTemplatedEmail{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSendBulkTemplatedEmail{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpSendBulkTemplatedEmailValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendBulkTemplatedEmail(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opSendBulkTemplatedEmail(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "SendBulkTemplatedEmail",
}
}
| 237 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Adds an email address to the list of identities for your Amazon SES account in
// the current AWS Region and attempts to verify it. As a result of executing this
// operation, a customized verification email is sent to the specified address. To
// use this operation, you must first create a custom verification email template.
// For more information about creating and using custom verification email
// templates, see Using Custom Verification Email Templates (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html)
// in the Amazon SES Developer Guide. You can execute this operation no more than
// once per second.
func (c *Client) SendCustomVerificationEmail(ctx context.Context, params *SendCustomVerificationEmailInput, optFns ...func(*Options)) (*SendCustomVerificationEmailOutput, error) {
if params == nil {
params = &SendCustomVerificationEmailInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SendCustomVerificationEmail", params, optFns, c.addOperationSendCustomVerificationEmailMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SendCustomVerificationEmailOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to send a custom verification email to a specified
// recipient.
type SendCustomVerificationEmailInput struct {
// The email address to verify.
//
// This member is required.
EmailAddress *string
// The name of the custom verification email template to use when sending the
// verification email.
//
// This member is required.
TemplateName *string
// Name of a configuration set to use when sending the verification email.
ConfigurationSetName *string
noSmithyDocumentSerde
}
// The response received when attempting to send the custom verification email.
type SendCustomVerificationEmailOutput struct {
// The unique message identifier returned from the SendCustomVerificationEmail
// operation.
MessageId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSendCustomVerificationEmailMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpSendCustomVerificationEmail{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSendCustomVerificationEmail{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpSendCustomVerificationEmailValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendCustomVerificationEmail(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opSendCustomVerificationEmail(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "SendCustomVerificationEmail",
}
}
| 144 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Composes an email message and immediately queues it for sending. In order to
// send email using the SendEmail operation, your message must meet the following
// requirements:
// - The message must be sent from a verified email address or domain. If you
// attempt to send email using a non-verified address or domain, the operation will
// result in an "Email address not verified" error.
// - If your account is still in the Amazon SES sandbox, you may only send to
// verified addresses or domains, or to email addresses associated with the Amazon
// SES Mailbox Simulator. For more information, see Verifying Email Addresses
// and Domains (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html)
// in the Amazon SES Developer Guide.
// - The maximum message size is 10 MB.
// - The message must include at least one recipient email address. The
// recipient address can be a To: address, a CC: address, or a BCC: address. If a
// recipient email address is invalid (that is, it is not in the format
// UserName@[SubDomain.]Domain.TopLevelDomain), the entire message will be
// rejected, even if the message contains other recipients that are valid.
// - The message may not include more than 50 recipients, across the To:, CC:
// and BCC: fields. If you need to send an email message to a larger audience, you
// can divide your recipient list into groups of 50 or fewer, and then call the
// SendEmail operation several times to send the message to each group.
//
// For every message that you send, the total number of recipients (including each
// recipient in the To:, CC: and BCC: fields) is counted against the maximum number
// of emails you can send in a 24-hour period (your sending quota). For more
// information about sending quotas in Amazon SES, see Managing Your Amazon SES
// Sending Limits (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/manage-sending-limits.html)
// in the Amazon SES Developer Guide.
func (c *Client) SendEmail(ctx context.Context, params *SendEmailInput, optFns ...func(*Options)) (*SendEmailOutput, error) {
if params == nil {
params = &SendEmailInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SendEmail", params, optFns, c.addOperationSendEmailMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SendEmailOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to send a single formatted email using Amazon SES. For
// more information, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-formatted.html)
// .
type SendEmailInput struct {
// The destination for this email, composed of To:, CC:, and BCC: fields.
//
// This member is required.
Destination *types.Destination
// The message to be sent.
//
// This member is required.
Message *types.Message
// The email address that is sending the email. This email address must be either
// individually verified with Amazon SES, or from a domain that has been verified
// with Amazon SES. For information about verifying identities, see the Amazon SES
// Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html)
// . If you are sending on behalf of another user and have been permitted to do so
// by a sending authorization policy, then you must also specify the SourceArn
// parameter. For more information about sending authorization, see the Amazon SES
// Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// . Amazon SES does not support the SMTPUTF8 extension, as described in RFC6531 (https://tools.ietf.org/html/rfc6531)
// . For this reason, the local part of a source email address (the part of the
// email address that precedes the @ sign) may only contain 7-bit ASCII characters (https://en.wikipedia.org/wiki/Email_address#Local-part)
// . If the domain part of an address (the part after the @ sign) contains
// non-ASCII characters, they must be encoded using Punycode, as described in
// RFC3492 (https://tools.ietf.org/html/rfc3492.html) . The sender name (also known
// as the friendly name) may contain non-ASCII characters. These characters must be
// encoded using MIME encoded-word syntax, as described in RFC 2047 (https://tools.ietf.org/html/rfc2047)
// . MIME encoded-word syntax uses the following form:
// =?charset?encoding?encoded-text?= .
//
// This member is required.
Source *string
// The name of the configuration set to use when you send an email using SendEmail .
ConfigurationSetName *string
// The reply-to email address(es) for the message. If the recipient replies to the
// message, each reply-to address will receive the reply.
ReplyToAddresses []string
// The email address that bounces and complaints will be forwarded to when
// feedback forwarding is enabled. If the message cannot be delivered to the
// recipient, then an error message will be returned from the recipient's ISP; this
// message will then be forwarded to the email address specified by the ReturnPath
// parameter. The ReturnPath parameter is never overwritten. This email address
// must be either individually verified with Amazon SES, or from a domain that has
// been verified with Amazon SES.
ReturnPath *string
// This parameter is used only for sending authorization. It is the ARN of the
// identity that is associated with the sending authorization policy that permits
// you to use the email address specified in the ReturnPath parameter. For
// example, if the owner of example.com (which has ARN
// arn:aws:ses:us-east-1:123456789012:identity/example.com ) attaches a policy to
// it that authorizes you to use [email protected] , then you would specify the
// ReturnPathArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com ,
// and the ReturnPath to be [email protected] . For more information about
// sending authorization, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// .
ReturnPathArn *string
// This parameter is used only for sending authorization. It is the ARN of the
// identity that is associated with the sending authorization policy that permits
// you to send for the email address specified in the Source parameter. For
// example, if the owner of example.com (which has ARN
// arn:aws:ses:us-east-1:123456789012:identity/example.com ) attaches a policy to
// it that authorizes you to send from [email protected] , then you would specify
// the SourceArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com ,
// and the Source to be [email protected] . For more information about sending
// authorization, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// .
SourceArn *string
// A list of tags, in the form of name/value pairs, to apply to an email that you
// send using SendEmail . Tags correspond to characteristics of the email that you
// define, so that you can publish email sending events.
Tags []types.MessageTag
noSmithyDocumentSerde
}
// Represents a unique message ID.
type SendEmailOutput struct {
// The unique message identifier returned from the SendEmail action.
//
// This member is required.
MessageId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSendEmailMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpSendEmail{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSendEmail{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpSendEmailValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendEmail(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opSendEmail(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "SendEmail",
}
}
| 230 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Composes an email message and immediately queues it for sending. This operation
// is more flexible than the SendEmail API operation. When you use the SendRawEmail
// operation, you can specify the headers of the message as well as its content.
// This flexibility is useful, for example, when you want to send a multipart MIME
// email (such a message that contains both a text and an HTML version). You can
// also use this operation to send messages that include attachments. The
// SendRawEmail operation has the following requirements:
// - You can only send email from verified email addresses or domains (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html)
// . If you try to send email from an address that isn't verified, the operation
// results in an "Email address not verified" error.
// - If your account is still in the Amazon SES sandbox (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html)
// , you can only send email to other verified addresses in your account, or to
// addresses that are associated with the Amazon SES mailbox simulator (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mailbox-simulator.html)
// .
// - The maximum message size, including attachments, is 10 MB.
// - Each message has to include at least one recipient address. A recipient
// address includes any address on the To:, CC:, or BCC: lines.
// - If you send a single message to more than one recipient address, and one of
// the recipient addresses isn't in a valid format (that is, it's not in the format
// UserName@[SubDomain.]Domain.TopLevelDomain), Amazon SES rejects the entire
// message, even if the other addresses are valid.
// - Each message can include up to 50 recipient addresses across the To:, CC:,
// or BCC: lines. If you need to send a single message to more than 50 recipients,
// you have to split the list of recipient addresses into groups of less than 50
// recipients, and send separate messages to each group.
// - Amazon SES allows you to specify 8-bit Content-Transfer-Encoding for MIME
// message parts. However, if Amazon SES has to modify the contents of your message
// (for example, if you use open and click tracking), 8-bit content isn't
// preserved. For this reason, we highly recommend that you encode all content that
// isn't 7-bit ASCII. For more information, see MIME Encoding (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-raw.html#send-email-mime-encoding)
// in the Amazon SES Developer Guide.
//
// Additionally, keep the following considerations in mind when using the
// SendRawEmail operation:
// - Although you can customize the message headers when using the SendRawEmail
// operation, Amazon SES will automatically apply its own Message-ID and Date
// headers; if you passed these headers when creating the message, they will be
// overwritten by the values that Amazon SES provides.
// - If you are using sending authorization to send on behalf of another user,
// SendRawEmail enables you to specify the cross-account identity for the email's
// Source, From, and Return-Path parameters in one of two ways: you can pass
// optional parameters SourceArn , FromArn , and/or ReturnPathArn to the API, or
// you can include the following X-headers in the header of your raw email:
// - X-SES-SOURCE-ARN
// - X-SES-FROM-ARN
// - X-SES-RETURN-PATH-ARN Don't include these X-headers in the DKIM signature.
// Amazon SES removes these before it sends the email. If you only specify the
// SourceIdentityArn parameter, Amazon SES sets the From and Return-Path
// addresses to the same identity that you specified. For more information about
// sending authorization, see the Using Sending Authorization with Amazon SES (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// in the Amazon SES Developer Guide.
// - For every message that you send, the total number of recipients (including
// each recipient in the To:, CC: and BCC: fields) is counted against the maximum
// number of emails you can send in a 24-hour period (your sending quota). For more
// information about sending quotas in Amazon SES, see Managing Your Amazon SES
// Sending Limits (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/manage-sending-limits.html)
// in the Amazon SES Developer Guide.
func (c *Client) SendRawEmail(ctx context.Context, params *SendRawEmailInput, optFns ...func(*Options)) (*SendRawEmailOutput, error) {
if params == nil {
params = &SendRawEmailInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SendRawEmail", params, optFns, c.addOperationSendRawEmailMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SendRawEmailOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to send a single raw email using Amazon SES. For more
// information, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-raw.html)
// .
type SendRawEmailInput struct {
// The raw email message itself. The message has to meet the following criteria:
// - The message has to contain a header and a body, separated by a blank line.
// - All of the required header fields must be present in the message.
// - Each part of a multipart MIME message must be formatted properly.
// - Attachments must be of a content type that Amazon SES supports. For a list
// on unsupported content types, see Unsupported Attachment Types (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mime-types.html)
// in the Amazon SES Developer Guide.
// - The entire message must be base64-encoded.
// - If any of the MIME parts in your message contain content that is outside of
// the 7-bit ASCII character range, we highly recommend that you encode that
// content. For more information, see Sending Raw Email (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-raw.html)
// in the Amazon SES Developer Guide.
// - Per RFC 5321 (https://tools.ietf.org/html/rfc5321#section-4.5.3.1.6) , the
// maximum length of each line of text, including the , must not exceed 1,000
// characters.
//
// This member is required.
RawMessage *types.RawMessage
// The name of the configuration set to use when you send an email using
// SendRawEmail .
ConfigurationSetName *string
// A list of destinations for the message, consisting of To:, CC:, and BCC:
// addresses.
Destinations []string
// This parameter is used only for sending authorization. It is the ARN of the
// identity that is associated with the sending authorization policy that permits
// you to specify a particular "From" address in the header of the raw email.
// Instead of using this parameter, you can use the X-header X-SES-FROM-ARN in the
// raw message of the email. If you use both the FromArn parameter and the
// corresponding X-header, Amazon SES uses the value of the FromArn parameter. For
// information about when to use this parameter, see the description of
// SendRawEmail in this guide, or see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization-delegate-sender-tasks-email.html)
// .
FromArn *string
// This parameter is used only for sending authorization. It is the ARN of the
// identity that is associated with the sending authorization policy that permits
// you to use the email address specified in the ReturnPath parameter. For
// example, if the owner of example.com (which has ARN
// arn:aws:ses:us-east-1:123456789012:identity/example.com ) attaches a policy to
// it that authorizes you to use [email protected] , then you would specify the
// ReturnPathArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com ,
// and the ReturnPath to be [email protected] . Instead of using this parameter,
// you can use the X-header X-SES-RETURN-PATH-ARN in the raw message of the email.
// If you use both the ReturnPathArn parameter and the corresponding X-header,
// Amazon SES uses the value of the ReturnPathArn parameter. For information about
// when to use this parameter, see the description of SendRawEmail in this guide,
// or see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization-delegate-sender-tasks-email.html)
// .
ReturnPathArn *string
// The identity's email address. If you do not provide a value for this parameter,
// you must specify a "From" address in the raw text of the message. (You can also
// specify both.) Amazon SES does not support the SMTPUTF8 extension, as described
// in RFC6531 (https://tools.ietf.org/html/rfc6531) . For this reason, the local
// part of a source email address (the part of the email address that precedes the
// @ sign) may only contain 7-bit ASCII characters (https://en.wikipedia.org/wiki/Email_address#Local-part)
// . If the domain part of an address (the part after the @ sign) contains
// non-ASCII characters, they must be encoded using Punycode, as described in
// RFC3492 (https://tools.ietf.org/html/rfc3492.html) . The sender name (also known
// as the friendly name) may contain non-ASCII characters. These characters must be
// encoded using MIME encoded-word syntax, as described in RFC 2047 (https://tools.ietf.org/html/rfc2047)
// . MIME encoded-word syntax uses the following form:
// =?charset?encoding?encoded-text?= . If you specify the Source parameter and
// have feedback forwarding enabled, then bounces and complaints will be sent to
// this email address. This takes precedence over any Return-Path header that you
// might include in the raw text of the message.
Source *string
// This parameter is used only for sending authorization. It is the ARN of the
// identity that is associated with the sending authorization policy that permits
// you to send for the email address specified in the Source parameter. For
// example, if the owner of example.com (which has ARN
// arn:aws:ses:us-east-1:123456789012:identity/example.com ) attaches a policy to
// it that authorizes you to send from [email protected] , then you would specify
// the SourceArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com ,
// and the Source to be [email protected] . Instead of using this parameter, you can
// use the X-header X-SES-SOURCE-ARN in the raw message of the email. If you use
// both the SourceArn parameter and the corresponding X-header, Amazon SES uses
// the value of the SourceArn parameter. For information about when to use this
// parameter, see the description of SendRawEmail in this guide, or see the Amazon
// SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization-delegate-sender-tasks-email.html)
// .
SourceArn *string
// A list of tags, in the form of name/value pairs, to apply to an email that you
// send using SendRawEmail . Tags correspond to characteristics of the email that
// you define, so that you can publish email sending events.
Tags []types.MessageTag
noSmithyDocumentSerde
}
// Represents a unique message ID.
type SendRawEmailOutput struct {
// The unique message identifier returned from the SendRawEmail action.
//
// This member is required.
MessageId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSendRawEmailMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpSendRawEmail{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSendRawEmail{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpSendRawEmailValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendRawEmail(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opSendRawEmail(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "SendRawEmail",
}
}
| 275 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Composes an email message using an email template and immediately queues it for
// sending. In order to send email using the SendTemplatedEmail operation, your
// call to the API must meet the following requirements:
// - The call must refer to an existing email template. You can create email
// templates using the CreateTemplate operation.
// - The message must be sent from a verified email address or domain.
// - If your account is still in the Amazon SES sandbox, you may only send to
// verified addresses or domains, or to email addresses associated with the Amazon
// SES Mailbox Simulator. For more information, see Verifying Email Addresses
// and Domains (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html)
// in the Amazon SES Developer Guide.
// - The maximum message size is 10 MB.
// - Calls to the SendTemplatedEmail operation may only include one Destination
// parameter. A destination is a set of recipients who will receive the same
// version of the email. The Destination parameter can include up to 50
// recipients, across the To:, CC: and BCC: fields.
// - The Destination parameter must include at least one recipient email address.
// The recipient address can be a To: address, a CC: address, or a BCC: address. If
// a recipient email address is invalid (that is, it is not in the format
// UserName@[SubDomain.]Domain.TopLevelDomain), the entire message will be
// rejected, even if the message contains other recipients that are valid.
//
// If your call to the SendTemplatedEmail operation includes all of the required
// parameters, Amazon SES accepts it and returns a Message ID. However, if Amazon
// SES can't render the email because the template contains errors, it doesn't send
// the email. Additionally, because it already accepted the message, Amazon SES
// doesn't return a message stating that it was unable to send the email. For these
// reasons, we highly recommend that you set up Amazon SES to send you
// notifications when Rendering Failure events occur. For more information, see
// Sending Personalized Email Using the Amazon SES API (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html)
// in the Amazon Simple Email Service Developer Guide.
func (c *Client) SendTemplatedEmail(ctx context.Context, params *SendTemplatedEmailInput, optFns ...func(*Options)) (*SendTemplatedEmailOutput, error) {
if params == nil {
params = &SendTemplatedEmailInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SendTemplatedEmail", params, optFns, c.addOperationSendTemplatedEmailMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SendTemplatedEmailOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to send a templated email using Amazon SES. For more
// information, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html)
// .
type SendTemplatedEmailInput struct {
// The destination for this email, composed of To:, CC:, and BCC: fields. A
// Destination can include up to 50 recipients across these three fields.
//
// This member is required.
Destination *types.Destination
// The email address that is sending the email. This email address must be either
// individually verified with Amazon SES, or from a domain that has been verified
// with Amazon SES. For information about verifying identities, see the Amazon SES
// Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html)
// . If you are sending on behalf of another user and have been permitted to do so
// by a sending authorization policy, then you must also specify the SourceArn
// parameter. For more information about sending authorization, see the Amazon SES
// Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// . Amazon SES does not support the SMTPUTF8 extension, as described in RFC6531 (https://tools.ietf.org/html/rfc6531)
// . For this reason, the local part of a source email address (the part of the
// email address that precedes the @ sign) may only contain 7-bit ASCII characters (https://en.wikipedia.org/wiki/Email_address#Local-part)
// . If the domain part of an address (the part after the @ sign) contains
// non-ASCII characters, they must be encoded using Punycode, as described in
// RFC3492 (https://tools.ietf.org/html/rfc3492.html) . The sender name (also known
// as the friendly name) may contain non-ASCII characters. These characters must be
// encoded using MIME encoded-word syntax, as described in RFC 2047 (https://tools.ietf.org/html/rfc2047)
// . MIME encoded-word syntax uses the following form:
// =?charset?encoding?encoded-text?= .
//
// This member is required.
Source *string
// The template to use when sending this email.
//
// This member is required.
Template *string
// A list of replacement values to apply to the template. This parameter is a JSON
// object, typically consisting of key-value pairs in which the keys correspond to
// replacement tags in the email template.
//
// This member is required.
TemplateData *string
// The name of the configuration set to use when you send an email using
// SendTemplatedEmail .
ConfigurationSetName *string
// The reply-to email address(es) for the message. If the recipient replies to the
// message, each reply-to address will receive the reply.
ReplyToAddresses []string
// The email address that bounces and complaints will be forwarded to when
// feedback forwarding is enabled. If the message cannot be delivered to the
// recipient, then an error message will be returned from the recipient's ISP; this
// message will then be forwarded to the email address specified by the ReturnPath
// parameter. The ReturnPath parameter is never overwritten. This email address
// must be either individually verified with Amazon SES, or from a domain that has
// been verified with Amazon SES.
ReturnPath *string
// This parameter is used only for sending authorization. It is the ARN of the
// identity that is associated with the sending authorization policy that permits
// you to use the email address specified in the ReturnPath parameter. For
// example, if the owner of example.com (which has ARN
// arn:aws:ses:us-east-1:123456789012:identity/example.com ) attaches a policy to
// it that authorizes you to use [email protected] , then you would specify the
// ReturnPathArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com ,
// and the ReturnPath to be [email protected] . For more information about
// sending authorization, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// .
ReturnPathArn *string
// This parameter is used only for sending authorization. It is the ARN of the
// identity that is associated with the sending authorization policy that permits
// you to send for the email address specified in the Source parameter. For
// example, if the owner of example.com (which has ARN
// arn:aws:ses:us-east-1:123456789012:identity/example.com ) attaches a policy to
// it that authorizes you to send from [email protected] , then you would specify
// the SourceArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com ,
// and the Source to be [email protected] . For more information about sending
// authorization, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// .
SourceArn *string
// A list of tags, in the form of name/value pairs, to apply to an email that you
// send using SendTemplatedEmail . Tags correspond to characteristics of the email
// that you define, so that you can publish email sending events.
Tags []types.MessageTag
// The ARN of the template to use when sending this email.
TemplateArn *string
noSmithyDocumentSerde
}
type SendTemplatedEmailOutput struct {
// The unique message identifier returned from the SendTemplatedEmail action.
//
// This member is required.
MessageId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSendTemplatedEmailMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpSendTemplatedEmail{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSendTemplatedEmail{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpSendTemplatedEmailValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendTemplatedEmail(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opSendTemplatedEmail(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "SendTemplatedEmail",
}
}
| 244 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Sets the specified receipt rule set as the active receipt rule set. To disable
// your email-receiving through Amazon SES completely, you can call this API with
// RuleSetName set to null. For information about managing receipt rule sets, see
// the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html)
// . You can execute this operation no more than once per second.
func (c *Client) SetActiveReceiptRuleSet(ctx context.Context, params *SetActiveReceiptRuleSetInput, optFns ...func(*Options)) (*SetActiveReceiptRuleSetOutput, error) {
if params == nil {
params = &SetActiveReceiptRuleSetInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SetActiveReceiptRuleSet", params, optFns, c.addOperationSetActiveReceiptRuleSetMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SetActiveReceiptRuleSetOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to set a receipt rule set as the active receipt rule set.
// You use receipt rule sets to receive email with Amazon SES. For more
// information, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html)
// .
type SetActiveReceiptRuleSetInput struct {
// The name of the receipt rule set to make active. Setting this value to null
// disables all email receiving.
RuleSetName *string
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type SetActiveReceiptRuleSetOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSetActiveReceiptRuleSetMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpSetActiveReceiptRuleSet{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSetActiveReceiptRuleSet{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetActiveReceiptRuleSet(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opSetActiveReceiptRuleSet(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "SetActiveReceiptRuleSet",
}
}
| 125 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Enables or disables Easy DKIM signing of email sent from an identity. If Easy
// DKIM signing is enabled for a domain, then Amazon SES uses DKIM to sign all
// email that it sends from addresses on that domain. If Easy DKIM signing is
// enabled for an email address, then Amazon SES uses DKIM to sign all email it
// sends from that address. For email addresses (for example, [email protected] ),
// you can only enable DKIM signing if the corresponding domain (in this case,
// example.com ) has been set up to use Easy DKIM. You can enable DKIM signing for
// an identity at any time after you start the verification process for the
// identity, even if the verification process isn't complete. You can execute this
// operation no more than once per second. For more information about Easy DKIM
// signing, go to the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html)
// .
func (c *Client) SetIdentityDkimEnabled(ctx context.Context, params *SetIdentityDkimEnabledInput, optFns ...func(*Options)) (*SetIdentityDkimEnabledOutput, error) {
if params == nil {
params = &SetIdentityDkimEnabledInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SetIdentityDkimEnabled", params, optFns, c.addOperationSetIdentityDkimEnabledMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SetIdentityDkimEnabledOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to enable or disable Amazon SES Easy DKIM signing for an
// identity. For more information about setting up Easy DKIM, see the Amazon SES
// Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html)
// .
type SetIdentityDkimEnabledInput struct {
// Sets whether DKIM signing is enabled for an identity. Set to true to enable
// DKIM signing for this identity; false to disable it.
//
// This member is required.
DkimEnabled bool
// The identity for which DKIM signing should be enabled or disabled.
//
// This member is required.
Identity *string
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type SetIdentityDkimEnabledOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSetIdentityDkimEnabledMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpSetIdentityDkimEnabled{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSetIdentityDkimEnabled{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpSetIdentityDkimEnabledValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetIdentityDkimEnabled(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opSetIdentityDkimEnabled(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "SetIdentityDkimEnabled",
}
}
| 142 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Given an identity (an email address or a domain), enables or disables whether
// Amazon SES forwards bounce and complaint notifications as email. Feedback
// forwarding can only be disabled when Amazon Simple Notification Service (Amazon
// SNS) topics are specified for both bounces and complaints. Feedback forwarding
// does not apply to delivery notifications. Delivery notifications are only
// available through Amazon SNS. You can execute this operation no more than once
// per second. For more information about using notifications with Amazon SES, see
// the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html)
// .
func (c *Client) SetIdentityFeedbackForwardingEnabled(ctx context.Context, params *SetIdentityFeedbackForwardingEnabledInput, optFns ...func(*Options)) (*SetIdentityFeedbackForwardingEnabledOutput, error) {
if params == nil {
params = &SetIdentityFeedbackForwardingEnabledInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SetIdentityFeedbackForwardingEnabled", params, optFns, c.addOperationSetIdentityFeedbackForwardingEnabledMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SetIdentityFeedbackForwardingEnabledOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to enable or disable whether Amazon SES forwards you
// bounce and complaint notifications through email. For information about email
// feedback forwarding, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications-via-email.html)
// .
type SetIdentityFeedbackForwardingEnabledInput struct {
// Sets whether Amazon SES will forward bounce and complaint notifications as
// email. true specifies that Amazon SES will forward bounce and complaint
// notifications as email, in addition to any Amazon SNS topic publishing otherwise
// specified. false specifies that Amazon SES will publish bounce and complaint
// notifications only through Amazon SNS. This value can only be set to false when
// Amazon SNS topics are set for both Bounce and Complaint notification types.
//
// This member is required.
ForwardingEnabled bool
// The identity for which to set bounce and complaint notification forwarding.
// Examples: [email protected] , example.com .
//
// This member is required.
Identity *string
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type SetIdentityFeedbackForwardingEnabledOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSetIdentityFeedbackForwardingEnabledMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpSetIdentityFeedbackForwardingEnabled{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSetIdentityFeedbackForwardingEnabled{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpSetIdentityFeedbackForwardingEnabledValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetIdentityFeedbackForwardingEnabled(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opSetIdentityFeedbackForwardingEnabled(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "SetIdentityFeedbackForwardingEnabled",
}
}
| 144 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Given an identity (an email address or a domain), sets whether Amazon SES
// includes the original email headers in the Amazon Simple Notification Service
// (Amazon SNS) notifications of a specified type. You can execute this operation
// no more than once per second. For more information about using notifications
// with Amazon SES, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html)
// .
func (c *Client) SetIdentityHeadersInNotificationsEnabled(ctx context.Context, params *SetIdentityHeadersInNotificationsEnabledInput, optFns ...func(*Options)) (*SetIdentityHeadersInNotificationsEnabledOutput, error) {
if params == nil {
params = &SetIdentityHeadersInNotificationsEnabledInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SetIdentityHeadersInNotificationsEnabled", params, optFns, c.addOperationSetIdentityHeadersInNotificationsEnabledMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SetIdentityHeadersInNotificationsEnabledOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to set whether Amazon SES includes the original email
// headers in the Amazon SNS notifications of a specified type. For information
// about notifications, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications-via-sns.html)
// .
type SetIdentityHeadersInNotificationsEnabledInput struct {
// Sets whether Amazon SES includes the original email headers in Amazon SNS
// notifications of the specified notification type. A value of true specifies
// that Amazon SES will include headers in notifications, and a value of false
// specifies that Amazon SES will not include headers in notifications. This value
// can only be set when NotificationType is already set to use a particular Amazon
// SNS topic.
//
// This member is required.
Enabled bool
// The identity for which to enable or disable headers in notifications. Examples:
// [email protected] , example.com .
//
// This member is required.
Identity *string
// The notification type for which to enable or disable headers in notifications.
//
// This member is required.
NotificationType types.NotificationType
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type SetIdentityHeadersInNotificationsEnabledOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSetIdentityHeadersInNotificationsEnabledMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpSetIdentityHeadersInNotificationsEnabled{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSetIdentityHeadersInNotificationsEnabled{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpSetIdentityHeadersInNotificationsEnabledValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetIdentityHeadersInNotificationsEnabled(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opSetIdentityHeadersInNotificationsEnabled(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "SetIdentityHeadersInNotificationsEnabled",
}
}
| 147 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Enables or disables the custom MAIL FROM domain setup for a verified identity
// (an email address or a domain). To send emails using the specified MAIL FROM
// domain, you must add an MX record to your MAIL FROM domain's DNS settings. If
// you want your emails to pass Sender Policy Framework (SPF) checks, you must also
// add or update an SPF record. For more information, see the Amazon SES Developer
// Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-set.html)
// . You can execute this operation no more than once per second.
func (c *Client) SetIdentityMailFromDomain(ctx context.Context, params *SetIdentityMailFromDomainInput, optFns ...func(*Options)) (*SetIdentityMailFromDomainOutput, error) {
if params == nil {
params = &SetIdentityMailFromDomainInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SetIdentityMailFromDomain", params, optFns, c.addOperationSetIdentityMailFromDomainMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SetIdentityMailFromDomainOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to enable or disable the Amazon SES custom MAIL FROM
// domain setup for a verified identity. For information about using a custom MAIL
// FROM domain, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from.html)
// .
type SetIdentityMailFromDomainInput struct {
// The verified identity for which you want to enable or disable the specified
// custom MAIL FROM domain.
//
// This member is required.
Identity *string
// The action that you want Amazon SES to take if it cannot successfully read the
// required MX record when you send an email. If you choose UseDefaultValue ,
// Amazon SES will use amazonses.com (or a subdomain of that) as the MAIL FROM
// domain. If you choose RejectMessage , Amazon SES will return a
// MailFromDomainNotVerified error and not send the email. The action specified in
// BehaviorOnMXFailure is taken when the custom MAIL FROM domain setup is in the
// Pending , Failed , and TemporaryFailure states.
BehaviorOnMXFailure types.BehaviorOnMXFailure
// The custom MAIL FROM domain that you want the verified identity to use. The
// MAIL FROM domain must 1) be a subdomain of the verified identity, 2) not be used
// in a "From" address if the MAIL FROM domain is the destination of email feedback
// forwarding (for more information, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from.html)
// ), and 3) not be used to receive emails. A value of null disables the custom
// MAIL FROM setting for the identity.
MailFromDomain *string
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type SetIdentityMailFromDomainOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSetIdentityMailFromDomainMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpSetIdentityMailFromDomain{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSetIdentityMailFromDomain{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpSetIdentityMailFromDomainValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetIdentityMailFromDomain(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opSetIdentityMailFromDomain(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "SetIdentityMailFromDomain",
}
}
| 150 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Sets an Amazon Simple Notification Service (Amazon SNS) topic to use when
// delivering notifications. When you use this operation, you specify a verified
// identity, such as an email address or domain. When you send an email that uses
// the chosen identity in the Source field, Amazon SES sends notifications to the
// topic you specified. You can send bounce, complaint, or delivery notifications
// (or any combination of the three) to the Amazon SNS topic that you specify. You
// can execute this operation no more than once per second. For more information
// about feedback notification, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html)
// .
func (c *Client) SetIdentityNotificationTopic(ctx context.Context, params *SetIdentityNotificationTopicInput, optFns ...func(*Options)) (*SetIdentityNotificationTopicOutput, error) {
if params == nil {
params = &SetIdentityNotificationTopicInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SetIdentityNotificationTopic", params, optFns, c.addOperationSetIdentityNotificationTopicMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SetIdentityNotificationTopicOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to specify the Amazon SNS topic to which Amazon SES will
// publish bounce, complaint, or delivery notifications for emails sent with that
// identity as the Source. For information about Amazon SES notifications, see the
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications-via-sns.html)
// .
type SetIdentityNotificationTopicInput struct {
// The identity (email address or domain) that you want to set the Amazon SNS
// topic for. You can only specify a verified identity for this parameter. You can
// specify an identity by using its name or by using its Amazon Resource Name
// (ARN). The following examples are all valid identities: [email protected] ,
// example.com , arn:aws:ses:us-east-1:123456789012:identity/example.com .
//
// This member is required.
Identity *string
// The type of notifications that will be published to the specified Amazon SNS
// topic.
//
// This member is required.
NotificationType types.NotificationType
// The Amazon Resource Name (ARN) of the Amazon SNS topic. If the parameter is
// omitted from the request or a null value is passed, SnsTopic is cleared and
// publishing is disabled.
SnsTopic *string
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type SetIdentityNotificationTopicOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSetIdentityNotificationTopicMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpSetIdentityNotificationTopic{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSetIdentityNotificationTopic{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpSetIdentityNotificationTopicValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetIdentityNotificationTopic(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opSetIdentityNotificationTopic(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "SetIdentityNotificationTopic",
}
}
| 150 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Sets the position of the specified receipt rule in the receipt rule set. For
// information about managing receipt rules, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rules.html)
// . You can execute this operation no more than once per second.
func (c *Client) SetReceiptRulePosition(ctx context.Context, params *SetReceiptRulePositionInput, optFns ...func(*Options)) (*SetReceiptRulePositionOutput, error) {
if params == nil {
params = &SetReceiptRulePositionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SetReceiptRulePosition", params, optFns, c.addOperationSetReceiptRulePositionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SetReceiptRulePositionOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to set the position of a receipt rule in a receipt rule
// set. You use receipt rule sets to receive email with Amazon SES. For more
// information, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html)
// .
type SetReceiptRulePositionInput struct {
// The name of the receipt rule to reposition.
//
// This member is required.
RuleName *string
// The name of the receipt rule set that contains the receipt rule to reposition.
//
// This member is required.
RuleSetName *string
// The name of the receipt rule after which to place the specified receipt rule.
After *string
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type SetReceiptRulePositionOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSetReceiptRulePositionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpSetReceiptRulePosition{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpSetReceiptRulePosition{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpSetReceiptRulePositionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetReceiptRulePosition(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opSetReceiptRulePosition(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "SetReceiptRulePosition",
}
}
| 135 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates a preview of the MIME content of an email when provided with a template
// and a set of replacement data. You can execute this operation no more than once
// per second.
func (c *Client) TestRenderTemplate(ctx context.Context, params *TestRenderTemplateInput, optFns ...func(*Options)) (*TestRenderTemplateOutput, error) {
if params == nil {
params = &TestRenderTemplateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "TestRenderTemplate", params, optFns, c.addOperationTestRenderTemplateMiddlewares)
if err != nil {
return nil, err
}
out := result.(*TestRenderTemplateOutput)
out.ResultMetadata = metadata
return out, nil
}
type TestRenderTemplateInput struct {
// A list of replacement values to apply to the template. This parameter is a JSON
// object, typically consisting of key-value pairs in which the keys correspond to
// replacement tags in the email template.
//
// This member is required.
TemplateData *string
// The name of the template that you want to render.
//
// This member is required.
TemplateName *string
noSmithyDocumentSerde
}
type TestRenderTemplateOutput struct {
// The complete MIME message rendered by applying the data in the TemplateData
// parameter to the template specified in the TemplateName parameter.
RenderedTemplate *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationTestRenderTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpTestRenderTemplate{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpTestRenderTemplate{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpTestRenderTemplateValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestRenderTemplate(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opTestRenderTemplate(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "TestRenderTemplate",
}
}
| 134 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Enables or disables email sending across your entire Amazon SES account in the
// current AWS Region. You can use this operation in conjunction with Amazon
// CloudWatch alarms to temporarily pause email sending across your Amazon SES
// account in a given AWS Region when reputation metrics (such as your bounce or
// complaint rates) reach certain thresholds. You can execute this operation no
// more than once per second.
func (c *Client) UpdateAccountSendingEnabled(ctx context.Context, params *UpdateAccountSendingEnabledInput, optFns ...func(*Options)) (*UpdateAccountSendingEnabledOutput, error) {
if params == nil {
params = &UpdateAccountSendingEnabledInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateAccountSendingEnabled", params, optFns, c.addOperationUpdateAccountSendingEnabledMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateAccountSendingEnabledOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to enable or disable the email sending capabilities for
// your entire Amazon SES account.
type UpdateAccountSendingEnabledInput struct {
// Describes whether email sending is enabled or disabled for your Amazon SES
// account in the current AWS Region.
Enabled bool
noSmithyDocumentSerde
}
type UpdateAccountSendingEnabledOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateAccountSendingEnabledMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateAccountSendingEnabled{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateAccountSendingEnabled{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccountSendingEnabled(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opUpdateAccountSendingEnabled(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "UpdateAccountSendingEnabled",
}
}
| 123 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates the event destination of a configuration set. Event destinations are
// associated with configuration sets, which enable you to publish email sending
// events to Amazon CloudWatch, Amazon Kinesis Firehose, or Amazon Simple
// Notification Service (Amazon SNS). For information about using configuration
// sets, see Monitoring Your Amazon SES Sending Activity (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html)
// in the Amazon SES Developer Guide. When you create or update an event
// destination, you must provide one, and only one, destination. The destination
// can be Amazon CloudWatch, Amazon Kinesis Firehose, or Amazon Simple Notification
// Service (Amazon SNS). You can execute this operation no more than once per
// second.
func (c *Client) UpdateConfigurationSetEventDestination(ctx context.Context, params *UpdateConfigurationSetEventDestinationInput, optFns ...func(*Options)) (*UpdateConfigurationSetEventDestinationOutput, error) {
if params == nil {
params = &UpdateConfigurationSetEventDestinationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateConfigurationSetEventDestination", params, optFns, c.addOperationUpdateConfigurationSetEventDestinationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateConfigurationSetEventDestinationOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to update the event destination of a configuration set.
// Configuration sets enable you to publish email sending events. For information
// about using configuration sets, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html)
// .
type UpdateConfigurationSetEventDestinationInput struct {
// The name of the configuration set that contains the event destination that you
// want to update.
//
// This member is required.
ConfigurationSetName *string
// The event destination object that you want to apply to the specified
// configuration set.
//
// This member is required.
EventDestination *types.EventDestination
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type UpdateConfigurationSetEventDestinationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateConfigurationSetEventDestinationMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateConfigurationSetEventDestination{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateConfigurationSetEventDestination{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateConfigurationSetEventDestinationValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateConfigurationSetEventDestination(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opUpdateConfigurationSetEventDestination(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "UpdateConfigurationSetEventDestination",
}
}
| 142 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Enables or disables the publishing of reputation metrics for emails sent using
// a specific configuration set in a given AWS Region. Reputation metrics include
// bounce and complaint rates. These metrics are published to Amazon CloudWatch. By
// using CloudWatch, you can create alarms when bounce or complaint rates exceed
// certain thresholds. You can execute this operation no more than once per second.
func (c *Client) UpdateConfigurationSetReputationMetricsEnabled(ctx context.Context, params *UpdateConfigurationSetReputationMetricsEnabledInput, optFns ...func(*Options)) (*UpdateConfigurationSetReputationMetricsEnabledOutput, error) {
if params == nil {
params = &UpdateConfigurationSetReputationMetricsEnabledInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateConfigurationSetReputationMetricsEnabled", params, optFns, c.addOperationUpdateConfigurationSetReputationMetricsEnabledMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateConfigurationSetReputationMetricsEnabledOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to modify the reputation metric publishing settings for a
// configuration set.
type UpdateConfigurationSetReputationMetricsEnabledInput struct {
// The name of the configuration set that you want to update.
//
// This member is required.
ConfigurationSetName *string
// Describes whether or not Amazon SES will publish reputation metrics for the
// configuration set, such as bounce and complaint rates, to Amazon CloudWatch.
//
// This member is required.
Enabled bool
noSmithyDocumentSerde
}
type UpdateConfigurationSetReputationMetricsEnabledOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateConfigurationSetReputationMetricsEnabledMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateConfigurationSetReputationMetricsEnabled{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateConfigurationSetReputationMetricsEnabled{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateConfigurationSetReputationMetricsEnabledValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateConfigurationSetReputationMetricsEnabled(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opUpdateConfigurationSetReputationMetricsEnabled(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "UpdateConfigurationSetReputationMetricsEnabled",
}
}
| 132 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Enables or disables email sending for messages sent using a specific
// configuration set in a given AWS Region. You can use this operation in
// conjunction with Amazon CloudWatch alarms to temporarily pause email sending for
// a configuration set when the reputation metrics for that configuration set (such
// as your bounce on complaint rate) exceed certain thresholds. You can execute
// this operation no more than once per second.
func (c *Client) UpdateConfigurationSetSendingEnabled(ctx context.Context, params *UpdateConfigurationSetSendingEnabledInput, optFns ...func(*Options)) (*UpdateConfigurationSetSendingEnabledOutput, error) {
if params == nil {
params = &UpdateConfigurationSetSendingEnabledInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateConfigurationSetSendingEnabled", params, optFns, c.addOperationUpdateConfigurationSetSendingEnabledMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateConfigurationSetSendingEnabledOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to enable or disable the email sending capabilities for a
// specific configuration set.
type UpdateConfigurationSetSendingEnabledInput struct {
// The name of the configuration set that you want to update.
//
// This member is required.
ConfigurationSetName *string
// Describes whether email sending is enabled or disabled for the configuration
// set.
//
// This member is required.
Enabled bool
noSmithyDocumentSerde
}
type UpdateConfigurationSetSendingEnabledOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateConfigurationSetSendingEnabledMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateConfigurationSetSendingEnabled{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateConfigurationSetSendingEnabled{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateConfigurationSetSendingEnabledValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateConfigurationSetSendingEnabled(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opUpdateConfigurationSetSendingEnabled(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "UpdateConfigurationSetSendingEnabled",
}
}
| 133 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies an association between a configuration set and a custom domain for
// open and click event tracking. By default, images and links used for tracking
// open and click events are hosted on domains operated by Amazon SES. You can
// configure a subdomain of your own to handle these events. For information about
// using custom domains, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html)
// .
func (c *Client) UpdateConfigurationSetTrackingOptions(ctx context.Context, params *UpdateConfigurationSetTrackingOptionsInput, optFns ...func(*Options)) (*UpdateConfigurationSetTrackingOptionsOutput, error) {
if params == nil {
params = &UpdateConfigurationSetTrackingOptionsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateConfigurationSetTrackingOptions", params, optFns, c.addOperationUpdateConfigurationSetTrackingOptionsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateConfigurationSetTrackingOptionsOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to update the tracking options for a configuration set.
type UpdateConfigurationSetTrackingOptionsInput struct {
// The name of the configuration set for which you want to update the custom
// tracking domain.
//
// This member is required.
ConfigurationSetName *string
// A domain that is used to redirect email recipients to an Amazon SES-operated
// domain. This domain captures open and click events generated by Amazon SES
// emails. For more information, see Configuring Custom Domains to Handle Open and
// Click Tracking (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html)
// in the Amazon SES Developer Guide.
//
// This member is required.
TrackingOptions *types.TrackingOptions
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type UpdateConfigurationSetTrackingOptionsOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateConfigurationSetTrackingOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateConfigurationSetTrackingOptions{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateConfigurationSetTrackingOptions{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateConfigurationSetTrackingOptionsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateConfigurationSetTrackingOptions(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opUpdateConfigurationSetTrackingOptions(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "UpdateConfigurationSetTrackingOptions",
}
}
| 138 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates an existing custom verification email template. For more information
// about custom verification email templates, see Using Custom Verification Email
// Templates (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html)
// in the Amazon SES Developer Guide. You can execute this operation no more than
// once per second.
func (c *Client) UpdateCustomVerificationEmailTemplate(ctx context.Context, params *UpdateCustomVerificationEmailTemplateInput, optFns ...func(*Options)) (*UpdateCustomVerificationEmailTemplateOutput, error) {
if params == nil {
params = &UpdateCustomVerificationEmailTemplateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateCustomVerificationEmailTemplate", params, optFns, c.addOperationUpdateCustomVerificationEmailTemplateMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateCustomVerificationEmailTemplateOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to update an existing custom verification email template.
type UpdateCustomVerificationEmailTemplateInput struct {
// The name of the custom verification email template that you want to update.
//
// This member is required.
TemplateName *string
// The URL that the recipient of the verification email is sent to if his or her
// address is not successfully verified.
FailureRedirectionURL *string
// The email address that the custom verification email is sent from.
FromEmailAddress *string
// The URL that the recipient of the verification email is sent to if his or her
// address is successfully verified.
SuccessRedirectionURL *string
// The content of the custom verification email. The total size of the email must
// be less than 10 MB. The message body may contain HTML, with some limitations.
// For more information, see Custom Verification Email Frequently Asked Questions (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html#custom-verification-emails-faq)
// in the Amazon SES Developer Guide.
TemplateContent *string
// The subject line of the custom verification email.
TemplateSubject *string
noSmithyDocumentSerde
}
type UpdateCustomVerificationEmailTemplateOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateCustomVerificationEmailTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateCustomVerificationEmailTemplate{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateCustomVerificationEmailTemplate{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateCustomVerificationEmailTemplateValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateCustomVerificationEmailTemplate(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opUpdateCustomVerificationEmailTemplate(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "UpdateCustomVerificationEmailTemplate",
}
}
| 145 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates a receipt rule. For information about managing receipt rules, see the
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rules.html)
// . You can execute this operation no more than once per second.
func (c *Client) UpdateReceiptRule(ctx context.Context, params *UpdateReceiptRuleInput, optFns ...func(*Options)) (*UpdateReceiptRuleOutput, error) {
if params == nil {
params = &UpdateReceiptRuleInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateReceiptRule", params, optFns, c.addOperationUpdateReceiptRuleMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateReceiptRuleOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to update a receipt rule. You use receipt rules to receive
// email with Amazon SES. For more information, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html)
// .
type UpdateReceiptRuleInput struct {
// A data structure that contains the updated receipt rule information.
//
// This member is required.
Rule *types.ReceiptRule
// The name of the receipt rule set that the receipt rule belongs to.
//
// This member is required.
RuleSetName *string
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type UpdateReceiptRuleOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateReceiptRuleMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateReceiptRule{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateReceiptRule{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateReceiptRuleValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateReceiptRule(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opUpdateReceiptRule(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "UpdateReceiptRule",
}
}
| 132 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates an email template. Email templates enable you to send personalized
// email to one or more destinations in a single API operation. For more
// information, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html)
// . You can execute this operation no more than once per second.
func (c *Client) UpdateTemplate(ctx context.Context, params *UpdateTemplateInput, optFns ...func(*Options)) (*UpdateTemplateOutput, error) {
if params == nil {
params = &UpdateTemplateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateTemplate", params, optFns, c.addOperationUpdateTemplateMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateTemplateOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateTemplateInput struct {
// The content of the email, composed of a subject line, an HTML part, and a
// text-only part.
//
// This member is required.
Template *types.Template
noSmithyDocumentSerde
}
type UpdateTemplateOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpUpdateTemplate{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpUpdateTemplate{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateTemplateValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateTemplate(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opUpdateTemplate(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "UpdateTemplate",
}
}
| 125 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a set of DKIM tokens for a domain identity. When you execute the
// VerifyDomainDkim operation, the domain that you specify is added to the list of
// identities that are associated with your account. This is true even if you
// haven't already associated the domain with your account by using the
// VerifyDomainIdentity operation. However, you can't send email from the domain
// until you either successfully verify it (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-domains.html)
// or you successfully set up DKIM for it (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html)
// . You use the tokens that are generated by this operation to create CNAME
// records. When Amazon SES detects that you've added these records to the DNS
// configuration for a domain, you can start sending email from that domain. You
// can start sending email even if you haven't added the TXT record provided by the
// VerifyDomainIdentity operation to the DNS configuration for your domain. All
// email that you send from the domain is authenticated using DKIM. To create the
// CNAME records for DKIM authentication, use the following values:
// - Name: token._domainkey.example.com
// - Type: CNAME
// - Value: token.dkim.amazonses.com
//
// In the preceding example, replace token with one of the tokens that are
// generated when you execute this operation. Replace example.com with your domain.
// Repeat this process for each token that's generated by this operation. You can
// execute this operation no more than once per second.
func (c *Client) VerifyDomainDkim(ctx context.Context, params *VerifyDomainDkimInput, optFns ...func(*Options)) (*VerifyDomainDkimOutput, error) {
if params == nil {
params = &VerifyDomainDkimInput{}
}
result, metadata, err := c.invokeOperation(ctx, "VerifyDomainDkim", params, optFns, c.addOperationVerifyDomainDkimMiddlewares)
if err != nil {
return nil, err
}
out := result.(*VerifyDomainDkimOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to generate the CNAME records needed to set up Easy DKIM
// with Amazon SES. For more information about setting up Easy DKIM, see the
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html)
// .
type VerifyDomainDkimInput struct {
// The name of the domain to be verified for Easy DKIM signing.
//
// This member is required.
Domain *string
noSmithyDocumentSerde
}
// Returns CNAME records that you must publish to the DNS server of your domain to
// set up Easy DKIM with Amazon SES.
type VerifyDomainDkimOutput struct {
// A set of character strings that represent the domain's identity. If the
// identity is an email address, the tokens represent the domain of that address.
// Using these tokens, you need to create DNS CNAME records that point to DKIM
// public keys that are hosted by Amazon SES. Amazon Web Services eventually
// detects that you've updated your DNS records. This detection process might take
// up to 72 hours. After successful detection, Amazon SES is able to DKIM-sign
// email originating from that domain. (This only applies to domain identities, not
// email address identities.) For more information about creating DNS records using
// DKIM tokens, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html)
// .
//
// This member is required.
DkimTokens []string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationVerifyDomainDkimMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpVerifyDomainDkim{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpVerifyDomainDkim{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpVerifyDomainDkimValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opVerifyDomainDkim(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opVerifyDomainDkim(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "VerifyDomainDkim",
}
}
| 162 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Adds a domain to the list of identities for your Amazon SES account in the
// current AWS Region and attempts to verify it. For more information about
// verifying domains, see Verifying Email Addresses and Domains (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html)
// in the Amazon SES Developer Guide. You can execute this operation no more than
// once per second.
func (c *Client) VerifyDomainIdentity(ctx context.Context, params *VerifyDomainIdentityInput, optFns ...func(*Options)) (*VerifyDomainIdentityOutput, error) {
if params == nil {
params = &VerifyDomainIdentityInput{}
}
result, metadata, err := c.invokeOperation(ctx, "VerifyDomainIdentity", params, optFns, c.addOperationVerifyDomainIdentityMiddlewares)
if err != nil {
return nil, err
}
out := result.(*VerifyDomainIdentityOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to begin Amazon SES domain verification and to generate
// the TXT records that you must publish to the DNS server of your domain to
// complete the verification. For information about domain verification, see the
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-domains.html)
// .
type VerifyDomainIdentityInput struct {
// The domain to be verified.
//
// This member is required.
Domain *string
noSmithyDocumentSerde
}
// Returns a TXT record that you must publish to the DNS server of your domain to
// complete domain verification with Amazon SES.
type VerifyDomainIdentityOutput struct {
// A TXT record that you must place in the DNS settings of the domain to complete
// domain verification with Amazon SES. As Amazon SES searches for the TXT record,
// the domain's verification status is "Pending". When Amazon SES detects the
// record, the domain's verification status changes to "Success". If Amazon SES is
// unable to detect the record within 72 hours, the domain's verification status
// changes to "Failed." In that case, if you still want to verify the domain, you
// must restart the verification process from the beginning.
//
// This member is required.
VerificationToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationVerifyDomainIdentityMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpVerifyDomainIdentity{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpVerifyDomainIdentity{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpVerifyDomainIdentityValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opVerifyDomainIdentity(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opVerifyDomainIdentity(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "VerifyDomainIdentity",
}
}
| 143 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deprecated. Use the VerifyEmailIdentity operation to verify a new email address.
func (c *Client) VerifyEmailAddress(ctx context.Context, params *VerifyEmailAddressInput, optFns ...func(*Options)) (*VerifyEmailAddressOutput, error) {
if params == nil {
params = &VerifyEmailAddressInput{}
}
result, metadata, err := c.invokeOperation(ctx, "VerifyEmailAddress", params, optFns, c.addOperationVerifyEmailAddressMiddlewares)
if err != nil {
return nil, err
}
out := result.(*VerifyEmailAddressOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to begin email address verification with Amazon SES. For
// information about email address verification, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-email-addresses.html)
// .
type VerifyEmailAddressInput struct {
// The email address to be verified.
//
// This member is required.
EmailAddress *string
noSmithyDocumentSerde
}
type VerifyEmailAddressOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationVerifyEmailAddressMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpVerifyEmailAddress{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpVerifyEmailAddress{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpVerifyEmailAddressValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opVerifyEmailAddress(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opVerifyEmailAddress(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "VerifyEmailAddress",
}
}
| 123 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Adds an email address to the list of identities for your Amazon SES account in
// the current AWS region and attempts to verify it. As a result of executing this
// operation, a verification email is sent to the specified address. You can
// execute this operation no more than once per second.
func (c *Client) VerifyEmailIdentity(ctx context.Context, params *VerifyEmailIdentityInput, optFns ...func(*Options)) (*VerifyEmailIdentityOutput, error) {
if params == nil {
params = &VerifyEmailIdentityInput{}
}
result, metadata, err := c.invokeOperation(ctx, "VerifyEmailIdentity", params, optFns, c.addOperationVerifyEmailIdentityMiddlewares)
if err != nil {
return nil, err
}
out := result.(*VerifyEmailIdentityOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to begin email address verification with Amazon SES. For
// information about email address verification, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-email-addresses.html)
// .
type VerifyEmailIdentityInput struct {
// The email address to be verified.
//
// This member is required.
EmailAddress *string
noSmithyDocumentSerde
}
// An empty element returned on a successful request.
type VerifyEmailIdentityOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationVerifyEmailIdentityMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsquery_serializeOpVerifyEmailIdentity{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsquery_deserializeOpVerifyEmailIdentity{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpVerifyEmailIdentityValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opVerifyEmailIdentity(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opVerifyEmailIdentity(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "VerifyEmailIdentity",
}
}
| 127 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"bytes"
"context"
"encoding/xml"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
awsxml "github.com/aws/aws-sdk-go-v2/aws/protocol/xml"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
smithy "github.com/aws/smithy-go"
smithyxml "github.com/aws/smithy-go/encoding/xml"
smithyio "github.com/aws/smithy-go/io"
"github.com/aws/smithy-go/middleware"
"github.com/aws/smithy-go/ptr"
smithytime "github.com/aws/smithy-go/time"
smithyhttp "github.com/aws/smithy-go/transport/http"
"io"
"io/ioutil"
"strconv"
"strings"
)
type awsAwsquery_deserializeOpCloneReceiptRuleSet struct {
}
func (*awsAwsquery_deserializeOpCloneReceiptRuleSet) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpCloneReceiptRuleSet) HandleDeserialize(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, awsAwsquery_deserializeOpErrorCloneReceiptRuleSet(response, &metadata)
}
output := &CloneReceiptRuleSetOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("CloneReceiptRuleSetResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentCloneReceiptRuleSetOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorCloneReceiptRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("AlreadyExists", errorCode):
return awsAwsquery_deserializeErrorAlreadyExistsException(response, errorBody)
case strings.EqualFold("LimitExceeded", errorCode):
return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody)
case strings.EqualFold("RuleSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpCreateConfigurationSet struct {
}
func (*awsAwsquery_deserializeOpCreateConfigurationSet) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_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)
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, awsAwsquery_deserializeOpErrorCreateConfigurationSet(response, &metadata)
}
output := &CreateConfigurationSetOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("CreateConfigurationSetResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentCreateConfigurationSetOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_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)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("ConfigurationSetAlreadyExists", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetAlreadyExistsException(response, errorBody)
case strings.EqualFold("InvalidConfigurationSet", errorCode):
return awsAwsquery_deserializeErrorInvalidConfigurationSetException(response, errorBody)
case strings.EqualFold("LimitExceeded", errorCode):
return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpCreateConfigurationSetEventDestination struct {
}
func (*awsAwsquery_deserializeOpCreateConfigurationSetEventDestination) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpCreateConfigurationSetEventDestination) HandleDeserialize(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, awsAwsquery_deserializeOpErrorCreateConfigurationSetEventDestination(response, &metadata)
}
output := &CreateConfigurationSetEventDestinationOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("CreateConfigurationSetEventDestinationResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentCreateConfigurationSetEventDestinationOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorCreateConfigurationSetEventDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("ConfigurationSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody)
case strings.EqualFold("EventDestinationAlreadyExists", errorCode):
return awsAwsquery_deserializeErrorEventDestinationAlreadyExistsException(response, errorBody)
case strings.EqualFold("InvalidCloudWatchDestination", errorCode):
return awsAwsquery_deserializeErrorInvalidCloudWatchDestinationException(response, errorBody)
case strings.EqualFold("InvalidFirehoseDestination", errorCode):
return awsAwsquery_deserializeErrorInvalidFirehoseDestinationException(response, errorBody)
case strings.EqualFold("InvalidSNSDestination", errorCode):
return awsAwsquery_deserializeErrorInvalidSNSDestinationException(response, errorBody)
case strings.EqualFold("LimitExceeded", errorCode):
return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpCreateConfigurationSetTrackingOptions struct {
}
func (*awsAwsquery_deserializeOpCreateConfigurationSetTrackingOptions) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpCreateConfigurationSetTrackingOptions) HandleDeserialize(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, awsAwsquery_deserializeOpErrorCreateConfigurationSetTrackingOptions(response, &metadata)
}
output := &CreateConfigurationSetTrackingOptionsOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("CreateConfigurationSetTrackingOptionsResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentCreateConfigurationSetTrackingOptionsOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorCreateConfigurationSetTrackingOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("ConfigurationSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody)
case strings.EqualFold("InvalidTrackingOptions", errorCode):
return awsAwsquery_deserializeErrorInvalidTrackingOptionsException(response, errorBody)
case strings.EqualFold("TrackingOptionsAlreadyExistsException", errorCode):
return awsAwsquery_deserializeErrorTrackingOptionsAlreadyExistsException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpCreateCustomVerificationEmailTemplate struct {
}
func (*awsAwsquery_deserializeOpCreateCustomVerificationEmailTemplate) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpCreateCustomVerificationEmailTemplate) HandleDeserialize(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, awsAwsquery_deserializeOpErrorCreateCustomVerificationEmailTemplate(response, &metadata)
}
output := &CreateCustomVerificationEmailTemplateOutput{}
out.Result = output
if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to discard response body, %w", err),
}
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorCreateCustomVerificationEmailTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("CustomVerificationEmailInvalidContent", errorCode):
return awsAwsquery_deserializeErrorCustomVerificationEmailInvalidContentException(response, errorBody)
case strings.EqualFold("CustomVerificationEmailTemplateAlreadyExists", errorCode):
return awsAwsquery_deserializeErrorCustomVerificationEmailTemplateAlreadyExistsException(response, errorBody)
case strings.EqualFold("FromEmailAddressNotVerified", errorCode):
return awsAwsquery_deserializeErrorFromEmailAddressNotVerifiedException(response, errorBody)
case strings.EqualFold("LimitExceeded", errorCode):
return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpCreateReceiptFilter struct {
}
func (*awsAwsquery_deserializeOpCreateReceiptFilter) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpCreateReceiptFilter) HandleDeserialize(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, awsAwsquery_deserializeOpErrorCreateReceiptFilter(response, &metadata)
}
output := &CreateReceiptFilterOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("CreateReceiptFilterResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentCreateReceiptFilterOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorCreateReceiptFilter(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("AlreadyExists", errorCode):
return awsAwsquery_deserializeErrorAlreadyExistsException(response, errorBody)
case strings.EqualFold("LimitExceeded", errorCode):
return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpCreateReceiptRule struct {
}
func (*awsAwsquery_deserializeOpCreateReceiptRule) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpCreateReceiptRule) HandleDeserialize(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, awsAwsquery_deserializeOpErrorCreateReceiptRule(response, &metadata)
}
output := &CreateReceiptRuleOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("CreateReceiptRuleResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentCreateReceiptRuleOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorCreateReceiptRule(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("AlreadyExists", errorCode):
return awsAwsquery_deserializeErrorAlreadyExistsException(response, errorBody)
case strings.EqualFold("InvalidLambdaFunction", errorCode):
return awsAwsquery_deserializeErrorInvalidLambdaFunctionException(response, errorBody)
case strings.EqualFold("InvalidS3Configuration", errorCode):
return awsAwsquery_deserializeErrorInvalidS3ConfigurationException(response, errorBody)
case strings.EqualFold("InvalidSnsTopic", errorCode):
return awsAwsquery_deserializeErrorInvalidSnsTopicException(response, errorBody)
case strings.EqualFold("LimitExceeded", errorCode):
return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody)
case strings.EqualFold("RuleDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorRuleDoesNotExistException(response, errorBody)
case strings.EqualFold("RuleSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpCreateReceiptRuleSet struct {
}
func (*awsAwsquery_deserializeOpCreateReceiptRuleSet) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpCreateReceiptRuleSet) HandleDeserialize(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, awsAwsquery_deserializeOpErrorCreateReceiptRuleSet(response, &metadata)
}
output := &CreateReceiptRuleSetOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("CreateReceiptRuleSetResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentCreateReceiptRuleSetOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorCreateReceiptRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("AlreadyExists", errorCode):
return awsAwsquery_deserializeErrorAlreadyExistsException(response, errorBody)
case strings.EqualFold("LimitExceeded", errorCode):
return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpCreateTemplate struct {
}
func (*awsAwsquery_deserializeOpCreateTemplate) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpCreateTemplate) HandleDeserialize(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, awsAwsquery_deserializeOpErrorCreateTemplate(response, &metadata)
}
output := &CreateTemplateOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("CreateTemplateResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentCreateTemplateOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorCreateTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("AlreadyExists", errorCode):
return awsAwsquery_deserializeErrorAlreadyExistsException(response, errorBody)
case strings.EqualFold("InvalidTemplate", errorCode):
return awsAwsquery_deserializeErrorInvalidTemplateException(response, errorBody)
case strings.EqualFold("LimitExceeded", errorCode):
return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpDeleteConfigurationSet struct {
}
func (*awsAwsquery_deserializeOpDeleteConfigurationSet) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_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)
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, awsAwsquery_deserializeOpErrorDeleteConfigurationSet(response, &metadata)
}
output := &DeleteConfigurationSetOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("DeleteConfigurationSetResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentDeleteConfigurationSetOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_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)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("ConfigurationSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpDeleteConfigurationSetEventDestination struct {
}
func (*awsAwsquery_deserializeOpDeleteConfigurationSetEventDestination) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpDeleteConfigurationSetEventDestination) HandleDeserialize(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, awsAwsquery_deserializeOpErrorDeleteConfigurationSetEventDestination(response, &metadata)
}
output := &DeleteConfigurationSetEventDestinationOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("DeleteConfigurationSetEventDestinationResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentDeleteConfigurationSetEventDestinationOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorDeleteConfigurationSetEventDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("ConfigurationSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody)
case strings.EqualFold("EventDestinationDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorEventDestinationDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpDeleteConfigurationSetTrackingOptions struct {
}
func (*awsAwsquery_deserializeOpDeleteConfigurationSetTrackingOptions) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpDeleteConfigurationSetTrackingOptions) HandleDeserialize(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, awsAwsquery_deserializeOpErrorDeleteConfigurationSetTrackingOptions(response, &metadata)
}
output := &DeleteConfigurationSetTrackingOptionsOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("DeleteConfigurationSetTrackingOptionsResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentDeleteConfigurationSetTrackingOptionsOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorDeleteConfigurationSetTrackingOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("ConfigurationSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody)
case strings.EqualFold("TrackingOptionsDoesNotExistException", errorCode):
return awsAwsquery_deserializeErrorTrackingOptionsDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpDeleteCustomVerificationEmailTemplate struct {
}
func (*awsAwsquery_deserializeOpDeleteCustomVerificationEmailTemplate) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpDeleteCustomVerificationEmailTemplate) HandleDeserialize(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, awsAwsquery_deserializeOpErrorDeleteCustomVerificationEmailTemplate(response, &metadata)
}
output := &DeleteCustomVerificationEmailTemplateOutput{}
out.Result = output
if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to discard response body, %w", err),
}
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorDeleteCustomVerificationEmailTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpDeleteIdentity struct {
}
func (*awsAwsquery_deserializeOpDeleteIdentity) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpDeleteIdentity) HandleDeserialize(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, awsAwsquery_deserializeOpErrorDeleteIdentity(response, &metadata)
}
output := &DeleteIdentityOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("DeleteIdentityResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentDeleteIdentityOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorDeleteIdentity(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpDeleteIdentityPolicy struct {
}
func (*awsAwsquery_deserializeOpDeleteIdentityPolicy) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpDeleteIdentityPolicy) HandleDeserialize(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, awsAwsquery_deserializeOpErrorDeleteIdentityPolicy(response, &metadata)
}
output := &DeleteIdentityPolicyOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("DeleteIdentityPolicyResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentDeleteIdentityPolicyOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorDeleteIdentityPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpDeleteReceiptFilter struct {
}
func (*awsAwsquery_deserializeOpDeleteReceiptFilter) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpDeleteReceiptFilter) HandleDeserialize(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, awsAwsquery_deserializeOpErrorDeleteReceiptFilter(response, &metadata)
}
output := &DeleteReceiptFilterOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("DeleteReceiptFilterResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentDeleteReceiptFilterOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorDeleteReceiptFilter(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpDeleteReceiptRule struct {
}
func (*awsAwsquery_deserializeOpDeleteReceiptRule) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpDeleteReceiptRule) HandleDeserialize(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, awsAwsquery_deserializeOpErrorDeleteReceiptRule(response, &metadata)
}
output := &DeleteReceiptRuleOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("DeleteReceiptRuleResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentDeleteReceiptRuleOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorDeleteReceiptRule(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("RuleSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpDeleteReceiptRuleSet struct {
}
func (*awsAwsquery_deserializeOpDeleteReceiptRuleSet) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpDeleteReceiptRuleSet) HandleDeserialize(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, awsAwsquery_deserializeOpErrorDeleteReceiptRuleSet(response, &metadata)
}
output := &DeleteReceiptRuleSetOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("DeleteReceiptRuleSetResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentDeleteReceiptRuleSetOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorDeleteReceiptRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("CannotDelete", errorCode):
return awsAwsquery_deserializeErrorCannotDeleteException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpDeleteTemplate struct {
}
func (*awsAwsquery_deserializeOpDeleteTemplate) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpDeleteTemplate) HandleDeserialize(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, awsAwsquery_deserializeOpErrorDeleteTemplate(response, &metadata)
}
output := &DeleteTemplateOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("DeleteTemplateResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentDeleteTemplateOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorDeleteTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpDeleteVerifiedEmailAddress struct {
}
func (*awsAwsquery_deserializeOpDeleteVerifiedEmailAddress) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpDeleteVerifiedEmailAddress) HandleDeserialize(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, awsAwsquery_deserializeOpErrorDeleteVerifiedEmailAddress(response, &metadata)
}
output := &DeleteVerifiedEmailAddressOutput{}
out.Result = output
if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to discard response body, %w", err),
}
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorDeleteVerifiedEmailAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpDescribeActiveReceiptRuleSet struct {
}
func (*awsAwsquery_deserializeOpDescribeActiveReceiptRuleSet) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpDescribeActiveReceiptRuleSet) HandleDeserialize(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, awsAwsquery_deserializeOpErrorDescribeActiveReceiptRuleSet(response, &metadata)
}
output := &DescribeActiveReceiptRuleSetOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("DescribeActiveReceiptRuleSetResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentDescribeActiveReceiptRuleSetOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorDescribeActiveReceiptRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpDescribeConfigurationSet struct {
}
func (*awsAwsquery_deserializeOpDescribeConfigurationSet) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpDescribeConfigurationSet) HandleDeserialize(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, awsAwsquery_deserializeOpErrorDescribeConfigurationSet(response, &metadata)
}
output := &DescribeConfigurationSetOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("DescribeConfigurationSetResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentDescribeConfigurationSetOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorDescribeConfigurationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("ConfigurationSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpDescribeReceiptRule struct {
}
func (*awsAwsquery_deserializeOpDescribeReceiptRule) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpDescribeReceiptRule) HandleDeserialize(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, awsAwsquery_deserializeOpErrorDescribeReceiptRule(response, &metadata)
}
output := &DescribeReceiptRuleOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("DescribeReceiptRuleResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentDescribeReceiptRuleOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorDescribeReceiptRule(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("RuleDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorRuleDoesNotExistException(response, errorBody)
case strings.EqualFold("RuleSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpDescribeReceiptRuleSet struct {
}
func (*awsAwsquery_deserializeOpDescribeReceiptRuleSet) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpDescribeReceiptRuleSet) HandleDeserialize(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, awsAwsquery_deserializeOpErrorDescribeReceiptRuleSet(response, &metadata)
}
output := &DescribeReceiptRuleSetOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("DescribeReceiptRuleSetResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentDescribeReceiptRuleSetOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorDescribeReceiptRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("RuleSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpGetAccountSendingEnabled struct {
}
func (*awsAwsquery_deserializeOpGetAccountSendingEnabled) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpGetAccountSendingEnabled) HandleDeserialize(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, awsAwsquery_deserializeOpErrorGetAccountSendingEnabled(response, &metadata)
}
output := &GetAccountSendingEnabledOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("GetAccountSendingEnabledResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentGetAccountSendingEnabledOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorGetAccountSendingEnabled(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpGetCustomVerificationEmailTemplate struct {
}
func (*awsAwsquery_deserializeOpGetCustomVerificationEmailTemplate) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpGetCustomVerificationEmailTemplate) HandleDeserialize(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, awsAwsquery_deserializeOpErrorGetCustomVerificationEmailTemplate(response, &metadata)
}
output := &GetCustomVerificationEmailTemplateOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("GetCustomVerificationEmailTemplateResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentGetCustomVerificationEmailTemplateOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorGetCustomVerificationEmailTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("CustomVerificationEmailTemplateDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorCustomVerificationEmailTemplateDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpGetIdentityDkimAttributes struct {
}
func (*awsAwsquery_deserializeOpGetIdentityDkimAttributes) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpGetIdentityDkimAttributes) HandleDeserialize(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, awsAwsquery_deserializeOpErrorGetIdentityDkimAttributes(response, &metadata)
}
output := &GetIdentityDkimAttributesOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("GetIdentityDkimAttributesResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentGetIdentityDkimAttributesOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorGetIdentityDkimAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpGetIdentityMailFromDomainAttributes struct {
}
func (*awsAwsquery_deserializeOpGetIdentityMailFromDomainAttributes) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpGetIdentityMailFromDomainAttributes) HandleDeserialize(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, awsAwsquery_deserializeOpErrorGetIdentityMailFromDomainAttributes(response, &metadata)
}
output := &GetIdentityMailFromDomainAttributesOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("GetIdentityMailFromDomainAttributesResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentGetIdentityMailFromDomainAttributesOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorGetIdentityMailFromDomainAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpGetIdentityNotificationAttributes struct {
}
func (*awsAwsquery_deserializeOpGetIdentityNotificationAttributes) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpGetIdentityNotificationAttributes) HandleDeserialize(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, awsAwsquery_deserializeOpErrorGetIdentityNotificationAttributes(response, &metadata)
}
output := &GetIdentityNotificationAttributesOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("GetIdentityNotificationAttributesResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentGetIdentityNotificationAttributesOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorGetIdentityNotificationAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpGetIdentityPolicies struct {
}
func (*awsAwsquery_deserializeOpGetIdentityPolicies) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpGetIdentityPolicies) HandleDeserialize(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, awsAwsquery_deserializeOpErrorGetIdentityPolicies(response, &metadata)
}
output := &GetIdentityPoliciesOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("GetIdentityPoliciesResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentGetIdentityPoliciesOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorGetIdentityPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpGetIdentityVerificationAttributes struct {
}
func (*awsAwsquery_deserializeOpGetIdentityVerificationAttributes) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpGetIdentityVerificationAttributes) HandleDeserialize(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, awsAwsquery_deserializeOpErrorGetIdentityVerificationAttributes(response, &metadata)
}
output := &GetIdentityVerificationAttributesOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("GetIdentityVerificationAttributesResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentGetIdentityVerificationAttributesOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorGetIdentityVerificationAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpGetSendQuota struct {
}
func (*awsAwsquery_deserializeOpGetSendQuota) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpGetSendQuota) HandleDeserialize(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, awsAwsquery_deserializeOpErrorGetSendQuota(response, &metadata)
}
output := &GetSendQuotaOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("GetSendQuotaResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentGetSendQuotaOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorGetSendQuota(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpGetSendStatistics struct {
}
func (*awsAwsquery_deserializeOpGetSendStatistics) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpGetSendStatistics) HandleDeserialize(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, awsAwsquery_deserializeOpErrorGetSendStatistics(response, &metadata)
}
output := &GetSendStatisticsOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("GetSendStatisticsResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentGetSendStatisticsOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorGetSendStatistics(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpGetTemplate struct {
}
func (*awsAwsquery_deserializeOpGetTemplate) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpGetTemplate) HandleDeserialize(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, awsAwsquery_deserializeOpErrorGetTemplate(response, &metadata)
}
output := &GetTemplateOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("GetTemplateResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentGetTemplateOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorGetTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("TemplateDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorTemplateDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpListConfigurationSets struct {
}
func (*awsAwsquery_deserializeOpListConfigurationSets) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpListConfigurationSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
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, awsAwsquery_deserializeOpErrorListConfigurationSets(response, &metadata)
}
output := &ListConfigurationSetsOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("ListConfigurationSetsResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentListConfigurationSetsOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorListConfigurationSets(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpListCustomVerificationEmailTemplates struct {
}
func (*awsAwsquery_deserializeOpListCustomVerificationEmailTemplates) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpListCustomVerificationEmailTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
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, awsAwsquery_deserializeOpErrorListCustomVerificationEmailTemplates(response, &metadata)
}
output := &ListCustomVerificationEmailTemplatesOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("ListCustomVerificationEmailTemplatesResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentListCustomVerificationEmailTemplatesOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorListCustomVerificationEmailTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpListIdentities struct {
}
func (*awsAwsquery_deserializeOpListIdentities) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpListIdentities) HandleDeserialize(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, awsAwsquery_deserializeOpErrorListIdentities(response, &metadata)
}
output := &ListIdentitiesOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("ListIdentitiesResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentListIdentitiesOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorListIdentities(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpListIdentityPolicies struct {
}
func (*awsAwsquery_deserializeOpListIdentityPolicies) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpListIdentityPolicies) HandleDeserialize(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, awsAwsquery_deserializeOpErrorListIdentityPolicies(response, &metadata)
}
output := &ListIdentityPoliciesOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("ListIdentityPoliciesResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentListIdentityPoliciesOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorListIdentityPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpListReceiptFilters struct {
}
func (*awsAwsquery_deserializeOpListReceiptFilters) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpListReceiptFilters) HandleDeserialize(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, awsAwsquery_deserializeOpErrorListReceiptFilters(response, &metadata)
}
output := &ListReceiptFiltersOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("ListReceiptFiltersResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentListReceiptFiltersOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorListReceiptFilters(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpListReceiptRuleSets struct {
}
func (*awsAwsquery_deserializeOpListReceiptRuleSets) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpListReceiptRuleSets) HandleDeserialize(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, awsAwsquery_deserializeOpErrorListReceiptRuleSets(response, &metadata)
}
output := &ListReceiptRuleSetsOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("ListReceiptRuleSetsResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentListReceiptRuleSetsOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorListReceiptRuleSets(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpListTemplates struct {
}
func (*awsAwsquery_deserializeOpListTemplates) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpListTemplates) HandleDeserialize(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, awsAwsquery_deserializeOpErrorListTemplates(response, &metadata)
}
output := &ListTemplatesOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("ListTemplatesResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentListTemplatesOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorListTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpListVerifiedEmailAddresses struct {
}
func (*awsAwsquery_deserializeOpListVerifiedEmailAddresses) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpListVerifiedEmailAddresses) HandleDeserialize(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, awsAwsquery_deserializeOpErrorListVerifiedEmailAddresses(response, &metadata)
}
output := &ListVerifiedEmailAddressesOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("ListVerifiedEmailAddressesResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentListVerifiedEmailAddressesOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorListVerifiedEmailAddresses(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpPutConfigurationSetDeliveryOptions struct {
}
func (*awsAwsquery_deserializeOpPutConfigurationSetDeliveryOptions) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpPutConfigurationSetDeliveryOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
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, awsAwsquery_deserializeOpErrorPutConfigurationSetDeliveryOptions(response, &metadata)
}
output := &PutConfigurationSetDeliveryOptionsOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("PutConfigurationSetDeliveryOptionsResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentPutConfigurationSetDeliveryOptionsOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorPutConfigurationSetDeliveryOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("ConfigurationSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody)
case strings.EqualFold("InvalidDeliveryOptions", errorCode):
return awsAwsquery_deserializeErrorInvalidDeliveryOptionsException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpPutIdentityPolicy struct {
}
func (*awsAwsquery_deserializeOpPutIdentityPolicy) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpPutIdentityPolicy) HandleDeserialize(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, awsAwsquery_deserializeOpErrorPutIdentityPolicy(response, &metadata)
}
output := &PutIdentityPolicyOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("PutIdentityPolicyResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentPutIdentityPolicyOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorPutIdentityPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("InvalidPolicy", errorCode):
return awsAwsquery_deserializeErrorInvalidPolicyException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpReorderReceiptRuleSet struct {
}
func (*awsAwsquery_deserializeOpReorderReceiptRuleSet) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpReorderReceiptRuleSet) HandleDeserialize(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, awsAwsquery_deserializeOpErrorReorderReceiptRuleSet(response, &metadata)
}
output := &ReorderReceiptRuleSetOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("ReorderReceiptRuleSetResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentReorderReceiptRuleSetOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorReorderReceiptRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("RuleDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorRuleDoesNotExistException(response, errorBody)
case strings.EqualFold("RuleSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpSendBounce struct {
}
func (*awsAwsquery_deserializeOpSendBounce) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpSendBounce) HandleDeserialize(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, awsAwsquery_deserializeOpErrorSendBounce(response, &metadata)
}
output := &SendBounceOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("SendBounceResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentSendBounceOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorSendBounce(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("MessageRejected", errorCode):
return awsAwsquery_deserializeErrorMessageRejected(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpSendBulkTemplatedEmail struct {
}
func (*awsAwsquery_deserializeOpSendBulkTemplatedEmail) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpSendBulkTemplatedEmail) HandleDeserialize(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, awsAwsquery_deserializeOpErrorSendBulkTemplatedEmail(response, &metadata)
}
output := &SendBulkTemplatedEmailOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("SendBulkTemplatedEmailResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentSendBulkTemplatedEmailOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorSendBulkTemplatedEmail(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("AccountSendingPausedException", errorCode):
return awsAwsquery_deserializeErrorAccountSendingPausedException(response, errorBody)
case strings.EqualFold("ConfigurationSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody)
case strings.EqualFold("ConfigurationSetSendingPausedException", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetSendingPausedException(response, errorBody)
case strings.EqualFold("MailFromDomainNotVerifiedException", errorCode):
return awsAwsquery_deserializeErrorMailFromDomainNotVerifiedException(response, errorBody)
case strings.EqualFold("MessageRejected", errorCode):
return awsAwsquery_deserializeErrorMessageRejected(response, errorBody)
case strings.EqualFold("TemplateDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorTemplateDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpSendCustomVerificationEmail struct {
}
func (*awsAwsquery_deserializeOpSendCustomVerificationEmail) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpSendCustomVerificationEmail) HandleDeserialize(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, awsAwsquery_deserializeOpErrorSendCustomVerificationEmail(response, &metadata)
}
output := &SendCustomVerificationEmailOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("SendCustomVerificationEmailResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentSendCustomVerificationEmailOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorSendCustomVerificationEmail(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("ConfigurationSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody)
case strings.EqualFold("CustomVerificationEmailTemplateDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorCustomVerificationEmailTemplateDoesNotExistException(response, errorBody)
case strings.EqualFold("FromEmailAddressNotVerified", errorCode):
return awsAwsquery_deserializeErrorFromEmailAddressNotVerifiedException(response, errorBody)
case strings.EqualFold("MessageRejected", errorCode):
return awsAwsquery_deserializeErrorMessageRejected(response, errorBody)
case strings.EqualFold("ProductionAccessNotGranted", errorCode):
return awsAwsquery_deserializeErrorProductionAccessNotGrantedException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpSendEmail struct {
}
func (*awsAwsquery_deserializeOpSendEmail) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpSendEmail) HandleDeserialize(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, awsAwsquery_deserializeOpErrorSendEmail(response, &metadata)
}
output := &SendEmailOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("SendEmailResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentSendEmailOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorSendEmail(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("AccountSendingPausedException", errorCode):
return awsAwsquery_deserializeErrorAccountSendingPausedException(response, errorBody)
case strings.EqualFold("ConfigurationSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody)
case strings.EqualFold("ConfigurationSetSendingPausedException", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetSendingPausedException(response, errorBody)
case strings.EqualFold("MailFromDomainNotVerifiedException", errorCode):
return awsAwsquery_deserializeErrorMailFromDomainNotVerifiedException(response, errorBody)
case strings.EqualFold("MessageRejected", errorCode):
return awsAwsquery_deserializeErrorMessageRejected(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpSendRawEmail struct {
}
func (*awsAwsquery_deserializeOpSendRawEmail) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpSendRawEmail) HandleDeserialize(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, awsAwsquery_deserializeOpErrorSendRawEmail(response, &metadata)
}
output := &SendRawEmailOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("SendRawEmailResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentSendRawEmailOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorSendRawEmail(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("AccountSendingPausedException", errorCode):
return awsAwsquery_deserializeErrorAccountSendingPausedException(response, errorBody)
case strings.EqualFold("ConfigurationSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody)
case strings.EqualFold("ConfigurationSetSendingPausedException", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetSendingPausedException(response, errorBody)
case strings.EqualFold("MailFromDomainNotVerifiedException", errorCode):
return awsAwsquery_deserializeErrorMailFromDomainNotVerifiedException(response, errorBody)
case strings.EqualFold("MessageRejected", errorCode):
return awsAwsquery_deserializeErrorMessageRejected(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpSendTemplatedEmail struct {
}
func (*awsAwsquery_deserializeOpSendTemplatedEmail) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpSendTemplatedEmail) HandleDeserialize(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, awsAwsquery_deserializeOpErrorSendTemplatedEmail(response, &metadata)
}
output := &SendTemplatedEmailOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("SendTemplatedEmailResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentSendTemplatedEmailOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorSendTemplatedEmail(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("AccountSendingPausedException", errorCode):
return awsAwsquery_deserializeErrorAccountSendingPausedException(response, errorBody)
case strings.EqualFold("ConfigurationSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody)
case strings.EqualFold("ConfigurationSetSendingPausedException", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetSendingPausedException(response, errorBody)
case strings.EqualFold("MailFromDomainNotVerifiedException", errorCode):
return awsAwsquery_deserializeErrorMailFromDomainNotVerifiedException(response, errorBody)
case strings.EqualFold("MessageRejected", errorCode):
return awsAwsquery_deserializeErrorMessageRejected(response, errorBody)
case strings.EqualFold("TemplateDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorTemplateDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpSetActiveReceiptRuleSet struct {
}
func (*awsAwsquery_deserializeOpSetActiveReceiptRuleSet) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpSetActiveReceiptRuleSet) HandleDeserialize(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, awsAwsquery_deserializeOpErrorSetActiveReceiptRuleSet(response, &metadata)
}
output := &SetActiveReceiptRuleSetOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("SetActiveReceiptRuleSetResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentSetActiveReceiptRuleSetOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorSetActiveReceiptRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("RuleSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpSetIdentityDkimEnabled struct {
}
func (*awsAwsquery_deserializeOpSetIdentityDkimEnabled) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpSetIdentityDkimEnabled) HandleDeserialize(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, awsAwsquery_deserializeOpErrorSetIdentityDkimEnabled(response, &metadata)
}
output := &SetIdentityDkimEnabledOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("SetIdentityDkimEnabledResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentSetIdentityDkimEnabledOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorSetIdentityDkimEnabled(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpSetIdentityFeedbackForwardingEnabled struct {
}
func (*awsAwsquery_deserializeOpSetIdentityFeedbackForwardingEnabled) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpSetIdentityFeedbackForwardingEnabled) HandleDeserialize(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, awsAwsquery_deserializeOpErrorSetIdentityFeedbackForwardingEnabled(response, &metadata)
}
output := &SetIdentityFeedbackForwardingEnabledOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("SetIdentityFeedbackForwardingEnabledResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentSetIdentityFeedbackForwardingEnabledOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorSetIdentityFeedbackForwardingEnabled(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpSetIdentityHeadersInNotificationsEnabled struct {
}
func (*awsAwsquery_deserializeOpSetIdentityHeadersInNotificationsEnabled) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpSetIdentityHeadersInNotificationsEnabled) HandleDeserialize(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, awsAwsquery_deserializeOpErrorSetIdentityHeadersInNotificationsEnabled(response, &metadata)
}
output := &SetIdentityHeadersInNotificationsEnabledOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("SetIdentityHeadersInNotificationsEnabledResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentSetIdentityHeadersInNotificationsEnabledOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorSetIdentityHeadersInNotificationsEnabled(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpSetIdentityMailFromDomain struct {
}
func (*awsAwsquery_deserializeOpSetIdentityMailFromDomain) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpSetIdentityMailFromDomain) HandleDeserialize(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, awsAwsquery_deserializeOpErrorSetIdentityMailFromDomain(response, &metadata)
}
output := &SetIdentityMailFromDomainOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("SetIdentityMailFromDomainResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentSetIdentityMailFromDomainOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorSetIdentityMailFromDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpSetIdentityNotificationTopic struct {
}
func (*awsAwsquery_deserializeOpSetIdentityNotificationTopic) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpSetIdentityNotificationTopic) HandleDeserialize(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, awsAwsquery_deserializeOpErrorSetIdentityNotificationTopic(response, &metadata)
}
output := &SetIdentityNotificationTopicOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("SetIdentityNotificationTopicResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentSetIdentityNotificationTopicOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorSetIdentityNotificationTopic(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpSetReceiptRulePosition struct {
}
func (*awsAwsquery_deserializeOpSetReceiptRulePosition) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpSetReceiptRulePosition) HandleDeserialize(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, awsAwsquery_deserializeOpErrorSetReceiptRulePosition(response, &metadata)
}
output := &SetReceiptRulePositionOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("SetReceiptRulePositionResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentSetReceiptRulePositionOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorSetReceiptRulePosition(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("RuleDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorRuleDoesNotExistException(response, errorBody)
case strings.EqualFold("RuleSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpTestRenderTemplate struct {
}
func (*awsAwsquery_deserializeOpTestRenderTemplate) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpTestRenderTemplate) HandleDeserialize(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, awsAwsquery_deserializeOpErrorTestRenderTemplate(response, &metadata)
}
output := &TestRenderTemplateOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("TestRenderTemplateResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentTestRenderTemplateOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorTestRenderTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("InvalidRenderingParameter", errorCode):
return awsAwsquery_deserializeErrorInvalidRenderingParameterException(response, errorBody)
case strings.EqualFold("MissingRenderingAttribute", errorCode):
return awsAwsquery_deserializeErrorMissingRenderingAttributeException(response, errorBody)
case strings.EqualFold("TemplateDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorTemplateDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpUpdateAccountSendingEnabled struct {
}
func (*awsAwsquery_deserializeOpUpdateAccountSendingEnabled) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpUpdateAccountSendingEnabled) HandleDeserialize(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, awsAwsquery_deserializeOpErrorUpdateAccountSendingEnabled(response, &metadata)
}
output := &UpdateAccountSendingEnabledOutput{}
out.Result = output
if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to discard response body, %w", err),
}
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorUpdateAccountSendingEnabled(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpUpdateConfigurationSetEventDestination struct {
}
func (*awsAwsquery_deserializeOpUpdateConfigurationSetEventDestination) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpUpdateConfigurationSetEventDestination) HandleDeserialize(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, awsAwsquery_deserializeOpErrorUpdateConfigurationSetEventDestination(response, &metadata)
}
output := &UpdateConfigurationSetEventDestinationOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("UpdateConfigurationSetEventDestinationResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentUpdateConfigurationSetEventDestinationOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorUpdateConfigurationSetEventDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("ConfigurationSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody)
case strings.EqualFold("EventDestinationDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorEventDestinationDoesNotExistException(response, errorBody)
case strings.EqualFold("InvalidCloudWatchDestination", errorCode):
return awsAwsquery_deserializeErrorInvalidCloudWatchDestinationException(response, errorBody)
case strings.EqualFold("InvalidFirehoseDestination", errorCode):
return awsAwsquery_deserializeErrorInvalidFirehoseDestinationException(response, errorBody)
case strings.EqualFold("InvalidSNSDestination", errorCode):
return awsAwsquery_deserializeErrorInvalidSNSDestinationException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpUpdateConfigurationSetReputationMetricsEnabled struct {
}
func (*awsAwsquery_deserializeOpUpdateConfigurationSetReputationMetricsEnabled) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpUpdateConfigurationSetReputationMetricsEnabled) HandleDeserialize(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, awsAwsquery_deserializeOpErrorUpdateConfigurationSetReputationMetricsEnabled(response, &metadata)
}
output := &UpdateConfigurationSetReputationMetricsEnabledOutput{}
out.Result = output
if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to discard response body, %w", err),
}
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorUpdateConfigurationSetReputationMetricsEnabled(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("ConfigurationSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpUpdateConfigurationSetSendingEnabled struct {
}
func (*awsAwsquery_deserializeOpUpdateConfigurationSetSendingEnabled) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpUpdateConfigurationSetSendingEnabled) HandleDeserialize(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, awsAwsquery_deserializeOpErrorUpdateConfigurationSetSendingEnabled(response, &metadata)
}
output := &UpdateConfigurationSetSendingEnabledOutput{}
out.Result = output
if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to discard response body, %w", err),
}
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorUpdateConfigurationSetSendingEnabled(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("ConfigurationSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpUpdateConfigurationSetTrackingOptions struct {
}
func (*awsAwsquery_deserializeOpUpdateConfigurationSetTrackingOptions) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpUpdateConfigurationSetTrackingOptions) HandleDeserialize(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, awsAwsquery_deserializeOpErrorUpdateConfigurationSetTrackingOptions(response, &metadata)
}
output := &UpdateConfigurationSetTrackingOptionsOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("UpdateConfigurationSetTrackingOptionsResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentUpdateConfigurationSetTrackingOptionsOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorUpdateConfigurationSetTrackingOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("ConfigurationSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody)
case strings.EqualFold("InvalidTrackingOptions", errorCode):
return awsAwsquery_deserializeErrorInvalidTrackingOptionsException(response, errorBody)
case strings.EqualFold("TrackingOptionsDoesNotExistException", errorCode):
return awsAwsquery_deserializeErrorTrackingOptionsDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpUpdateCustomVerificationEmailTemplate struct {
}
func (*awsAwsquery_deserializeOpUpdateCustomVerificationEmailTemplate) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpUpdateCustomVerificationEmailTemplate) HandleDeserialize(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, awsAwsquery_deserializeOpErrorUpdateCustomVerificationEmailTemplate(response, &metadata)
}
output := &UpdateCustomVerificationEmailTemplateOutput{}
out.Result = output
if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to discard response body, %w", err),
}
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorUpdateCustomVerificationEmailTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("CustomVerificationEmailInvalidContent", errorCode):
return awsAwsquery_deserializeErrorCustomVerificationEmailInvalidContentException(response, errorBody)
case strings.EqualFold("CustomVerificationEmailTemplateDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorCustomVerificationEmailTemplateDoesNotExistException(response, errorBody)
case strings.EqualFold("FromEmailAddressNotVerified", errorCode):
return awsAwsquery_deserializeErrorFromEmailAddressNotVerifiedException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpUpdateReceiptRule struct {
}
func (*awsAwsquery_deserializeOpUpdateReceiptRule) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpUpdateReceiptRule) HandleDeserialize(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, awsAwsquery_deserializeOpErrorUpdateReceiptRule(response, &metadata)
}
output := &UpdateReceiptRuleOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("UpdateReceiptRuleResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentUpdateReceiptRuleOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorUpdateReceiptRule(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("InvalidLambdaFunction", errorCode):
return awsAwsquery_deserializeErrorInvalidLambdaFunctionException(response, errorBody)
case strings.EqualFold("InvalidS3Configuration", errorCode):
return awsAwsquery_deserializeErrorInvalidS3ConfigurationException(response, errorBody)
case strings.EqualFold("InvalidSnsTopic", errorCode):
return awsAwsquery_deserializeErrorInvalidSnsTopicException(response, errorBody)
case strings.EqualFold("LimitExceeded", errorCode):
return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody)
case strings.EqualFold("RuleDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorRuleDoesNotExistException(response, errorBody)
case strings.EqualFold("RuleSetDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpUpdateTemplate struct {
}
func (*awsAwsquery_deserializeOpUpdateTemplate) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpUpdateTemplate) HandleDeserialize(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, awsAwsquery_deserializeOpErrorUpdateTemplate(response, &metadata)
}
output := &UpdateTemplateOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("UpdateTemplateResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentUpdateTemplateOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorUpdateTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
case strings.EqualFold("InvalidTemplate", errorCode):
return awsAwsquery_deserializeErrorInvalidTemplateException(response, errorBody)
case strings.EqualFold("TemplateDoesNotExist", errorCode):
return awsAwsquery_deserializeErrorTemplateDoesNotExistException(response, errorBody)
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpVerifyDomainDkim struct {
}
func (*awsAwsquery_deserializeOpVerifyDomainDkim) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpVerifyDomainDkim) HandleDeserialize(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, awsAwsquery_deserializeOpErrorVerifyDomainDkim(response, &metadata)
}
output := &VerifyDomainDkimOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("VerifyDomainDkimResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentVerifyDomainDkimOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorVerifyDomainDkim(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpVerifyDomainIdentity struct {
}
func (*awsAwsquery_deserializeOpVerifyDomainIdentity) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpVerifyDomainIdentity) HandleDeserialize(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, awsAwsquery_deserializeOpErrorVerifyDomainIdentity(response, &metadata)
}
output := &VerifyDomainIdentityOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("VerifyDomainIdentityResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentVerifyDomainIdentityOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorVerifyDomainIdentity(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpVerifyEmailAddress struct {
}
func (*awsAwsquery_deserializeOpVerifyEmailAddress) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpVerifyEmailAddress) HandleDeserialize(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, awsAwsquery_deserializeOpErrorVerifyEmailAddress(response, &metadata)
}
output := &VerifyEmailAddressOutput{}
out.Result = output
if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to discard response body, %w", err),
}
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorVerifyEmailAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
type awsAwsquery_deserializeOpVerifyEmailIdentity struct {
}
func (*awsAwsquery_deserializeOpVerifyEmailIdentity) ID() string {
return "OperationDeserializer"
}
func (m *awsAwsquery_deserializeOpVerifyEmailIdentity) HandleDeserialize(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, awsAwsquery_deserializeOpErrorVerifyEmailIdentity(response, &metadata)
}
output := &VerifyEmailIdentityOutput{}
out.Result = output
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(response.Body, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return out, metadata, &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("VerifyEmailIdentityResult")
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
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeOpDocumentVerifyEmailIdentityOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
err = &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
return out, metadata, err
}
return out, metadata, err
}
func awsAwsquery_deserializeOpErrorVerifyEmailIdentity(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
}
errorBody := bytes.NewReader(errorBuffer.Bytes())
errorCode := "UnknownError"
errorMessage := errorCode
errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
if err != nil {
return err
}
if reqID := errorComponents.RequestID; len(reqID) != 0 {
awsmiddleware.SetRequestIDMetadata(metadata, reqID)
}
if len(errorComponents.Code) != 0 {
errorCode = errorComponents.Code
}
if len(errorComponents.Message) != 0 {
errorMessage = errorComponents.Message
}
errorBody.Seek(0, io.SeekStart)
switch {
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
Message: errorMessage,
}
return genericError
}
}
func awsAwsquery_deserializeErrorAccountSendingPausedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.AccountSendingPausedException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentAccountSendingPausedException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.AlreadyExistsException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentAlreadyExistsException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorCannotDeleteException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.CannotDeleteException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentCannotDeleteException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorConfigurationSetAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.ConfigurationSetAlreadyExistsException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentConfigurationSetAlreadyExistsException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.ConfigurationSetDoesNotExistException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentConfigurationSetDoesNotExistException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorConfigurationSetSendingPausedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.ConfigurationSetSendingPausedException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentConfigurationSetSendingPausedException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorCustomVerificationEmailInvalidContentException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.CustomVerificationEmailInvalidContentException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentCustomVerificationEmailInvalidContentException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorCustomVerificationEmailTemplateAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.CustomVerificationEmailTemplateAlreadyExistsException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentCustomVerificationEmailTemplateAlreadyExistsException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorCustomVerificationEmailTemplateDoesNotExistException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.CustomVerificationEmailTemplateDoesNotExistException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentCustomVerificationEmailTemplateDoesNotExistException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorEventDestinationAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.EventDestinationAlreadyExistsException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentEventDestinationAlreadyExistsException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorEventDestinationDoesNotExistException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.EventDestinationDoesNotExistException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentEventDestinationDoesNotExistException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorFromEmailAddressNotVerifiedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.FromEmailAddressNotVerifiedException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentFromEmailAddressNotVerifiedException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorInvalidCloudWatchDestinationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.InvalidCloudWatchDestinationException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentInvalidCloudWatchDestinationException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorInvalidConfigurationSetException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.InvalidConfigurationSetException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentInvalidConfigurationSetException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorInvalidDeliveryOptionsException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.InvalidDeliveryOptionsException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentInvalidDeliveryOptionsException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorInvalidFirehoseDestinationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.InvalidFirehoseDestinationException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentInvalidFirehoseDestinationException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorInvalidLambdaFunctionException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.InvalidLambdaFunctionException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentInvalidLambdaFunctionException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorInvalidPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.InvalidPolicyException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentInvalidPolicyException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorInvalidRenderingParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.InvalidRenderingParameterException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentInvalidRenderingParameterException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorInvalidS3ConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.InvalidS3ConfigurationException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentInvalidS3ConfigurationException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorInvalidSNSDestinationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.InvalidSNSDestinationException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentInvalidSNSDestinationException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorInvalidSnsTopicException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.InvalidSnsTopicException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentInvalidSnsTopicException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorInvalidTemplateException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.InvalidTemplateException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentInvalidTemplateException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorInvalidTrackingOptionsException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.InvalidTrackingOptionsException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentInvalidTrackingOptionsException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.LimitExceededException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentLimitExceededException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorMailFromDomainNotVerifiedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.MailFromDomainNotVerifiedException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentMailFromDomainNotVerifiedException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorMessageRejected(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.MessageRejected{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentMessageRejected(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorMissingRenderingAttributeException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.MissingRenderingAttributeException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentMissingRenderingAttributeException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorProductionAccessNotGrantedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.ProductionAccessNotGrantedException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentProductionAccessNotGrantedException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorRuleDoesNotExistException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.RuleDoesNotExistException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentRuleDoesNotExistException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.RuleSetDoesNotExistException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentRuleSetDoesNotExistException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorTemplateDoesNotExistException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.TemplateDoesNotExistException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentTemplateDoesNotExistException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorTrackingOptionsAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.TrackingOptionsAlreadyExistsException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentTrackingOptionsAlreadyExistsException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeErrorTrackingOptionsDoesNotExistException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.TrackingOptionsDoesNotExistException{}
var buff [1024]byte
ringBuffer := smithyio.NewRingBuffer(buff[:])
body := io.TeeReader(errorBody, ringBuffer)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return output
}
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
t, err = decoder.GetElement("Error")
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
err = awsAwsquery_deserializeDocumentTrackingOptionsDoesNotExistException(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
return &smithy.DeserializationError{
Err: fmt.Errorf("failed to decode response body, %w", err),
Snapshot: snapshot.Bytes(),
}
}
return output
}
func awsAwsquery_deserializeDocumentAccountSendingPausedException(v **types.AccountSendingPausedException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.AccountSendingPausedException
if *v == nil {
sv = &types.AccountSendingPausedException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentAddHeaderAction(v **types.AddHeaderAction, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.AddHeaderAction
if *v == nil {
sv = &types.AddHeaderAction{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("HeaderName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.HeaderName = ptr.String(xtv)
}
case strings.EqualFold("HeaderValue", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.HeaderValue = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentAddressList(v *[]string, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv []string
if *v == nil {
sv = make([]string, 0)
} else {
sv = *v
}
originalDecoder := decoder
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
decoder = memberDecoder
switch {
case strings.EqualFold("member", t.Name.Local):
var col string
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
col = xtv
}
sv = append(sv, col)
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentAddressListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error {
var sv []string
if *v == nil {
sv = make([]string, 0)
} else {
sv = *v
}
switch {
default:
var mv string
t := decoder.StartEl
_ = t
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
mv = xtv
}
sv = append(sv, mv)
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentAlreadyExistsException(v **types.AlreadyExistsException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.AlreadyExistsException
if *v == nil {
sv = &types.AlreadyExistsException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
case strings.EqualFold("Name", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Name = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentBounceAction(v **types.BounceAction, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.BounceAction
if *v == nil {
sv = &types.BounceAction{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("Message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
case strings.EqualFold("Sender", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Sender = ptr.String(xtv)
}
case strings.EqualFold("SmtpReplyCode", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.SmtpReplyCode = ptr.String(xtv)
}
case strings.EqualFold("StatusCode", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.StatusCode = ptr.String(xtv)
}
case strings.EqualFold("TopicArn", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TopicArn = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentBulkEmailDestinationStatus(v **types.BulkEmailDestinationStatus, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.BulkEmailDestinationStatus
if *v == nil {
sv = &types.BulkEmailDestinationStatus{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("Error", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Error = ptr.String(xtv)
}
case strings.EqualFold("MessageId", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.MessageId = ptr.String(xtv)
}
case strings.EqualFold("Status", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Status = types.BulkEmailStatus(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentBulkEmailDestinationStatusList(v *[]types.BulkEmailDestinationStatus, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv []types.BulkEmailDestinationStatus
if *v == nil {
sv = make([]types.BulkEmailDestinationStatus, 0)
} else {
sv = *v
}
originalDecoder := decoder
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
switch {
case strings.EqualFold("member", t.Name.Local):
var col types.BulkEmailDestinationStatus
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &col
if err := awsAwsquery_deserializeDocumentBulkEmailDestinationStatus(&destAddr, nodeDecoder); err != nil {
return err
}
col = *destAddr
sv = append(sv, col)
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentBulkEmailDestinationStatusListUnwrapped(v *[]types.BulkEmailDestinationStatus, decoder smithyxml.NodeDecoder) error {
var sv []types.BulkEmailDestinationStatus
if *v == nil {
sv = make([]types.BulkEmailDestinationStatus, 0)
} else {
sv = *v
}
switch {
default:
var mv types.BulkEmailDestinationStatus
t := decoder.StartEl
_ = t
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &mv
if err := awsAwsquery_deserializeDocumentBulkEmailDestinationStatus(&destAddr, nodeDecoder); err != nil {
return err
}
mv = *destAddr
sv = append(sv, mv)
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentCannotDeleteException(v **types.CannotDeleteException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.CannotDeleteException
if *v == nil {
sv = &types.CannotDeleteException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
case strings.EqualFold("Name", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Name = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentCloudWatchDestination(v **types.CloudWatchDestination, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.CloudWatchDestination
if *v == nil {
sv = &types.CloudWatchDestination{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("DimensionConfigurations", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentCloudWatchDimensionConfigurations(&sv.DimensionConfigurations, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentCloudWatchDimensionConfiguration(v **types.CloudWatchDimensionConfiguration, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.CloudWatchDimensionConfiguration
if *v == nil {
sv = &types.CloudWatchDimensionConfiguration{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("DefaultDimensionValue", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.DefaultDimensionValue = ptr.String(xtv)
}
case strings.EqualFold("DimensionName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.DimensionName = ptr.String(xtv)
}
case strings.EqualFold("DimensionValueSource", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.DimensionValueSource = types.DimensionValueSource(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentCloudWatchDimensionConfigurations(v *[]types.CloudWatchDimensionConfiguration, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv []types.CloudWatchDimensionConfiguration
if *v == nil {
sv = make([]types.CloudWatchDimensionConfiguration, 0)
} else {
sv = *v
}
originalDecoder := decoder
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
switch {
case strings.EqualFold("member", t.Name.Local):
var col types.CloudWatchDimensionConfiguration
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &col
if err := awsAwsquery_deserializeDocumentCloudWatchDimensionConfiguration(&destAddr, nodeDecoder); err != nil {
return err
}
col = *destAddr
sv = append(sv, col)
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentCloudWatchDimensionConfigurationsUnwrapped(v *[]types.CloudWatchDimensionConfiguration, decoder smithyxml.NodeDecoder) error {
var sv []types.CloudWatchDimensionConfiguration
if *v == nil {
sv = make([]types.CloudWatchDimensionConfiguration, 0)
} else {
sv = *v
}
switch {
default:
var mv types.CloudWatchDimensionConfiguration
t := decoder.StartEl
_ = t
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &mv
if err := awsAwsquery_deserializeDocumentCloudWatchDimensionConfiguration(&destAddr, nodeDecoder); err != nil {
return err
}
mv = *destAddr
sv = append(sv, mv)
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentConfigurationSet(v **types.ConfigurationSet, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.ConfigurationSet
if *v == nil {
sv = &types.ConfigurationSet{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("Name", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Name = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentConfigurationSetAlreadyExistsException(v **types.ConfigurationSetAlreadyExistsException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.ConfigurationSetAlreadyExistsException
if *v == nil {
sv = &types.ConfigurationSetAlreadyExistsException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("ConfigurationSetName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.ConfigurationSetName = ptr.String(xtv)
}
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentConfigurationSetDoesNotExistException(v **types.ConfigurationSetDoesNotExistException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.ConfigurationSetDoesNotExistException
if *v == nil {
sv = &types.ConfigurationSetDoesNotExistException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("ConfigurationSetName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.ConfigurationSetName = ptr.String(xtv)
}
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentConfigurationSets(v *[]types.ConfigurationSet, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv []types.ConfigurationSet
if *v == nil {
sv = make([]types.ConfigurationSet, 0)
} else {
sv = *v
}
originalDecoder := decoder
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
switch {
case strings.EqualFold("member", t.Name.Local):
var col types.ConfigurationSet
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &col
if err := awsAwsquery_deserializeDocumentConfigurationSet(&destAddr, nodeDecoder); err != nil {
return err
}
col = *destAddr
sv = append(sv, col)
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentConfigurationSetsUnwrapped(v *[]types.ConfigurationSet, decoder smithyxml.NodeDecoder) error {
var sv []types.ConfigurationSet
if *v == nil {
sv = make([]types.ConfigurationSet, 0)
} else {
sv = *v
}
switch {
default:
var mv types.ConfigurationSet
t := decoder.StartEl
_ = t
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &mv
if err := awsAwsquery_deserializeDocumentConfigurationSet(&destAddr, nodeDecoder); err != nil {
return err
}
mv = *destAddr
sv = append(sv, mv)
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentConfigurationSetSendingPausedException(v **types.ConfigurationSetSendingPausedException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.ConfigurationSetSendingPausedException
if *v == nil {
sv = &types.ConfigurationSetSendingPausedException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("ConfigurationSetName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.ConfigurationSetName = ptr.String(xtv)
}
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentCustomVerificationEmailInvalidContentException(v **types.CustomVerificationEmailInvalidContentException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.CustomVerificationEmailInvalidContentException
if *v == nil {
sv = &types.CustomVerificationEmailInvalidContentException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentCustomVerificationEmailTemplate(v **types.CustomVerificationEmailTemplate, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.CustomVerificationEmailTemplate
if *v == nil {
sv = &types.CustomVerificationEmailTemplate{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("FailureRedirectionURL", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.FailureRedirectionURL = ptr.String(xtv)
}
case strings.EqualFold("FromEmailAddress", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.FromEmailAddress = ptr.String(xtv)
}
case strings.EqualFold("SuccessRedirectionURL", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.SuccessRedirectionURL = ptr.String(xtv)
}
case strings.EqualFold("TemplateName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TemplateName = ptr.String(xtv)
}
case strings.EqualFold("TemplateSubject", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TemplateSubject = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentCustomVerificationEmailTemplateAlreadyExistsException(v **types.CustomVerificationEmailTemplateAlreadyExistsException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.CustomVerificationEmailTemplateAlreadyExistsException
if *v == nil {
sv = &types.CustomVerificationEmailTemplateAlreadyExistsException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("CustomVerificationEmailTemplateName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.CustomVerificationEmailTemplateName = ptr.String(xtv)
}
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentCustomVerificationEmailTemplateDoesNotExistException(v **types.CustomVerificationEmailTemplateDoesNotExistException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.CustomVerificationEmailTemplateDoesNotExistException
if *v == nil {
sv = &types.CustomVerificationEmailTemplateDoesNotExistException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("CustomVerificationEmailTemplateName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.CustomVerificationEmailTemplateName = ptr.String(xtv)
}
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentCustomVerificationEmailTemplates(v *[]types.CustomVerificationEmailTemplate, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv []types.CustomVerificationEmailTemplate
if *v == nil {
sv = make([]types.CustomVerificationEmailTemplate, 0)
} else {
sv = *v
}
originalDecoder := decoder
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
switch {
case strings.EqualFold("member", t.Name.Local):
var col types.CustomVerificationEmailTemplate
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &col
if err := awsAwsquery_deserializeDocumentCustomVerificationEmailTemplate(&destAddr, nodeDecoder); err != nil {
return err
}
col = *destAddr
sv = append(sv, col)
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentCustomVerificationEmailTemplatesUnwrapped(v *[]types.CustomVerificationEmailTemplate, decoder smithyxml.NodeDecoder) error {
var sv []types.CustomVerificationEmailTemplate
if *v == nil {
sv = make([]types.CustomVerificationEmailTemplate, 0)
} else {
sv = *v
}
switch {
default:
var mv types.CustomVerificationEmailTemplate
t := decoder.StartEl
_ = t
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &mv
if err := awsAwsquery_deserializeDocumentCustomVerificationEmailTemplate(&destAddr, nodeDecoder); err != nil {
return err
}
mv = *destAddr
sv = append(sv, mv)
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentDeliveryOptions(v **types.DeliveryOptions, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.DeliveryOptions
if *v == nil {
sv = &types.DeliveryOptions{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("TlsPolicy", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TlsPolicy = types.TlsPolicy(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentDkimAttributes(v *map[string]types.IdentityDkimAttributes, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv map[string]types.IdentityDkimAttributes
if *v == nil {
sv = make(map[string]types.IdentityDkimAttributes, 0)
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
switch {
case strings.EqualFold("entry", t.Name.Local):
entryDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentDkimAttributesUnwrapped(&sv, entryDecoder); err != nil {
return err
}
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentDkimAttributesUnwrapped(v *map[string]types.IdentityDkimAttributes, decoder smithyxml.NodeDecoder) error {
var sv map[string]types.IdentityDkimAttributes
if *v == nil {
sv = make(map[string]types.IdentityDkimAttributes, 0)
} else {
sv = *v
}
var ek string
var ev types.IdentityDkimAttributes
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
sv[ek] = ev
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("key", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
ek = xtv
}
case strings.EqualFold("value", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
mapVar := ev
destAddr := &mapVar
if err := awsAwsquery_deserializeDocumentIdentityDkimAttributes(&destAddr, nodeDecoder); err != nil {
return err
}
ev = *destAddr
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentEventDestination(v **types.EventDestination, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.EventDestination
if *v == nil {
sv = &types.EventDestination{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("CloudWatchDestination", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentCloudWatchDestination(&sv.CloudWatchDestination, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("Enabled", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv, err := strconv.ParseBool(string(val))
if err != nil {
return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val)
}
sv.Enabled = xtv
}
case strings.EqualFold("KinesisFirehoseDestination", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentKinesisFirehoseDestination(&sv.KinesisFirehoseDestination, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("MatchingEventTypes", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentEventTypes(&sv.MatchingEventTypes, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("Name", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Name = ptr.String(xtv)
}
case strings.EqualFold("SNSDestination", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentSNSDestination(&sv.SNSDestination, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentEventDestinationAlreadyExistsException(v **types.EventDestinationAlreadyExistsException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.EventDestinationAlreadyExistsException
if *v == nil {
sv = &types.EventDestinationAlreadyExistsException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("ConfigurationSetName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.ConfigurationSetName = ptr.String(xtv)
}
case strings.EqualFold("EventDestinationName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.EventDestinationName = ptr.String(xtv)
}
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentEventDestinationDoesNotExistException(v **types.EventDestinationDoesNotExistException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.EventDestinationDoesNotExistException
if *v == nil {
sv = &types.EventDestinationDoesNotExistException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("ConfigurationSetName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.ConfigurationSetName = ptr.String(xtv)
}
case strings.EqualFold("EventDestinationName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.EventDestinationName = ptr.String(xtv)
}
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentEventDestinations(v *[]types.EventDestination, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv []types.EventDestination
if *v == nil {
sv = make([]types.EventDestination, 0)
} else {
sv = *v
}
originalDecoder := decoder
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
switch {
case strings.EqualFold("member", t.Name.Local):
var col types.EventDestination
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &col
if err := awsAwsquery_deserializeDocumentEventDestination(&destAddr, nodeDecoder); err != nil {
return err
}
col = *destAddr
sv = append(sv, col)
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentEventDestinationsUnwrapped(v *[]types.EventDestination, decoder smithyxml.NodeDecoder) error {
var sv []types.EventDestination
if *v == nil {
sv = make([]types.EventDestination, 0)
} else {
sv = *v
}
switch {
default:
var mv types.EventDestination
t := decoder.StartEl
_ = t
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &mv
if err := awsAwsquery_deserializeDocumentEventDestination(&destAddr, nodeDecoder); err != nil {
return err
}
mv = *destAddr
sv = append(sv, mv)
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentEventTypes(v *[]types.EventType, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv []types.EventType
if *v == nil {
sv = make([]types.EventType, 0)
} else {
sv = *v
}
originalDecoder := decoder
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
decoder = memberDecoder
switch {
case strings.EqualFold("member", t.Name.Local):
var col types.EventType
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
col = types.EventType(xtv)
}
sv = append(sv, col)
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentEventTypesUnwrapped(v *[]types.EventType, decoder smithyxml.NodeDecoder) error {
var sv []types.EventType
if *v == nil {
sv = make([]types.EventType, 0)
} else {
sv = *v
}
switch {
default:
var mv types.EventType
t := decoder.StartEl
_ = t
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
mv = types.EventType(xtv)
}
sv = append(sv, mv)
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentFromEmailAddressNotVerifiedException(v **types.FromEmailAddressNotVerifiedException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.FromEmailAddressNotVerifiedException
if *v == nil {
sv = &types.FromEmailAddressNotVerifiedException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("FromEmailAddress", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.FromEmailAddress = ptr.String(xtv)
}
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentIdentityDkimAttributes(v **types.IdentityDkimAttributes, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.IdentityDkimAttributes
if *v == nil {
sv = &types.IdentityDkimAttributes{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("DkimEnabled", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv, err := strconv.ParseBool(string(val))
if err != nil {
return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val)
}
sv.DkimEnabled = xtv
}
case strings.EqualFold("DkimTokens", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentVerificationTokenList(&sv.DkimTokens, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("DkimVerificationStatus", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.DkimVerificationStatus = types.VerificationStatus(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentIdentityList(v *[]string, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv []string
if *v == nil {
sv = make([]string, 0)
} else {
sv = *v
}
originalDecoder := decoder
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
decoder = memberDecoder
switch {
case strings.EqualFold("member", t.Name.Local):
var col string
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
col = xtv
}
sv = append(sv, col)
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentIdentityListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error {
var sv []string
if *v == nil {
sv = make([]string, 0)
} else {
sv = *v
}
switch {
default:
var mv string
t := decoder.StartEl
_ = t
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
mv = xtv
}
sv = append(sv, mv)
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentIdentityMailFromDomainAttributes(v **types.IdentityMailFromDomainAttributes, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.IdentityMailFromDomainAttributes
if *v == nil {
sv = &types.IdentityMailFromDomainAttributes{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("BehaviorOnMXFailure", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.BehaviorOnMXFailure = types.BehaviorOnMXFailure(xtv)
}
case strings.EqualFold("MailFromDomain", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.MailFromDomain = ptr.String(xtv)
}
case strings.EqualFold("MailFromDomainStatus", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.MailFromDomainStatus = types.CustomMailFromStatus(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentIdentityNotificationAttributes(v **types.IdentityNotificationAttributes, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.IdentityNotificationAttributes
if *v == nil {
sv = &types.IdentityNotificationAttributes{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("BounceTopic", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.BounceTopic = ptr.String(xtv)
}
case strings.EqualFold("ComplaintTopic", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.ComplaintTopic = ptr.String(xtv)
}
case strings.EqualFold("DeliveryTopic", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.DeliveryTopic = ptr.String(xtv)
}
case strings.EqualFold("ForwardingEnabled", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv, err := strconv.ParseBool(string(val))
if err != nil {
return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val)
}
sv.ForwardingEnabled = xtv
}
case strings.EqualFold("HeadersInBounceNotificationsEnabled", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv, err := strconv.ParseBool(string(val))
if err != nil {
return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val)
}
sv.HeadersInBounceNotificationsEnabled = xtv
}
case strings.EqualFold("HeadersInComplaintNotificationsEnabled", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv, err := strconv.ParseBool(string(val))
if err != nil {
return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val)
}
sv.HeadersInComplaintNotificationsEnabled = xtv
}
case strings.EqualFold("HeadersInDeliveryNotificationsEnabled", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv, err := strconv.ParseBool(string(val))
if err != nil {
return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val)
}
sv.HeadersInDeliveryNotificationsEnabled = xtv
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentIdentityVerificationAttributes(v **types.IdentityVerificationAttributes, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.IdentityVerificationAttributes
if *v == nil {
sv = &types.IdentityVerificationAttributes{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("VerificationStatus", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.VerificationStatus = types.VerificationStatus(xtv)
}
case strings.EqualFold("VerificationToken", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.VerificationToken = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentInvalidCloudWatchDestinationException(v **types.InvalidCloudWatchDestinationException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.InvalidCloudWatchDestinationException
if *v == nil {
sv = &types.InvalidCloudWatchDestinationException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("ConfigurationSetName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.ConfigurationSetName = ptr.String(xtv)
}
case strings.EqualFold("EventDestinationName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.EventDestinationName = ptr.String(xtv)
}
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentInvalidConfigurationSetException(v **types.InvalidConfigurationSetException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.InvalidConfigurationSetException
if *v == nil {
sv = &types.InvalidConfigurationSetException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentInvalidDeliveryOptionsException(v **types.InvalidDeliveryOptionsException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.InvalidDeliveryOptionsException
if *v == nil {
sv = &types.InvalidDeliveryOptionsException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentInvalidFirehoseDestinationException(v **types.InvalidFirehoseDestinationException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.InvalidFirehoseDestinationException
if *v == nil {
sv = &types.InvalidFirehoseDestinationException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("ConfigurationSetName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.ConfigurationSetName = ptr.String(xtv)
}
case strings.EqualFold("EventDestinationName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.EventDestinationName = ptr.String(xtv)
}
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentInvalidLambdaFunctionException(v **types.InvalidLambdaFunctionException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.InvalidLambdaFunctionException
if *v == nil {
sv = &types.InvalidLambdaFunctionException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("FunctionArn", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.FunctionArn = ptr.String(xtv)
}
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentInvalidPolicyException(v **types.InvalidPolicyException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.InvalidPolicyException
if *v == nil {
sv = &types.InvalidPolicyException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentInvalidRenderingParameterException(v **types.InvalidRenderingParameterException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.InvalidRenderingParameterException
if *v == nil {
sv = &types.InvalidRenderingParameterException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
case strings.EqualFold("TemplateName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TemplateName = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentInvalidS3ConfigurationException(v **types.InvalidS3ConfigurationException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.InvalidS3ConfigurationException
if *v == nil {
sv = &types.InvalidS3ConfigurationException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("Bucket", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Bucket = ptr.String(xtv)
}
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentInvalidSNSDestinationException(v **types.InvalidSNSDestinationException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.InvalidSNSDestinationException
if *v == nil {
sv = &types.InvalidSNSDestinationException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("ConfigurationSetName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.ConfigurationSetName = ptr.String(xtv)
}
case strings.EqualFold("EventDestinationName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.EventDestinationName = ptr.String(xtv)
}
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentInvalidSnsTopicException(v **types.InvalidSnsTopicException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.InvalidSnsTopicException
if *v == nil {
sv = &types.InvalidSnsTopicException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
case strings.EqualFold("Topic", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Topic = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentInvalidTemplateException(v **types.InvalidTemplateException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.InvalidTemplateException
if *v == nil {
sv = &types.InvalidTemplateException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
case strings.EqualFold("TemplateName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TemplateName = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentInvalidTrackingOptionsException(v **types.InvalidTrackingOptionsException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.InvalidTrackingOptionsException
if *v == nil {
sv = &types.InvalidTrackingOptionsException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentKinesisFirehoseDestination(v **types.KinesisFirehoseDestination, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.KinesisFirehoseDestination
if *v == nil {
sv = &types.KinesisFirehoseDestination{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("DeliveryStreamARN", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.DeliveryStreamARN = ptr.String(xtv)
}
case strings.EqualFold("IAMRoleARN", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.IAMRoleARN = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentLambdaAction(v **types.LambdaAction, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.LambdaAction
if *v == nil {
sv = &types.LambdaAction{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("FunctionArn", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.FunctionArn = ptr.String(xtv)
}
case strings.EqualFold("InvocationType", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.InvocationType = types.InvocationType(xtv)
}
case strings.EqualFold("TopicArn", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TopicArn = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentLimitExceededException(v **types.LimitExceededException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.LimitExceededException
if *v == nil {
sv = &types.LimitExceededException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentMailFromDomainAttributes(v *map[string]types.IdentityMailFromDomainAttributes, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv map[string]types.IdentityMailFromDomainAttributes
if *v == nil {
sv = make(map[string]types.IdentityMailFromDomainAttributes, 0)
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
switch {
case strings.EqualFold("entry", t.Name.Local):
entryDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentMailFromDomainAttributesUnwrapped(&sv, entryDecoder); err != nil {
return err
}
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentMailFromDomainAttributesUnwrapped(v *map[string]types.IdentityMailFromDomainAttributes, decoder smithyxml.NodeDecoder) error {
var sv map[string]types.IdentityMailFromDomainAttributes
if *v == nil {
sv = make(map[string]types.IdentityMailFromDomainAttributes, 0)
} else {
sv = *v
}
var ek string
var ev types.IdentityMailFromDomainAttributes
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
sv[ek] = ev
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("key", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
ek = xtv
}
case strings.EqualFold("value", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
mapVar := ev
destAddr := &mapVar
if err := awsAwsquery_deserializeDocumentIdentityMailFromDomainAttributes(&destAddr, nodeDecoder); err != nil {
return err
}
ev = *destAddr
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentMailFromDomainNotVerifiedException(v **types.MailFromDomainNotVerifiedException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.MailFromDomainNotVerifiedException
if *v == nil {
sv = &types.MailFromDomainNotVerifiedException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentMessageRejected(v **types.MessageRejected, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.MessageRejected
if *v == nil {
sv = &types.MessageRejected{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentMissingRenderingAttributeException(v **types.MissingRenderingAttributeException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.MissingRenderingAttributeException
if *v == nil {
sv = &types.MissingRenderingAttributeException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
case strings.EqualFold("TemplateName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TemplateName = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentNotificationAttributes(v *map[string]types.IdentityNotificationAttributes, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv map[string]types.IdentityNotificationAttributes
if *v == nil {
sv = make(map[string]types.IdentityNotificationAttributes, 0)
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
switch {
case strings.EqualFold("entry", t.Name.Local):
entryDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentNotificationAttributesUnwrapped(&sv, entryDecoder); err != nil {
return err
}
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentNotificationAttributesUnwrapped(v *map[string]types.IdentityNotificationAttributes, decoder smithyxml.NodeDecoder) error {
var sv map[string]types.IdentityNotificationAttributes
if *v == nil {
sv = make(map[string]types.IdentityNotificationAttributes, 0)
} else {
sv = *v
}
var ek string
var ev types.IdentityNotificationAttributes
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
sv[ek] = ev
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("key", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
ek = xtv
}
case strings.EqualFold("value", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
mapVar := ev
destAddr := &mapVar
if err := awsAwsquery_deserializeDocumentIdentityNotificationAttributes(&destAddr, nodeDecoder); err != nil {
return err
}
ev = *destAddr
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentPolicyMap(v *map[string]string, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv map[string]string
if *v == nil {
sv = make(map[string]string, 0)
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
switch {
case strings.EqualFold("entry", t.Name.Local):
entryDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentPolicyMapUnwrapped(&sv, entryDecoder); err != nil {
return err
}
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentPolicyMapUnwrapped(v *map[string]string, decoder smithyxml.NodeDecoder) error {
var sv map[string]string
if *v == nil {
sv = make(map[string]string, 0)
} else {
sv = *v
}
var ek string
var ev string
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
sv[ek] = ev
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("key", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
ek = xtv
}
case strings.EqualFold("value", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
ev = xtv
}
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentPolicyNameList(v *[]string, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv []string
if *v == nil {
sv = make([]string, 0)
} else {
sv = *v
}
originalDecoder := decoder
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
decoder = memberDecoder
switch {
case strings.EqualFold("member", t.Name.Local):
var col string
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
col = xtv
}
sv = append(sv, col)
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentPolicyNameListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error {
var sv []string
if *v == nil {
sv = make([]string, 0)
} else {
sv = *v
}
switch {
default:
var mv string
t := decoder.StartEl
_ = t
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
mv = xtv
}
sv = append(sv, mv)
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentProductionAccessNotGrantedException(v **types.ProductionAccessNotGrantedException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.ProductionAccessNotGrantedException
if *v == nil {
sv = &types.ProductionAccessNotGrantedException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentReceiptAction(v **types.ReceiptAction, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.ReceiptAction
if *v == nil {
sv = &types.ReceiptAction{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("AddHeaderAction", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentAddHeaderAction(&sv.AddHeaderAction, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("BounceAction", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentBounceAction(&sv.BounceAction, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("LambdaAction", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentLambdaAction(&sv.LambdaAction, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("S3Action", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentS3Action(&sv.S3Action, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("SNSAction", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentSNSAction(&sv.SNSAction, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("StopAction", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentStopAction(&sv.StopAction, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("WorkmailAction", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentWorkmailAction(&sv.WorkmailAction, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentReceiptActionsList(v *[]types.ReceiptAction, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv []types.ReceiptAction
if *v == nil {
sv = make([]types.ReceiptAction, 0)
} else {
sv = *v
}
originalDecoder := decoder
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
switch {
case strings.EqualFold("member", t.Name.Local):
var col types.ReceiptAction
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &col
if err := awsAwsquery_deserializeDocumentReceiptAction(&destAddr, nodeDecoder); err != nil {
return err
}
col = *destAddr
sv = append(sv, col)
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentReceiptActionsListUnwrapped(v *[]types.ReceiptAction, decoder smithyxml.NodeDecoder) error {
var sv []types.ReceiptAction
if *v == nil {
sv = make([]types.ReceiptAction, 0)
} else {
sv = *v
}
switch {
default:
var mv types.ReceiptAction
t := decoder.StartEl
_ = t
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &mv
if err := awsAwsquery_deserializeDocumentReceiptAction(&destAddr, nodeDecoder); err != nil {
return err
}
mv = *destAddr
sv = append(sv, mv)
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentReceiptFilter(v **types.ReceiptFilter, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.ReceiptFilter
if *v == nil {
sv = &types.ReceiptFilter{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("IpFilter", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentReceiptIpFilter(&sv.IpFilter, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("Name", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Name = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentReceiptFilterList(v *[]types.ReceiptFilter, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv []types.ReceiptFilter
if *v == nil {
sv = make([]types.ReceiptFilter, 0)
} else {
sv = *v
}
originalDecoder := decoder
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
switch {
case strings.EqualFold("member", t.Name.Local):
var col types.ReceiptFilter
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &col
if err := awsAwsquery_deserializeDocumentReceiptFilter(&destAddr, nodeDecoder); err != nil {
return err
}
col = *destAddr
sv = append(sv, col)
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentReceiptFilterListUnwrapped(v *[]types.ReceiptFilter, decoder smithyxml.NodeDecoder) error {
var sv []types.ReceiptFilter
if *v == nil {
sv = make([]types.ReceiptFilter, 0)
} else {
sv = *v
}
switch {
default:
var mv types.ReceiptFilter
t := decoder.StartEl
_ = t
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &mv
if err := awsAwsquery_deserializeDocumentReceiptFilter(&destAddr, nodeDecoder); err != nil {
return err
}
mv = *destAddr
sv = append(sv, mv)
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentReceiptIpFilter(v **types.ReceiptIpFilter, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.ReceiptIpFilter
if *v == nil {
sv = &types.ReceiptIpFilter{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("Cidr", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Cidr = ptr.String(xtv)
}
case strings.EqualFold("Policy", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Policy = types.ReceiptFilterPolicy(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentReceiptRule(v **types.ReceiptRule, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.ReceiptRule
if *v == nil {
sv = &types.ReceiptRule{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("Actions", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentReceiptActionsList(&sv.Actions, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("Enabled", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv, err := strconv.ParseBool(string(val))
if err != nil {
return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val)
}
sv.Enabled = xtv
}
case strings.EqualFold("Name", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Name = ptr.String(xtv)
}
case strings.EqualFold("Recipients", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentRecipientsList(&sv.Recipients, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("ScanEnabled", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv, err := strconv.ParseBool(string(val))
if err != nil {
return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val)
}
sv.ScanEnabled = xtv
}
case strings.EqualFold("TlsPolicy", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TlsPolicy = types.TlsPolicy(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentReceiptRuleSetMetadata(v **types.ReceiptRuleSetMetadata, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.ReceiptRuleSetMetadata
if *v == nil {
sv = &types.ReceiptRuleSetMetadata{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("CreatedTimestamp", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
t, err := smithytime.ParseDateTime(xtv)
if err != nil {
return err
}
sv.CreatedTimestamp = ptr.Time(t)
}
case strings.EqualFold("Name", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Name = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentReceiptRuleSetsLists(v *[]types.ReceiptRuleSetMetadata, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv []types.ReceiptRuleSetMetadata
if *v == nil {
sv = make([]types.ReceiptRuleSetMetadata, 0)
} else {
sv = *v
}
originalDecoder := decoder
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
switch {
case strings.EqualFold("member", t.Name.Local):
var col types.ReceiptRuleSetMetadata
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &col
if err := awsAwsquery_deserializeDocumentReceiptRuleSetMetadata(&destAddr, nodeDecoder); err != nil {
return err
}
col = *destAddr
sv = append(sv, col)
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentReceiptRuleSetsListsUnwrapped(v *[]types.ReceiptRuleSetMetadata, decoder smithyxml.NodeDecoder) error {
var sv []types.ReceiptRuleSetMetadata
if *v == nil {
sv = make([]types.ReceiptRuleSetMetadata, 0)
} else {
sv = *v
}
switch {
default:
var mv types.ReceiptRuleSetMetadata
t := decoder.StartEl
_ = t
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &mv
if err := awsAwsquery_deserializeDocumentReceiptRuleSetMetadata(&destAddr, nodeDecoder); err != nil {
return err
}
mv = *destAddr
sv = append(sv, mv)
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentReceiptRulesList(v *[]types.ReceiptRule, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv []types.ReceiptRule
if *v == nil {
sv = make([]types.ReceiptRule, 0)
} else {
sv = *v
}
originalDecoder := decoder
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
switch {
case strings.EqualFold("member", t.Name.Local):
var col types.ReceiptRule
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &col
if err := awsAwsquery_deserializeDocumentReceiptRule(&destAddr, nodeDecoder); err != nil {
return err
}
col = *destAddr
sv = append(sv, col)
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentReceiptRulesListUnwrapped(v *[]types.ReceiptRule, decoder smithyxml.NodeDecoder) error {
var sv []types.ReceiptRule
if *v == nil {
sv = make([]types.ReceiptRule, 0)
} else {
sv = *v
}
switch {
default:
var mv types.ReceiptRule
t := decoder.StartEl
_ = t
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &mv
if err := awsAwsquery_deserializeDocumentReceiptRule(&destAddr, nodeDecoder); err != nil {
return err
}
mv = *destAddr
sv = append(sv, mv)
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentRecipientsList(v *[]string, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv []string
if *v == nil {
sv = make([]string, 0)
} else {
sv = *v
}
originalDecoder := decoder
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
decoder = memberDecoder
switch {
case strings.EqualFold("member", t.Name.Local):
var col string
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
col = xtv
}
sv = append(sv, col)
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentRecipientsListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error {
var sv []string
if *v == nil {
sv = make([]string, 0)
} else {
sv = *v
}
switch {
default:
var mv string
t := decoder.StartEl
_ = t
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
mv = xtv
}
sv = append(sv, mv)
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentReputationOptions(v **types.ReputationOptions, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.ReputationOptions
if *v == nil {
sv = &types.ReputationOptions{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("LastFreshStart", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
t, err := smithytime.ParseDateTime(xtv)
if err != nil {
return err
}
sv.LastFreshStart = ptr.Time(t)
}
case strings.EqualFold("ReputationMetricsEnabled", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv, err := strconv.ParseBool(string(val))
if err != nil {
return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val)
}
sv.ReputationMetricsEnabled = xtv
}
case strings.EqualFold("SendingEnabled", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv, err := strconv.ParseBool(string(val))
if err != nil {
return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val)
}
sv.SendingEnabled = xtv
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentRuleDoesNotExistException(v **types.RuleDoesNotExistException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.RuleDoesNotExistException
if *v == nil {
sv = &types.RuleDoesNotExistException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
case strings.EqualFold("Name", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Name = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentRuleSetDoesNotExistException(v **types.RuleSetDoesNotExistException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.RuleSetDoesNotExistException
if *v == nil {
sv = &types.RuleSetDoesNotExistException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
case strings.EqualFold("Name", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Name = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentS3Action(v **types.S3Action, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.S3Action
if *v == nil {
sv = &types.S3Action{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("BucketName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.BucketName = ptr.String(xtv)
}
case strings.EqualFold("KmsKeyArn", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.KmsKeyArn = ptr.String(xtv)
}
case strings.EqualFold("ObjectKeyPrefix", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.ObjectKeyPrefix = ptr.String(xtv)
}
case strings.EqualFold("TopicArn", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TopicArn = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentSendDataPoint(v **types.SendDataPoint, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.SendDataPoint
if *v == nil {
sv = &types.SendDataPoint{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("Bounces", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
i64, err := strconv.ParseInt(xtv, 10, 64)
if err != nil {
return err
}
sv.Bounces = i64
}
case strings.EqualFold("Complaints", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
i64, err := strconv.ParseInt(xtv, 10, 64)
if err != nil {
return err
}
sv.Complaints = i64
}
case strings.EqualFold("DeliveryAttempts", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
i64, err := strconv.ParseInt(xtv, 10, 64)
if err != nil {
return err
}
sv.DeliveryAttempts = i64
}
case strings.EqualFold("Rejects", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
i64, err := strconv.ParseInt(xtv, 10, 64)
if err != nil {
return err
}
sv.Rejects = i64
}
case strings.EqualFold("Timestamp", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
t, err := smithytime.ParseDateTime(xtv)
if err != nil {
return err
}
sv.Timestamp = ptr.Time(t)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentSendDataPointList(v *[]types.SendDataPoint, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv []types.SendDataPoint
if *v == nil {
sv = make([]types.SendDataPoint, 0)
} else {
sv = *v
}
originalDecoder := decoder
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
switch {
case strings.EqualFold("member", t.Name.Local):
var col types.SendDataPoint
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &col
if err := awsAwsquery_deserializeDocumentSendDataPoint(&destAddr, nodeDecoder); err != nil {
return err
}
col = *destAddr
sv = append(sv, col)
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentSendDataPointListUnwrapped(v *[]types.SendDataPoint, decoder smithyxml.NodeDecoder) error {
var sv []types.SendDataPoint
if *v == nil {
sv = make([]types.SendDataPoint, 0)
} else {
sv = *v
}
switch {
default:
var mv types.SendDataPoint
t := decoder.StartEl
_ = t
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &mv
if err := awsAwsquery_deserializeDocumentSendDataPoint(&destAddr, nodeDecoder); err != nil {
return err
}
mv = *destAddr
sv = append(sv, mv)
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentSNSAction(v **types.SNSAction, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.SNSAction
if *v == nil {
sv = &types.SNSAction{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("Encoding", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Encoding = types.SNSActionEncoding(xtv)
}
case strings.EqualFold("TopicArn", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TopicArn = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentSNSDestination(v **types.SNSDestination, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.SNSDestination
if *v == nil {
sv = &types.SNSDestination{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("TopicARN", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TopicARN = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentStopAction(v **types.StopAction, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.StopAction
if *v == nil {
sv = &types.StopAction{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("Scope", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Scope = types.StopScope(xtv)
}
case strings.EqualFold("TopicArn", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TopicArn = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentTemplate(v **types.Template, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.Template
if *v == nil {
sv = &types.Template{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("HtmlPart", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.HtmlPart = ptr.String(xtv)
}
case strings.EqualFold("SubjectPart", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.SubjectPart = ptr.String(xtv)
}
case strings.EqualFold("TemplateName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TemplateName = ptr.String(xtv)
}
case strings.EqualFold("TextPart", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TextPart = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentTemplateDoesNotExistException(v **types.TemplateDoesNotExistException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.TemplateDoesNotExistException
if *v == nil {
sv = &types.TemplateDoesNotExistException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
case strings.EqualFold("TemplateName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TemplateName = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentTemplateMetadata(v **types.TemplateMetadata, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.TemplateMetadata
if *v == nil {
sv = &types.TemplateMetadata{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("CreatedTimestamp", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
t, err := smithytime.ParseDateTime(xtv)
if err != nil {
return err
}
sv.CreatedTimestamp = ptr.Time(t)
}
case strings.EqualFold("Name", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Name = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentTemplateMetadataList(v *[]types.TemplateMetadata, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv []types.TemplateMetadata
if *v == nil {
sv = make([]types.TemplateMetadata, 0)
} else {
sv = *v
}
originalDecoder := decoder
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
switch {
case strings.EqualFold("member", t.Name.Local):
var col types.TemplateMetadata
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &col
if err := awsAwsquery_deserializeDocumentTemplateMetadata(&destAddr, nodeDecoder); err != nil {
return err
}
col = *destAddr
sv = append(sv, col)
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentTemplateMetadataListUnwrapped(v *[]types.TemplateMetadata, decoder smithyxml.NodeDecoder) error {
var sv []types.TemplateMetadata
if *v == nil {
sv = make([]types.TemplateMetadata, 0)
} else {
sv = *v
}
switch {
default:
var mv types.TemplateMetadata
t := decoder.StartEl
_ = t
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
destAddr := &mv
if err := awsAwsquery_deserializeDocumentTemplateMetadata(&destAddr, nodeDecoder); err != nil {
return err
}
mv = *destAddr
sv = append(sv, mv)
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentTrackingOptions(v **types.TrackingOptions, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.TrackingOptions
if *v == nil {
sv = &types.TrackingOptions{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("CustomRedirectDomain", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.CustomRedirectDomain = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentTrackingOptionsAlreadyExistsException(v **types.TrackingOptionsAlreadyExistsException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.TrackingOptionsAlreadyExistsException
if *v == nil {
sv = &types.TrackingOptionsAlreadyExistsException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("ConfigurationSetName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.ConfigurationSetName = ptr.String(xtv)
}
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentTrackingOptionsDoesNotExistException(v **types.TrackingOptionsDoesNotExistException, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.TrackingOptionsDoesNotExistException
if *v == nil {
sv = &types.TrackingOptionsDoesNotExistException{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("ConfigurationSetName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.ConfigurationSetName = ptr.String(xtv)
}
case strings.EqualFold("message", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.Message = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentVerificationAttributes(v *map[string]types.IdentityVerificationAttributes, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv map[string]types.IdentityVerificationAttributes
if *v == nil {
sv = make(map[string]types.IdentityVerificationAttributes, 0)
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
switch {
case strings.EqualFold("entry", t.Name.Local):
entryDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentVerificationAttributesUnwrapped(&sv, entryDecoder); err != nil {
return err
}
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentVerificationAttributesUnwrapped(v *map[string]types.IdentityVerificationAttributes, decoder smithyxml.NodeDecoder) error {
var sv map[string]types.IdentityVerificationAttributes
if *v == nil {
sv = make(map[string]types.IdentityVerificationAttributes, 0)
} else {
sv = *v
}
var ek string
var ev types.IdentityVerificationAttributes
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
sv[ek] = ev
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("key", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
ek = xtv
}
case strings.EqualFold("value", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
mapVar := ev
destAddr := &mapVar
if err := awsAwsquery_deserializeDocumentIdentityVerificationAttributes(&destAddr, nodeDecoder); err != nil {
return err
}
ev = *destAddr
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentVerificationTokenList(v *[]string, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv []string
if *v == nil {
sv = make([]string, 0)
} else {
sv = *v
}
originalDecoder := decoder
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
decoder = memberDecoder
switch {
case strings.EqualFold("member", t.Name.Local):
var col string
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
col = xtv
}
sv = append(sv, col)
default:
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentVerificationTokenListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error {
var sv []string
if *v == nil {
sv = make([]string, 0)
} else {
sv = *v
}
switch {
default:
var mv string
t := decoder.StartEl
_ = t
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
mv = xtv
}
sv = append(sv, mv)
}
*v = sv
return nil
}
func awsAwsquery_deserializeDocumentWorkmailAction(v **types.WorkmailAction, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *types.WorkmailAction
if *v == nil {
sv = &types.WorkmailAction{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("OrganizationArn", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.OrganizationArn = ptr.String(xtv)
}
case strings.EqualFold("TopicArn", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TopicArn = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentCloneReceiptRuleSetOutput(v **CloneReceiptRuleSetOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *CloneReceiptRuleSetOutput
if *v == nil {
sv = &CloneReceiptRuleSetOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentCreateConfigurationSetEventDestinationOutput(v **CreateConfigurationSetEventDestinationOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *CreateConfigurationSetEventDestinationOutput
if *v == nil {
sv = &CreateConfigurationSetEventDestinationOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentCreateConfigurationSetOutput(v **CreateConfigurationSetOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *CreateConfigurationSetOutput
if *v == nil {
sv = &CreateConfigurationSetOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentCreateConfigurationSetTrackingOptionsOutput(v **CreateConfigurationSetTrackingOptionsOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *CreateConfigurationSetTrackingOptionsOutput
if *v == nil {
sv = &CreateConfigurationSetTrackingOptionsOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentCreateReceiptFilterOutput(v **CreateReceiptFilterOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *CreateReceiptFilterOutput
if *v == nil {
sv = &CreateReceiptFilterOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentCreateReceiptRuleOutput(v **CreateReceiptRuleOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *CreateReceiptRuleOutput
if *v == nil {
sv = &CreateReceiptRuleOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentCreateReceiptRuleSetOutput(v **CreateReceiptRuleSetOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *CreateReceiptRuleSetOutput
if *v == nil {
sv = &CreateReceiptRuleSetOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentCreateTemplateOutput(v **CreateTemplateOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *CreateTemplateOutput
if *v == nil {
sv = &CreateTemplateOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentDeleteConfigurationSetEventDestinationOutput(v **DeleteConfigurationSetEventDestinationOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *DeleteConfigurationSetEventDestinationOutput
if *v == nil {
sv = &DeleteConfigurationSetEventDestinationOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentDeleteConfigurationSetOutput(v **DeleteConfigurationSetOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *DeleteConfigurationSetOutput
if *v == nil {
sv = &DeleteConfigurationSetOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentDeleteConfigurationSetTrackingOptionsOutput(v **DeleteConfigurationSetTrackingOptionsOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *DeleteConfigurationSetTrackingOptionsOutput
if *v == nil {
sv = &DeleteConfigurationSetTrackingOptionsOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentDeleteIdentityOutput(v **DeleteIdentityOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *DeleteIdentityOutput
if *v == nil {
sv = &DeleteIdentityOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentDeleteIdentityPolicyOutput(v **DeleteIdentityPolicyOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *DeleteIdentityPolicyOutput
if *v == nil {
sv = &DeleteIdentityPolicyOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentDeleteReceiptFilterOutput(v **DeleteReceiptFilterOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *DeleteReceiptFilterOutput
if *v == nil {
sv = &DeleteReceiptFilterOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentDeleteReceiptRuleOutput(v **DeleteReceiptRuleOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *DeleteReceiptRuleOutput
if *v == nil {
sv = &DeleteReceiptRuleOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentDeleteReceiptRuleSetOutput(v **DeleteReceiptRuleSetOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *DeleteReceiptRuleSetOutput
if *v == nil {
sv = &DeleteReceiptRuleSetOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentDeleteTemplateOutput(v **DeleteTemplateOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *DeleteTemplateOutput
if *v == nil {
sv = &DeleteTemplateOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentDescribeActiveReceiptRuleSetOutput(v **DescribeActiveReceiptRuleSetOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *DescribeActiveReceiptRuleSetOutput
if *v == nil {
sv = &DescribeActiveReceiptRuleSetOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("Metadata", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentReceiptRuleSetMetadata(&sv.Metadata, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("Rules", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentReceiptRulesList(&sv.Rules, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentDescribeConfigurationSetOutput(v **DescribeConfigurationSetOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *DescribeConfigurationSetOutput
if *v == nil {
sv = &DescribeConfigurationSetOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("ConfigurationSet", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentConfigurationSet(&sv.ConfigurationSet, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("DeliveryOptions", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentDeliveryOptions(&sv.DeliveryOptions, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("EventDestinations", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentEventDestinations(&sv.EventDestinations, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("ReputationOptions", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentReputationOptions(&sv.ReputationOptions, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("TrackingOptions", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentTrackingOptions(&sv.TrackingOptions, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentDescribeReceiptRuleOutput(v **DescribeReceiptRuleOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *DescribeReceiptRuleOutput
if *v == nil {
sv = &DescribeReceiptRuleOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("Rule", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentReceiptRule(&sv.Rule, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentDescribeReceiptRuleSetOutput(v **DescribeReceiptRuleSetOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *DescribeReceiptRuleSetOutput
if *v == nil {
sv = &DescribeReceiptRuleSetOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("Metadata", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentReceiptRuleSetMetadata(&sv.Metadata, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("Rules", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentReceiptRulesList(&sv.Rules, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentGetAccountSendingEnabledOutput(v **GetAccountSendingEnabledOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *GetAccountSendingEnabledOutput
if *v == nil {
sv = &GetAccountSendingEnabledOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("Enabled", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv, err := strconv.ParseBool(string(val))
if err != nil {
return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val)
}
sv.Enabled = xtv
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentGetCustomVerificationEmailTemplateOutput(v **GetCustomVerificationEmailTemplateOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *GetCustomVerificationEmailTemplateOutput
if *v == nil {
sv = &GetCustomVerificationEmailTemplateOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("FailureRedirectionURL", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.FailureRedirectionURL = ptr.String(xtv)
}
case strings.EqualFold("FromEmailAddress", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.FromEmailAddress = ptr.String(xtv)
}
case strings.EqualFold("SuccessRedirectionURL", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.SuccessRedirectionURL = ptr.String(xtv)
}
case strings.EqualFold("TemplateContent", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TemplateContent = ptr.String(xtv)
}
case strings.EqualFold("TemplateName", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TemplateName = ptr.String(xtv)
}
case strings.EqualFold("TemplateSubject", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.TemplateSubject = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentGetIdentityDkimAttributesOutput(v **GetIdentityDkimAttributesOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *GetIdentityDkimAttributesOutput
if *v == nil {
sv = &GetIdentityDkimAttributesOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("DkimAttributes", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentDkimAttributes(&sv.DkimAttributes, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentGetIdentityMailFromDomainAttributesOutput(v **GetIdentityMailFromDomainAttributesOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *GetIdentityMailFromDomainAttributesOutput
if *v == nil {
sv = &GetIdentityMailFromDomainAttributesOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("MailFromDomainAttributes", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentMailFromDomainAttributes(&sv.MailFromDomainAttributes, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentGetIdentityNotificationAttributesOutput(v **GetIdentityNotificationAttributesOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *GetIdentityNotificationAttributesOutput
if *v == nil {
sv = &GetIdentityNotificationAttributesOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("NotificationAttributes", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentNotificationAttributes(&sv.NotificationAttributes, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentGetIdentityPoliciesOutput(v **GetIdentityPoliciesOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *GetIdentityPoliciesOutput
if *v == nil {
sv = &GetIdentityPoliciesOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("Policies", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentPolicyMap(&sv.Policies, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentGetIdentityVerificationAttributesOutput(v **GetIdentityVerificationAttributesOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *GetIdentityVerificationAttributesOutput
if *v == nil {
sv = &GetIdentityVerificationAttributesOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("VerificationAttributes", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentVerificationAttributes(&sv.VerificationAttributes, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentGetSendQuotaOutput(v **GetSendQuotaOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *GetSendQuotaOutput
if *v == nil {
sv = &GetSendQuotaOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("Max24HourSend", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
f64, err := strconv.ParseFloat(xtv, 64)
if err != nil {
return err
}
sv.Max24HourSend = f64
}
case strings.EqualFold("MaxSendRate", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
f64, err := strconv.ParseFloat(xtv, 64)
if err != nil {
return err
}
sv.MaxSendRate = f64
}
case strings.EqualFold("SentLast24Hours", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
f64, err := strconv.ParseFloat(xtv, 64)
if err != nil {
return err
}
sv.SentLast24Hours = f64
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentGetSendStatisticsOutput(v **GetSendStatisticsOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *GetSendStatisticsOutput
if *v == nil {
sv = &GetSendStatisticsOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("SendDataPoints", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentSendDataPointList(&sv.SendDataPoints, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentGetTemplateOutput(v **GetTemplateOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *GetTemplateOutput
if *v == nil {
sv = &GetTemplateOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("Template", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentTemplate(&sv.Template, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentListConfigurationSetsOutput(v **ListConfigurationSetsOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *ListConfigurationSetsOutput
if *v == nil {
sv = &ListConfigurationSetsOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("ConfigurationSets", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentConfigurationSets(&sv.ConfigurationSets, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("NextToken", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.NextToken = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentListCustomVerificationEmailTemplatesOutput(v **ListCustomVerificationEmailTemplatesOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *ListCustomVerificationEmailTemplatesOutput
if *v == nil {
sv = &ListCustomVerificationEmailTemplatesOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("CustomVerificationEmailTemplates", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentCustomVerificationEmailTemplates(&sv.CustomVerificationEmailTemplates, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("NextToken", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.NextToken = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentListIdentitiesOutput(v **ListIdentitiesOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *ListIdentitiesOutput
if *v == nil {
sv = &ListIdentitiesOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("Identities", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentIdentityList(&sv.Identities, nodeDecoder); err != nil {
return err
}
case strings.EqualFold("NextToken", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.NextToken = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentListIdentityPoliciesOutput(v **ListIdentityPoliciesOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *ListIdentityPoliciesOutput
if *v == nil {
sv = &ListIdentityPoliciesOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("PolicyNames", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentPolicyNameList(&sv.PolicyNames, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentListReceiptFiltersOutput(v **ListReceiptFiltersOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *ListReceiptFiltersOutput
if *v == nil {
sv = &ListReceiptFiltersOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("Filters", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentReceiptFilterList(&sv.Filters, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentListReceiptRuleSetsOutput(v **ListReceiptRuleSetsOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *ListReceiptRuleSetsOutput
if *v == nil {
sv = &ListReceiptRuleSetsOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("NextToken", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.NextToken = ptr.String(xtv)
}
case strings.EqualFold("RuleSets", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentReceiptRuleSetsLists(&sv.RuleSets, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentListTemplatesOutput(v **ListTemplatesOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *ListTemplatesOutput
if *v == nil {
sv = &ListTemplatesOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("NextToken", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.NextToken = ptr.String(xtv)
}
case strings.EqualFold("TemplatesMetadata", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentTemplateMetadataList(&sv.TemplatesMetadata, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentListVerifiedEmailAddressesOutput(v **ListVerifiedEmailAddressesOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *ListVerifiedEmailAddressesOutput
if *v == nil {
sv = &ListVerifiedEmailAddressesOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("VerifiedEmailAddresses", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentAddressList(&sv.VerifiedEmailAddresses, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentPutConfigurationSetDeliveryOptionsOutput(v **PutConfigurationSetDeliveryOptionsOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *PutConfigurationSetDeliveryOptionsOutput
if *v == nil {
sv = &PutConfigurationSetDeliveryOptionsOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentPutIdentityPolicyOutput(v **PutIdentityPolicyOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *PutIdentityPolicyOutput
if *v == nil {
sv = &PutIdentityPolicyOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentReorderReceiptRuleSetOutput(v **ReorderReceiptRuleSetOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *ReorderReceiptRuleSetOutput
if *v == nil {
sv = &ReorderReceiptRuleSetOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentSendBounceOutput(v **SendBounceOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *SendBounceOutput
if *v == nil {
sv = &SendBounceOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("MessageId", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.MessageId = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentSendBulkTemplatedEmailOutput(v **SendBulkTemplatedEmailOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *SendBulkTemplatedEmailOutput
if *v == nil {
sv = &SendBulkTemplatedEmailOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("Status", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentBulkEmailDestinationStatusList(&sv.Status, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentSendCustomVerificationEmailOutput(v **SendCustomVerificationEmailOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *SendCustomVerificationEmailOutput
if *v == nil {
sv = &SendCustomVerificationEmailOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("MessageId", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.MessageId = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentSendEmailOutput(v **SendEmailOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *SendEmailOutput
if *v == nil {
sv = &SendEmailOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("MessageId", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.MessageId = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentSendRawEmailOutput(v **SendRawEmailOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *SendRawEmailOutput
if *v == nil {
sv = &SendRawEmailOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("MessageId", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.MessageId = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentSendTemplatedEmailOutput(v **SendTemplatedEmailOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *SendTemplatedEmailOutput
if *v == nil {
sv = &SendTemplatedEmailOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("MessageId", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.MessageId = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentSetActiveReceiptRuleSetOutput(v **SetActiveReceiptRuleSetOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *SetActiveReceiptRuleSetOutput
if *v == nil {
sv = &SetActiveReceiptRuleSetOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentSetIdentityDkimEnabledOutput(v **SetIdentityDkimEnabledOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *SetIdentityDkimEnabledOutput
if *v == nil {
sv = &SetIdentityDkimEnabledOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentSetIdentityFeedbackForwardingEnabledOutput(v **SetIdentityFeedbackForwardingEnabledOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *SetIdentityFeedbackForwardingEnabledOutput
if *v == nil {
sv = &SetIdentityFeedbackForwardingEnabledOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentSetIdentityHeadersInNotificationsEnabledOutput(v **SetIdentityHeadersInNotificationsEnabledOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *SetIdentityHeadersInNotificationsEnabledOutput
if *v == nil {
sv = &SetIdentityHeadersInNotificationsEnabledOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentSetIdentityMailFromDomainOutput(v **SetIdentityMailFromDomainOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *SetIdentityMailFromDomainOutput
if *v == nil {
sv = &SetIdentityMailFromDomainOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentSetIdentityNotificationTopicOutput(v **SetIdentityNotificationTopicOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *SetIdentityNotificationTopicOutput
if *v == nil {
sv = &SetIdentityNotificationTopicOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentSetReceiptRulePositionOutput(v **SetReceiptRulePositionOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *SetReceiptRulePositionOutput
if *v == nil {
sv = &SetReceiptRulePositionOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentTestRenderTemplateOutput(v **TestRenderTemplateOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *TestRenderTemplateOutput
if *v == nil {
sv = &TestRenderTemplateOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("RenderedTemplate", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.RenderedTemplate = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentUpdateConfigurationSetEventDestinationOutput(v **UpdateConfigurationSetEventDestinationOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *UpdateConfigurationSetEventDestinationOutput
if *v == nil {
sv = &UpdateConfigurationSetEventDestinationOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentUpdateConfigurationSetTrackingOptionsOutput(v **UpdateConfigurationSetTrackingOptionsOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *UpdateConfigurationSetTrackingOptionsOutput
if *v == nil {
sv = &UpdateConfigurationSetTrackingOptionsOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentUpdateReceiptRuleOutput(v **UpdateReceiptRuleOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *UpdateReceiptRuleOutput
if *v == nil {
sv = &UpdateReceiptRuleOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentUpdateTemplateOutput(v **UpdateTemplateOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *UpdateTemplateOutput
if *v == nil {
sv = &UpdateTemplateOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentVerifyDomainDkimOutput(v **VerifyDomainDkimOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *VerifyDomainDkimOutput
if *v == nil {
sv = &VerifyDomainDkimOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("DkimTokens", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsAwsquery_deserializeDocumentVerificationTokenList(&sv.DkimTokens, nodeDecoder); err != nil {
return err
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentVerifyDomainIdentityOutput(v **VerifyDomainIdentityOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *VerifyDomainIdentityOutput
if *v == nil {
sv = &VerifyDomainIdentityOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
case strings.EqualFold("VerificationToken", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
}
if val == nil {
break
}
{
xtv := string(val)
sv.VerificationToken = ptr.String(xtv)
}
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
func awsAwsquery_deserializeOpDocumentVerifyEmailIdentityOutput(v **VerifyEmailIdentityOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
var sv *VerifyEmailIdentityOutput
if *v == nil {
sv = &VerifyEmailIdentityOutput{}
} else {
sv = *v
}
for {
t, done, err := decoder.Token()
if err != nil {
return err
}
if done {
break
}
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
if err != nil {
return err
}
}
decoder = originalDecoder
}
*v = sv
return nil
}
| 17,716 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
// Package ses provides the API client, operations, and parameter types for Amazon
// Simple Email Service.
//
// Amazon Simple Email Service This document contains reference information for
// the Amazon Simple Email Service (https://aws.amazon.com/ses/) (Amazon SES) API,
// version 2010-12-01. This document is best used in conjunction with the Amazon
// SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html)
// . For a list of Amazon SES endpoints to use in service requests, see Regions
// and Amazon SES (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/regions.html)
// in the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html)
// .
package ses
| 15 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
"errors"
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
internalendpoints "github.com/aws/aws-sdk-go-v2/service/ses/internal/endpoints"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"net/url"
"strings"
)
// EndpointResolverOptions is the service endpoint resolver options
type EndpointResolverOptions = internalendpoints.Options
// EndpointResolver interface for resolving service endpoints.
type EndpointResolver interface {
ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
}
var _ EndpointResolver = &internalendpoints.Resolver{}
// NewDefaultEndpointResolver constructs a new service endpoint resolver
func NewDefaultEndpointResolver() *internalendpoints.Resolver {
return internalendpoints.New()
}
// EndpointResolverFunc is a helper utility that wraps a function so it satisfies
// the EndpointResolver interface. This is useful when you want to add additional
// endpoint resolving logic, or stub out specific endpoints with custom values.
type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)
func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
return fn(region, options)
}
func resolveDefaultEndpointConfiguration(o *Options) {
if o.EndpointResolver != nil {
return
}
o.EndpointResolver = NewDefaultEndpointResolver()
}
// EndpointResolverFromURL returns an EndpointResolver configured using the
// provided endpoint url. By default, the resolved endpoint resolver uses the
// client region as signing region, and the endpoint source is set to
// EndpointSourceCustom.You can provide functional options to configure endpoint
// values for the resolved endpoint.
func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver {
e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom}
for _, fn := range optFns {
fn(&e)
}
return EndpointResolverFunc(
func(region string, options EndpointResolverOptions) (aws.Endpoint, error) {
if len(e.SigningRegion) == 0 {
e.SigningRegion = region
}
return e, nil
},
)
}
type ResolveEndpoint struct {
Resolver EndpointResolver
Options EndpointResolverOptions
}
func (*ResolveEndpoint) ID() string {
return "ResolveEndpoint"
}
func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
req, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
}
if m.Resolver == nil {
return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
}
eo := m.Options
eo.Logger = middleware.GetLogger(ctx)
var endpoint aws.Endpoint
endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo)
if err != nil {
return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
}
req.URL, err = url.Parse(endpoint.URL)
if err != nil {
return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err)
}
if len(awsmiddleware.GetSigningName(ctx)) == 0 {
signingName := endpoint.SigningName
if len(signingName) == 0 {
signingName = "ses"
}
ctx = awsmiddleware.SetSigningName(ctx, signingName)
}
ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source)
ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable)
ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion)
ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID)
return next.HandleSerialize(ctx, in)
}
func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error {
return stack.Serialize.Insert(&ResolveEndpoint{
Resolver: o.EndpointResolver,
Options: o.EndpointOptions,
}, "OperationSerializer", middleware.Before)
}
func removeResolveEndpointMiddleware(stack *middleware.Stack) error {
_, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID())
return err
}
type wrappedEndpointResolver struct {
awsResolver aws.EndpointResolverWithOptions
resolver EndpointResolver
}
func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
if w.awsResolver == nil {
goto fallback
}
endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options)
if err == nil {
return endpoint, nil
}
if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) {
return endpoint, err
}
fallback:
if w.resolver == nil {
return endpoint, fmt.Errorf("default endpoint resolver provided was nil")
}
return w.resolver.ResolveEndpoint(region, options)
}
type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error)
func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) {
return a(service, region)
}
var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil)
// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver.
// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided
// fallbackResolver for resolution.
//
// fallbackResolver must not be nil
func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver {
var resolver aws.EndpointResolverWithOptions
if awsResolverWithOptions != nil {
resolver = awsResolverWithOptions
} else if awsResolver != nil {
resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint)
}
return &wrappedEndpointResolver{
awsResolver: resolver,
resolver: fallbackResolver,
}
}
func finalizeClientEndpointResolverOptions(options *Options) {
options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage()
if len(options.EndpointOptions.ResolvedRegion) == 0 {
const fipsInfix = "-fips-"
const fipsPrefix = "fips-"
const fipsSuffix = "-fips"
if strings.Contains(options.Region, fipsInfix) ||
strings.Contains(options.Region, fipsPrefix) ||
strings.Contains(options.Region, fipsSuffix) {
options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(
options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "")
options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled
}
}
}
| 201 |
aws-sdk-go-v2 | aws | Go | // Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
package ses
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.15.11"
| 7 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
| 4 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"bytes"
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/aws/protocol/query"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/encoding/httpbinding"
"github.com/aws/smithy-go/middleware"
smithytime "github.com/aws/smithy-go/time"
smithyhttp "github.com/aws/smithy-go/transport/http"
"path"
)
type awsAwsquery_serializeOpCloneReceiptRuleSet struct {
}
func (*awsAwsquery_serializeOpCloneReceiptRuleSet) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCloneReceiptRuleSet) 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.(*CloneReceiptRuleSetInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CloneReceiptRuleSet")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentCloneReceiptRuleSetInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpCreateConfigurationSet struct {
}
func (*awsAwsquery_serializeOpCreateConfigurationSet) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateConfigurationSet) 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.(*CreateConfigurationSetInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateConfigurationSet")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentCreateConfigurationSetInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpCreateConfigurationSetEventDestination struct {
}
func (*awsAwsquery_serializeOpCreateConfigurationSetEventDestination) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateConfigurationSetEventDestination) 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.(*CreateConfigurationSetEventDestinationInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateConfigurationSetEventDestination")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentCreateConfigurationSetEventDestinationInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpCreateConfigurationSetTrackingOptions struct {
}
func (*awsAwsquery_serializeOpCreateConfigurationSetTrackingOptions) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateConfigurationSetTrackingOptions) 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.(*CreateConfigurationSetTrackingOptionsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateConfigurationSetTrackingOptions")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentCreateConfigurationSetTrackingOptionsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpCreateCustomVerificationEmailTemplate struct {
}
func (*awsAwsquery_serializeOpCreateCustomVerificationEmailTemplate) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateCustomVerificationEmailTemplate) 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.(*CreateCustomVerificationEmailTemplateInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateCustomVerificationEmailTemplate")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentCreateCustomVerificationEmailTemplateInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpCreateReceiptFilter struct {
}
func (*awsAwsquery_serializeOpCreateReceiptFilter) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateReceiptFilter) 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.(*CreateReceiptFilterInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateReceiptFilter")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentCreateReceiptFilterInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpCreateReceiptRule struct {
}
func (*awsAwsquery_serializeOpCreateReceiptRule) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateReceiptRule) 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.(*CreateReceiptRuleInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateReceiptRule")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentCreateReceiptRuleInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpCreateReceiptRuleSet struct {
}
func (*awsAwsquery_serializeOpCreateReceiptRuleSet) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateReceiptRuleSet) 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.(*CreateReceiptRuleSetInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateReceiptRuleSet")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentCreateReceiptRuleSetInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpCreateTemplate struct {
}
func (*awsAwsquery_serializeOpCreateTemplate) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpCreateTemplate) 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.(*CreateTemplateInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("CreateTemplate")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentCreateTemplateInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpDeleteConfigurationSet struct {
}
func (*awsAwsquery_serializeOpDeleteConfigurationSet) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteConfigurationSet) 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.(*DeleteConfigurationSetInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteConfigurationSet")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteConfigurationSetInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpDeleteConfigurationSetEventDestination struct {
}
func (*awsAwsquery_serializeOpDeleteConfigurationSetEventDestination) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteConfigurationSetEventDestination) 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.(*DeleteConfigurationSetEventDestinationInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteConfigurationSetEventDestination")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteConfigurationSetEventDestinationInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpDeleteConfigurationSetTrackingOptions struct {
}
func (*awsAwsquery_serializeOpDeleteConfigurationSetTrackingOptions) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteConfigurationSetTrackingOptions) 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.(*DeleteConfigurationSetTrackingOptionsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteConfigurationSetTrackingOptions")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteConfigurationSetTrackingOptionsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpDeleteCustomVerificationEmailTemplate struct {
}
func (*awsAwsquery_serializeOpDeleteCustomVerificationEmailTemplate) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteCustomVerificationEmailTemplate) 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.(*DeleteCustomVerificationEmailTemplateInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteCustomVerificationEmailTemplate")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteCustomVerificationEmailTemplateInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpDeleteIdentity struct {
}
func (*awsAwsquery_serializeOpDeleteIdentity) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteIdentity) 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.(*DeleteIdentityInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteIdentity")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteIdentityInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpDeleteIdentityPolicy struct {
}
func (*awsAwsquery_serializeOpDeleteIdentityPolicy) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteIdentityPolicy) 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.(*DeleteIdentityPolicyInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteIdentityPolicy")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteIdentityPolicyInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpDeleteReceiptFilter struct {
}
func (*awsAwsquery_serializeOpDeleteReceiptFilter) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteReceiptFilter) 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.(*DeleteReceiptFilterInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteReceiptFilter")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteReceiptFilterInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpDeleteReceiptRule struct {
}
func (*awsAwsquery_serializeOpDeleteReceiptRule) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteReceiptRule) 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.(*DeleteReceiptRuleInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteReceiptRule")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteReceiptRuleInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpDeleteReceiptRuleSet struct {
}
func (*awsAwsquery_serializeOpDeleteReceiptRuleSet) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteReceiptRuleSet) 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.(*DeleteReceiptRuleSetInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteReceiptRuleSet")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteReceiptRuleSetInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpDeleteTemplate struct {
}
func (*awsAwsquery_serializeOpDeleteTemplate) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteTemplate) 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.(*DeleteTemplateInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteTemplate")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteTemplateInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpDeleteVerifiedEmailAddress struct {
}
func (*awsAwsquery_serializeOpDeleteVerifiedEmailAddress) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDeleteVerifiedEmailAddress) 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.(*DeleteVerifiedEmailAddressInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DeleteVerifiedEmailAddress")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentDeleteVerifiedEmailAddressInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpDescribeActiveReceiptRuleSet struct {
}
func (*awsAwsquery_serializeOpDescribeActiveReceiptRuleSet) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeActiveReceiptRuleSet) 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.(*DescribeActiveReceiptRuleSetInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeActiveReceiptRuleSet")
body.Key("Version").String("2010-12-01")
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpDescribeConfigurationSet struct {
}
func (*awsAwsquery_serializeOpDescribeConfigurationSet) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeConfigurationSet) 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.(*DescribeConfigurationSetInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeConfigurationSet")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeConfigurationSetInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpDescribeReceiptRule struct {
}
func (*awsAwsquery_serializeOpDescribeReceiptRule) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeReceiptRule) 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.(*DescribeReceiptRuleInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeReceiptRule")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeReceiptRuleInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpDescribeReceiptRuleSet struct {
}
func (*awsAwsquery_serializeOpDescribeReceiptRuleSet) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpDescribeReceiptRuleSet) 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.(*DescribeReceiptRuleSetInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("DescribeReceiptRuleSet")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentDescribeReceiptRuleSetInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpGetAccountSendingEnabled struct {
}
func (*awsAwsquery_serializeOpGetAccountSendingEnabled) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpGetAccountSendingEnabled) 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.(*GetAccountSendingEnabledInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("GetAccountSendingEnabled")
body.Key("Version").String("2010-12-01")
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpGetCustomVerificationEmailTemplate struct {
}
func (*awsAwsquery_serializeOpGetCustomVerificationEmailTemplate) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpGetCustomVerificationEmailTemplate) 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.(*GetCustomVerificationEmailTemplateInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("GetCustomVerificationEmailTemplate")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentGetCustomVerificationEmailTemplateInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpGetIdentityDkimAttributes struct {
}
func (*awsAwsquery_serializeOpGetIdentityDkimAttributes) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpGetIdentityDkimAttributes) 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.(*GetIdentityDkimAttributesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("GetIdentityDkimAttributes")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentGetIdentityDkimAttributesInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpGetIdentityMailFromDomainAttributes struct {
}
func (*awsAwsquery_serializeOpGetIdentityMailFromDomainAttributes) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpGetIdentityMailFromDomainAttributes) 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.(*GetIdentityMailFromDomainAttributesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("GetIdentityMailFromDomainAttributes")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentGetIdentityMailFromDomainAttributesInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpGetIdentityNotificationAttributes struct {
}
func (*awsAwsquery_serializeOpGetIdentityNotificationAttributes) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpGetIdentityNotificationAttributes) 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.(*GetIdentityNotificationAttributesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("GetIdentityNotificationAttributes")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentGetIdentityNotificationAttributesInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpGetIdentityPolicies struct {
}
func (*awsAwsquery_serializeOpGetIdentityPolicies) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpGetIdentityPolicies) 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.(*GetIdentityPoliciesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("GetIdentityPolicies")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentGetIdentityPoliciesInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpGetIdentityVerificationAttributes struct {
}
func (*awsAwsquery_serializeOpGetIdentityVerificationAttributes) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpGetIdentityVerificationAttributes) 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.(*GetIdentityVerificationAttributesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("GetIdentityVerificationAttributes")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentGetIdentityVerificationAttributesInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpGetSendQuota struct {
}
func (*awsAwsquery_serializeOpGetSendQuota) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpGetSendQuota) 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.(*GetSendQuotaInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("GetSendQuota")
body.Key("Version").String("2010-12-01")
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpGetSendStatistics struct {
}
func (*awsAwsquery_serializeOpGetSendStatistics) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpGetSendStatistics) 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.(*GetSendStatisticsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("GetSendStatistics")
body.Key("Version").String("2010-12-01")
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpGetTemplate struct {
}
func (*awsAwsquery_serializeOpGetTemplate) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpGetTemplate) 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.(*GetTemplateInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("GetTemplate")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentGetTemplateInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpListConfigurationSets struct {
}
func (*awsAwsquery_serializeOpListConfigurationSets) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpListConfigurationSets) 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.(*ListConfigurationSetsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ListConfigurationSets")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentListConfigurationSetsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpListCustomVerificationEmailTemplates struct {
}
func (*awsAwsquery_serializeOpListCustomVerificationEmailTemplates) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpListCustomVerificationEmailTemplates) 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.(*ListCustomVerificationEmailTemplatesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ListCustomVerificationEmailTemplates")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentListCustomVerificationEmailTemplatesInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpListIdentities struct {
}
func (*awsAwsquery_serializeOpListIdentities) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpListIdentities) 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.(*ListIdentitiesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ListIdentities")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentListIdentitiesInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpListIdentityPolicies struct {
}
func (*awsAwsquery_serializeOpListIdentityPolicies) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpListIdentityPolicies) 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.(*ListIdentityPoliciesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ListIdentityPolicies")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentListIdentityPoliciesInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpListReceiptFilters struct {
}
func (*awsAwsquery_serializeOpListReceiptFilters) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpListReceiptFilters) 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.(*ListReceiptFiltersInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ListReceiptFilters")
body.Key("Version").String("2010-12-01")
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpListReceiptRuleSets struct {
}
func (*awsAwsquery_serializeOpListReceiptRuleSets) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpListReceiptRuleSets) 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.(*ListReceiptRuleSetsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ListReceiptRuleSets")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentListReceiptRuleSetsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpListTemplates struct {
}
func (*awsAwsquery_serializeOpListTemplates) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpListTemplates) 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.(*ListTemplatesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ListTemplates")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentListTemplatesInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpListVerifiedEmailAddresses struct {
}
func (*awsAwsquery_serializeOpListVerifiedEmailAddresses) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpListVerifiedEmailAddresses) 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.(*ListVerifiedEmailAddressesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ListVerifiedEmailAddresses")
body.Key("Version").String("2010-12-01")
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpPutConfigurationSetDeliveryOptions struct {
}
func (*awsAwsquery_serializeOpPutConfigurationSetDeliveryOptions) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpPutConfigurationSetDeliveryOptions) 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.(*PutConfigurationSetDeliveryOptionsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("PutConfigurationSetDeliveryOptions")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentPutConfigurationSetDeliveryOptionsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpPutIdentityPolicy struct {
}
func (*awsAwsquery_serializeOpPutIdentityPolicy) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpPutIdentityPolicy) 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.(*PutIdentityPolicyInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("PutIdentityPolicy")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentPutIdentityPolicyInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpReorderReceiptRuleSet struct {
}
func (*awsAwsquery_serializeOpReorderReceiptRuleSet) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpReorderReceiptRuleSet) 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.(*ReorderReceiptRuleSetInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("ReorderReceiptRuleSet")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentReorderReceiptRuleSetInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpSendBounce struct {
}
func (*awsAwsquery_serializeOpSendBounce) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpSendBounce) 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.(*SendBounceInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("SendBounce")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentSendBounceInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpSendBulkTemplatedEmail struct {
}
func (*awsAwsquery_serializeOpSendBulkTemplatedEmail) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpSendBulkTemplatedEmail) 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.(*SendBulkTemplatedEmailInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("SendBulkTemplatedEmail")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentSendBulkTemplatedEmailInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpSendCustomVerificationEmail struct {
}
func (*awsAwsquery_serializeOpSendCustomVerificationEmail) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpSendCustomVerificationEmail) 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.(*SendCustomVerificationEmailInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("SendCustomVerificationEmail")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentSendCustomVerificationEmailInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpSendEmail struct {
}
func (*awsAwsquery_serializeOpSendEmail) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpSendEmail) 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.(*SendEmailInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("SendEmail")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentSendEmailInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpSendRawEmail struct {
}
func (*awsAwsquery_serializeOpSendRawEmail) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpSendRawEmail) 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.(*SendRawEmailInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("SendRawEmail")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentSendRawEmailInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpSendTemplatedEmail struct {
}
func (*awsAwsquery_serializeOpSendTemplatedEmail) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpSendTemplatedEmail) 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.(*SendTemplatedEmailInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("SendTemplatedEmail")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentSendTemplatedEmailInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpSetActiveReceiptRuleSet struct {
}
func (*awsAwsquery_serializeOpSetActiveReceiptRuleSet) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpSetActiveReceiptRuleSet) 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.(*SetActiveReceiptRuleSetInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("SetActiveReceiptRuleSet")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentSetActiveReceiptRuleSetInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpSetIdentityDkimEnabled struct {
}
func (*awsAwsquery_serializeOpSetIdentityDkimEnabled) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpSetIdentityDkimEnabled) 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.(*SetIdentityDkimEnabledInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("SetIdentityDkimEnabled")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentSetIdentityDkimEnabledInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpSetIdentityFeedbackForwardingEnabled struct {
}
func (*awsAwsquery_serializeOpSetIdentityFeedbackForwardingEnabled) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpSetIdentityFeedbackForwardingEnabled) 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.(*SetIdentityFeedbackForwardingEnabledInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("SetIdentityFeedbackForwardingEnabled")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentSetIdentityFeedbackForwardingEnabledInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpSetIdentityHeadersInNotificationsEnabled struct {
}
func (*awsAwsquery_serializeOpSetIdentityHeadersInNotificationsEnabled) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpSetIdentityHeadersInNotificationsEnabled) 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.(*SetIdentityHeadersInNotificationsEnabledInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("SetIdentityHeadersInNotificationsEnabled")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentSetIdentityHeadersInNotificationsEnabledInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpSetIdentityMailFromDomain struct {
}
func (*awsAwsquery_serializeOpSetIdentityMailFromDomain) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpSetIdentityMailFromDomain) 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.(*SetIdentityMailFromDomainInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("SetIdentityMailFromDomain")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentSetIdentityMailFromDomainInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpSetIdentityNotificationTopic struct {
}
func (*awsAwsquery_serializeOpSetIdentityNotificationTopic) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpSetIdentityNotificationTopic) 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.(*SetIdentityNotificationTopicInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("SetIdentityNotificationTopic")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentSetIdentityNotificationTopicInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpSetReceiptRulePosition struct {
}
func (*awsAwsquery_serializeOpSetReceiptRulePosition) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpSetReceiptRulePosition) 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.(*SetReceiptRulePositionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("SetReceiptRulePosition")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentSetReceiptRulePositionInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpTestRenderTemplate struct {
}
func (*awsAwsquery_serializeOpTestRenderTemplate) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpTestRenderTemplate) 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.(*TestRenderTemplateInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("TestRenderTemplate")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentTestRenderTemplateInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpUpdateAccountSendingEnabled struct {
}
func (*awsAwsquery_serializeOpUpdateAccountSendingEnabled) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpUpdateAccountSendingEnabled) 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.(*UpdateAccountSendingEnabledInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("UpdateAccountSendingEnabled")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentUpdateAccountSendingEnabledInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpUpdateConfigurationSetEventDestination struct {
}
func (*awsAwsquery_serializeOpUpdateConfigurationSetEventDestination) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpUpdateConfigurationSetEventDestination) 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.(*UpdateConfigurationSetEventDestinationInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("UpdateConfigurationSetEventDestination")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentUpdateConfigurationSetEventDestinationInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpUpdateConfigurationSetReputationMetricsEnabled struct {
}
func (*awsAwsquery_serializeOpUpdateConfigurationSetReputationMetricsEnabled) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpUpdateConfigurationSetReputationMetricsEnabled) 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.(*UpdateConfigurationSetReputationMetricsEnabledInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("UpdateConfigurationSetReputationMetricsEnabled")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentUpdateConfigurationSetReputationMetricsEnabledInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpUpdateConfigurationSetSendingEnabled struct {
}
func (*awsAwsquery_serializeOpUpdateConfigurationSetSendingEnabled) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpUpdateConfigurationSetSendingEnabled) 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.(*UpdateConfigurationSetSendingEnabledInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("UpdateConfigurationSetSendingEnabled")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentUpdateConfigurationSetSendingEnabledInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpUpdateConfigurationSetTrackingOptions struct {
}
func (*awsAwsquery_serializeOpUpdateConfigurationSetTrackingOptions) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpUpdateConfigurationSetTrackingOptions) 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.(*UpdateConfigurationSetTrackingOptionsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("UpdateConfigurationSetTrackingOptions")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentUpdateConfigurationSetTrackingOptionsInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpUpdateCustomVerificationEmailTemplate struct {
}
func (*awsAwsquery_serializeOpUpdateCustomVerificationEmailTemplate) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpUpdateCustomVerificationEmailTemplate) 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.(*UpdateCustomVerificationEmailTemplateInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("UpdateCustomVerificationEmailTemplate")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentUpdateCustomVerificationEmailTemplateInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpUpdateReceiptRule struct {
}
func (*awsAwsquery_serializeOpUpdateReceiptRule) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpUpdateReceiptRule) 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.(*UpdateReceiptRuleInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("UpdateReceiptRule")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentUpdateReceiptRuleInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpUpdateTemplate struct {
}
func (*awsAwsquery_serializeOpUpdateTemplate) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpUpdateTemplate) 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.(*UpdateTemplateInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("UpdateTemplate")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentUpdateTemplateInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpVerifyDomainDkim struct {
}
func (*awsAwsquery_serializeOpVerifyDomainDkim) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpVerifyDomainDkim) 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.(*VerifyDomainDkimInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("VerifyDomainDkim")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentVerifyDomainDkimInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpVerifyDomainIdentity struct {
}
func (*awsAwsquery_serializeOpVerifyDomainIdentity) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpVerifyDomainIdentity) 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.(*VerifyDomainIdentityInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("VerifyDomainIdentity")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentVerifyDomainIdentityInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpVerifyEmailAddress struct {
}
func (*awsAwsquery_serializeOpVerifyEmailAddress) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpVerifyEmailAddress) 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.(*VerifyEmailAddressInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("VerifyEmailAddress")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentVerifyEmailAddressInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
type awsAwsquery_serializeOpVerifyEmailIdentity struct {
}
func (*awsAwsquery_serializeOpVerifyEmailIdentity) ID() string {
return "OperationSerializer"
}
func (m *awsAwsquery_serializeOpVerifyEmailIdentity) 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.(*VerifyEmailIdentityInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
operationPath := "/"
if len(request.Request.URL.Path) == 0 {
request.Request.URL.Path = operationPath
} else {
request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
request.Request.URL.Path += "/"
}
}
request.Request.Method = "POST"
httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
bodyWriter := bytes.NewBuffer(nil)
bodyEncoder := query.NewEncoder(bodyWriter)
body := bodyEncoder.Object()
body.Key("Action").String("VerifyEmailIdentity")
body.Key("Version").String("2010-12-01")
if err := awsAwsquery_serializeOpDocumentVerifyEmailIdentityInput(input, bodyEncoder.Value); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
err = bodyEncoder.Encode()
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsAwsquery_serializeDocumentAddHeaderAction(v *types.AddHeaderAction, value query.Value) error {
object := value.Object()
_ = object
if v.HeaderName != nil {
objectKey := object.Key("HeaderName")
objectKey.String(*v.HeaderName)
}
if v.HeaderValue != nil {
objectKey := object.Key("HeaderValue")
objectKey.String(*v.HeaderValue)
}
return nil
}
func awsAwsquery_serializeDocumentAddressList(v []string, value query.Value) error {
array := value.Array("member")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentBody(v *types.Body, value query.Value) error {
object := value.Object()
_ = object
if v.Html != nil {
objectKey := object.Key("Html")
if err := awsAwsquery_serializeDocumentContent(v.Html, objectKey); err != nil {
return err
}
}
if v.Text != nil {
objectKey := object.Key("Text")
if err := awsAwsquery_serializeDocumentContent(v.Text, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentBounceAction(v *types.BounceAction, value query.Value) error {
object := value.Object()
_ = object
if v.Message != nil {
objectKey := object.Key("Message")
objectKey.String(*v.Message)
}
if v.Sender != nil {
objectKey := object.Key("Sender")
objectKey.String(*v.Sender)
}
if v.SmtpReplyCode != nil {
objectKey := object.Key("SmtpReplyCode")
objectKey.String(*v.SmtpReplyCode)
}
if v.StatusCode != nil {
objectKey := object.Key("StatusCode")
objectKey.String(*v.StatusCode)
}
if v.TopicArn != nil {
objectKey := object.Key("TopicArn")
objectKey.String(*v.TopicArn)
}
return nil
}
func awsAwsquery_serializeDocumentBouncedRecipientInfo(v *types.BouncedRecipientInfo, value query.Value) error {
object := value.Object()
_ = object
if len(v.BounceType) > 0 {
objectKey := object.Key("BounceType")
objectKey.String(string(v.BounceType))
}
if v.Recipient != nil {
objectKey := object.Key("Recipient")
objectKey.String(*v.Recipient)
}
if v.RecipientArn != nil {
objectKey := object.Key("RecipientArn")
objectKey.String(*v.RecipientArn)
}
if v.RecipientDsnFields != nil {
objectKey := object.Key("RecipientDsnFields")
if err := awsAwsquery_serializeDocumentRecipientDsnFields(v.RecipientDsnFields, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentBouncedRecipientInfoList(v []types.BouncedRecipientInfo, value query.Value) error {
array := value.Array("member")
for i := range v {
av := array.Value()
if err := awsAwsquery_serializeDocumentBouncedRecipientInfo(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentBulkEmailDestination(v *types.BulkEmailDestination, value query.Value) error {
object := value.Object()
_ = object
if v.Destination != nil {
objectKey := object.Key("Destination")
if err := awsAwsquery_serializeDocumentDestination(v.Destination, objectKey); err != nil {
return err
}
}
if v.ReplacementTags != nil {
objectKey := object.Key("ReplacementTags")
if err := awsAwsquery_serializeDocumentMessageTagList(v.ReplacementTags, objectKey); err != nil {
return err
}
}
if v.ReplacementTemplateData != nil {
objectKey := object.Key("ReplacementTemplateData")
objectKey.String(*v.ReplacementTemplateData)
}
return nil
}
func awsAwsquery_serializeDocumentBulkEmailDestinationList(v []types.BulkEmailDestination, value query.Value) error {
array := value.Array("member")
for i := range v {
av := array.Value()
if err := awsAwsquery_serializeDocumentBulkEmailDestination(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentCloudWatchDestination(v *types.CloudWatchDestination, value query.Value) error {
object := value.Object()
_ = object
if v.DimensionConfigurations != nil {
objectKey := object.Key("DimensionConfigurations")
if err := awsAwsquery_serializeDocumentCloudWatchDimensionConfigurations(v.DimensionConfigurations, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentCloudWatchDimensionConfiguration(v *types.CloudWatchDimensionConfiguration, value query.Value) error {
object := value.Object()
_ = object
if v.DefaultDimensionValue != nil {
objectKey := object.Key("DefaultDimensionValue")
objectKey.String(*v.DefaultDimensionValue)
}
if v.DimensionName != nil {
objectKey := object.Key("DimensionName")
objectKey.String(*v.DimensionName)
}
if len(v.DimensionValueSource) > 0 {
objectKey := object.Key("DimensionValueSource")
objectKey.String(string(v.DimensionValueSource))
}
return nil
}
func awsAwsquery_serializeDocumentCloudWatchDimensionConfigurations(v []types.CloudWatchDimensionConfiguration, value query.Value) error {
array := value.Array("member")
for i := range v {
av := array.Value()
if err := awsAwsquery_serializeDocumentCloudWatchDimensionConfiguration(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentConfigurationSet(v *types.ConfigurationSet, value query.Value) error {
object := value.Object()
_ = object
if v.Name != nil {
objectKey := object.Key("Name")
objectKey.String(*v.Name)
}
return nil
}
func awsAwsquery_serializeDocumentConfigurationSetAttributeList(v []types.ConfigurationSetAttribute, value query.Value) error {
array := value.Array("member")
for i := range v {
av := array.Value()
av.String(string(v[i]))
}
return nil
}
func awsAwsquery_serializeDocumentContent(v *types.Content, value query.Value) error {
object := value.Object()
_ = object
if v.Charset != nil {
objectKey := object.Key("Charset")
objectKey.String(*v.Charset)
}
if v.Data != nil {
objectKey := object.Key("Data")
objectKey.String(*v.Data)
}
return nil
}
func awsAwsquery_serializeDocumentDeliveryOptions(v *types.DeliveryOptions, value query.Value) error {
object := value.Object()
_ = object
if len(v.TlsPolicy) > 0 {
objectKey := object.Key("TlsPolicy")
objectKey.String(string(v.TlsPolicy))
}
return nil
}
func awsAwsquery_serializeDocumentDestination(v *types.Destination, value query.Value) error {
object := value.Object()
_ = object
if v.BccAddresses != nil {
objectKey := object.Key("BccAddresses")
if err := awsAwsquery_serializeDocumentAddressList(v.BccAddresses, objectKey); err != nil {
return err
}
}
if v.CcAddresses != nil {
objectKey := object.Key("CcAddresses")
if err := awsAwsquery_serializeDocumentAddressList(v.CcAddresses, objectKey); err != nil {
return err
}
}
if v.ToAddresses != nil {
objectKey := object.Key("ToAddresses")
if err := awsAwsquery_serializeDocumentAddressList(v.ToAddresses, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentEventDestination(v *types.EventDestination, value query.Value) error {
object := value.Object()
_ = object
if v.CloudWatchDestination != nil {
objectKey := object.Key("CloudWatchDestination")
if err := awsAwsquery_serializeDocumentCloudWatchDestination(v.CloudWatchDestination, objectKey); err != nil {
return err
}
}
if v.Enabled {
objectKey := object.Key("Enabled")
objectKey.Boolean(v.Enabled)
}
if v.KinesisFirehoseDestination != nil {
objectKey := object.Key("KinesisFirehoseDestination")
if err := awsAwsquery_serializeDocumentKinesisFirehoseDestination(v.KinesisFirehoseDestination, objectKey); err != nil {
return err
}
}
if v.MatchingEventTypes != nil {
objectKey := object.Key("MatchingEventTypes")
if err := awsAwsquery_serializeDocumentEventTypes(v.MatchingEventTypes, objectKey); err != nil {
return err
}
}
if v.Name != nil {
objectKey := object.Key("Name")
objectKey.String(*v.Name)
}
if v.SNSDestination != nil {
objectKey := object.Key("SNSDestination")
if err := awsAwsquery_serializeDocumentSNSDestination(v.SNSDestination, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentEventTypes(v []types.EventType, value query.Value) error {
array := value.Array("member")
for i := range v {
av := array.Value()
av.String(string(v[i]))
}
return nil
}
func awsAwsquery_serializeDocumentExtensionField(v *types.ExtensionField, value query.Value) error {
object := value.Object()
_ = object
if v.Name != nil {
objectKey := object.Key("Name")
objectKey.String(*v.Name)
}
if v.Value != nil {
objectKey := object.Key("Value")
objectKey.String(*v.Value)
}
return nil
}
func awsAwsquery_serializeDocumentExtensionFieldList(v []types.ExtensionField, value query.Value) error {
array := value.Array("member")
for i := range v {
av := array.Value()
if err := awsAwsquery_serializeDocumentExtensionField(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentIdentityList(v []string, value query.Value) error {
array := value.Array("member")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentKinesisFirehoseDestination(v *types.KinesisFirehoseDestination, value query.Value) error {
object := value.Object()
_ = object
if v.DeliveryStreamARN != nil {
objectKey := object.Key("DeliveryStreamARN")
objectKey.String(*v.DeliveryStreamARN)
}
if v.IAMRoleARN != nil {
objectKey := object.Key("IAMRoleARN")
objectKey.String(*v.IAMRoleARN)
}
return nil
}
func awsAwsquery_serializeDocumentLambdaAction(v *types.LambdaAction, value query.Value) error {
object := value.Object()
_ = object
if v.FunctionArn != nil {
objectKey := object.Key("FunctionArn")
objectKey.String(*v.FunctionArn)
}
if len(v.InvocationType) > 0 {
objectKey := object.Key("InvocationType")
objectKey.String(string(v.InvocationType))
}
if v.TopicArn != nil {
objectKey := object.Key("TopicArn")
objectKey.String(*v.TopicArn)
}
return nil
}
func awsAwsquery_serializeDocumentMessage(v *types.Message, value query.Value) error {
object := value.Object()
_ = object
if v.Body != nil {
objectKey := object.Key("Body")
if err := awsAwsquery_serializeDocumentBody(v.Body, objectKey); err != nil {
return err
}
}
if v.Subject != nil {
objectKey := object.Key("Subject")
if err := awsAwsquery_serializeDocumentContent(v.Subject, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentMessageDsn(v *types.MessageDsn, value query.Value) error {
object := value.Object()
_ = object
if v.ArrivalDate != nil {
objectKey := object.Key("ArrivalDate")
objectKey.String(smithytime.FormatDateTime(*v.ArrivalDate))
}
if v.ExtensionFields != nil {
objectKey := object.Key("ExtensionFields")
if err := awsAwsquery_serializeDocumentExtensionFieldList(v.ExtensionFields, objectKey); err != nil {
return err
}
}
if v.ReportingMta != nil {
objectKey := object.Key("ReportingMta")
objectKey.String(*v.ReportingMta)
}
return nil
}
func awsAwsquery_serializeDocumentMessageTag(v *types.MessageTag, value query.Value) error {
object := value.Object()
_ = object
if v.Name != nil {
objectKey := object.Key("Name")
objectKey.String(*v.Name)
}
if v.Value != nil {
objectKey := object.Key("Value")
objectKey.String(*v.Value)
}
return nil
}
func awsAwsquery_serializeDocumentMessageTagList(v []types.MessageTag, value query.Value) error {
array := value.Array("member")
for i := range v {
av := array.Value()
if err := awsAwsquery_serializeDocumentMessageTag(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentPolicyNameList(v []string, value query.Value) error {
array := value.Array("member")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentRawMessage(v *types.RawMessage, value query.Value) error {
object := value.Object()
_ = object
if v.Data != nil {
objectKey := object.Key("Data")
objectKey.Base64EncodeBytes(v.Data)
}
return nil
}
func awsAwsquery_serializeDocumentReceiptAction(v *types.ReceiptAction, value query.Value) error {
object := value.Object()
_ = object
if v.AddHeaderAction != nil {
objectKey := object.Key("AddHeaderAction")
if err := awsAwsquery_serializeDocumentAddHeaderAction(v.AddHeaderAction, objectKey); err != nil {
return err
}
}
if v.BounceAction != nil {
objectKey := object.Key("BounceAction")
if err := awsAwsquery_serializeDocumentBounceAction(v.BounceAction, objectKey); err != nil {
return err
}
}
if v.LambdaAction != nil {
objectKey := object.Key("LambdaAction")
if err := awsAwsquery_serializeDocumentLambdaAction(v.LambdaAction, objectKey); err != nil {
return err
}
}
if v.S3Action != nil {
objectKey := object.Key("S3Action")
if err := awsAwsquery_serializeDocumentS3Action(v.S3Action, objectKey); err != nil {
return err
}
}
if v.SNSAction != nil {
objectKey := object.Key("SNSAction")
if err := awsAwsquery_serializeDocumentSNSAction(v.SNSAction, objectKey); err != nil {
return err
}
}
if v.StopAction != nil {
objectKey := object.Key("StopAction")
if err := awsAwsquery_serializeDocumentStopAction(v.StopAction, objectKey); err != nil {
return err
}
}
if v.WorkmailAction != nil {
objectKey := object.Key("WorkmailAction")
if err := awsAwsquery_serializeDocumentWorkmailAction(v.WorkmailAction, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentReceiptActionsList(v []types.ReceiptAction, value query.Value) error {
array := value.Array("member")
for i := range v {
av := array.Value()
if err := awsAwsquery_serializeDocumentReceiptAction(&v[i], av); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeDocumentReceiptFilter(v *types.ReceiptFilter, value query.Value) error {
object := value.Object()
_ = object
if v.IpFilter != nil {
objectKey := object.Key("IpFilter")
if err := awsAwsquery_serializeDocumentReceiptIpFilter(v.IpFilter, objectKey); err != nil {
return err
}
}
if v.Name != nil {
objectKey := object.Key("Name")
objectKey.String(*v.Name)
}
return nil
}
func awsAwsquery_serializeDocumentReceiptIpFilter(v *types.ReceiptIpFilter, value query.Value) error {
object := value.Object()
_ = object
if v.Cidr != nil {
objectKey := object.Key("Cidr")
objectKey.String(*v.Cidr)
}
if len(v.Policy) > 0 {
objectKey := object.Key("Policy")
objectKey.String(string(v.Policy))
}
return nil
}
func awsAwsquery_serializeDocumentReceiptRule(v *types.ReceiptRule, value query.Value) error {
object := value.Object()
_ = object
if v.Actions != nil {
objectKey := object.Key("Actions")
if err := awsAwsquery_serializeDocumentReceiptActionsList(v.Actions, objectKey); err != nil {
return err
}
}
if v.Enabled {
objectKey := object.Key("Enabled")
objectKey.Boolean(v.Enabled)
}
if v.Name != nil {
objectKey := object.Key("Name")
objectKey.String(*v.Name)
}
if v.Recipients != nil {
objectKey := object.Key("Recipients")
if err := awsAwsquery_serializeDocumentRecipientsList(v.Recipients, objectKey); err != nil {
return err
}
}
if v.ScanEnabled {
objectKey := object.Key("ScanEnabled")
objectKey.Boolean(v.ScanEnabled)
}
if len(v.TlsPolicy) > 0 {
objectKey := object.Key("TlsPolicy")
objectKey.String(string(v.TlsPolicy))
}
return nil
}
func awsAwsquery_serializeDocumentReceiptRuleNamesList(v []string, value query.Value) error {
array := value.Array("member")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentRecipientDsnFields(v *types.RecipientDsnFields, value query.Value) error {
object := value.Object()
_ = object
if len(v.Action) > 0 {
objectKey := object.Key("Action")
objectKey.String(string(v.Action))
}
if v.DiagnosticCode != nil {
objectKey := object.Key("DiagnosticCode")
objectKey.String(*v.DiagnosticCode)
}
if v.ExtensionFields != nil {
objectKey := object.Key("ExtensionFields")
if err := awsAwsquery_serializeDocumentExtensionFieldList(v.ExtensionFields, objectKey); err != nil {
return err
}
}
if v.FinalRecipient != nil {
objectKey := object.Key("FinalRecipient")
objectKey.String(*v.FinalRecipient)
}
if v.LastAttemptDate != nil {
objectKey := object.Key("LastAttemptDate")
objectKey.String(smithytime.FormatDateTime(*v.LastAttemptDate))
}
if v.RemoteMta != nil {
objectKey := object.Key("RemoteMta")
objectKey.String(*v.RemoteMta)
}
if v.Status != nil {
objectKey := object.Key("Status")
objectKey.String(*v.Status)
}
return nil
}
func awsAwsquery_serializeDocumentRecipientsList(v []string, value query.Value) error {
array := value.Array("member")
for i := range v {
av := array.Value()
av.String(v[i])
}
return nil
}
func awsAwsquery_serializeDocumentS3Action(v *types.S3Action, value query.Value) error {
object := value.Object()
_ = object
if v.BucketName != nil {
objectKey := object.Key("BucketName")
objectKey.String(*v.BucketName)
}
if v.KmsKeyArn != nil {
objectKey := object.Key("KmsKeyArn")
objectKey.String(*v.KmsKeyArn)
}
if v.ObjectKeyPrefix != nil {
objectKey := object.Key("ObjectKeyPrefix")
objectKey.String(*v.ObjectKeyPrefix)
}
if v.TopicArn != nil {
objectKey := object.Key("TopicArn")
objectKey.String(*v.TopicArn)
}
return nil
}
func awsAwsquery_serializeDocumentSNSAction(v *types.SNSAction, value query.Value) error {
object := value.Object()
_ = object
if len(v.Encoding) > 0 {
objectKey := object.Key("Encoding")
objectKey.String(string(v.Encoding))
}
if v.TopicArn != nil {
objectKey := object.Key("TopicArn")
objectKey.String(*v.TopicArn)
}
return nil
}
func awsAwsquery_serializeDocumentSNSDestination(v *types.SNSDestination, value query.Value) error {
object := value.Object()
_ = object
if v.TopicARN != nil {
objectKey := object.Key("TopicARN")
objectKey.String(*v.TopicARN)
}
return nil
}
func awsAwsquery_serializeDocumentStopAction(v *types.StopAction, value query.Value) error {
object := value.Object()
_ = object
if len(v.Scope) > 0 {
objectKey := object.Key("Scope")
objectKey.String(string(v.Scope))
}
if v.TopicArn != nil {
objectKey := object.Key("TopicArn")
objectKey.String(*v.TopicArn)
}
return nil
}
func awsAwsquery_serializeDocumentTemplate(v *types.Template, value query.Value) error {
object := value.Object()
_ = object
if v.HtmlPart != nil {
objectKey := object.Key("HtmlPart")
objectKey.String(*v.HtmlPart)
}
if v.SubjectPart != nil {
objectKey := object.Key("SubjectPart")
objectKey.String(*v.SubjectPart)
}
if v.TemplateName != nil {
objectKey := object.Key("TemplateName")
objectKey.String(*v.TemplateName)
}
if v.TextPart != nil {
objectKey := object.Key("TextPart")
objectKey.String(*v.TextPart)
}
return nil
}
func awsAwsquery_serializeDocumentTrackingOptions(v *types.TrackingOptions, value query.Value) error {
object := value.Object()
_ = object
if v.CustomRedirectDomain != nil {
objectKey := object.Key("CustomRedirectDomain")
objectKey.String(*v.CustomRedirectDomain)
}
return nil
}
func awsAwsquery_serializeDocumentWorkmailAction(v *types.WorkmailAction, value query.Value) error {
object := value.Object()
_ = object
if v.OrganizationArn != nil {
objectKey := object.Key("OrganizationArn")
objectKey.String(*v.OrganizationArn)
}
if v.TopicArn != nil {
objectKey := object.Key("TopicArn")
objectKey.String(*v.TopicArn)
}
return nil
}
func awsAwsquery_serializeOpDocumentCloneReceiptRuleSetInput(v *CloneReceiptRuleSetInput, value query.Value) error {
object := value.Object()
_ = object
if v.OriginalRuleSetName != nil {
objectKey := object.Key("OriginalRuleSetName")
objectKey.String(*v.OriginalRuleSetName)
}
if v.RuleSetName != nil {
objectKey := object.Key("RuleSetName")
objectKey.String(*v.RuleSetName)
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateConfigurationSetEventDestinationInput(v *CreateConfigurationSetEventDestinationInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConfigurationSetName != nil {
objectKey := object.Key("ConfigurationSetName")
objectKey.String(*v.ConfigurationSetName)
}
if v.EventDestination != nil {
objectKey := object.Key("EventDestination")
if err := awsAwsquery_serializeDocumentEventDestination(v.EventDestination, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateConfigurationSetInput(v *CreateConfigurationSetInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConfigurationSet != nil {
objectKey := object.Key("ConfigurationSet")
if err := awsAwsquery_serializeDocumentConfigurationSet(v.ConfigurationSet, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateConfigurationSetTrackingOptionsInput(v *CreateConfigurationSetTrackingOptionsInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConfigurationSetName != nil {
objectKey := object.Key("ConfigurationSetName")
objectKey.String(*v.ConfigurationSetName)
}
if v.TrackingOptions != nil {
objectKey := object.Key("TrackingOptions")
if err := awsAwsquery_serializeDocumentTrackingOptions(v.TrackingOptions, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateCustomVerificationEmailTemplateInput(v *CreateCustomVerificationEmailTemplateInput, value query.Value) error {
object := value.Object()
_ = object
if v.FailureRedirectionURL != nil {
objectKey := object.Key("FailureRedirectionURL")
objectKey.String(*v.FailureRedirectionURL)
}
if v.FromEmailAddress != nil {
objectKey := object.Key("FromEmailAddress")
objectKey.String(*v.FromEmailAddress)
}
if v.SuccessRedirectionURL != nil {
objectKey := object.Key("SuccessRedirectionURL")
objectKey.String(*v.SuccessRedirectionURL)
}
if v.TemplateContent != nil {
objectKey := object.Key("TemplateContent")
objectKey.String(*v.TemplateContent)
}
if v.TemplateName != nil {
objectKey := object.Key("TemplateName")
objectKey.String(*v.TemplateName)
}
if v.TemplateSubject != nil {
objectKey := object.Key("TemplateSubject")
objectKey.String(*v.TemplateSubject)
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateReceiptFilterInput(v *CreateReceiptFilterInput, value query.Value) error {
object := value.Object()
_ = object
if v.Filter != nil {
objectKey := object.Key("Filter")
if err := awsAwsquery_serializeDocumentReceiptFilter(v.Filter, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateReceiptRuleInput(v *CreateReceiptRuleInput, value query.Value) error {
object := value.Object()
_ = object
if v.After != nil {
objectKey := object.Key("After")
objectKey.String(*v.After)
}
if v.Rule != nil {
objectKey := object.Key("Rule")
if err := awsAwsquery_serializeDocumentReceiptRule(v.Rule, objectKey); err != nil {
return err
}
}
if v.RuleSetName != nil {
objectKey := object.Key("RuleSetName")
objectKey.String(*v.RuleSetName)
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateReceiptRuleSetInput(v *CreateReceiptRuleSetInput, value query.Value) error {
object := value.Object()
_ = object
if v.RuleSetName != nil {
objectKey := object.Key("RuleSetName")
objectKey.String(*v.RuleSetName)
}
return nil
}
func awsAwsquery_serializeOpDocumentCreateTemplateInput(v *CreateTemplateInput, value query.Value) error {
object := value.Object()
_ = object
if v.Template != nil {
objectKey := object.Key("Template")
if err := awsAwsquery_serializeDocumentTemplate(v.Template, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteConfigurationSetEventDestinationInput(v *DeleteConfigurationSetEventDestinationInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConfigurationSetName != nil {
objectKey := object.Key("ConfigurationSetName")
objectKey.String(*v.ConfigurationSetName)
}
if v.EventDestinationName != nil {
objectKey := object.Key("EventDestinationName")
objectKey.String(*v.EventDestinationName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteConfigurationSetInput(v *DeleteConfigurationSetInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConfigurationSetName != nil {
objectKey := object.Key("ConfigurationSetName")
objectKey.String(*v.ConfigurationSetName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteConfigurationSetTrackingOptionsInput(v *DeleteConfigurationSetTrackingOptionsInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConfigurationSetName != nil {
objectKey := object.Key("ConfigurationSetName")
objectKey.String(*v.ConfigurationSetName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteCustomVerificationEmailTemplateInput(v *DeleteCustomVerificationEmailTemplateInput, value query.Value) error {
object := value.Object()
_ = object
if v.TemplateName != nil {
objectKey := object.Key("TemplateName")
objectKey.String(*v.TemplateName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteIdentityInput(v *DeleteIdentityInput, value query.Value) error {
object := value.Object()
_ = object
if v.Identity != nil {
objectKey := object.Key("Identity")
objectKey.String(*v.Identity)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteIdentityPolicyInput(v *DeleteIdentityPolicyInput, value query.Value) error {
object := value.Object()
_ = object
if v.Identity != nil {
objectKey := object.Key("Identity")
objectKey.String(*v.Identity)
}
if v.PolicyName != nil {
objectKey := object.Key("PolicyName")
objectKey.String(*v.PolicyName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteReceiptFilterInput(v *DeleteReceiptFilterInput, value query.Value) error {
object := value.Object()
_ = object
if v.FilterName != nil {
objectKey := object.Key("FilterName")
objectKey.String(*v.FilterName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteReceiptRuleInput(v *DeleteReceiptRuleInput, value query.Value) error {
object := value.Object()
_ = object
if v.RuleName != nil {
objectKey := object.Key("RuleName")
objectKey.String(*v.RuleName)
}
if v.RuleSetName != nil {
objectKey := object.Key("RuleSetName")
objectKey.String(*v.RuleSetName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteReceiptRuleSetInput(v *DeleteReceiptRuleSetInput, value query.Value) error {
object := value.Object()
_ = object
if v.RuleSetName != nil {
objectKey := object.Key("RuleSetName")
objectKey.String(*v.RuleSetName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteTemplateInput(v *DeleteTemplateInput, value query.Value) error {
object := value.Object()
_ = object
if v.TemplateName != nil {
objectKey := object.Key("TemplateName")
objectKey.String(*v.TemplateName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDeleteVerifiedEmailAddressInput(v *DeleteVerifiedEmailAddressInput, value query.Value) error {
object := value.Object()
_ = object
if v.EmailAddress != nil {
objectKey := object.Key("EmailAddress")
objectKey.String(*v.EmailAddress)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeActiveReceiptRuleSetInput(v *DescribeActiveReceiptRuleSetInput, value query.Value) error {
object := value.Object()
_ = object
return nil
}
func awsAwsquery_serializeOpDocumentDescribeConfigurationSetInput(v *DescribeConfigurationSetInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConfigurationSetAttributeNames != nil {
objectKey := object.Key("ConfigurationSetAttributeNames")
if err := awsAwsquery_serializeDocumentConfigurationSetAttributeList(v.ConfigurationSetAttributeNames, objectKey); err != nil {
return err
}
}
if v.ConfigurationSetName != nil {
objectKey := object.Key("ConfigurationSetName")
objectKey.String(*v.ConfigurationSetName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeReceiptRuleInput(v *DescribeReceiptRuleInput, value query.Value) error {
object := value.Object()
_ = object
if v.RuleName != nil {
objectKey := object.Key("RuleName")
objectKey.String(*v.RuleName)
}
if v.RuleSetName != nil {
objectKey := object.Key("RuleSetName")
objectKey.String(*v.RuleSetName)
}
return nil
}
func awsAwsquery_serializeOpDocumentDescribeReceiptRuleSetInput(v *DescribeReceiptRuleSetInput, value query.Value) error {
object := value.Object()
_ = object
if v.RuleSetName != nil {
objectKey := object.Key("RuleSetName")
objectKey.String(*v.RuleSetName)
}
return nil
}
func awsAwsquery_serializeOpDocumentGetCustomVerificationEmailTemplateInput(v *GetCustomVerificationEmailTemplateInput, value query.Value) error {
object := value.Object()
_ = object
if v.TemplateName != nil {
objectKey := object.Key("TemplateName")
objectKey.String(*v.TemplateName)
}
return nil
}
func awsAwsquery_serializeOpDocumentGetIdentityDkimAttributesInput(v *GetIdentityDkimAttributesInput, value query.Value) error {
object := value.Object()
_ = object
if v.Identities != nil {
objectKey := object.Key("Identities")
if err := awsAwsquery_serializeDocumentIdentityList(v.Identities, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentGetIdentityMailFromDomainAttributesInput(v *GetIdentityMailFromDomainAttributesInput, value query.Value) error {
object := value.Object()
_ = object
if v.Identities != nil {
objectKey := object.Key("Identities")
if err := awsAwsquery_serializeDocumentIdentityList(v.Identities, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentGetIdentityNotificationAttributesInput(v *GetIdentityNotificationAttributesInput, value query.Value) error {
object := value.Object()
_ = object
if v.Identities != nil {
objectKey := object.Key("Identities")
if err := awsAwsquery_serializeDocumentIdentityList(v.Identities, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentGetIdentityPoliciesInput(v *GetIdentityPoliciesInput, value query.Value) error {
object := value.Object()
_ = object
if v.Identity != nil {
objectKey := object.Key("Identity")
objectKey.String(*v.Identity)
}
if v.PolicyNames != nil {
objectKey := object.Key("PolicyNames")
if err := awsAwsquery_serializeDocumentPolicyNameList(v.PolicyNames, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentGetIdentityVerificationAttributesInput(v *GetIdentityVerificationAttributesInput, value query.Value) error {
object := value.Object()
_ = object
if v.Identities != nil {
objectKey := object.Key("Identities")
if err := awsAwsquery_serializeDocumentIdentityList(v.Identities, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentGetTemplateInput(v *GetTemplateInput, value query.Value) error {
object := value.Object()
_ = object
if v.TemplateName != nil {
objectKey := object.Key("TemplateName")
objectKey.String(*v.TemplateName)
}
return nil
}
func awsAwsquery_serializeOpDocumentListConfigurationSetsInput(v *ListConfigurationSetsInput, value query.Value) error {
object := value.Object()
_ = object
if v.MaxItems != nil {
objectKey := object.Key("MaxItems")
objectKey.Integer(*v.MaxItems)
}
if v.NextToken != nil {
objectKey := object.Key("NextToken")
objectKey.String(*v.NextToken)
}
return nil
}
func awsAwsquery_serializeOpDocumentListCustomVerificationEmailTemplatesInput(v *ListCustomVerificationEmailTemplatesInput, value query.Value) error {
object := value.Object()
_ = object
if v.MaxResults != nil {
objectKey := object.Key("MaxResults")
objectKey.Integer(*v.MaxResults)
}
if v.NextToken != nil {
objectKey := object.Key("NextToken")
objectKey.String(*v.NextToken)
}
return nil
}
func awsAwsquery_serializeOpDocumentListIdentitiesInput(v *ListIdentitiesInput, value query.Value) error {
object := value.Object()
_ = object
if len(v.IdentityType) > 0 {
objectKey := object.Key("IdentityType")
objectKey.String(string(v.IdentityType))
}
if v.MaxItems != nil {
objectKey := object.Key("MaxItems")
objectKey.Integer(*v.MaxItems)
}
if v.NextToken != nil {
objectKey := object.Key("NextToken")
objectKey.String(*v.NextToken)
}
return nil
}
func awsAwsquery_serializeOpDocumentListIdentityPoliciesInput(v *ListIdentityPoliciesInput, value query.Value) error {
object := value.Object()
_ = object
if v.Identity != nil {
objectKey := object.Key("Identity")
objectKey.String(*v.Identity)
}
return nil
}
func awsAwsquery_serializeOpDocumentListReceiptFiltersInput(v *ListReceiptFiltersInput, value query.Value) error {
object := value.Object()
_ = object
return nil
}
func awsAwsquery_serializeOpDocumentListReceiptRuleSetsInput(v *ListReceiptRuleSetsInput, value query.Value) error {
object := value.Object()
_ = object
if v.NextToken != nil {
objectKey := object.Key("NextToken")
objectKey.String(*v.NextToken)
}
return nil
}
func awsAwsquery_serializeOpDocumentListTemplatesInput(v *ListTemplatesInput, value query.Value) error {
object := value.Object()
_ = object
if v.MaxItems != nil {
objectKey := object.Key("MaxItems")
objectKey.Integer(*v.MaxItems)
}
if v.NextToken != nil {
objectKey := object.Key("NextToken")
objectKey.String(*v.NextToken)
}
return nil
}
func awsAwsquery_serializeOpDocumentPutConfigurationSetDeliveryOptionsInput(v *PutConfigurationSetDeliveryOptionsInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConfigurationSetName != nil {
objectKey := object.Key("ConfigurationSetName")
objectKey.String(*v.ConfigurationSetName)
}
if v.DeliveryOptions != nil {
objectKey := object.Key("DeliveryOptions")
if err := awsAwsquery_serializeDocumentDeliveryOptions(v.DeliveryOptions, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentPutIdentityPolicyInput(v *PutIdentityPolicyInput, value query.Value) error {
object := value.Object()
_ = object
if v.Identity != nil {
objectKey := object.Key("Identity")
objectKey.String(*v.Identity)
}
if v.Policy != nil {
objectKey := object.Key("Policy")
objectKey.String(*v.Policy)
}
if v.PolicyName != nil {
objectKey := object.Key("PolicyName")
objectKey.String(*v.PolicyName)
}
return nil
}
func awsAwsquery_serializeOpDocumentReorderReceiptRuleSetInput(v *ReorderReceiptRuleSetInput, value query.Value) error {
object := value.Object()
_ = object
if v.RuleNames != nil {
objectKey := object.Key("RuleNames")
if err := awsAwsquery_serializeDocumentReceiptRuleNamesList(v.RuleNames, objectKey); err != nil {
return err
}
}
if v.RuleSetName != nil {
objectKey := object.Key("RuleSetName")
objectKey.String(*v.RuleSetName)
}
return nil
}
func awsAwsquery_serializeOpDocumentSendBounceInput(v *SendBounceInput, value query.Value) error {
object := value.Object()
_ = object
if v.BouncedRecipientInfoList != nil {
objectKey := object.Key("BouncedRecipientInfoList")
if err := awsAwsquery_serializeDocumentBouncedRecipientInfoList(v.BouncedRecipientInfoList, objectKey); err != nil {
return err
}
}
if v.BounceSender != nil {
objectKey := object.Key("BounceSender")
objectKey.String(*v.BounceSender)
}
if v.BounceSenderArn != nil {
objectKey := object.Key("BounceSenderArn")
objectKey.String(*v.BounceSenderArn)
}
if v.Explanation != nil {
objectKey := object.Key("Explanation")
objectKey.String(*v.Explanation)
}
if v.MessageDsn != nil {
objectKey := object.Key("MessageDsn")
if err := awsAwsquery_serializeDocumentMessageDsn(v.MessageDsn, objectKey); err != nil {
return err
}
}
if v.OriginalMessageId != nil {
objectKey := object.Key("OriginalMessageId")
objectKey.String(*v.OriginalMessageId)
}
return nil
}
func awsAwsquery_serializeOpDocumentSendBulkTemplatedEmailInput(v *SendBulkTemplatedEmailInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConfigurationSetName != nil {
objectKey := object.Key("ConfigurationSetName")
objectKey.String(*v.ConfigurationSetName)
}
if v.DefaultTags != nil {
objectKey := object.Key("DefaultTags")
if err := awsAwsquery_serializeDocumentMessageTagList(v.DefaultTags, objectKey); err != nil {
return err
}
}
if v.DefaultTemplateData != nil {
objectKey := object.Key("DefaultTemplateData")
objectKey.String(*v.DefaultTemplateData)
}
if v.Destinations != nil {
objectKey := object.Key("Destinations")
if err := awsAwsquery_serializeDocumentBulkEmailDestinationList(v.Destinations, objectKey); err != nil {
return err
}
}
if v.ReplyToAddresses != nil {
objectKey := object.Key("ReplyToAddresses")
if err := awsAwsquery_serializeDocumentAddressList(v.ReplyToAddresses, objectKey); err != nil {
return err
}
}
if v.ReturnPath != nil {
objectKey := object.Key("ReturnPath")
objectKey.String(*v.ReturnPath)
}
if v.ReturnPathArn != nil {
objectKey := object.Key("ReturnPathArn")
objectKey.String(*v.ReturnPathArn)
}
if v.Source != nil {
objectKey := object.Key("Source")
objectKey.String(*v.Source)
}
if v.SourceArn != nil {
objectKey := object.Key("SourceArn")
objectKey.String(*v.SourceArn)
}
if v.Template != nil {
objectKey := object.Key("Template")
objectKey.String(*v.Template)
}
if v.TemplateArn != nil {
objectKey := object.Key("TemplateArn")
objectKey.String(*v.TemplateArn)
}
return nil
}
func awsAwsquery_serializeOpDocumentSendCustomVerificationEmailInput(v *SendCustomVerificationEmailInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConfigurationSetName != nil {
objectKey := object.Key("ConfigurationSetName")
objectKey.String(*v.ConfigurationSetName)
}
if v.EmailAddress != nil {
objectKey := object.Key("EmailAddress")
objectKey.String(*v.EmailAddress)
}
if v.TemplateName != nil {
objectKey := object.Key("TemplateName")
objectKey.String(*v.TemplateName)
}
return nil
}
func awsAwsquery_serializeOpDocumentSendEmailInput(v *SendEmailInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConfigurationSetName != nil {
objectKey := object.Key("ConfigurationSetName")
objectKey.String(*v.ConfigurationSetName)
}
if v.Destination != nil {
objectKey := object.Key("Destination")
if err := awsAwsquery_serializeDocumentDestination(v.Destination, objectKey); err != nil {
return err
}
}
if v.Message != nil {
objectKey := object.Key("Message")
if err := awsAwsquery_serializeDocumentMessage(v.Message, objectKey); err != nil {
return err
}
}
if v.ReplyToAddresses != nil {
objectKey := object.Key("ReplyToAddresses")
if err := awsAwsquery_serializeDocumentAddressList(v.ReplyToAddresses, objectKey); err != nil {
return err
}
}
if v.ReturnPath != nil {
objectKey := object.Key("ReturnPath")
objectKey.String(*v.ReturnPath)
}
if v.ReturnPathArn != nil {
objectKey := object.Key("ReturnPathArn")
objectKey.String(*v.ReturnPathArn)
}
if v.Source != nil {
objectKey := object.Key("Source")
objectKey.String(*v.Source)
}
if v.SourceArn != nil {
objectKey := object.Key("SourceArn")
objectKey.String(*v.SourceArn)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentMessageTagList(v.Tags, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentSendRawEmailInput(v *SendRawEmailInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConfigurationSetName != nil {
objectKey := object.Key("ConfigurationSetName")
objectKey.String(*v.ConfigurationSetName)
}
if v.Destinations != nil {
objectKey := object.Key("Destinations")
if err := awsAwsquery_serializeDocumentAddressList(v.Destinations, objectKey); err != nil {
return err
}
}
if v.FromArn != nil {
objectKey := object.Key("FromArn")
objectKey.String(*v.FromArn)
}
if v.RawMessage != nil {
objectKey := object.Key("RawMessage")
if err := awsAwsquery_serializeDocumentRawMessage(v.RawMessage, objectKey); err != nil {
return err
}
}
if v.ReturnPathArn != nil {
objectKey := object.Key("ReturnPathArn")
objectKey.String(*v.ReturnPathArn)
}
if v.Source != nil {
objectKey := object.Key("Source")
objectKey.String(*v.Source)
}
if v.SourceArn != nil {
objectKey := object.Key("SourceArn")
objectKey.String(*v.SourceArn)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentMessageTagList(v.Tags, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentSendTemplatedEmailInput(v *SendTemplatedEmailInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConfigurationSetName != nil {
objectKey := object.Key("ConfigurationSetName")
objectKey.String(*v.ConfigurationSetName)
}
if v.Destination != nil {
objectKey := object.Key("Destination")
if err := awsAwsquery_serializeDocumentDestination(v.Destination, objectKey); err != nil {
return err
}
}
if v.ReplyToAddresses != nil {
objectKey := object.Key("ReplyToAddresses")
if err := awsAwsquery_serializeDocumentAddressList(v.ReplyToAddresses, objectKey); err != nil {
return err
}
}
if v.ReturnPath != nil {
objectKey := object.Key("ReturnPath")
objectKey.String(*v.ReturnPath)
}
if v.ReturnPathArn != nil {
objectKey := object.Key("ReturnPathArn")
objectKey.String(*v.ReturnPathArn)
}
if v.Source != nil {
objectKey := object.Key("Source")
objectKey.String(*v.Source)
}
if v.SourceArn != nil {
objectKey := object.Key("SourceArn")
objectKey.String(*v.SourceArn)
}
if v.Tags != nil {
objectKey := object.Key("Tags")
if err := awsAwsquery_serializeDocumentMessageTagList(v.Tags, objectKey); err != nil {
return err
}
}
if v.Template != nil {
objectKey := object.Key("Template")
objectKey.String(*v.Template)
}
if v.TemplateArn != nil {
objectKey := object.Key("TemplateArn")
objectKey.String(*v.TemplateArn)
}
if v.TemplateData != nil {
objectKey := object.Key("TemplateData")
objectKey.String(*v.TemplateData)
}
return nil
}
func awsAwsquery_serializeOpDocumentSetActiveReceiptRuleSetInput(v *SetActiveReceiptRuleSetInput, value query.Value) error {
object := value.Object()
_ = object
if v.RuleSetName != nil {
objectKey := object.Key("RuleSetName")
objectKey.String(*v.RuleSetName)
}
return nil
}
func awsAwsquery_serializeOpDocumentSetIdentityDkimEnabledInput(v *SetIdentityDkimEnabledInput, value query.Value) error {
object := value.Object()
_ = object
{
objectKey := object.Key("DkimEnabled")
objectKey.Boolean(v.DkimEnabled)
}
if v.Identity != nil {
objectKey := object.Key("Identity")
objectKey.String(*v.Identity)
}
return nil
}
func awsAwsquery_serializeOpDocumentSetIdentityFeedbackForwardingEnabledInput(v *SetIdentityFeedbackForwardingEnabledInput, value query.Value) error {
object := value.Object()
_ = object
{
objectKey := object.Key("ForwardingEnabled")
objectKey.Boolean(v.ForwardingEnabled)
}
if v.Identity != nil {
objectKey := object.Key("Identity")
objectKey.String(*v.Identity)
}
return nil
}
func awsAwsquery_serializeOpDocumentSetIdentityHeadersInNotificationsEnabledInput(v *SetIdentityHeadersInNotificationsEnabledInput, value query.Value) error {
object := value.Object()
_ = object
{
objectKey := object.Key("Enabled")
objectKey.Boolean(v.Enabled)
}
if v.Identity != nil {
objectKey := object.Key("Identity")
objectKey.String(*v.Identity)
}
if len(v.NotificationType) > 0 {
objectKey := object.Key("NotificationType")
objectKey.String(string(v.NotificationType))
}
return nil
}
func awsAwsquery_serializeOpDocumentSetIdentityMailFromDomainInput(v *SetIdentityMailFromDomainInput, value query.Value) error {
object := value.Object()
_ = object
if len(v.BehaviorOnMXFailure) > 0 {
objectKey := object.Key("BehaviorOnMXFailure")
objectKey.String(string(v.BehaviorOnMXFailure))
}
if v.Identity != nil {
objectKey := object.Key("Identity")
objectKey.String(*v.Identity)
}
if v.MailFromDomain != nil {
objectKey := object.Key("MailFromDomain")
objectKey.String(*v.MailFromDomain)
}
return nil
}
func awsAwsquery_serializeOpDocumentSetIdentityNotificationTopicInput(v *SetIdentityNotificationTopicInput, value query.Value) error {
object := value.Object()
_ = object
if v.Identity != nil {
objectKey := object.Key("Identity")
objectKey.String(*v.Identity)
}
if len(v.NotificationType) > 0 {
objectKey := object.Key("NotificationType")
objectKey.String(string(v.NotificationType))
}
if v.SnsTopic != nil {
objectKey := object.Key("SnsTopic")
objectKey.String(*v.SnsTopic)
}
return nil
}
func awsAwsquery_serializeOpDocumentSetReceiptRulePositionInput(v *SetReceiptRulePositionInput, value query.Value) error {
object := value.Object()
_ = object
if v.After != nil {
objectKey := object.Key("After")
objectKey.String(*v.After)
}
if v.RuleName != nil {
objectKey := object.Key("RuleName")
objectKey.String(*v.RuleName)
}
if v.RuleSetName != nil {
objectKey := object.Key("RuleSetName")
objectKey.String(*v.RuleSetName)
}
return nil
}
func awsAwsquery_serializeOpDocumentTestRenderTemplateInput(v *TestRenderTemplateInput, value query.Value) error {
object := value.Object()
_ = object
if v.TemplateData != nil {
objectKey := object.Key("TemplateData")
objectKey.String(*v.TemplateData)
}
if v.TemplateName != nil {
objectKey := object.Key("TemplateName")
objectKey.String(*v.TemplateName)
}
return nil
}
func awsAwsquery_serializeOpDocumentUpdateAccountSendingEnabledInput(v *UpdateAccountSendingEnabledInput, value query.Value) error {
object := value.Object()
_ = object
if v.Enabled {
objectKey := object.Key("Enabled")
objectKey.Boolean(v.Enabled)
}
return nil
}
func awsAwsquery_serializeOpDocumentUpdateConfigurationSetEventDestinationInput(v *UpdateConfigurationSetEventDestinationInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConfigurationSetName != nil {
objectKey := object.Key("ConfigurationSetName")
objectKey.String(*v.ConfigurationSetName)
}
if v.EventDestination != nil {
objectKey := object.Key("EventDestination")
if err := awsAwsquery_serializeDocumentEventDestination(v.EventDestination, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentUpdateConfigurationSetReputationMetricsEnabledInput(v *UpdateConfigurationSetReputationMetricsEnabledInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConfigurationSetName != nil {
objectKey := object.Key("ConfigurationSetName")
objectKey.String(*v.ConfigurationSetName)
}
{
objectKey := object.Key("Enabled")
objectKey.Boolean(v.Enabled)
}
return nil
}
func awsAwsquery_serializeOpDocumentUpdateConfigurationSetSendingEnabledInput(v *UpdateConfigurationSetSendingEnabledInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConfigurationSetName != nil {
objectKey := object.Key("ConfigurationSetName")
objectKey.String(*v.ConfigurationSetName)
}
{
objectKey := object.Key("Enabled")
objectKey.Boolean(v.Enabled)
}
return nil
}
func awsAwsquery_serializeOpDocumentUpdateConfigurationSetTrackingOptionsInput(v *UpdateConfigurationSetTrackingOptionsInput, value query.Value) error {
object := value.Object()
_ = object
if v.ConfigurationSetName != nil {
objectKey := object.Key("ConfigurationSetName")
objectKey.String(*v.ConfigurationSetName)
}
if v.TrackingOptions != nil {
objectKey := object.Key("TrackingOptions")
if err := awsAwsquery_serializeDocumentTrackingOptions(v.TrackingOptions, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentUpdateCustomVerificationEmailTemplateInput(v *UpdateCustomVerificationEmailTemplateInput, value query.Value) error {
object := value.Object()
_ = object
if v.FailureRedirectionURL != nil {
objectKey := object.Key("FailureRedirectionURL")
objectKey.String(*v.FailureRedirectionURL)
}
if v.FromEmailAddress != nil {
objectKey := object.Key("FromEmailAddress")
objectKey.String(*v.FromEmailAddress)
}
if v.SuccessRedirectionURL != nil {
objectKey := object.Key("SuccessRedirectionURL")
objectKey.String(*v.SuccessRedirectionURL)
}
if v.TemplateContent != nil {
objectKey := object.Key("TemplateContent")
objectKey.String(*v.TemplateContent)
}
if v.TemplateName != nil {
objectKey := object.Key("TemplateName")
objectKey.String(*v.TemplateName)
}
if v.TemplateSubject != nil {
objectKey := object.Key("TemplateSubject")
objectKey.String(*v.TemplateSubject)
}
return nil
}
func awsAwsquery_serializeOpDocumentUpdateReceiptRuleInput(v *UpdateReceiptRuleInput, value query.Value) error {
object := value.Object()
_ = object
if v.Rule != nil {
objectKey := object.Key("Rule")
if err := awsAwsquery_serializeDocumentReceiptRule(v.Rule, objectKey); err != nil {
return err
}
}
if v.RuleSetName != nil {
objectKey := object.Key("RuleSetName")
objectKey.String(*v.RuleSetName)
}
return nil
}
func awsAwsquery_serializeOpDocumentUpdateTemplateInput(v *UpdateTemplateInput, value query.Value) error {
object := value.Object()
_ = object
if v.Template != nil {
objectKey := object.Key("Template")
if err := awsAwsquery_serializeDocumentTemplate(v.Template, objectKey); err != nil {
return err
}
}
return nil
}
func awsAwsquery_serializeOpDocumentVerifyDomainDkimInput(v *VerifyDomainDkimInput, value query.Value) error {
object := value.Object()
_ = object
if v.Domain != nil {
objectKey := object.Key("Domain")
objectKey.String(*v.Domain)
}
return nil
}
func awsAwsquery_serializeOpDocumentVerifyDomainIdentityInput(v *VerifyDomainIdentityInput, value query.Value) error {
object := value.Object()
_ = object
if v.Domain != nil {
objectKey := object.Key("Domain")
objectKey.String(*v.Domain)
}
return nil
}
func awsAwsquery_serializeOpDocumentVerifyEmailAddressInput(v *VerifyEmailAddressInput, value query.Value) error {
object := value.Object()
_ = object
if v.EmailAddress != nil {
objectKey := object.Key("EmailAddress")
objectKey.String(*v.EmailAddress)
}
return nil
}
func awsAwsquery_serializeOpDocumentVerifyEmailIdentityInput(v *VerifyEmailIdentityInput, value query.Value) error {
object := value.Object()
_ = object
if v.EmailAddress != nil {
objectKey := object.Key("EmailAddress")
objectKey.String(*v.EmailAddress)
}
return nil
}
| 6,690 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ses
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/middleware"
)
type validateOpCloneReceiptRuleSet struct {
}
func (*validateOpCloneReceiptRuleSet) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCloneReceiptRuleSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CloneReceiptRuleSetInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCloneReceiptRuleSetInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateConfigurationSetEventDestination struct {
}
func (*validateOpCreateConfigurationSetEventDestination) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateConfigurationSetEventDestination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateConfigurationSetEventDestinationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateConfigurationSetEventDestinationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateConfigurationSet struct {
}
func (*validateOpCreateConfigurationSet) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateConfigurationSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateConfigurationSetInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateConfigurationSetInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateConfigurationSetTrackingOptions struct {
}
func (*validateOpCreateConfigurationSetTrackingOptions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateConfigurationSetTrackingOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateConfigurationSetTrackingOptionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateConfigurationSetTrackingOptionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateCustomVerificationEmailTemplate struct {
}
func (*validateOpCreateCustomVerificationEmailTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateCustomVerificationEmailTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateCustomVerificationEmailTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateCustomVerificationEmailTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateReceiptFilter struct {
}
func (*validateOpCreateReceiptFilter) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateReceiptFilter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateReceiptFilterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateReceiptFilterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateReceiptRule struct {
}
func (*validateOpCreateReceiptRule) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateReceiptRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateReceiptRuleInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateReceiptRuleInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateReceiptRuleSet struct {
}
func (*validateOpCreateReceiptRuleSet) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateReceiptRuleSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateReceiptRuleSetInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateReceiptRuleSetInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateTemplate struct {
}
func (*validateOpCreateTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteConfigurationSetEventDestination struct {
}
func (*validateOpDeleteConfigurationSetEventDestination) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteConfigurationSetEventDestination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteConfigurationSetEventDestinationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteConfigurationSetEventDestinationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteConfigurationSet struct {
}
func (*validateOpDeleteConfigurationSet) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteConfigurationSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteConfigurationSetInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteConfigurationSetInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteConfigurationSetTrackingOptions struct {
}
func (*validateOpDeleteConfigurationSetTrackingOptions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteConfigurationSetTrackingOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteConfigurationSetTrackingOptionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteConfigurationSetTrackingOptionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteCustomVerificationEmailTemplate struct {
}
func (*validateOpDeleteCustomVerificationEmailTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteCustomVerificationEmailTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteCustomVerificationEmailTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteCustomVerificationEmailTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteIdentity struct {
}
func (*validateOpDeleteIdentity) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteIdentity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteIdentityInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteIdentityInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteIdentityPolicy struct {
}
func (*validateOpDeleteIdentityPolicy) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteIdentityPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteIdentityPolicyInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteIdentityPolicyInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteReceiptFilter struct {
}
func (*validateOpDeleteReceiptFilter) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteReceiptFilter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteReceiptFilterInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteReceiptFilterInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteReceiptRule struct {
}
func (*validateOpDeleteReceiptRule) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteReceiptRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteReceiptRuleInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteReceiptRuleInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteReceiptRuleSet struct {
}
func (*validateOpDeleteReceiptRuleSet) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteReceiptRuleSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteReceiptRuleSetInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteReceiptRuleSetInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteTemplate struct {
}
func (*validateOpDeleteTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteVerifiedEmailAddress struct {
}
func (*validateOpDeleteVerifiedEmailAddress) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteVerifiedEmailAddress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteVerifiedEmailAddressInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteVerifiedEmailAddressInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeConfigurationSet struct {
}
func (*validateOpDescribeConfigurationSet) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeConfigurationSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeConfigurationSetInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeConfigurationSetInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeReceiptRule struct {
}
func (*validateOpDescribeReceiptRule) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeReceiptRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeReceiptRuleInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeReceiptRuleInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeReceiptRuleSet struct {
}
func (*validateOpDescribeReceiptRuleSet) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeReceiptRuleSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeReceiptRuleSetInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeReceiptRuleSetInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetCustomVerificationEmailTemplate struct {
}
func (*validateOpGetCustomVerificationEmailTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetCustomVerificationEmailTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetCustomVerificationEmailTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetCustomVerificationEmailTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetIdentityDkimAttributes struct {
}
func (*validateOpGetIdentityDkimAttributes) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetIdentityDkimAttributes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetIdentityDkimAttributesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetIdentityDkimAttributesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetIdentityMailFromDomainAttributes struct {
}
func (*validateOpGetIdentityMailFromDomainAttributes) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetIdentityMailFromDomainAttributes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetIdentityMailFromDomainAttributesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetIdentityMailFromDomainAttributesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetIdentityNotificationAttributes struct {
}
func (*validateOpGetIdentityNotificationAttributes) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetIdentityNotificationAttributes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetIdentityNotificationAttributesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetIdentityNotificationAttributesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetIdentityPolicies struct {
}
func (*validateOpGetIdentityPolicies) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetIdentityPolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetIdentityPoliciesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetIdentityPoliciesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetIdentityVerificationAttributes struct {
}
func (*validateOpGetIdentityVerificationAttributes) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetIdentityVerificationAttributes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetIdentityVerificationAttributesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetIdentityVerificationAttributesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetTemplate struct {
}
func (*validateOpGetTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListIdentityPolicies struct {
}
func (*validateOpListIdentityPolicies) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListIdentityPolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListIdentityPoliciesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListIdentityPoliciesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpPutConfigurationSetDeliveryOptions struct {
}
func (*validateOpPutConfigurationSetDeliveryOptions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpPutConfigurationSetDeliveryOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*PutConfigurationSetDeliveryOptionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpPutConfigurationSetDeliveryOptionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpPutIdentityPolicy struct {
}
func (*validateOpPutIdentityPolicy) ID() string {
return "OperationInputValidation"
}
func (m *validateOpPutIdentityPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*PutIdentityPolicyInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpPutIdentityPolicyInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpReorderReceiptRuleSet struct {
}
func (*validateOpReorderReceiptRuleSet) ID() string {
return "OperationInputValidation"
}
func (m *validateOpReorderReceiptRuleSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ReorderReceiptRuleSetInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpReorderReceiptRuleSetInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpSendBounce struct {
}
func (*validateOpSendBounce) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSendBounce) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SendBounceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSendBounceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpSendBulkTemplatedEmail struct {
}
func (*validateOpSendBulkTemplatedEmail) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSendBulkTemplatedEmail) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SendBulkTemplatedEmailInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSendBulkTemplatedEmailInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpSendCustomVerificationEmail struct {
}
func (*validateOpSendCustomVerificationEmail) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSendCustomVerificationEmail) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SendCustomVerificationEmailInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSendCustomVerificationEmailInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpSendEmail struct {
}
func (*validateOpSendEmail) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSendEmail) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SendEmailInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSendEmailInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpSendRawEmail struct {
}
func (*validateOpSendRawEmail) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSendRawEmail) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SendRawEmailInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSendRawEmailInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpSendTemplatedEmail struct {
}
func (*validateOpSendTemplatedEmail) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSendTemplatedEmail) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SendTemplatedEmailInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSendTemplatedEmailInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpSetIdentityDkimEnabled struct {
}
func (*validateOpSetIdentityDkimEnabled) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSetIdentityDkimEnabled) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SetIdentityDkimEnabledInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSetIdentityDkimEnabledInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpSetIdentityFeedbackForwardingEnabled struct {
}
func (*validateOpSetIdentityFeedbackForwardingEnabled) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSetIdentityFeedbackForwardingEnabled) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SetIdentityFeedbackForwardingEnabledInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSetIdentityFeedbackForwardingEnabledInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpSetIdentityHeadersInNotificationsEnabled struct {
}
func (*validateOpSetIdentityHeadersInNotificationsEnabled) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSetIdentityHeadersInNotificationsEnabled) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SetIdentityHeadersInNotificationsEnabledInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSetIdentityHeadersInNotificationsEnabledInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpSetIdentityMailFromDomain struct {
}
func (*validateOpSetIdentityMailFromDomain) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSetIdentityMailFromDomain) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SetIdentityMailFromDomainInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSetIdentityMailFromDomainInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpSetIdentityNotificationTopic struct {
}
func (*validateOpSetIdentityNotificationTopic) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSetIdentityNotificationTopic) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SetIdentityNotificationTopicInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSetIdentityNotificationTopicInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpSetReceiptRulePosition struct {
}
func (*validateOpSetReceiptRulePosition) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSetReceiptRulePosition) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SetReceiptRulePositionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSetReceiptRulePositionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpTestRenderTemplate struct {
}
func (*validateOpTestRenderTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpTestRenderTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*TestRenderTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpTestRenderTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateConfigurationSetEventDestination struct {
}
func (*validateOpUpdateConfigurationSetEventDestination) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateConfigurationSetEventDestination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateConfigurationSetEventDestinationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateConfigurationSetEventDestinationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateConfigurationSetReputationMetricsEnabled struct {
}
func (*validateOpUpdateConfigurationSetReputationMetricsEnabled) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateConfigurationSetReputationMetricsEnabled) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateConfigurationSetReputationMetricsEnabledInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateConfigurationSetReputationMetricsEnabledInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateConfigurationSetSendingEnabled struct {
}
func (*validateOpUpdateConfigurationSetSendingEnabled) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateConfigurationSetSendingEnabled) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateConfigurationSetSendingEnabledInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateConfigurationSetSendingEnabledInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateConfigurationSetTrackingOptions struct {
}
func (*validateOpUpdateConfigurationSetTrackingOptions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateConfigurationSetTrackingOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateConfigurationSetTrackingOptionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateConfigurationSetTrackingOptionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateCustomVerificationEmailTemplate struct {
}
func (*validateOpUpdateCustomVerificationEmailTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateCustomVerificationEmailTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateCustomVerificationEmailTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateCustomVerificationEmailTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateReceiptRule struct {
}
func (*validateOpUpdateReceiptRule) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateReceiptRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateReceiptRuleInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateReceiptRuleInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateTemplate struct {
}
func (*validateOpUpdateTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpVerifyDomainDkim struct {
}
func (*validateOpVerifyDomainDkim) ID() string {
return "OperationInputValidation"
}
func (m *validateOpVerifyDomainDkim) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*VerifyDomainDkimInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpVerifyDomainDkimInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpVerifyDomainIdentity struct {
}
func (*validateOpVerifyDomainIdentity) ID() string {
return "OperationInputValidation"
}
func (m *validateOpVerifyDomainIdentity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*VerifyDomainIdentityInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpVerifyDomainIdentityInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpVerifyEmailAddress struct {
}
func (*validateOpVerifyEmailAddress) ID() string {
return "OperationInputValidation"
}
func (m *validateOpVerifyEmailAddress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*VerifyEmailAddressInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpVerifyEmailAddressInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpVerifyEmailIdentity struct {
}
func (*validateOpVerifyEmailIdentity) ID() string {
return "OperationInputValidation"
}
func (m *validateOpVerifyEmailIdentity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*VerifyEmailIdentityInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpVerifyEmailIdentityInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
func addOpCloneReceiptRuleSetValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCloneReceiptRuleSet{}, middleware.After)
}
func addOpCreateConfigurationSetEventDestinationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateConfigurationSetEventDestination{}, middleware.After)
}
func addOpCreateConfigurationSetValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateConfigurationSet{}, middleware.After)
}
func addOpCreateConfigurationSetTrackingOptionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateConfigurationSetTrackingOptions{}, middleware.After)
}
func addOpCreateCustomVerificationEmailTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateCustomVerificationEmailTemplate{}, middleware.After)
}
func addOpCreateReceiptFilterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateReceiptFilter{}, middleware.After)
}
func addOpCreateReceiptRuleValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateReceiptRule{}, middleware.After)
}
func addOpCreateReceiptRuleSetValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateReceiptRuleSet{}, middleware.After)
}
func addOpCreateTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateTemplate{}, middleware.After)
}
func addOpDeleteConfigurationSetEventDestinationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteConfigurationSetEventDestination{}, middleware.After)
}
func addOpDeleteConfigurationSetValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteConfigurationSet{}, middleware.After)
}
func addOpDeleteConfigurationSetTrackingOptionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteConfigurationSetTrackingOptions{}, middleware.After)
}
func addOpDeleteCustomVerificationEmailTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteCustomVerificationEmailTemplate{}, middleware.After)
}
func addOpDeleteIdentityValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteIdentity{}, middleware.After)
}
func addOpDeleteIdentityPolicyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteIdentityPolicy{}, middleware.After)
}
func addOpDeleteReceiptFilterValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteReceiptFilter{}, middleware.After)
}
func addOpDeleteReceiptRuleValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteReceiptRule{}, middleware.After)
}
func addOpDeleteReceiptRuleSetValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteReceiptRuleSet{}, middleware.After)
}
func addOpDeleteTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteTemplate{}, middleware.After)
}
func addOpDeleteVerifiedEmailAddressValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteVerifiedEmailAddress{}, middleware.After)
}
func addOpDescribeConfigurationSetValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeConfigurationSet{}, middleware.After)
}
func addOpDescribeReceiptRuleValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeReceiptRule{}, middleware.After)
}
func addOpDescribeReceiptRuleSetValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeReceiptRuleSet{}, middleware.After)
}
func addOpGetCustomVerificationEmailTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetCustomVerificationEmailTemplate{}, middleware.After)
}
func addOpGetIdentityDkimAttributesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetIdentityDkimAttributes{}, middleware.After)
}
func addOpGetIdentityMailFromDomainAttributesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetIdentityMailFromDomainAttributes{}, middleware.After)
}
func addOpGetIdentityNotificationAttributesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetIdentityNotificationAttributes{}, middleware.After)
}
func addOpGetIdentityPoliciesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetIdentityPolicies{}, middleware.After)
}
func addOpGetIdentityVerificationAttributesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetIdentityVerificationAttributes{}, middleware.After)
}
func addOpGetTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetTemplate{}, middleware.After)
}
func addOpListIdentityPoliciesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListIdentityPolicies{}, middleware.After)
}
func addOpPutConfigurationSetDeliveryOptionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpPutConfigurationSetDeliveryOptions{}, middleware.After)
}
func addOpPutIdentityPolicyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpPutIdentityPolicy{}, middleware.After)
}
func addOpReorderReceiptRuleSetValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpReorderReceiptRuleSet{}, middleware.After)
}
func addOpSendBounceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSendBounce{}, middleware.After)
}
func addOpSendBulkTemplatedEmailValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSendBulkTemplatedEmail{}, middleware.After)
}
func addOpSendCustomVerificationEmailValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSendCustomVerificationEmail{}, middleware.After)
}
func addOpSendEmailValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSendEmail{}, middleware.After)
}
func addOpSendRawEmailValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSendRawEmail{}, middleware.After)
}
func addOpSendTemplatedEmailValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSendTemplatedEmail{}, middleware.After)
}
func addOpSetIdentityDkimEnabledValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSetIdentityDkimEnabled{}, middleware.After)
}
func addOpSetIdentityFeedbackForwardingEnabledValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSetIdentityFeedbackForwardingEnabled{}, middleware.After)
}
func addOpSetIdentityHeadersInNotificationsEnabledValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSetIdentityHeadersInNotificationsEnabled{}, middleware.After)
}
func addOpSetIdentityMailFromDomainValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSetIdentityMailFromDomain{}, middleware.After)
}
func addOpSetIdentityNotificationTopicValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSetIdentityNotificationTopic{}, middleware.After)
}
func addOpSetReceiptRulePositionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSetReceiptRulePosition{}, middleware.After)
}
func addOpTestRenderTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpTestRenderTemplate{}, middleware.After)
}
func addOpUpdateConfigurationSetEventDestinationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateConfigurationSetEventDestination{}, middleware.After)
}
func addOpUpdateConfigurationSetReputationMetricsEnabledValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateConfigurationSetReputationMetricsEnabled{}, middleware.After)
}
func addOpUpdateConfigurationSetSendingEnabledValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateConfigurationSetSendingEnabled{}, middleware.After)
}
func addOpUpdateConfigurationSetTrackingOptionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateConfigurationSetTrackingOptions{}, middleware.After)
}
func addOpUpdateCustomVerificationEmailTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateCustomVerificationEmailTemplate{}, middleware.After)
}
func addOpUpdateReceiptRuleValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateReceiptRule{}, middleware.After)
}
func addOpUpdateTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateTemplate{}, middleware.After)
}
func addOpVerifyDomainDkimValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpVerifyDomainDkim{}, middleware.After)
}
func addOpVerifyDomainIdentityValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpVerifyDomainIdentity{}, middleware.After)
}
func addOpVerifyEmailAddressValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpVerifyEmailAddress{}, middleware.After)
}
func addOpVerifyEmailIdentityValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpVerifyEmailIdentity{}, middleware.After)
}
func validateAddHeaderAction(v *types.AddHeaderAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AddHeaderAction"}
if v.HeaderName == nil {
invalidParams.Add(smithy.NewErrParamRequired("HeaderName"))
}
if v.HeaderValue == nil {
invalidParams.Add(smithy.NewErrParamRequired("HeaderValue"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateBody(v *types.Body) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "Body"}
if v.Text != nil {
if err := validateContent(v.Text); err != nil {
invalidParams.AddNested("Text", err.(smithy.InvalidParamsError))
}
}
if v.Html != nil {
if err := validateContent(v.Html); err != nil {
invalidParams.AddNested("Html", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateBounceAction(v *types.BounceAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "BounceAction"}
if v.SmtpReplyCode == nil {
invalidParams.Add(smithy.NewErrParamRequired("SmtpReplyCode"))
}
if v.Message == nil {
invalidParams.Add(smithy.NewErrParamRequired("Message"))
}
if v.Sender == nil {
invalidParams.Add(smithy.NewErrParamRequired("Sender"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateBouncedRecipientInfo(v *types.BouncedRecipientInfo) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "BouncedRecipientInfo"}
if v.Recipient == nil {
invalidParams.Add(smithy.NewErrParamRequired("Recipient"))
}
if v.RecipientDsnFields != nil {
if err := validateRecipientDsnFields(v.RecipientDsnFields); err != nil {
invalidParams.AddNested("RecipientDsnFields", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateBouncedRecipientInfoList(v []types.BouncedRecipientInfo) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "BouncedRecipientInfoList"}
for i := range v {
if err := validateBouncedRecipientInfo(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateBulkEmailDestination(v *types.BulkEmailDestination) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "BulkEmailDestination"}
if v.Destination == nil {
invalidParams.Add(smithy.NewErrParamRequired("Destination"))
}
if v.ReplacementTags != nil {
if err := validateMessageTagList(v.ReplacementTags); err != nil {
invalidParams.AddNested("ReplacementTags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateBulkEmailDestinationList(v []types.BulkEmailDestination) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "BulkEmailDestinationList"}
for i := range v {
if err := validateBulkEmailDestination(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateCloudWatchDestination(v *types.CloudWatchDestination) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CloudWatchDestination"}
if v.DimensionConfigurations == nil {
invalidParams.Add(smithy.NewErrParamRequired("DimensionConfigurations"))
} else if v.DimensionConfigurations != nil {
if err := validateCloudWatchDimensionConfigurations(v.DimensionConfigurations); err != nil {
invalidParams.AddNested("DimensionConfigurations", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateCloudWatchDimensionConfiguration(v *types.CloudWatchDimensionConfiguration) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CloudWatchDimensionConfiguration"}
if v.DimensionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DimensionName"))
}
if len(v.DimensionValueSource) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("DimensionValueSource"))
}
if v.DefaultDimensionValue == nil {
invalidParams.Add(smithy.NewErrParamRequired("DefaultDimensionValue"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateCloudWatchDimensionConfigurations(v []types.CloudWatchDimensionConfiguration) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CloudWatchDimensionConfigurations"}
for i := range v {
if err := validateCloudWatchDimensionConfiguration(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateConfigurationSet(v *types.ConfigurationSet) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ConfigurationSet"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateContent(v *types.Content) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "Content"}
if v.Data == nil {
invalidParams.Add(smithy.NewErrParamRequired("Data"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateEventDestination(v *types.EventDestination) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "EventDestination"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.MatchingEventTypes == nil {
invalidParams.Add(smithy.NewErrParamRequired("MatchingEventTypes"))
}
if v.KinesisFirehoseDestination != nil {
if err := validateKinesisFirehoseDestination(v.KinesisFirehoseDestination); err != nil {
invalidParams.AddNested("KinesisFirehoseDestination", err.(smithy.InvalidParamsError))
}
}
if v.CloudWatchDestination != nil {
if err := validateCloudWatchDestination(v.CloudWatchDestination); err != nil {
invalidParams.AddNested("CloudWatchDestination", err.(smithy.InvalidParamsError))
}
}
if v.SNSDestination != nil {
if err := validateSNSDestination(v.SNSDestination); err != nil {
invalidParams.AddNested("SNSDestination", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateExtensionField(v *types.ExtensionField) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ExtensionField"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.Value == nil {
invalidParams.Add(smithy.NewErrParamRequired("Value"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateExtensionFieldList(v []types.ExtensionField) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ExtensionFieldList"}
for i := range v {
if err := validateExtensionField(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateKinesisFirehoseDestination(v *types.KinesisFirehoseDestination) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "KinesisFirehoseDestination"}
if v.IAMRoleARN == nil {
invalidParams.Add(smithy.NewErrParamRequired("IAMRoleARN"))
}
if v.DeliveryStreamARN == nil {
invalidParams.Add(smithy.NewErrParamRequired("DeliveryStreamARN"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateLambdaAction(v *types.LambdaAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "LambdaAction"}
if v.FunctionArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("FunctionArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateMessage(v *types.Message) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "Message"}
if v.Subject == nil {
invalidParams.Add(smithy.NewErrParamRequired("Subject"))
} else if v.Subject != nil {
if err := validateContent(v.Subject); err != nil {
invalidParams.AddNested("Subject", err.(smithy.InvalidParamsError))
}
}
if v.Body == nil {
invalidParams.Add(smithy.NewErrParamRequired("Body"))
} else if v.Body != nil {
if err := validateBody(v.Body); err != nil {
invalidParams.AddNested("Body", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateMessageDsn(v *types.MessageDsn) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "MessageDsn"}
if v.ReportingMta == nil {
invalidParams.Add(smithy.NewErrParamRequired("ReportingMta"))
}
if v.ExtensionFields != nil {
if err := validateExtensionFieldList(v.ExtensionFields); err != nil {
invalidParams.AddNested("ExtensionFields", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateMessageTag(v *types.MessageTag) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "MessageTag"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.Value == nil {
invalidParams.Add(smithy.NewErrParamRequired("Value"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateMessageTagList(v []types.MessageTag) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "MessageTagList"}
for i := range v {
if err := validateMessageTag(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateRawMessage(v *types.RawMessage) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RawMessage"}
if v.Data == nil {
invalidParams.Add(smithy.NewErrParamRequired("Data"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateReceiptAction(v *types.ReceiptAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ReceiptAction"}
if v.S3Action != nil {
if err := validateS3Action(v.S3Action); err != nil {
invalidParams.AddNested("S3Action", err.(smithy.InvalidParamsError))
}
}
if v.BounceAction != nil {
if err := validateBounceAction(v.BounceAction); err != nil {
invalidParams.AddNested("BounceAction", err.(smithy.InvalidParamsError))
}
}
if v.WorkmailAction != nil {
if err := validateWorkmailAction(v.WorkmailAction); err != nil {
invalidParams.AddNested("WorkmailAction", err.(smithy.InvalidParamsError))
}
}
if v.LambdaAction != nil {
if err := validateLambdaAction(v.LambdaAction); err != nil {
invalidParams.AddNested("LambdaAction", err.(smithy.InvalidParamsError))
}
}
if v.StopAction != nil {
if err := validateStopAction(v.StopAction); err != nil {
invalidParams.AddNested("StopAction", err.(smithy.InvalidParamsError))
}
}
if v.AddHeaderAction != nil {
if err := validateAddHeaderAction(v.AddHeaderAction); err != nil {
invalidParams.AddNested("AddHeaderAction", err.(smithy.InvalidParamsError))
}
}
if v.SNSAction != nil {
if err := validateSNSAction(v.SNSAction); err != nil {
invalidParams.AddNested("SNSAction", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateReceiptActionsList(v []types.ReceiptAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ReceiptActionsList"}
for i := range v {
if err := validateReceiptAction(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateReceiptFilter(v *types.ReceiptFilter) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ReceiptFilter"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.IpFilter == nil {
invalidParams.Add(smithy.NewErrParamRequired("IpFilter"))
} else if v.IpFilter != nil {
if err := validateReceiptIpFilter(v.IpFilter); err != nil {
invalidParams.AddNested("IpFilter", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateReceiptIpFilter(v *types.ReceiptIpFilter) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ReceiptIpFilter"}
if len(v.Policy) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Policy"))
}
if v.Cidr == nil {
invalidParams.Add(smithy.NewErrParamRequired("Cidr"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateReceiptRule(v *types.ReceiptRule) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ReceiptRule"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.Actions != nil {
if err := validateReceiptActionsList(v.Actions); err != nil {
invalidParams.AddNested("Actions", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateRecipientDsnFields(v *types.RecipientDsnFields) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RecipientDsnFields"}
if len(v.Action) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Action"))
}
if v.Status == nil {
invalidParams.Add(smithy.NewErrParamRequired("Status"))
}
if v.ExtensionFields != nil {
if err := validateExtensionFieldList(v.ExtensionFields); err != nil {
invalidParams.AddNested("ExtensionFields", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateS3Action(v *types.S3Action) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "S3Action"}
if v.BucketName == nil {
invalidParams.Add(smithy.NewErrParamRequired("BucketName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateSNSAction(v *types.SNSAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SNSAction"}
if v.TopicArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("TopicArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateSNSDestination(v *types.SNSDestination) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SNSDestination"}
if v.TopicARN == nil {
invalidParams.Add(smithy.NewErrParamRequired("TopicARN"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateStopAction(v *types.StopAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "StopAction"}
if len(v.Scope) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Scope"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateTemplate(v *types.Template) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "Template"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateWorkmailAction(v *types.WorkmailAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "WorkmailAction"}
if v.OrganizationArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("OrganizationArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCloneReceiptRuleSetInput(v *CloneReceiptRuleSetInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CloneReceiptRuleSetInput"}
if v.RuleSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleSetName"))
}
if v.OriginalRuleSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("OriginalRuleSetName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateConfigurationSetEventDestinationInput(v *CreateConfigurationSetEventDestinationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateConfigurationSetEventDestinationInput"}
if v.ConfigurationSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ConfigurationSetName"))
}
if v.EventDestination == nil {
invalidParams.Add(smithy.NewErrParamRequired("EventDestination"))
} else if v.EventDestination != nil {
if err := validateEventDestination(v.EventDestination); err != nil {
invalidParams.AddNested("EventDestination", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateConfigurationSetInput(v *CreateConfigurationSetInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateConfigurationSetInput"}
if v.ConfigurationSet == nil {
invalidParams.Add(smithy.NewErrParamRequired("ConfigurationSet"))
} else if v.ConfigurationSet != nil {
if err := validateConfigurationSet(v.ConfigurationSet); err != nil {
invalidParams.AddNested("ConfigurationSet", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateConfigurationSetTrackingOptionsInput(v *CreateConfigurationSetTrackingOptionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateConfigurationSetTrackingOptionsInput"}
if v.ConfigurationSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ConfigurationSetName"))
}
if v.TrackingOptions == nil {
invalidParams.Add(smithy.NewErrParamRequired("TrackingOptions"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateCustomVerificationEmailTemplateInput(v *CreateCustomVerificationEmailTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateCustomVerificationEmailTemplateInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if v.FromEmailAddress == nil {
invalidParams.Add(smithy.NewErrParamRequired("FromEmailAddress"))
}
if v.TemplateSubject == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateSubject"))
}
if v.TemplateContent == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateContent"))
}
if v.SuccessRedirectionURL == nil {
invalidParams.Add(smithy.NewErrParamRequired("SuccessRedirectionURL"))
}
if v.FailureRedirectionURL == nil {
invalidParams.Add(smithy.NewErrParamRequired("FailureRedirectionURL"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateReceiptFilterInput(v *CreateReceiptFilterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateReceiptFilterInput"}
if v.Filter == nil {
invalidParams.Add(smithy.NewErrParamRequired("Filter"))
} else if v.Filter != nil {
if err := validateReceiptFilter(v.Filter); err != nil {
invalidParams.AddNested("Filter", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateReceiptRuleInput(v *CreateReceiptRuleInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateReceiptRuleInput"}
if v.RuleSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleSetName"))
}
if v.Rule == nil {
invalidParams.Add(smithy.NewErrParamRequired("Rule"))
} else if v.Rule != nil {
if err := validateReceiptRule(v.Rule); err != nil {
invalidParams.AddNested("Rule", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateReceiptRuleSetInput(v *CreateReceiptRuleSetInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateReceiptRuleSetInput"}
if v.RuleSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleSetName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateTemplateInput(v *CreateTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateTemplateInput"}
if v.Template == nil {
invalidParams.Add(smithy.NewErrParamRequired("Template"))
} else if v.Template != nil {
if err := validateTemplate(v.Template); err != nil {
invalidParams.AddNested("Template", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteConfigurationSetEventDestinationInput(v *DeleteConfigurationSetEventDestinationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteConfigurationSetEventDestinationInput"}
if v.ConfigurationSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ConfigurationSetName"))
}
if v.EventDestinationName == nil {
invalidParams.Add(smithy.NewErrParamRequired("EventDestinationName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteConfigurationSetInput(v *DeleteConfigurationSetInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteConfigurationSetInput"}
if v.ConfigurationSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ConfigurationSetName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteConfigurationSetTrackingOptionsInput(v *DeleteConfigurationSetTrackingOptionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteConfigurationSetTrackingOptionsInput"}
if v.ConfigurationSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ConfigurationSetName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteCustomVerificationEmailTemplateInput(v *DeleteCustomVerificationEmailTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteCustomVerificationEmailTemplateInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteIdentityInput(v *DeleteIdentityInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteIdentityInput"}
if v.Identity == nil {
invalidParams.Add(smithy.NewErrParamRequired("Identity"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteIdentityPolicyInput(v *DeleteIdentityPolicyInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteIdentityPolicyInput"}
if v.Identity == nil {
invalidParams.Add(smithy.NewErrParamRequired("Identity"))
}
if v.PolicyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteReceiptFilterInput(v *DeleteReceiptFilterInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteReceiptFilterInput"}
if v.FilterName == nil {
invalidParams.Add(smithy.NewErrParamRequired("FilterName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteReceiptRuleInput(v *DeleteReceiptRuleInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteReceiptRuleInput"}
if v.RuleSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleSetName"))
}
if v.RuleName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteReceiptRuleSetInput(v *DeleteReceiptRuleSetInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteReceiptRuleSetInput"}
if v.RuleSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleSetName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteTemplateInput(v *DeleteTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteTemplateInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteVerifiedEmailAddressInput(v *DeleteVerifiedEmailAddressInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteVerifiedEmailAddressInput"}
if v.EmailAddress == nil {
invalidParams.Add(smithy.NewErrParamRequired("EmailAddress"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeConfigurationSetInput(v *DescribeConfigurationSetInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeConfigurationSetInput"}
if v.ConfigurationSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ConfigurationSetName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeReceiptRuleInput(v *DescribeReceiptRuleInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeReceiptRuleInput"}
if v.RuleSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleSetName"))
}
if v.RuleName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeReceiptRuleSetInput(v *DescribeReceiptRuleSetInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeReceiptRuleSetInput"}
if v.RuleSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleSetName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetCustomVerificationEmailTemplateInput(v *GetCustomVerificationEmailTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetCustomVerificationEmailTemplateInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetIdentityDkimAttributesInput(v *GetIdentityDkimAttributesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetIdentityDkimAttributesInput"}
if v.Identities == nil {
invalidParams.Add(smithy.NewErrParamRequired("Identities"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetIdentityMailFromDomainAttributesInput(v *GetIdentityMailFromDomainAttributesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetIdentityMailFromDomainAttributesInput"}
if v.Identities == nil {
invalidParams.Add(smithy.NewErrParamRequired("Identities"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetIdentityNotificationAttributesInput(v *GetIdentityNotificationAttributesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetIdentityNotificationAttributesInput"}
if v.Identities == nil {
invalidParams.Add(smithy.NewErrParamRequired("Identities"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetIdentityPoliciesInput(v *GetIdentityPoliciesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetIdentityPoliciesInput"}
if v.Identity == nil {
invalidParams.Add(smithy.NewErrParamRequired("Identity"))
}
if v.PolicyNames == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyNames"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetIdentityVerificationAttributesInput(v *GetIdentityVerificationAttributesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetIdentityVerificationAttributesInput"}
if v.Identities == nil {
invalidParams.Add(smithy.NewErrParamRequired("Identities"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetTemplateInput(v *GetTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetTemplateInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListIdentityPoliciesInput(v *ListIdentityPoliciesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListIdentityPoliciesInput"}
if v.Identity == nil {
invalidParams.Add(smithy.NewErrParamRequired("Identity"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpPutConfigurationSetDeliveryOptionsInput(v *PutConfigurationSetDeliveryOptionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "PutConfigurationSetDeliveryOptionsInput"}
if v.ConfigurationSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ConfigurationSetName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpPutIdentityPolicyInput(v *PutIdentityPolicyInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "PutIdentityPolicyInput"}
if v.Identity == nil {
invalidParams.Add(smithy.NewErrParamRequired("Identity"))
}
if v.PolicyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
}
if v.Policy == nil {
invalidParams.Add(smithy.NewErrParamRequired("Policy"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpReorderReceiptRuleSetInput(v *ReorderReceiptRuleSetInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ReorderReceiptRuleSetInput"}
if v.RuleSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleSetName"))
}
if v.RuleNames == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleNames"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSendBounceInput(v *SendBounceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SendBounceInput"}
if v.OriginalMessageId == nil {
invalidParams.Add(smithy.NewErrParamRequired("OriginalMessageId"))
}
if v.BounceSender == nil {
invalidParams.Add(smithy.NewErrParamRequired("BounceSender"))
}
if v.MessageDsn != nil {
if err := validateMessageDsn(v.MessageDsn); err != nil {
invalidParams.AddNested("MessageDsn", err.(smithy.InvalidParamsError))
}
}
if v.BouncedRecipientInfoList == nil {
invalidParams.Add(smithy.NewErrParamRequired("BouncedRecipientInfoList"))
} else if v.BouncedRecipientInfoList != nil {
if err := validateBouncedRecipientInfoList(v.BouncedRecipientInfoList); err != nil {
invalidParams.AddNested("BouncedRecipientInfoList", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSendBulkTemplatedEmailInput(v *SendBulkTemplatedEmailInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SendBulkTemplatedEmailInput"}
if v.Source == nil {
invalidParams.Add(smithy.NewErrParamRequired("Source"))
}
if v.DefaultTags != nil {
if err := validateMessageTagList(v.DefaultTags); err != nil {
invalidParams.AddNested("DefaultTags", err.(smithy.InvalidParamsError))
}
}
if v.Template == nil {
invalidParams.Add(smithy.NewErrParamRequired("Template"))
}
if v.Destinations == nil {
invalidParams.Add(smithy.NewErrParamRequired("Destinations"))
} else if v.Destinations != nil {
if err := validateBulkEmailDestinationList(v.Destinations); err != nil {
invalidParams.AddNested("Destinations", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSendCustomVerificationEmailInput(v *SendCustomVerificationEmailInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SendCustomVerificationEmailInput"}
if v.EmailAddress == nil {
invalidParams.Add(smithy.NewErrParamRequired("EmailAddress"))
}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSendEmailInput(v *SendEmailInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SendEmailInput"}
if v.Source == nil {
invalidParams.Add(smithy.NewErrParamRequired("Source"))
}
if v.Destination == nil {
invalidParams.Add(smithy.NewErrParamRequired("Destination"))
}
if v.Message == nil {
invalidParams.Add(smithy.NewErrParamRequired("Message"))
} else if v.Message != nil {
if err := validateMessage(v.Message); err != nil {
invalidParams.AddNested("Message", err.(smithy.InvalidParamsError))
}
}
if v.Tags != nil {
if err := validateMessageTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSendRawEmailInput(v *SendRawEmailInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SendRawEmailInput"}
if v.RawMessage == nil {
invalidParams.Add(smithy.NewErrParamRequired("RawMessage"))
} else if v.RawMessage != nil {
if err := validateRawMessage(v.RawMessage); err != nil {
invalidParams.AddNested("RawMessage", err.(smithy.InvalidParamsError))
}
}
if v.Tags != nil {
if err := validateMessageTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSendTemplatedEmailInput(v *SendTemplatedEmailInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SendTemplatedEmailInput"}
if v.Source == nil {
invalidParams.Add(smithy.NewErrParamRequired("Source"))
}
if v.Destination == nil {
invalidParams.Add(smithy.NewErrParamRequired("Destination"))
}
if v.Tags != nil {
if err := validateMessageTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if v.Template == nil {
invalidParams.Add(smithy.NewErrParamRequired("Template"))
}
if v.TemplateData == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateData"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSetIdentityDkimEnabledInput(v *SetIdentityDkimEnabledInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SetIdentityDkimEnabledInput"}
if v.Identity == nil {
invalidParams.Add(smithy.NewErrParamRequired("Identity"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSetIdentityFeedbackForwardingEnabledInput(v *SetIdentityFeedbackForwardingEnabledInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SetIdentityFeedbackForwardingEnabledInput"}
if v.Identity == nil {
invalidParams.Add(smithy.NewErrParamRequired("Identity"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSetIdentityHeadersInNotificationsEnabledInput(v *SetIdentityHeadersInNotificationsEnabledInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SetIdentityHeadersInNotificationsEnabledInput"}
if v.Identity == nil {
invalidParams.Add(smithy.NewErrParamRequired("Identity"))
}
if len(v.NotificationType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("NotificationType"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSetIdentityMailFromDomainInput(v *SetIdentityMailFromDomainInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SetIdentityMailFromDomainInput"}
if v.Identity == nil {
invalidParams.Add(smithy.NewErrParamRequired("Identity"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSetIdentityNotificationTopicInput(v *SetIdentityNotificationTopicInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SetIdentityNotificationTopicInput"}
if v.Identity == nil {
invalidParams.Add(smithy.NewErrParamRequired("Identity"))
}
if len(v.NotificationType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("NotificationType"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSetReceiptRulePositionInput(v *SetReceiptRulePositionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SetReceiptRulePositionInput"}
if v.RuleSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleSetName"))
}
if v.RuleName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpTestRenderTemplateInput(v *TestRenderTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "TestRenderTemplateInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if v.TemplateData == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateData"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateConfigurationSetEventDestinationInput(v *UpdateConfigurationSetEventDestinationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateConfigurationSetEventDestinationInput"}
if v.ConfigurationSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ConfigurationSetName"))
}
if v.EventDestination == nil {
invalidParams.Add(smithy.NewErrParamRequired("EventDestination"))
} else if v.EventDestination != nil {
if err := validateEventDestination(v.EventDestination); err != nil {
invalidParams.AddNested("EventDestination", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateConfigurationSetReputationMetricsEnabledInput(v *UpdateConfigurationSetReputationMetricsEnabledInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateConfigurationSetReputationMetricsEnabledInput"}
if v.ConfigurationSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ConfigurationSetName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateConfigurationSetSendingEnabledInput(v *UpdateConfigurationSetSendingEnabledInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateConfigurationSetSendingEnabledInput"}
if v.ConfigurationSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ConfigurationSetName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateConfigurationSetTrackingOptionsInput(v *UpdateConfigurationSetTrackingOptionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateConfigurationSetTrackingOptionsInput"}
if v.ConfigurationSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ConfigurationSetName"))
}
if v.TrackingOptions == nil {
invalidParams.Add(smithy.NewErrParamRequired("TrackingOptions"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateCustomVerificationEmailTemplateInput(v *UpdateCustomVerificationEmailTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateCustomVerificationEmailTemplateInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateReceiptRuleInput(v *UpdateReceiptRuleInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateReceiptRuleInput"}
if v.RuleSetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleSetName"))
}
if v.Rule == nil {
invalidParams.Add(smithy.NewErrParamRequired("Rule"))
} else if v.Rule != nil {
if err := validateReceiptRule(v.Rule); err != nil {
invalidParams.AddNested("Rule", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateTemplateInput(v *UpdateTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateTemplateInput"}
if v.Template == nil {
invalidParams.Add(smithy.NewErrParamRequired("Template"))
} else if v.Template != nil {
if err := validateTemplate(v.Template); err != nil {
invalidParams.AddNested("Template", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpVerifyDomainDkimInput(v *VerifyDomainDkimInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "VerifyDomainDkimInput"}
if v.Domain == nil {
invalidParams.Add(smithy.NewErrParamRequired("Domain"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpVerifyDomainIdentityInput(v *VerifyDomainIdentityInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "VerifyDomainIdentityInput"}
if v.Domain == nil {
invalidParams.Add(smithy.NewErrParamRequired("Domain"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpVerifyEmailAddressInput(v *VerifyEmailAddressInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "VerifyEmailAddressInput"}
if v.EmailAddress == nil {
invalidParams.Add(smithy.NewErrParamRequired("EmailAddress"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpVerifyEmailIdentityInput(v *VerifyEmailIdentityInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "VerifyEmailIdentityInput"}
if v.EmailAddress == nil {
invalidParams.Add(smithy.NewErrParamRequired("EmailAddress"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
| 3,105 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package endpoints
import (
"github.com/aws/aws-sdk-go-v2/aws"
endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2"
"github.com/aws/smithy-go/logging"
"regexp"
)
// Options is the endpoint resolver configuration options
type Options struct {
// Logger is a logging implementation that log events should be sent to.
Logger logging.Logger
// LogDeprecated indicates that deprecated endpoints should be logged to the
// provided logger.
LogDeprecated bool
// ResolvedRegion is used to override the region to be resolved, rather then the
// using the value passed to the ResolveEndpoint method. This value is used by the
// SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative
// name. You must not set this value directly in your application.
ResolvedRegion string
// DisableHTTPS informs the resolver to return an endpoint that does not use the
// HTTPS scheme.
DisableHTTPS bool
// UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint.
UseDualStackEndpoint aws.DualStackEndpointState
// UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
UseFIPSEndpoint aws.FIPSEndpointState
}
func (o Options) GetResolvedRegion() string {
return o.ResolvedRegion
}
func (o Options) GetDisableHTTPS() bool {
return o.DisableHTTPS
}
func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState {
return o.UseDualStackEndpoint
}
func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState {
return o.UseFIPSEndpoint
}
func transformToSharedOptions(options Options) endpoints.Options {
return endpoints.Options{
Logger: options.Logger,
LogDeprecated: options.LogDeprecated,
ResolvedRegion: options.ResolvedRegion,
DisableHTTPS: options.DisableHTTPS,
UseDualStackEndpoint: options.UseDualStackEndpoint,
UseFIPSEndpoint: options.UseFIPSEndpoint,
}
}
// Resolver SES endpoint resolver
type Resolver struct {
partitions endpoints.Partitions
}
// ResolveEndpoint resolves the service endpoint for the given region and options
func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) {
if len(region) == 0 {
return endpoint, &aws.MissingRegionError{}
}
opt := transformToSharedOptions(options)
return r.partitions.ResolveEndpoint(region, opt)
}
// New returns a new Resolver
func New() *Resolver {
return &Resolver{
partitions: defaultPartitions,
}
}
var partitionRegexp = struct {
Aws *regexp.Regexp
AwsCn *regexp.Regexp
AwsIso *regexp.Regexp
AwsIsoB *regexp.Regexp
AwsIsoE *regexp.Regexp
AwsIsoF *regexp.Regexp
AwsUsGov *regexp.Regexp
}{
Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"),
AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"),
AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"),
AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"),
}
var defaultPartitions = endpoints.Partitions{
{
ID: "aws",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.DualStackVariant,
}: {
Hostname: "email.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "email-fips.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "email-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "email.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.Aws,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
endpoints.EndpointKey{
Region: "af-south-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-northeast-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-northeast-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-northeast-3",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-south-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-southeast-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-southeast-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-southeast-3",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ca-central-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-central-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-north-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-south-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-west-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-west-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-west-3",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "fips-us-east-1",
}: endpoints.Endpoint{
Hostname: "email-fips.us-east-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-east-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "fips-us-west-2",
}: endpoints.Endpoint{
Hostname: "email-fips.us-west-2.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-west-2",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "me-south-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "sa-east-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-east-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-east-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "email-fips.us-east-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-east-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-west-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-west-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-west-2",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "email-fips.us-west-2.amazonaws.com",
},
},
},
{
ID: "aws-cn",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.DualStackVariant,
}: {
Hostname: "email.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "email-fips.{region}.amazonaws.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "email-fips.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "email.{region}.amazonaws.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsCn,
IsRegionalized: true,
},
{
ID: "aws-iso",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "email-fips.{region}.c2s.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "email.{region}.c2s.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsIso,
IsRegionalized: true,
},
{
ID: "aws-iso-b",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "email-fips.{region}.sc2s.sgov.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "email.{region}.sc2s.sgov.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsIsoB,
IsRegionalized: true,
},
{
ID: "aws-iso-e",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "email-fips.{region}.cloud.adc-e.uk",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "email.{region}.cloud.adc-e.uk",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsIsoE,
IsRegionalized: true,
},
{
ID: "aws-iso-f",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "email-fips.{region}.csp.hci.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "email.{region}.csp.hci.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsIsoF,
IsRegionalized: true,
},
{
ID: "aws-us-gov",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.DualStackVariant,
}: {
Hostname: "email.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "email-fips.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "email-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "email.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsUsGov,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
endpoints.EndpointKey{
Region: "fips-us-gov-west-1",
}: endpoints.Endpoint{
Hostname: "email-fips.us-gov-west-1.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-gov-west-1",
},
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "us-gov-west-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-gov-west-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "email-fips.us-gov-west-1.amazonaws.com",
},
},
},
}
| 412 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package endpoints
import (
"testing"
)
func TestRegexCompile(t *testing.T) {
_ = defaultPartitions
}
| 12 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package types
type BehaviorOnMXFailure string
// Enum values for BehaviorOnMXFailure
const (
BehaviorOnMXFailureUseDefaultValue BehaviorOnMXFailure = "UseDefaultValue"
BehaviorOnMXFailureRejectMessage BehaviorOnMXFailure = "RejectMessage"
)
// Values returns all known values for BehaviorOnMXFailure. 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 (BehaviorOnMXFailure) Values() []BehaviorOnMXFailure {
return []BehaviorOnMXFailure{
"UseDefaultValue",
"RejectMessage",
}
}
type BounceType string
// Enum values for BounceType
const (
BounceTypeDoesNotExist BounceType = "DoesNotExist"
BounceTypeMessageTooLarge BounceType = "MessageTooLarge"
BounceTypeExceededQuota BounceType = "ExceededQuota"
BounceTypeContentRejected BounceType = "ContentRejected"
BounceTypeUndefined BounceType = "Undefined"
BounceTypeTemporaryFailure BounceType = "TemporaryFailure"
)
// Values returns all known values for BounceType. Note that this can be expanded
// in the future, and so it is only as up to date as the client. The ordering of
// this slice is not guaranteed to be stable across updates.
func (BounceType) Values() []BounceType {
return []BounceType{
"DoesNotExist",
"MessageTooLarge",
"ExceededQuota",
"ContentRejected",
"Undefined",
"TemporaryFailure",
}
}
type BulkEmailStatus string
// Enum values for BulkEmailStatus
const (
BulkEmailStatusSuccess BulkEmailStatus = "Success"
BulkEmailStatusMessageRejected BulkEmailStatus = "MessageRejected"
BulkEmailStatusMailFromDomainNotVerified BulkEmailStatus = "MailFromDomainNotVerified"
BulkEmailStatusConfigurationSetDoesNotExist BulkEmailStatus = "ConfigurationSetDoesNotExist"
BulkEmailStatusTemplateDoesNotExist BulkEmailStatus = "TemplateDoesNotExist"
BulkEmailStatusAccountSuspended BulkEmailStatus = "AccountSuspended"
BulkEmailStatusAccountThrottled BulkEmailStatus = "AccountThrottled"
BulkEmailStatusAccountDailyQuotaExceeded BulkEmailStatus = "AccountDailyQuotaExceeded"
BulkEmailStatusInvalidSendingPoolName BulkEmailStatus = "InvalidSendingPoolName"
BulkEmailStatusAccountSendingPaused BulkEmailStatus = "AccountSendingPaused"
BulkEmailStatusConfigurationSetSendingPaused BulkEmailStatus = "ConfigurationSetSendingPaused"
BulkEmailStatusInvalidParameterValue BulkEmailStatus = "InvalidParameterValue"
BulkEmailStatusTransientFailure BulkEmailStatus = "TransientFailure"
BulkEmailStatusFailed BulkEmailStatus = "Failed"
)
// Values returns all known values for BulkEmailStatus. 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 (BulkEmailStatus) Values() []BulkEmailStatus {
return []BulkEmailStatus{
"Success",
"MessageRejected",
"MailFromDomainNotVerified",
"ConfigurationSetDoesNotExist",
"TemplateDoesNotExist",
"AccountSuspended",
"AccountThrottled",
"AccountDailyQuotaExceeded",
"InvalidSendingPoolName",
"AccountSendingPaused",
"ConfigurationSetSendingPaused",
"InvalidParameterValue",
"TransientFailure",
"Failed",
}
}
type ConfigurationSetAttribute string
// Enum values for ConfigurationSetAttribute
const (
ConfigurationSetAttributeEventDestinations ConfigurationSetAttribute = "eventDestinations"
ConfigurationSetAttributeTrackingOptions ConfigurationSetAttribute = "trackingOptions"
ConfigurationSetAttributeDeliveryOptions ConfigurationSetAttribute = "deliveryOptions"
ConfigurationSetAttributeReputationOptions ConfigurationSetAttribute = "reputationOptions"
)
// Values returns all known values for ConfigurationSetAttribute. 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 (ConfigurationSetAttribute) Values() []ConfigurationSetAttribute {
return []ConfigurationSetAttribute{
"eventDestinations",
"trackingOptions",
"deliveryOptions",
"reputationOptions",
}
}
type CustomMailFromStatus string
// Enum values for CustomMailFromStatus
const (
CustomMailFromStatusPending CustomMailFromStatus = "Pending"
CustomMailFromStatusSuccess CustomMailFromStatus = "Success"
CustomMailFromStatusFailed CustomMailFromStatus = "Failed"
CustomMailFromStatusTemporaryFailure CustomMailFromStatus = "TemporaryFailure"
)
// Values returns all known values for CustomMailFromStatus. 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 (CustomMailFromStatus) Values() []CustomMailFromStatus {
return []CustomMailFromStatus{
"Pending",
"Success",
"Failed",
"TemporaryFailure",
}
}
type DimensionValueSource string
// Enum values for DimensionValueSource
const (
DimensionValueSourceMessageTag DimensionValueSource = "messageTag"
DimensionValueSourceEmailHeader DimensionValueSource = "emailHeader"
DimensionValueSourceLinkTag DimensionValueSource = "linkTag"
)
// Values returns all known values for DimensionValueSource. 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 (DimensionValueSource) Values() []DimensionValueSource {
return []DimensionValueSource{
"messageTag",
"emailHeader",
"linkTag",
}
}
type DsnAction string
// Enum values for DsnAction
const (
DsnActionFailed DsnAction = "failed"
DsnActionDelayed DsnAction = "delayed"
DsnActionDelivered DsnAction = "delivered"
DsnActionRelayed DsnAction = "relayed"
DsnActionExpanded DsnAction = "expanded"
)
// Values returns all known values for DsnAction. 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 (DsnAction) Values() []DsnAction {
return []DsnAction{
"failed",
"delayed",
"delivered",
"relayed",
"expanded",
}
}
type EventType string
// Enum values for EventType
const (
EventTypeSend EventType = "send"
EventTypeReject EventType = "reject"
EventTypeBounce EventType = "bounce"
EventTypeComplaint EventType = "complaint"
EventTypeDelivery EventType = "delivery"
EventTypeOpen EventType = "open"
EventTypeClick EventType = "click"
EventTypeRenderingFailure EventType = "renderingFailure"
)
// Values returns all known values for EventType. 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 (EventType) Values() []EventType {
return []EventType{
"send",
"reject",
"bounce",
"complaint",
"delivery",
"open",
"click",
"renderingFailure",
}
}
type IdentityType string
// Enum values for IdentityType
const (
IdentityTypeEmailAddress IdentityType = "EmailAddress"
IdentityTypeDomain IdentityType = "Domain"
)
// Values returns all known values for IdentityType. 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 (IdentityType) Values() []IdentityType {
return []IdentityType{
"EmailAddress",
"Domain",
}
}
type InvocationType string
// Enum values for InvocationType
const (
InvocationTypeEvent InvocationType = "Event"
InvocationTypeRequestResponse InvocationType = "RequestResponse"
)
// Values returns all known values for InvocationType. 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 (InvocationType) Values() []InvocationType {
return []InvocationType{
"Event",
"RequestResponse",
}
}
type NotificationType string
// Enum values for NotificationType
const (
NotificationTypeBounce NotificationType = "Bounce"
NotificationTypeComplaint NotificationType = "Complaint"
NotificationTypeDelivery NotificationType = "Delivery"
)
// Values returns all known values for NotificationType. 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 (NotificationType) Values() []NotificationType {
return []NotificationType{
"Bounce",
"Complaint",
"Delivery",
}
}
type ReceiptFilterPolicy string
// Enum values for ReceiptFilterPolicy
const (
ReceiptFilterPolicyBlock ReceiptFilterPolicy = "Block"
ReceiptFilterPolicyAllow ReceiptFilterPolicy = "Allow"
)
// Values returns all known values for ReceiptFilterPolicy. 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 (ReceiptFilterPolicy) Values() []ReceiptFilterPolicy {
return []ReceiptFilterPolicy{
"Block",
"Allow",
}
}
type SNSActionEncoding string
// Enum values for SNSActionEncoding
const (
SNSActionEncodingUtf8 SNSActionEncoding = "UTF-8"
SNSActionEncodingBase64 SNSActionEncoding = "Base64"
)
// Values returns all known values for SNSActionEncoding. 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 (SNSActionEncoding) Values() []SNSActionEncoding {
return []SNSActionEncoding{
"UTF-8",
"Base64",
}
}
type StopScope string
// Enum values for StopScope
const (
StopScopeRuleSet StopScope = "RuleSet"
)
// Values returns all known values for StopScope. 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 (StopScope) Values() []StopScope {
return []StopScope{
"RuleSet",
}
}
type TlsPolicy string
// Enum values for TlsPolicy
const (
TlsPolicyRequire TlsPolicy = "Require"
TlsPolicyOptional TlsPolicy = "Optional"
)
// Values returns all known values for TlsPolicy. 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 (TlsPolicy) Values() []TlsPolicy {
return []TlsPolicy{
"Require",
"Optional",
}
}
type VerificationStatus string
// Enum values for VerificationStatus
const (
VerificationStatusPending VerificationStatus = "Pending"
VerificationStatusSuccess VerificationStatus = "Success"
VerificationStatusFailed VerificationStatus = "Failed"
VerificationStatusTemporaryFailure VerificationStatus = "TemporaryFailure"
VerificationStatusNotStarted VerificationStatus = "NotStarted"
)
// Values returns all known values for VerificationStatus. 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 (VerificationStatus) Values() []VerificationStatus {
return []VerificationStatus{
"Pending",
"Success",
"Failed",
"TemporaryFailure",
"NotStarted",
}
}
| 358 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package types
import (
"fmt"
smithy "github.com/aws/smithy-go"
)
// Indicates that email sending is disabled for your entire Amazon SES account.
// You can enable or disable email sending for your Amazon SES account using
// UpdateAccountSendingEnabled .
type AccountSendingPausedException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *AccountSendingPausedException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *AccountSendingPausedException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *AccountSendingPausedException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "AccountSendingPausedException"
}
return *e.ErrorCodeOverride
}
func (e *AccountSendingPausedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that a resource could not be created because of a naming conflict.
type AlreadyExistsException struct {
Message *string
ErrorCodeOverride *string
Name *string
noSmithyDocumentSerde
}
func (e *AlreadyExistsException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *AlreadyExistsException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *AlreadyExistsException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "AlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *AlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that the delete operation could not be completed.
type CannotDeleteException struct {
Message *string
ErrorCodeOverride *string
Name *string
noSmithyDocumentSerde
}
func (e *CannotDeleteException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CannotDeleteException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CannotDeleteException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CannotDelete"
}
return *e.ErrorCodeOverride
}
func (e *CannotDeleteException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that the configuration set could not be created because of a naming
// conflict.
type ConfigurationSetAlreadyExistsException struct {
Message *string
ErrorCodeOverride *string
ConfigurationSetName *string
noSmithyDocumentSerde
}
func (e *ConfigurationSetAlreadyExistsException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ConfigurationSetAlreadyExistsException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ConfigurationSetAlreadyExistsException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ConfigurationSetAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *ConfigurationSetAlreadyExistsException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Indicates that the configuration set does not exist.
type ConfigurationSetDoesNotExistException struct {
Message *string
ErrorCodeOverride *string
ConfigurationSetName *string
noSmithyDocumentSerde
}
func (e *ConfigurationSetDoesNotExistException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ConfigurationSetDoesNotExistException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ConfigurationSetDoesNotExistException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ConfigurationSetDoesNotExist"
}
return *e.ErrorCodeOverride
}
func (e *ConfigurationSetDoesNotExistException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Indicates that email sending is disabled for the configuration set. You can
// enable or disable email sending for a configuration set using
// UpdateConfigurationSetSendingEnabled .
type ConfigurationSetSendingPausedException struct {
Message *string
ErrorCodeOverride *string
ConfigurationSetName *string
noSmithyDocumentSerde
}
func (e *ConfigurationSetSendingPausedException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ConfigurationSetSendingPausedException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ConfigurationSetSendingPausedException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ConfigurationSetSendingPausedException"
}
return *e.ErrorCodeOverride
}
func (e *ConfigurationSetSendingPausedException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Indicates that custom verification email template provided content is invalid.
type CustomVerificationEmailInvalidContentException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *CustomVerificationEmailInvalidContentException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CustomVerificationEmailInvalidContentException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CustomVerificationEmailInvalidContentException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CustomVerificationEmailInvalidContent"
}
return *e.ErrorCodeOverride
}
func (e *CustomVerificationEmailInvalidContentException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Indicates that a custom verification email template with the name you specified
// already exists.
type CustomVerificationEmailTemplateAlreadyExistsException struct {
Message *string
ErrorCodeOverride *string
CustomVerificationEmailTemplateName *string
noSmithyDocumentSerde
}
func (e *CustomVerificationEmailTemplateAlreadyExistsException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CustomVerificationEmailTemplateAlreadyExistsException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CustomVerificationEmailTemplateAlreadyExistsException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CustomVerificationEmailTemplateAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *CustomVerificationEmailTemplateAlreadyExistsException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Indicates that a custom verification email template with the name you specified
// does not exist.
type CustomVerificationEmailTemplateDoesNotExistException struct {
Message *string
ErrorCodeOverride *string
CustomVerificationEmailTemplateName *string
noSmithyDocumentSerde
}
func (e *CustomVerificationEmailTemplateDoesNotExistException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CustomVerificationEmailTemplateDoesNotExistException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CustomVerificationEmailTemplateDoesNotExistException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CustomVerificationEmailTemplateDoesNotExist"
}
return *e.ErrorCodeOverride
}
func (e *CustomVerificationEmailTemplateDoesNotExistException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Indicates that the event destination could not be created because of a naming
// conflict.
type EventDestinationAlreadyExistsException struct {
Message *string
ErrorCodeOverride *string
ConfigurationSetName *string
EventDestinationName *string
noSmithyDocumentSerde
}
func (e *EventDestinationAlreadyExistsException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *EventDestinationAlreadyExistsException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *EventDestinationAlreadyExistsException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "EventDestinationAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *EventDestinationAlreadyExistsException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Indicates that the event destination does not exist.
type EventDestinationDoesNotExistException struct {
Message *string
ErrorCodeOverride *string
ConfigurationSetName *string
EventDestinationName *string
noSmithyDocumentSerde
}
func (e *EventDestinationDoesNotExistException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *EventDestinationDoesNotExistException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *EventDestinationDoesNotExistException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "EventDestinationDoesNotExist"
}
return *e.ErrorCodeOverride
}
func (e *EventDestinationDoesNotExistException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Indicates that the sender address specified for a custom verification email is
// not verified, and is therefore not eligible to send the custom verification
// email.
type FromEmailAddressNotVerifiedException struct {
Message *string
ErrorCodeOverride *string
FromEmailAddress *string
noSmithyDocumentSerde
}
func (e *FromEmailAddressNotVerifiedException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *FromEmailAddressNotVerifiedException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *FromEmailAddressNotVerifiedException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "FromEmailAddressNotVerified"
}
return *e.ErrorCodeOverride
}
func (e *FromEmailAddressNotVerifiedException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Indicates that the Amazon CloudWatch destination is invalid. See the error
// message for details.
type InvalidCloudWatchDestinationException struct {
Message *string
ErrorCodeOverride *string
ConfigurationSetName *string
EventDestinationName *string
noSmithyDocumentSerde
}
func (e *InvalidCloudWatchDestinationException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidCloudWatchDestinationException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidCloudWatchDestinationException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidCloudWatchDestination"
}
return *e.ErrorCodeOverride
}
func (e *InvalidCloudWatchDestinationException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Indicates that the configuration set is invalid. See the error message for
// details.
type InvalidConfigurationSetException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidConfigurationSetException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidConfigurationSetException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidConfigurationSetException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidConfigurationSet"
}
return *e.ErrorCodeOverride
}
func (e *InvalidConfigurationSetException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that provided delivery option is invalid.
type InvalidDeliveryOptionsException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidDeliveryOptionsException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidDeliveryOptionsException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidDeliveryOptionsException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidDeliveryOptions"
}
return *e.ErrorCodeOverride
}
func (e *InvalidDeliveryOptionsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that the Amazon Kinesis Firehose destination is invalid. See the
// error message for details.
type InvalidFirehoseDestinationException struct {
Message *string
ErrorCodeOverride *string
ConfigurationSetName *string
EventDestinationName *string
noSmithyDocumentSerde
}
func (e *InvalidFirehoseDestinationException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidFirehoseDestinationException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidFirehoseDestinationException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidFirehoseDestination"
}
return *e.ErrorCodeOverride
}
func (e *InvalidFirehoseDestinationException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Indicates that the provided AWS Lambda function is invalid, or that Amazon SES
// could not execute the provided function, possibly due to permissions issues. For
// information about giving permissions, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html)
// .
type InvalidLambdaFunctionException struct {
Message *string
ErrorCodeOverride *string
FunctionArn *string
noSmithyDocumentSerde
}
func (e *InvalidLambdaFunctionException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidLambdaFunctionException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidLambdaFunctionException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidLambdaFunction"
}
return *e.ErrorCodeOverride
}
func (e *InvalidLambdaFunctionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that the provided policy is invalid. Check the error stack for more
// information about what caused the error.
type InvalidPolicyException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidPolicyException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidPolicyException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidPolicyException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidPolicy"
}
return *e.ErrorCodeOverride
}
func (e *InvalidPolicyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that one or more of the replacement values you provided is invalid.
// This error may occur when the TemplateData object contains invalid JSON.
type InvalidRenderingParameterException struct {
Message *string
ErrorCodeOverride *string
TemplateName *string
noSmithyDocumentSerde
}
func (e *InvalidRenderingParameterException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidRenderingParameterException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidRenderingParameterException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidRenderingParameter"
}
return *e.ErrorCodeOverride
}
func (e *InvalidRenderingParameterException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Indicates that the provided Amazon S3 bucket or AWS KMS encryption key is
// invalid, or that Amazon SES could not publish to the bucket, possibly due to
// permissions issues. For information about giving permissions, see the Amazon
// SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html)
// .
type InvalidS3ConfigurationException struct {
Message *string
ErrorCodeOverride *string
Bucket *string
noSmithyDocumentSerde
}
func (e *InvalidS3ConfigurationException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidS3ConfigurationException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidS3ConfigurationException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidS3Configuration"
}
return *e.ErrorCodeOverride
}
func (e *InvalidS3ConfigurationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that the Amazon Simple Notification Service (Amazon SNS) destination
// is invalid. See the error message for details.
type InvalidSNSDestinationException struct {
Message *string
ErrorCodeOverride *string
ConfigurationSetName *string
EventDestinationName *string
noSmithyDocumentSerde
}
func (e *InvalidSNSDestinationException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidSNSDestinationException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidSNSDestinationException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidSNSDestination"
}
return *e.ErrorCodeOverride
}
func (e *InvalidSNSDestinationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that the provided Amazon SNS topic is invalid, or that Amazon SES
// could not publish to the topic, possibly due to permissions issues. For
// information about giving permissions, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html)
// .
type InvalidSnsTopicException struct {
Message *string
ErrorCodeOverride *string
Topic *string
noSmithyDocumentSerde
}
func (e *InvalidSnsTopicException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidSnsTopicException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidSnsTopicException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidSnsTopic"
}
return *e.ErrorCodeOverride
}
func (e *InvalidSnsTopicException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that the template that you specified could not be rendered. This
// issue may occur when a template refers to a partial that does not exist.
type InvalidTemplateException struct {
Message *string
ErrorCodeOverride *string
TemplateName *string
noSmithyDocumentSerde
}
func (e *InvalidTemplateException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidTemplateException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidTemplateException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidTemplate"
}
return *e.ErrorCodeOverride
}
func (e *InvalidTemplateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that the custom domain to be used for open and click tracking
// redirects is invalid. This error appears most often in the following situations:
//
// - When the tracking domain you specified is not verified in Amazon SES.
// - When the tracking domain you specified is not a valid domain or subdomain.
type InvalidTrackingOptionsException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidTrackingOptionsException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidTrackingOptionsException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidTrackingOptionsException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidTrackingOptions"
}
return *e.ErrorCodeOverride
}
func (e *InvalidTrackingOptionsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that a resource could not be created because of service limits. For a
// list of Amazon SES limits, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html)
// .
type LimitExceededException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *LimitExceededException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *LimitExceededException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *LimitExceededException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "LimitExceeded"
}
return *e.ErrorCodeOverride
}
func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that the message could not be sent because Amazon SES could not read
// the MX record required to use the specified MAIL FROM domain. For information
// about editing the custom MAIL FROM domain settings for an identity, see the
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-edit.html)
// .
type MailFromDomainNotVerifiedException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *MailFromDomainNotVerifiedException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *MailFromDomainNotVerifiedException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *MailFromDomainNotVerifiedException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "MailFromDomainNotVerifiedException"
}
return *e.ErrorCodeOverride
}
func (e *MailFromDomainNotVerifiedException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Indicates that the action failed, and the message could not be sent. Check the
// error stack for more information about what caused the error.
type MessageRejected struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *MessageRejected) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *MessageRejected) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *MessageRejected) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "MessageRejected"
}
return *e.ErrorCodeOverride
}
func (e *MessageRejected) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that one or more of the replacement values for the specified template
// was not specified. Ensure that the TemplateData object contains references to
// all of the replacement tags in the specified template.
type MissingRenderingAttributeException struct {
Message *string
ErrorCodeOverride *string
TemplateName *string
noSmithyDocumentSerde
}
func (e *MissingRenderingAttributeException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *MissingRenderingAttributeException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *MissingRenderingAttributeException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "MissingRenderingAttribute"
}
return *e.ErrorCodeOverride
}
func (e *MissingRenderingAttributeException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Indicates that the account has not been granted production access.
type ProductionAccessNotGrantedException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ProductionAccessNotGrantedException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ProductionAccessNotGrantedException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ProductionAccessNotGrantedException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ProductionAccessNotGranted"
}
return *e.ErrorCodeOverride
}
func (e *ProductionAccessNotGrantedException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Indicates that the provided receipt rule does not exist.
type RuleDoesNotExistException struct {
Message *string
ErrorCodeOverride *string
Name *string
noSmithyDocumentSerde
}
func (e *RuleDoesNotExistException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *RuleDoesNotExistException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *RuleDoesNotExistException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "RuleDoesNotExist"
}
return *e.ErrorCodeOverride
}
func (e *RuleDoesNotExistException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that the provided receipt rule set does not exist.
type RuleSetDoesNotExistException struct {
Message *string
ErrorCodeOverride *string
Name *string
noSmithyDocumentSerde
}
func (e *RuleSetDoesNotExistException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *RuleSetDoesNotExistException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *RuleSetDoesNotExistException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "RuleSetDoesNotExist"
}
return *e.ErrorCodeOverride
}
func (e *RuleSetDoesNotExistException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that the Template object you specified does not exist in your Amazon
// SES account.
type TemplateDoesNotExistException struct {
Message *string
ErrorCodeOverride *string
TemplateName *string
noSmithyDocumentSerde
}
func (e *TemplateDoesNotExistException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TemplateDoesNotExistException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TemplateDoesNotExistException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "TemplateDoesNotExist"
}
return *e.ErrorCodeOverride
}
func (e *TemplateDoesNotExistException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Indicates that the configuration set you specified already contains a
// TrackingOptions object.
type TrackingOptionsAlreadyExistsException struct {
Message *string
ErrorCodeOverride *string
ConfigurationSetName *string
noSmithyDocumentSerde
}
func (e *TrackingOptionsAlreadyExistsException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TrackingOptionsAlreadyExistsException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TrackingOptionsAlreadyExistsException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "TrackingOptionsAlreadyExistsException"
}
return *e.ErrorCodeOverride
}
func (e *TrackingOptionsAlreadyExistsException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Indicates that the TrackingOptions object you specified does not exist.
type TrackingOptionsDoesNotExistException struct {
Message *string
ErrorCodeOverride *string
ConfigurationSetName *string
noSmithyDocumentSerde
}
func (e *TrackingOptionsDoesNotExistException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TrackingOptionsDoesNotExistException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TrackingOptionsDoesNotExistException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "TrackingOptionsDoesNotExistException"
}
return *e.ErrorCodeOverride
}
func (e *TrackingOptionsDoesNotExistException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
| 1,022 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package types
import (
smithydocument "github.com/aws/smithy-go/document"
"time"
)
// When included in a receipt rule, this action adds a header to the received
// email. For information about adding a header using a receipt rule, see the
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-add-header.html)
// .
type AddHeaderAction struct {
// The name of the header to add. Must be between 1 and 50 characters, inclusive,
// and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only.
//
// This member is required.
HeaderName *string
// Must be less than 2048 characters, and must not contain newline characters
// ("\r" or "\n").
//
// This member is required.
HeaderValue *string
noSmithyDocumentSerde
}
// Represents the body of the message. You can specify text, HTML, or both. If you
// use both, then the message should display correctly in the widest variety of
// email clients.
type Body struct {
// The content of the message, in HTML format. Use this for email clients that can
// process HTML. You can include clickable links, formatted text, and much more in
// an HTML message.
Html *Content
// The content of the message, in text format. Use this for text-based email
// clients, or clients on high-latency networks (such as mobile devices).
Text *Content
noSmithyDocumentSerde
}
// When included in a receipt rule, this action rejects the received email by
// returning a bounce response to the sender and, optionally, publishes a
// notification to Amazon Simple Notification Service (Amazon SNS). For information
// about sending a bounce message in response to a received email, see the Amazon
// SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-bounce.html)
// .
type BounceAction struct {
// Human-readable text to include in the bounce message.
//
// This member is required.
Message *string
// The email address of the sender of the bounced email. This is the address from
// which the bounce message will be sent.
//
// This member is required.
Sender *string
// The SMTP reply code, as defined by RFC 5321 (https://tools.ietf.org/html/rfc5321)
// .
//
// This member is required.
SmtpReplyCode *string
// The SMTP enhanced status code, as defined by RFC 3463 (https://tools.ietf.org/html/rfc3463)
// .
StatusCode *string
// The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the
// bounce action is taken. An example of an Amazon SNS topic ARN is
// arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon
// SNS topics, see the Amazon SNS Developer Guide (https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html)
// .
TopicArn *string
noSmithyDocumentSerde
}
// Recipient-related information to include in the Delivery Status Notification
// (DSN) when an email that Amazon SES receives on your behalf bounces. For
// information about receiving email through Amazon SES, see the Amazon SES
// Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html)
// .
type BouncedRecipientInfo struct {
// The email address of the recipient of the bounced email.
//
// This member is required.
Recipient *string
// The reason for the bounce. You must provide either this parameter or
// RecipientDsnFields .
BounceType BounceType
// This parameter is used only for sending authorization. It is the ARN of the
// identity that is associated with the sending authorization policy that permits
// you to receive email for the recipient of the bounced email. For more
// information about sending authorization, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// .
RecipientArn *string
// Recipient-related DSN fields, most of which would normally be filled in
// automatically when provided with a BounceType . You must provide either this
// parameter or BounceType .
RecipientDsnFields *RecipientDsnFields
noSmithyDocumentSerde
}
// An array that contains one or more Destinations, as well as the tags and
// replacement data associated with each of those Destinations.
type BulkEmailDestination struct {
// Represents the destination of the message, consisting of To:, CC:, and BCC:
// fields. Amazon SES does not support the SMTPUTF8 extension, as described in
// RFC6531 (https://tools.ietf.org/html/rfc6531) . For this reason, the local part
// of a destination email address (the part of the email address that precedes the
// @ sign) may only contain 7-bit ASCII characters (https://en.wikipedia.org/wiki/Email_address#Local-part)
// . If the domain part of an address (the part after the @ sign) contains
// non-ASCII characters, they must be encoded using Punycode, as described in
// RFC3492 (https://tools.ietf.org/html/rfc3492.html) .
//
// This member is required.
Destination *Destination
// A list of tags, in the form of name/value pairs, to apply to an email that you
// send using SendBulkTemplatedEmail . Tags correspond to characteristics of the
// email that you define, so that you can publish email sending events.
ReplacementTags []MessageTag
// A list of replacement values to apply to the template. This parameter is a JSON
// object, typically consisting of key-value pairs in which the keys correspond to
// replacement tags in the email template.
ReplacementTemplateData *string
noSmithyDocumentSerde
}
// An object that contains the response from the SendBulkTemplatedEmail operation.
type BulkEmailDestinationStatus struct {
// A description of an error that prevented a message being sent using the
// SendBulkTemplatedEmail operation.
Error *string
// The unique message identifier returned from the SendBulkTemplatedEmail
// operation.
MessageId *string
// The status of a message sent using the SendBulkTemplatedEmail operation.
// Possible values for this parameter include:
// - Success : Amazon SES accepted the message, and will attempt to deliver it to
// the recipients.
// - MessageRejected : The message was rejected because it contained a virus.
// - MailFromDomainNotVerified : The sender's email address or domain was not
// verified.
// - ConfigurationSetDoesNotExist : The configuration set you specified does not
// exist.
// - TemplateDoesNotExist : The template you specified does not exist.
// - AccountSuspended : Your account has been shut down because of issues related
// to your email sending practices.
// - AccountThrottled : The number of emails you can send has been reduced
// because your account has exceeded its allocated sending limit.
// - AccountDailyQuotaExceeded : You have reached or exceeded the maximum number
// of emails you can send from your account in a 24-hour period.
// - InvalidSendingPoolName : The configuration set you specified refers to an IP
// pool that does not exist.
// - AccountSendingPaused : Email sending for the Amazon SES account was disabled
// using the UpdateAccountSendingEnabled operation.
// - ConfigurationSetSendingPaused : Email sending for this configuration set was
// disabled using the UpdateConfigurationSetSendingEnabled operation.
// - InvalidParameterValue : One or more of the parameters you specified when
// calling this operation was invalid. See the error message for additional
// information.
// - TransientFailure : Amazon SES was unable to process your request because of
// a temporary issue.
// - Failed : Amazon SES was unable to process your request. See the error
// message for additional information.
Status BulkEmailStatus
noSmithyDocumentSerde
}
// Contains information associated with an Amazon CloudWatch event destination to
// which email sending events are published. Event destinations, such as Amazon
// CloudWatch, are associated with configuration sets, which enable you to publish
// email sending events. For information about using configuration sets, see the
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html)
// .
type CloudWatchDestination struct {
// A list of dimensions upon which to categorize your emails when you publish
// email sending events to Amazon CloudWatch.
//
// This member is required.
DimensionConfigurations []CloudWatchDimensionConfiguration
noSmithyDocumentSerde
}
// Contains the dimension configuration to use when you publish email sending
// events to Amazon CloudWatch. For information about publishing email sending
// events to Amazon CloudWatch, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html)
// .
type CloudWatchDimensionConfiguration struct {
// The default value of the dimension that is published to Amazon CloudWatch if
// you do not provide the value of the dimension when you send an email. The
// default value must:
// - This value can only contain ASCII letters (a-z, A-Z), numbers (0-9),
// underscores (_), or dashes (-).
// - Contain less than 256 characters.
//
// This member is required.
DefaultDimensionValue *string
// The name of an Amazon CloudWatch dimension associated with an email sending
// metric. The name must:
// - This value can only contain ASCII letters (a-z, A-Z), numbers (0-9),
// underscores (_), or dashes (-).
// - Contain less than 256 characters.
//
// This member is required.
DimensionName *string
// The place where Amazon SES finds the value of a dimension to publish to Amazon
// CloudWatch. If you want Amazon SES to use the message tags that you specify
// using an X-SES-MESSAGE-TAGS header or a parameter to the SendEmail / SendRawEmail
// API, choose messageTag . If you want Amazon SES to use your own email headers,
// choose emailHeader .
//
// This member is required.
DimensionValueSource DimensionValueSource
noSmithyDocumentSerde
}
// The name of the configuration set. Configuration sets let you create groups of
// rules that you can apply to the emails you send using Amazon SES. For more
// information about using configuration sets, see Using Amazon SES Configuration
// Sets (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/using-configuration-sets.html)
// in the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/)
// .
type ConfigurationSet struct {
// The name of the configuration set. The name must meet the following
// requirements:
// - Contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes
// (-).
// - Contain 64 characters or fewer.
//
// This member is required.
Name *string
noSmithyDocumentSerde
}
// Represents textual data, plus an optional character set specification. By
// default, the text must be 7-bit ASCII, due to the constraints of the SMTP
// protocol. If the text must contain any other characters, then you must also
// specify a character set. Examples include UTF-8, ISO-8859-1, and Shift_JIS.
type Content struct {
// The textual data of the content.
//
// This member is required.
Data *string
// The character set of the content.
Charset *string
noSmithyDocumentSerde
}
// Contains information about a custom verification email template.
type CustomVerificationEmailTemplate struct {
// The URL that the recipient of the verification email is sent to if his or her
// address is not successfully verified.
FailureRedirectionURL *string
// The email address that the custom verification email is sent from.
FromEmailAddress *string
// The URL that the recipient of the verification email is sent to if his or her
// address is successfully verified.
SuccessRedirectionURL *string
// The name of the custom verification email template.
TemplateName *string
// The subject line of the custom verification email.
TemplateSubject *string
noSmithyDocumentSerde
}
// Specifies whether messages that use the configuration set are required to use
// Transport Layer Security (TLS).
type DeliveryOptions struct {
// Specifies whether messages that use the configuration set are required to use
// Transport Layer Security (TLS). If the value is Require , messages are only
// delivered if a TLS connection can be established. If the value is Optional ,
// messages can be delivered in plain text if a TLS connection can't be
// established.
TlsPolicy TlsPolicy
noSmithyDocumentSerde
}
// Represents the destination of the message, consisting of To:, CC:, and BCC:
// fields. Amazon SES does not support the SMTPUTF8 extension, as described in
// RFC6531 (https://tools.ietf.org/html/rfc6531) . For this reason, the local part
// of a destination email address (the part of the email address that precedes the
// @ sign) may only contain 7-bit ASCII characters (https://en.wikipedia.org/wiki/Email_address#Local-part)
// . If the domain part of an address (the part after the @ sign) contains
// non-ASCII characters, they must be encoded using Punycode, as described in
// RFC3492 (https://tools.ietf.org/html/rfc3492.html) .
type Destination struct {
// The recipients to place on the BCC: line of the message.
BccAddresses []string
// The recipients to place on the CC: line of the message.
CcAddresses []string
// The recipients to place on the To: line of the message.
ToAddresses []string
noSmithyDocumentSerde
}
// Contains information about the event destination that the specified email
// sending events will be published to. When you create or update an event
// destination, you must provide one, and only one, destination. The destination
// can be Amazon CloudWatch, Amazon Kinesis Firehose or Amazon Simple Notification
// Service (Amazon SNS). Event destinations are associated with configuration sets,
// which enable you to publish email sending events to Amazon CloudWatch, Amazon
// Kinesis Firehose, or Amazon Simple Notification Service (Amazon SNS). For
// information about using configuration sets, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html)
// .
type EventDestination struct {
// The type of email sending events to publish to the event destination.
//
// This member is required.
MatchingEventTypes []EventType
// The name of the event destination. The name must:
// - This value can only contain ASCII letters (a-z, A-Z), numbers (0-9),
// underscores (_), or dashes (-).
// - Contain less than 64 characters.
//
// This member is required.
Name *string
// An object that contains the names, default values, and sources of the
// dimensions associated with an Amazon CloudWatch event destination.
CloudWatchDestination *CloudWatchDestination
// Sets whether Amazon SES publishes events to this destination when you send an
// email with the associated configuration set. Set to true to enable publishing
// to this destination; set to false to prevent publishing to this destination.
// The default value is false .
Enabled bool
// An object that contains the delivery stream ARN and the IAM role ARN associated
// with an Amazon Kinesis Firehose event destination.
KinesisFirehoseDestination *KinesisFirehoseDestination
// An object that contains the topic ARN associated with an Amazon Simple
// Notification Service (Amazon SNS) event destination.
SNSDestination *SNSDestination
noSmithyDocumentSerde
}
// Additional X-headers to include in the Delivery Status Notification (DSN) when
// an email that Amazon SES receives on your behalf bounces. For information about
// receiving email through Amazon SES, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html)
// .
type ExtensionField struct {
// The name of the header to add. Must be between 1 and 50 characters, inclusive,
// and consist of alphanumeric (a-z, A-Z, 0-9) characters and dashes only.
//
// This member is required.
Name *string
// The value of the header to add. Must be less than 2048 characters, and must not
// contain newline characters ("\r" or "\n").
//
// This member is required.
Value *string
noSmithyDocumentSerde
}
// Represents the DKIM attributes of a verified email address or a domain.
type IdentityDkimAttributes struct {
// Is true if DKIM signing is enabled for email sent from the identity. It's false
// otherwise. The default value is true.
//
// This member is required.
DkimEnabled bool
// Describes whether Amazon SES has successfully verified the DKIM DNS records
// (tokens) published in the domain name's DNS. (This only applies to domain
// identities, not email address identities.)
//
// This member is required.
DkimVerificationStatus VerificationStatus
// A set of character strings that represent the domain's identity. Using these
// tokens, you need to create DNS CNAME records that point to DKIM public keys that
// are hosted by Amazon SES. Amazon Web Services eventually detects that you've
// updated your DNS records. This detection process might take up to 72 hours.
// After successful detection, Amazon SES is able to DKIM-sign email originating
// from that domain. (This only applies to domain identities, not email address
// identities.) For more information about creating DNS records using DKIM tokens,
// see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html)
// .
DkimTokens []string
noSmithyDocumentSerde
}
// Represents the custom MAIL FROM domain attributes of a verified identity (email
// address or domain).
type IdentityMailFromDomainAttributes struct {
// The action that Amazon SES takes if it cannot successfully read the required MX
// record when you send an email. A value of UseDefaultValue indicates that if
// Amazon SES cannot read the required MX record, it uses amazonses.com (or a
// subdomain of that) as the MAIL FROM domain. A value of RejectMessage indicates
// that if Amazon SES cannot read the required MX record, Amazon SES returns a
// MailFromDomainNotVerified error and does not send the email. The custom MAIL
// FROM setup states that result in this behavior are Pending , Failed , and
// TemporaryFailure .
//
// This member is required.
BehaviorOnMXFailure BehaviorOnMXFailure
// The custom MAIL FROM domain that the identity is configured to use.
//
// This member is required.
MailFromDomain *string
// The state that indicates whether Amazon SES has successfully read the MX record
// required for custom MAIL FROM domain setup. If the state is Success , Amazon SES
// uses the specified custom MAIL FROM domain when the verified identity sends an
// email. All other states indicate that Amazon SES takes the action described by
// BehaviorOnMXFailure .
//
// This member is required.
MailFromDomainStatus CustomMailFromStatus
noSmithyDocumentSerde
}
// Represents the notification attributes of an identity, including whether an
// identity has Amazon Simple Notification Service (Amazon SNS) topics set for
// bounce, complaint, and/or delivery notifications, and whether feedback
// forwarding is enabled for bounce and complaint notifications.
type IdentityNotificationAttributes struct {
// The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will
// publish bounce notifications.
//
// This member is required.
BounceTopic *string
// The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will
// publish complaint notifications.
//
// This member is required.
ComplaintTopic *string
// The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES will
// publish delivery notifications.
//
// This member is required.
DeliveryTopic *string
// Describes whether Amazon SES will forward bounce and complaint notifications as
// email. true indicates that Amazon SES will forward bounce and complaint
// notifications as email, while false indicates that bounce and complaint
// notifications will be published only to the specified bounce and complaint
// Amazon SNS topics.
//
// This member is required.
ForwardingEnabled bool
// Describes whether Amazon SES includes the original email headers in Amazon SNS
// notifications of type Bounce . A value of true specifies that Amazon SES will
// include headers in bounce notifications, and a value of false specifies that
// Amazon SES will not include headers in bounce notifications.
HeadersInBounceNotificationsEnabled bool
// Describes whether Amazon SES includes the original email headers in Amazon SNS
// notifications of type Complaint . A value of true specifies that Amazon SES
// will include headers in complaint notifications, and a value of false specifies
// that Amazon SES will not include headers in complaint notifications.
HeadersInComplaintNotificationsEnabled bool
// Describes whether Amazon SES includes the original email headers in Amazon SNS
// notifications of type Delivery . A value of true specifies that Amazon SES will
// include headers in delivery notifications, and a value of false specifies that
// Amazon SES will not include headers in delivery notifications.
HeadersInDeliveryNotificationsEnabled bool
noSmithyDocumentSerde
}
// Represents the verification attributes of a single identity.
type IdentityVerificationAttributes struct {
// The verification status of the identity: "Pending", "Success", "Failed", or
// "TemporaryFailure".
//
// This member is required.
VerificationStatus VerificationStatus
// The verification token for a domain identity. Null for email address identities.
VerificationToken *string
noSmithyDocumentSerde
}
// Contains the delivery stream ARN and the IAM role ARN associated with an Amazon
// Kinesis Firehose event destination. Event destinations, such as Amazon Kinesis
// Firehose, are associated with configuration sets, which enable you to publish
// email sending events. For information about using configuration sets, see the
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html)
// .
type KinesisFirehoseDestination struct {
// The ARN of the Amazon Kinesis Firehose stream that email sending events should
// be published to.
//
// This member is required.
DeliveryStreamARN *string
// The ARN of the IAM role under which Amazon SES publishes email sending events
// to the Amazon Kinesis Firehose stream.
//
// This member is required.
IAMRoleARN *string
noSmithyDocumentSerde
}
// When included in a receipt rule, this action calls an AWS Lambda function and,
// optionally, publishes a notification to Amazon Simple Notification Service
// (Amazon SNS). To enable Amazon SES to call your AWS Lambda function or to
// publish to an Amazon SNS topic of another account, Amazon SES must have
// permission to access those resources. For information about giving permissions,
// see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html)
// . For information about using AWS Lambda actions in receipt rules, see the
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-lambda.html)
// .
type LambdaAction struct {
// The Amazon Resource Name (ARN) of the AWS Lambda function. An example of an AWS
// Lambda function ARN is arn:aws:lambda:us-west-2:account-id:function:MyFunction .
// For more information about AWS Lambda, see the AWS Lambda Developer Guide (https://docs.aws.amazon.com/lambda/latest/dg/welcome.html)
// .
//
// This member is required.
FunctionArn *string
// The invocation type of the AWS Lambda function. An invocation type of
// RequestResponse means that the execution of the function will immediately result
// in a response, and a value of Event means that the function will be invoked
// asynchronously. The default value is Event . For information about AWS Lambda
// invocation types, see the AWS Lambda Developer Guide (https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html)
// . There is a 30-second timeout on RequestResponse invocations. You should use
// Event invocation in most cases. Use RequestResponse only when you want to make
// a mail flow decision, such as whether to stop the receipt rule or the receipt
// rule set.
InvocationType InvocationType
// The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the
// Lambda action is taken. An example of an Amazon SNS topic ARN is
// arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon
// SNS topics, see the Amazon SNS Developer Guide (https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html)
// .
TopicArn *string
noSmithyDocumentSerde
}
// Represents the message to be sent, composed of a subject and a body.
type Message struct {
// The message body.
//
// This member is required.
Body *Body
// The subject of the message: A short summary of the content, which will appear
// in the recipient's inbox.
//
// This member is required.
Subject *Content
noSmithyDocumentSerde
}
// Message-related information to include in the Delivery Status Notification
// (DSN) when an email that Amazon SES receives on your behalf bounces. For
// information about receiving email through Amazon SES, see the Amazon SES
// Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html)
// .
type MessageDsn struct {
// The reporting MTA that attempted to deliver the message, formatted as specified
// in RFC 3464 (https://tools.ietf.org/html/rfc3464) ( mta-name-type; mta-name ).
// The default value is dns; inbound-smtp.[region].amazonaws.com .
//
// This member is required.
ReportingMta *string
// When the message was received by the reporting mail transfer agent (MTA), in
// RFC 822 (https://www.ietf.org/rfc/rfc0822.txt) date-time format.
ArrivalDate *time.Time
// Additional X-headers to include in the DSN.
ExtensionFields []ExtensionField
noSmithyDocumentSerde
}
// Contains the name and value of a tag that you can provide to SendEmail or
// SendRawEmail to apply to an email. Message tags, which you use with
// configuration sets, enable you to publish email sending events. For information
// about using configuration sets, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html)
// .
type MessageTag struct {
// The name of the tag. The name must:
// - This value can only contain ASCII letters (a-z, A-Z), numbers (0-9),
// underscores (_), or dashes (-).
// - Contain less than 256 characters.
//
// This member is required.
Name *string
// The value of the tag. The value must:
// - This value can only contain ASCII letters (a-z, A-Z), numbers (0-9),
// underscores (_), or dashes (-).
// - Contain less than 256 characters.
//
// This member is required.
Value *string
noSmithyDocumentSerde
}
// Represents the raw data of the message.
type RawMessage struct {
// The raw data of the message. This data needs to base64-encoded if you are
// accessing Amazon SES directly through the HTTPS interface. If you are accessing
// Amazon SES using an AWS SDK, the SDK takes care of the base 64-encoding for you.
// In all cases, the client must ensure that the message format complies with
// Internet email standards regarding email header fields, MIME types, and MIME
// encoding. The To:, CC:, and BCC: headers in the raw message can contain a group
// list. If you are using SendRawEmail with sending authorization, you can include
// X-headers in the raw message to specify the "Source," "From," and "Return-Path"
// addresses. For more information, see the documentation for SendRawEmail . Do not
// include these X-headers in the DKIM signature, because they are removed by
// Amazon SES before sending the email. For more information, go to the Amazon SES
// Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-raw.html)
// .
//
// This member is required.
Data []byte
noSmithyDocumentSerde
}
// An action that Amazon SES can take when it receives an email on behalf of one
// or more email addresses or domains that you own. An instance of this data type
// can represent only one action. For information about setting up receipt rules,
// see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rules.html)
// .
type ReceiptAction struct {
// Adds a header to the received email.
AddHeaderAction *AddHeaderAction
// Rejects the received email by returning a bounce response to the sender and,
// optionally, publishes a notification to Amazon Simple Notification Service
// (Amazon SNS).
BounceAction *BounceAction
// Calls an AWS Lambda function, and optionally, publishes a notification to
// Amazon SNS.
LambdaAction *LambdaAction
// Saves the received message to an Amazon Simple Storage Service (Amazon S3)
// bucket and, optionally, publishes a notification to Amazon SNS.
S3Action *S3Action
// Publishes the email content within a notification to Amazon SNS.
SNSAction *SNSAction
// Terminates the evaluation of the receipt rule set and optionally publishes a
// notification to Amazon SNS.
StopAction *StopAction
// Calls Amazon WorkMail and, optionally, publishes a notification to Amazon
// Amazon SNS.
WorkmailAction *WorkmailAction
noSmithyDocumentSerde
}
// A receipt IP address filter enables you to specify whether to accept or reject
// mail originating from an IP address or range of IP addresses. For information
// about setting up IP address filters, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-ip-filters.html)
// .
type ReceiptFilter struct {
// A structure that provides the IP addresses to block or allow, and whether to
// block or allow incoming mail from them.
//
// This member is required.
IpFilter *ReceiptIpFilter
// The name of the IP address filter. The name must:
// - This value can only contain ASCII letters (a-z, A-Z), numbers (0-9),
// underscores (_), or dashes (-).
// - Start and end with a letter or number.
// - Contain less than 64 characters.
//
// This member is required.
Name *string
noSmithyDocumentSerde
}
// A receipt IP address filter enables you to specify whether to accept or reject
// mail originating from an IP address or range of IP addresses. For information
// about setting up IP address filters, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-ip-filters.html)
// .
type ReceiptIpFilter struct {
// A single IP address or a range of IP addresses that you want to block or allow,
// specified in Classless Inter-Domain Routing (CIDR) notation. An example of a
// single email address is 10.0.0.1. An example of a range of IP addresses is
// 10.0.0.1/24. For more information about CIDR notation, see RFC 2317 (https://tools.ietf.org/html/rfc2317)
// .
//
// This member is required.
Cidr *string
// Indicates whether to block or allow incoming mail from the specified IP
// addresses.
//
// This member is required.
Policy ReceiptFilterPolicy
noSmithyDocumentSerde
}
// Receipt rules enable you to specify which actions Amazon SES should take when
// it receives mail on behalf of one or more email addresses or domains that you
// own. Each receipt rule defines a set of email addresses or domains that it
// applies to. If the email addresses or domains match at least one recipient
// address of the message, Amazon SES executes all of the receipt rule's actions on
// the message. For information about setting up receipt rules, see the Amazon SES
// Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rules.html)
// .
type ReceiptRule struct {
// The name of the receipt rule. The name must:
// - This value can only contain ASCII letters (a-z, A-Z), numbers (0-9),
// underscores (_), or dashes (-).
// - Start and end with a letter or number.
// - Contain less than 64 characters.
//
// This member is required.
Name *string
// An ordered list of actions to perform on messages that match at least one of
// the recipient email addresses or domains specified in the receipt rule.
Actions []ReceiptAction
// If true , the receipt rule is active. The default value is false .
Enabled bool
// The recipient domains and email addresses that the receipt rule applies to. If
// this field is not specified, this rule will match all recipients under all
// verified domains.
Recipients []string
// If true , then messages that this receipt rule applies to are scanned for spam
// and viruses. The default value is false .
ScanEnabled bool
// Specifies whether Amazon SES should require that incoming email is delivered
// over a connection encrypted with Transport Layer Security (TLS). If this
// parameter is set to Require , Amazon SES will bounce emails that are not
// received over TLS. The default is Optional .
TlsPolicy TlsPolicy
noSmithyDocumentSerde
}
// Information about a receipt rule set. A receipt rule set is a collection of
// rules that specify what Amazon SES should do with mail it receives on behalf of
// your account's verified domains. For information about setting up receipt rule
// sets, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rule-set.html)
// .
type ReceiptRuleSetMetadata struct {
// The date and time the receipt rule set was created.
CreatedTimestamp *time.Time
// The name of the receipt rule set. The name must:
// - This value can only contain ASCII letters (a-z, A-Z), numbers (0-9),
// underscores (_), or dashes (-).
// - Start and end with a letter or number.
// - Contain less than 64 characters.
Name *string
noSmithyDocumentSerde
}
// Recipient-related information to include in the Delivery Status Notification
// (DSN) when an email that Amazon SES receives on your behalf bounces. For
// information about receiving email through Amazon SES, see the Amazon SES
// Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html)
// .
type RecipientDsnFields struct {
// The action performed by the reporting mail transfer agent (MTA) as a result of
// its attempt to deliver the message to the recipient address. This is required by
// RFC 3464 (https://tools.ietf.org/html/rfc3464) .
//
// This member is required.
Action DsnAction
// The status code that indicates what went wrong. This is required by RFC 3464 (https://tools.ietf.org/html/rfc3464)
// .
//
// This member is required.
Status *string
// An extended explanation of what went wrong; this is usually an SMTP response.
// See RFC 3463 (https://tools.ietf.org/html/rfc3463) for the correct formatting
// of this parameter.
DiagnosticCode *string
// Additional X-headers to include in the DSN.
ExtensionFields []ExtensionField
// The email address that the message was ultimately delivered to. This
// corresponds to the Final-Recipient in the DSN. If not specified, FinalRecipient
// will be set to the Recipient specified in the BouncedRecipientInfo structure.
// Either FinalRecipient or the recipient in BouncedRecipientInfo must be a
// recipient of the original bounced message. Do not prepend the FinalRecipient
// email address with rfc 822; , as described in RFC 3798 (https://tools.ietf.org/html/rfc3798)
// .
FinalRecipient *string
// The time the final delivery attempt was made, in RFC 822 (https://www.ietf.org/rfc/rfc0822.txt)
// date-time format.
LastAttemptDate *time.Time
// The MTA to which the remote MTA attempted to deliver the message, formatted as
// specified in RFC 3464 (https://tools.ietf.org/html/rfc3464) ( mta-name-type;
// mta-name ). This parameter typically applies only to propagating synchronous
// bounces.
RemoteMta *string
noSmithyDocumentSerde
}
// Contains information about the reputation settings for a configuration set.
type ReputationOptions struct {
// The date and time at which the reputation metrics for the configuration set
// were last reset. Resetting these metrics is known as a fresh start. When you
// disable email sending for a configuration set using
// UpdateConfigurationSetSendingEnabled and later re-enable it, the reputation
// metrics for the configuration set (but not for the entire Amazon SES account)
// are reset. If email sending for the configuration set has never been disabled
// and later re-enabled, the value of this attribute is null .
LastFreshStart *time.Time
// Describes whether or not Amazon SES publishes reputation metrics for the
// configuration set, such as bounce and complaint rates, to Amazon CloudWatch. If
// the value is true , reputation metrics are published. If the value is false ,
// reputation metrics are not published. The default value is false .
ReputationMetricsEnabled bool
// Describes whether email sending is enabled or disabled for the configuration
// set. If the value is true , then Amazon SES will send emails that use the
// configuration set. If the value is false , Amazon SES will not send emails that
// use the configuration set. The default value is true . You can change this
// setting using UpdateConfigurationSetSendingEnabled .
SendingEnabled bool
noSmithyDocumentSerde
}
// When included in a receipt rule, this action saves the received message to an
// Amazon Simple Storage Service (Amazon S3) bucket and, optionally, publishes a
// notification to Amazon Simple Notification Service (Amazon SNS). To enable
// Amazon SES to write emails to your Amazon S3 bucket, use an AWS KMS key to
// encrypt your emails, or publish to an Amazon SNS topic of another account,
// Amazon SES must have permission to access those resources. For information about
// giving permissions, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html)
// . When you save your emails to an Amazon S3 bucket, the maximum email size
// (including headers) is 30 MB. Emails larger than that will bounce. For
// information about specifying Amazon S3 actions in receipt rules, see the Amazon
// SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-s3.html)
// .
type S3Action struct {
// The name of the Amazon S3 bucket that incoming email will be saved to.
//
// This member is required.
BucketName *string
// The customer master key that Amazon SES should use to encrypt your emails
// before saving them to the Amazon S3 bucket. You can use the default master key
// or a custom master key you created in AWS KMS as follows:
// - To use the default master key, provide an ARN in the form of
// arn:aws:kms:REGION:ACCOUNT-ID-WITHOUT-HYPHENS:alias/aws/ses . For example, if
// your AWS account ID is 123456789012 and you want to use the default master key
// in the US West (Oregon) region, the ARN of the default master key would be
// arn:aws:kms:us-west-2:123456789012:alias/aws/ses . If you use the default
// master key, you don't need to perform any extra steps to give Amazon SES
// permission to use the key.
// - To use a custom master key you created in AWS KMS, provide the ARN of the
// master key and ensure that you add a statement to your key's policy to give
// Amazon SES permission to use it. For more information about giving permissions,
// see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html)
// .
// For more information about key policies, see the AWS KMS Developer Guide (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html)
// . If you do not specify a master key, Amazon SES will not encrypt your emails.
// Your mail is encrypted by Amazon SES using the Amazon S3 encryption client
// before the mail is submitted to Amazon S3 for storage. It is not encrypted using
// Amazon S3 server-side encryption. This means that you must use the Amazon S3
// encryption client to decrypt the email after retrieving it from Amazon S3, as
// the service has no access to use your AWS KMS keys for decryption. This
// encryption client is currently available with the AWS SDK for Java (http://aws.amazon.com/sdk-for-java/)
// and AWS SDK for Ruby (http://aws.amazon.com/sdk-for-ruby/) only. For more
// information about client-side encryption using AWS KMS master keys, see the
// Amazon S3 Developer Guide (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html)
// .
KmsKeyArn *string
// The key prefix of the Amazon S3 bucket. The key prefix is similar to a
// directory name that enables you to store similar data under the same directory
// in a bucket.
ObjectKeyPrefix *string
// The ARN of the Amazon SNS topic to notify when the message is saved to the
// Amazon S3 bucket. An example of an Amazon SNS topic ARN is
// arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon
// SNS topics, see the Amazon SNS Developer Guide (https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html)
// .
TopicArn *string
noSmithyDocumentSerde
}
// Represents sending statistics data. Each SendDataPoint contains statistics for
// a 15-minute period of sending activity.
type SendDataPoint struct {
// Number of emails that have bounced.
Bounces int64
// Number of unwanted emails that were rejected by recipients.
Complaints int64
// Number of emails that have been sent.
DeliveryAttempts int64
// Number of emails rejected by Amazon SES.
Rejects int64
// Time of the data point.
Timestamp *time.Time
noSmithyDocumentSerde
}
// When included in a receipt rule, this action publishes a notification to Amazon
// Simple Notification Service (Amazon SNS). This action includes a complete copy
// of the email content in the Amazon SNS notifications. Amazon SNS notifications
// for all other actions simply provide information about the email. They do not
// include the email content itself. If you own the Amazon SNS topic, you don't
// need to do anything to give Amazon SES permission to publish emails to it.
// However, if you don't own the Amazon SNS topic, you need to attach a policy to
// the topic to give Amazon SES permissions to access it. For information about
// giving permissions, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html)
// . You can only publish emails that are 150 KB or less (including the header) to
// Amazon SNS. Larger emails will bounce. If you anticipate emails larger than 150
// KB, use the S3 action instead. For information about using a receipt rule to
// publish an Amazon SNS notification, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-sns.html)
// .
type SNSAction struct {
// The Amazon Resource Name (ARN) of the Amazon SNS topic to notify. An example of
// an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic . For more
// information about Amazon SNS topics, see the Amazon SNS Developer Guide (https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html)
// .
//
// This member is required.
TopicArn *string
// The encoding to use for the email within the Amazon SNS notification. UTF-8 is
// easier to use, but may not preserve all special characters when a message was
// encoded with a different encoding format. Base64 preserves all special
// characters. The default value is UTF-8.
Encoding SNSActionEncoding
noSmithyDocumentSerde
}
// Contains the topic ARN associated with an Amazon Simple Notification Service
// (Amazon SNS) event destination. Event destinations, such as Amazon SNS, are
// associated with configuration sets, which enable you to publish email sending
// events. For information about using configuration sets, see the Amazon SES
// Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html)
// .
type SNSDestination struct {
// The ARN of the Amazon SNS topic that email sending events will be published to.
// An example of an Amazon SNS topic ARN is
// arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon
// SNS topics, see the Amazon SNS Developer Guide (https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html)
// .
//
// This member is required.
TopicARN *string
noSmithyDocumentSerde
}
// When included in a receipt rule, this action terminates the evaluation of the
// receipt rule set and, optionally, publishes a notification to Amazon Simple
// Notification Service (Amazon SNS). For information about setting a stop action
// in a receipt rule, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-stop.html)
// .
type StopAction struct {
// The scope of the StopAction. The only acceptable value is RuleSet .
//
// This member is required.
Scope StopScope
// The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the stop
// action is taken. An example of an Amazon SNS topic ARN is
// arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon
// SNS topics, see the Amazon SNS Developer Guide (https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html)
// .
TopicArn *string
noSmithyDocumentSerde
}
// The content of the email, composed of a subject line, an HTML part, and a
// text-only part.
type Template struct {
// The name of the template. You will refer to this name when you send email using
// the SendTemplatedEmail or SendBulkTemplatedEmail operations.
//
// This member is required.
TemplateName *string
// The HTML body of the email.
HtmlPart *string
// The subject line of the email.
SubjectPart *string
// The email body that will be visible to recipients whose email clients do not
// display HTML.
TextPart *string
noSmithyDocumentSerde
}
// Contains information about an email template.
type TemplateMetadata struct {
// The time and date the template was created.
CreatedTimestamp *time.Time
// The name of the template.
Name *string
noSmithyDocumentSerde
}
// A domain that is used to redirect email recipients to an Amazon SES-operated
// domain. This domain captures open and click events generated by Amazon SES
// emails. For more information, see Configuring Custom Domains to Handle Open and
// Click Tracking (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html)
// in the Amazon SES Developer Guide.
type TrackingOptions struct {
// The custom subdomain that will be used to redirect email recipients to the
// Amazon SES event tracking domain.
CustomRedirectDomain *string
noSmithyDocumentSerde
}
// When included in a receipt rule, this action calls Amazon WorkMail and,
// optionally, publishes a notification to Amazon Simple Notification Service
// (Amazon SNS). You will typically not use this action directly because Amazon
// WorkMail adds the rule automatically during its setup procedure. For information
// using a receipt rule to call Amazon WorkMail, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-workmail.html)
// .
type WorkmailAction struct {
// The ARN of the Amazon WorkMail organization. An example of an Amazon WorkMail
// organization ARN is
// arn:aws:workmail:us-west-2:123456789012:organization/m-68755160c4cb4e29a2b2f8fb58f359d7
// . For information about Amazon WorkMail organizations, see the Amazon WorkMail
// Administrator Guide (https://docs.aws.amazon.com/workmail/latest/adminguide/organizations_overview.html)
// .
//
// This member is required.
OrganizationArn *string
// The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the
// WorkMail action is called. An example of an Amazon SNS topic ARN is
// arn:aws:sns:us-west-2:123456789012:MyTopic . For more information about Amazon
// SNS topics, see the Amazon SNS Developer Guide (https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html)
// .
TopicArn *string
noSmithyDocumentSerde
}
type noSmithyDocumentSerde = smithydocument.NoSerde
| 1,158 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/defaults"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/retry"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
smithy "github.com/aws/smithy-go"
smithydocument "github.com/aws/smithy-go/document"
"github.com/aws/smithy-go/logging"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"net"
"net/http"
"time"
)
const ServiceID = "SESv2"
const ServiceAPIVersion = "2019-09-27"
// Client provides the API client to make operations call for Amazon Simple Email
// Service.
type Client struct {
options Options
}
// New returns an initialized Client based on the functional options. Provide
// additional functional options to further configure the behavior of the client,
// such as changing the client's endpoint or adding custom middleware behavior.
func New(options Options, optFns ...func(*Options)) *Client {
options = options.Copy()
resolveDefaultLogger(&options)
setResolvedDefaultsMode(&options)
resolveRetryer(&options)
resolveHTTPClient(&options)
resolveHTTPSignerV4(&options)
resolveDefaultEndpointConfiguration(&options)
for _, fn := range optFns {
fn(&options)
}
client := &Client{
options: options,
}
return client
}
type Options struct {
// Set of options to modify how an operation is invoked. These apply to all
// operations invoked for this client. Use functional options on operation call to
// modify this list for per operation behavior.
APIOptions []func(*middleware.Stack) error
// Configures the events that will be sent to the configured logger.
ClientLogMode aws.ClientLogMode
// The credentials object to use when signing requests.
Credentials aws.CredentialsProvider
// The configuration DefaultsMode that the SDK should use when constructing the
// clients initial default settings.
DefaultsMode aws.DefaultsMode
// The endpoint options to be used when attempting to resolve an endpoint.
EndpointOptions EndpointResolverOptions
// The service endpoint resolver.
EndpointResolver EndpointResolver
// Signature Version 4 (SigV4) Signer
HTTPSignerV4 HTTPSignerV4
// The logger writer interface to write logging messages to.
Logger logging.Logger
// The region to send requests to. (Required)
Region string
// RetryMaxAttempts specifies the maximum number attempts an API client will call
// an operation that fails with a retryable error. A value of 0 is ignored, and
// will not be used to configure the API client created default retryer, or modify
// per operation call's retry max attempts. When creating a new API Clients this
// member will only be used if the Retryer Options member is nil. This value will
// be ignored if Retryer is not nil. If specified in an operation call's functional
// options with a value that is different than the constructed client's Options,
// the Client's Retryer will be wrapped to use the operation's specific
// RetryMaxAttempts value.
RetryMaxAttempts int
// RetryMode specifies the retry mode the API client will be created with, if
// Retryer option is not also specified. When creating a new API Clients this
// member will only be used if the Retryer Options member is nil. This value will
// be ignored if Retryer is not nil. Currently does not support per operation call
// overrides, may in the future.
RetryMode aws.RetryMode
// Retryer guides how HTTP requests should be retried in case of recoverable
// failures. When nil the API client will use a default retryer. The kind of
// default retry created by the API client can be changed with the RetryMode
// option.
Retryer aws.Retryer
// The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
// to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You
// should not populate this structure programmatically, or rely on the values here
// within your applications.
RuntimeEnvironment aws.RuntimeEnvironment
// The initial DefaultsMode used when the client options were constructed. If the
// DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
// value was at that point in time. Currently does not support per operation call
// overrides, may in the future.
resolvedDefaultsMode aws.DefaultsMode
// The HTTP client to invoke API calls with. Defaults to client's default HTTP
// implementation if nil.
HTTPClient HTTPClient
}
// WithAPIOptions returns a functional option for setting the Client's APIOptions
// option.
func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
return func(o *Options) {
o.APIOptions = append(o.APIOptions, optFns...)
}
}
// WithEndpointResolver returns a functional option for setting the Client's
// EndpointResolver option.
func WithEndpointResolver(v EndpointResolver) func(*Options) {
return func(o *Options) {
o.EndpointResolver = v
}
}
type HTTPClient interface {
Do(*http.Request) (*http.Response, error)
}
// Copy creates a clone where the APIOptions list is deep copied.
func (o Options) Copy() Options {
to := o
to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
copy(to.APIOptions, o.APIOptions)
return to
}
func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
ctx = middleware.ClearStackValues(ctx)
stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
options := c.options.Copy()
for _, fn := range optFns {
fn(&options)
}
finalizeRetryMaxAttemptOptions(&options, *c)
finalizeClientEndpointResolverOptions(&options)
for _, fn := range stackFns {
if err := fn(stack, options); err != nil {
return nil, metadata, err
}
}
for _, fn := range options.APIOptions {
if err := fn(stack); err != nil {
return nil, metadata, err
}
}
handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack)
result, metadata, err = handler.Handle(ctx, params)
if err != nil {
err = &smithy.OperationError{
ServiceID: ServiceID,
OperationName: opID,
Err: err,
}
}
return result, metadata, err
}
type noSmithyDocumentSerde = smithydocument.NoSerde
func resolveDefaultLogger(o *Options) {
if o.Logger != nil {
return
}
o.Logger = logging.Nop{}
}
func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
return middleware.AddSetLoggerMiddleware(stack, o.Logger)
}
func setResolvedDefaultsMode(o *Options) {
if len(o.resolvedDefaultsMode) > 0 {
return
}
var mode aws.DefaultsMode
mode.SetFromString(string(o.DefaultsMode))
if mode == aws.DefaultsModeAuto {
mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
}
o.resolvedDefaultsMode = mode
}
// NewFromConfig returns a new client from the provided config.
func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
opts := Options{
Region: cfg.Region,
DefaultsMode: cfg.DefaultsMode,
RuntimeEnvironment: cfg.RuntimeEnvironment,
HTTPClient: cfg.HTTPClient,
Credentials: cfg.Credentials,
APIOptions: cfg.APIOptions,
Logger: cfg.Logger,
ClientLogMode: cfg.ClientLogMode,
}
resolveAWSRetryerProvider(cfg, &opts)
resolveAWSRetryMaxAttempts(cfg, &opts)
resolveAWSRetryMode(cfg, &opts)
resolveAWSEndpointResolver(cfg, &opts)
resolveUseDualStackEndpoint(cfg, &opts)
resolveUseFIPSEndpoint(cfg, &opts)
return New(opts, optFns...)
}
func resolveHTTPClient(o *Options) {
var buildable *awshttp.BuildableClient
if o.HTTPClient != nil {
var ok bool
buildable, ok = o.HTTPClient.(*awshttp.BuildableClient)
if !ok {
return
}
} else {
buildable = awshttp.NewBuildableClient()
}
modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
if err == nil {
buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) {
if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok {
dialer.Timeout = dialerTimeout
}
})
buildable = buildable.WithTransportOptions(func(transport *http.Transport) {
if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok {
transport.TLSHandshakeTimeout = tlsHandshakeTimeout
}
})
}
o.HTTPClient = buildable
}
func resolveRetryer(o *Options) {
if o.Retryer != nil {
return
}
if len(o.RetryMode) == 0 {
modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
if err == nil {
o.RetryMode = modeConfig.RetryMode
}
}
if len(o.RetryMode) == 0 {
o.RetryMode = aws.RetryModeStandard
}
var standardOptions []func(*retry.StandardOptions)
if v := o.RetryMaxAttempts; v != 0 {
standardOptions = append(standardOptions, func(so *retry.StandardOptions) {
so.MaxAttempts = v
})
}
switch o.RetryMode {
case aws.RetryModeAdaptive:
var adaptiveOptions []func(*retry.AdaptiveModeOptions)
if len(standardOptions) != 0 {
adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) {
ao.StandardOptions = append(ao.StandardOptions, standardOptions...)
})
}
o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...)
default:
o.Retryer = retry.NewStandard(standardOptions...)
}
}
func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
if cfg.Retryer == nil {
return
}
o.Retryer = cfg.Retryer()
}
func resolveAWSRetryMode(cfg aws.Config, o *Options) {
if len(cfg.RetryMode) == 0 {
return
}
o.RetryMode = cfg.RetryMode
}
func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
if cfg.RetryMaxAttempts == 0 {
return
}
o.RetryMaxAttempts = cfg.RetryMaxAttempts
}
func finalizeRetryMaxAttemptOptions(o *Options, client Client) {
if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
return
}
o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
}
func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
return
}
o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver())
}
func addClientUserAgent(stack *middleware.Stack) error {
return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "sesv2", goModuleVersion)(stack)
}
func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error {
mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{
CredentialsProvider: o.Credentials,
Signer: o.HTTPSignerV4,
LogSigning: o.ClientLogMode.IsSigning(),
})
return stack.Finalize.Add(mw, middleware.After)
}
type HTTPSignerV4 interface {
SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
}
func resolveHTTPSignerV4(o *Options) {
if o.HTTPSignerV4 != nil {
return
}
o.HTTPSignerV4 = newDefaultV4Signer(*o)
}
func newDefaultV4Signer(o Options) *v4.Signer {
return v4.NewSigner(func(so *v4.SignerOptions) {
so.Logger = o.Logger
so.LogSigning = o.ClientLogMode.IsSigning()
})
}
func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
mo := retry.AddRetryMiddlewaresOptions{
Retryer: o.Retryer,
LogRetryAttempts: o.ClientLogMode.IsRetries(),
}
return retry.AddRetryMiddlewares(stack, mo)
}
// resolves dual-stack endpoint configuration
func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error {
if len(cfg.ConfigSources) == 0 {
return nil
}
value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources)
if err != nil {
return err
}
if found {
o.EndpointOptions.UseDualStackEndpoint = value
}
return nil
}
// resolves FIPS endpoint configuration
func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
if len(cfg.ConfigSources) == 0 {
return nil
}
value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources)
if err != nil {
return err
}
if found {
o.EndpointOptions.UseFIPSEndpoint = value
}
return nil
}
func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
return awsmiddleware.AddRequestIDRetrieverMiddleware(stack)
}
func addResponseErrorMiddleware(stack *middleware.Stack) error {
return awshttp.AddResponseErrorMiddleware(stack)
}
func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{
LogRequest: o.ClientLogMode.IsRequest(),
LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(),
LogResponse: o.ClientLogMode.IsResponse(),
LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(),
}, middleware.After)
}
| 435 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"io/ioutil"
"net/http"
"strings"
"testing"
)
func TestClient_resolveRetryOptions(t *testing.T) {
nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) {
return &http.Response{
StatusCode: 200,
Header: http.Header{},
Body: ioutil.NopCloser(strings.NewReader("")),
}, nil
})
cases := map[string]struct {
defaultsMode aws.DefaultsMode
retryer aws.Retryer
retryMaxAttempts int
opRetryMaxAttempts *int
retryMode aws.RetryMode
expectClientRetryMode aws.RetryMode
expectClientMaxAttempts int
expectOpMaxAttempts int
}{
"defaults": {
defaultsMode: aws.DefaultsModeStandard,
expectClientRetryMode: aws.RetryModeStandard,
expectClientMaxAttempts: 3,
expectOpMaxAttempts: 3,
},
"custom default retry": {
retryMode: aws.RetryModeAdaptive,
retryMaxAttempts: 10,
expectClientRetryMode: aws.RetryModeAdaptive,
expectClientMaxAttempts: 10,
expectOpMaxAttempts: 10,
},
"custom op max attempts": {
retryMode: aws.RetryModeAdaptive,
retryMaxAttempts: 10,
opRetryMaxAttempts: aws.Int(2),
expectClientRetryMode: aws.RetryModeAdaptive,
expectClientMaxAttempts: 10,
expectOpMaxAttempts: 2,
},
"custom op no change max attempts": {
retryMode: aws.RetryModeAdaptive,
retryMaxAttempts: 10,
opRetryMaxAttempts: aws.Int(10),
expectClientRetryMode: aws.RetryModeAdaptive,
expectClientMaxAttempts: 10,
expectOpMaxAttempts: 10,
},
"custom op 0 max attempts": {
retryMode: aws.RetryModeAdaptive,
retryMaxAttempts: 10,
opRetryMaxAttempts: aws.Int(0),
expectClientRetryMode: aws.RetryModeAdaptive,
expectClientMaxAttempts: 10,
expectOpMaxAttempts: 10,
},
}
for name, c := range cases {
t.Run(name, func(t *testing.T) {
client := NewFromConfig(aws.Config{
DefaultsMode: c.defaultsMode,
Retryer: func() func() aws.Retryer {
if c.retryer == nil {
return nil
}
return func() aws.Retryer { return c.retryer }
}(),
HTTPClient: nopClient,
RetryMaxAttempts: c.retryMaxAttempts,
RetryMode: c.retryMode,
})
if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a {
t.Errorf("expect %v retry mode, got %v", e, a)
}
if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a {
t.Errorf("expect %v max attempts, got %v", e, a)
}
_, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{},
[]func(*Options){
func(o *Options) {
if c.opRetryMaxAttempts == nil {
return
}
o.RetryMaxAttempts = *c.opRetryMaxAttempts
},
},
func(s *middleware.Stack, o Options) error {
s.Initialize.Clear()
s.Serialize.Clear()
s.Build.Clear()
s.Finalize.Clear()
s.Deserialize.Clear()
if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a {
t.Errorf("expect %v op max attempts, got %v", e, a)
}
return nil
})
if err != nil {
t.Fatalf("expect no operation error, got %v", err)
}
})
}
}
| 124 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sesv2/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Retrieves batches of metric data collected based on your sending activity. You
// can execute this operation no more than 16 times per second, and with at most
// 160 queries from the batches per second (cumulative).
func (c *Client) BatchGetMetricData(ctx context.Context, params *BatchGetMetricDataInput, optFns ...func(*Options)) (*BatchGetMetricDataOutput, error) {
if params == nil {
params = &BatchGetMetricDataInput{}
}
result, metadata, err := c.invokeOperation(ctx, "BatchGetMetricData", params, optFns, c.addOperationBatchGetMetricDataMiddlewares)
if err != nil {
return nil, err
}
out := result.(*BatchGetMetricDataOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to retrieve a batch of metric data.
type BatchGetMetricDataInput struct {
// A list of queries for metrics to be retrieved.
//
// This member is required.
Queries []types.BatchGetMetricDataQuery
noSmithyDocumentSerde
}
// Represents the result of processing your metric data batch request
type BatchGetMetricDataOutput struct {
// A list of MetricDataError encountered while processing your metric data batch
// request.
Errors []types.MetricDataError
// A list of successfully retrieved MetricDataResult .
Results []types.MetricDataResult
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationBatchGetMetricDataMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpBatchGetMetricData{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpBatchGetMetricData{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpBatchGetMetricDataValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetMetricData(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opBatchGetMetricData(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "BatchGetMetricData",
}
}
| 133 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sesv2/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Create a configuration set. Configuration sets are groups of rules that you can
// apply to the emails that you send. You apply a configuration set to an email by
// specifying the name of the configuration set when you call the Amazon SES API
// v2. When you apply a configuration set to an email, all of the rules in that
// configuration set are applied to the email.
func (c *Client) CreateConfigurationSet(ctx context.Context, params *CreateConfigurationSetInput, optFns ...func(*Options)) (*CreateConfigurationSetOutput, error) {
if params == nil {
params = &CreateConfigurationSetInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateConfigurationSet", params, optFns, c.addOperationCreateConfigurationSetMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateConfigurationSetOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to create a configuration set.
type CreateConfigurationSetInput struct {
// The name of the configuration set. The name can contain up to 64 alphanumeric
// characters, including letters, numbers, hyphens (-) and underscores (_) only.
//
// This member is required.
ConfigurationSetName *string
// An object that defines the dedicated IP pool that is used to send emails that
// you send using the configuration set.
DeliveryOptions *types.DeliveryOptions
// An object that defines whether or not Amazon SES collects reputation metrics
// for the emails that you send that use the configuration set.
ReputationOptions *types.ReputationOptions
// An object that defines whether or not Amazon SES can send email that you send
// using the configuration set.
SendingOptions *types.SendingOptions
// An object that contains information about the suppression list preferences for
// your account.
SuppressionOptions *types.SuppressionOptions
// An array of objects that define the tags (keys and values) to associate with
// the configuration set.
Tags []types.Tag
// An object that defines the open and click tracking options for emails that you
// send using the configuration set.
TrackingOptions *types.TrackingOptions
// An object that defines the VDM options for emails that you send using the
// configuration set.
VdmOptions *types.VdmOptions
noSmithyDocumentSerde
}
// An HTTP 200 response if the request succeeds, or an error message if the
// request fails.
type CreateConfigurationSetOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateConfigurationSetMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateConfigurationSet{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateConfigurationSet{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpCreateConfigurationSetValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateConfigurationSet(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opCreateConfigurationSet(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "CreateConfigurationSet",
}
}
| 157 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sesv2/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Create an event destination. Events include message sends, deliveries, opens,
// clicks, bounces, and complaints. Event destinations are places that you can send
// information about these events to. For example, you can send event data to
// Amazon SNS to receive notifications when you receive bounces or complaints, or
// you can use Amazon Kinesis Data Firehose to stream data to Amazon S3 for
// long-term storage. A single configuration set can include more than one event
// destination.
func (c *Client) CreateConfigurationSetEventDestination(ctx context.Context, params *CreateConfigurationSetEventDestinationInput, optFns ...func(*Options)) (*CreateConfigurationSetEventDestinationOutput, error) {
if params == nil {
params = &CreateConfigurationSetEventDestinationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateConfigurationSetEventDestination", params, optFns, c.addOperationCreateConfigurationSetEventDestinationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateConfigurationSetEventDestinationOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to add an event destination to a configuration set.
type CreateConfigurationSetEventDestinationInput struct {
// The name of the configuration set .
//
// This member is required.
ConfigurationSetName *string
// An object that defines the event destination.
//
// This member is required.
EventDestination *types.EventDestinationDefinition
// A name that identifies the event destination within the configuration set.
//
// This member is required.
EventDestinationName *string
noSmithyDocumentSerde
}
// An HTTP 200 response if the request succeeds, or an error message if the
// request fails.
type CreateConfigurationSetEventDestinationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateConfigurationSetEventDestinationMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateConfigurationSetEventDestination{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateConfigurationSetEventDestination{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpCreateConfigurationSetEventDestinationValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateConfigurationSetEventDestination(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opCreateConfigurationSetEventDestination(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "CreateConfigurationSetEventDestination",
}
}
| 140 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sesv2/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates a contact, which is an end-user who is receiving the email, and adds
// them to a contact list.
func (c *Client) CreateContact(ctx context.Context, params *CreateContactInput, optFns ...func(*Options)) (*CreateContactOutput, error) {
if params == nil {
params = &CreateContactInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateContact", params, optFns, c.addOperationCreateContactMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateContactOutput)
out.ResultMetadata = metadata
return out, nil
}
type CreateContactInput struct {
// The name of the contact list to which the contact should be added.
//
// This member is required.
ContactListName *string
// The contact's email address.
//
// This member is required.
EmailAddress *string
// The attribute data attached to a contact.
AttributesData *string
// The contact's preferences for being opted-in to or opted-out of topics.
TopicPreferences []types.TopicPreference
// A boolean value status noting if the contact is unsubscribed from all contact
// list topics.
UnsubscribeAll bool
noSmithyDocumentSerde
}
type CreateContactOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateContactMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateContact{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateContact{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpCreateContactValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateContact(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opCreateContact(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "CreateContact",
}
}
| 137 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sesv2/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates a contact list.
func (c *Client) CreateContactList(ctx context.Context, params *CreateContactListInput, optFns ...func(*Options)) (*CreateContactListOutput, error) {
if params == nil {
params = &CreateContactListInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateContactList", params, optFns, c.addOperationCreateContactListMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateContactListOutput)
out.ResultMetadata = metadata
return out, nil
}
type CreateContactListInput struct {
// The name of the contact list.
//
// This member is required.
ContactListName *string
// A description of what the contact list is about.
Description *string
// The tags associated with a contact list.
Tags []types.Tag
// An interest group, theme, or label within a list. A contact list can have
// multiple topics.
Topics []types.Topic
noSmithyDocumentSerde
}
type CreateContactListOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateContactListMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateContactList{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateContactList{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpCreateContactListValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateContactList(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opCreateContactList(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "CreateContactList",
}
}
| 131 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates a new custom verification email template. For more information about
// custom verification email templates, see Using custom verification email
// templates (https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#send-email-verify-address-custom)
// in the Amazon SES Developer Guide. You can execute this operation no more than
// once per second.
func (c *Client) CreateCustomVerificationEmailTemplate(ctx context.Context, params *CreateCustomVerificationEmailTemplateInput, optFns ...func(*Options)) (*CreateCustomVerificationEmailTemplateOutput, error) {
if params == nil {
params = &CreateCustomVerificationEmailTemplateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateCustomVerificationEmailTemplate", params, optFns, c.addOperationCreateCustomVerificationEmailTemplateMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateCustomVerificationEmailTemplateOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to create a custom verification email template.
type CreateCustomVerificationEmailTemplateInput struct {
// The URL that the recipient of the verification email is sent to if his or her
// address is not successfully verified.
//
// This member is required.
FailureRedirectionURL *string
// The email address that the custom verification email is sent from.
//
// This member is required.
FromEmailAddress *string
// The URL that the recipient of the verification email is sent to if his or her
// address is successfully verified.
//
// This member is required.
SuccessRedirectionURL *string
// The content of the custom verification email. The total size of the email must
// be less than 10 MB. The message body may contain HTML, with some limitations.
// For more information, see Custom verification email frequently asked questions (https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#send-email-verify-address-custom-faq)
// in the Amazon SES Developer Guide.
//
// This member is required.
TemplateContent *string
// The name of the custom verification email template.
//
// This member is required.
TemplateName *string
// The subject line of the custom verification email.
//
// This member is required.
TemplateSubject *string
noSmithyDocumentSerde
}
// If the action is successful, the service sends back an HTTP 200 response with
// an empty HTTP body.
type CreateCustomVerificationEmailTemplateOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateCustomVerificationEmailTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateCustomVerificationEmailTemplate{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateCustomVerificationEmailTemplate{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpCreateCustomVerificationEmailTemplateValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCustomVerificationEmailTemplate(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opCreateCustomVerificationEmailTemplate(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "CreateCustomVerificationEmailTemplate",
}
}
| 157 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sesv2/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Create a new pool of dedicated IP addresses. A pool can include one or more
// dedicated IP addresses that are associated with your Amazon Web Services
// account. You can associate a pool with a configuration set. When you send an
// email that uses that configuration set, the message is sent from one of the
// addresses in the associated pool.
func (c *Client) CreateDedicatedIpPool(ctx context.Context, params *CreateDedicatedIpPoolInput, optFns ...func(*Options)) (*CreateDedicatedIpPoolOutput, error) {
if params == nil {
params = &CreateDedicatedIpPoolInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateDedicatedIpPool", params, optFns, c.addOperationCreateDedicatedIpPoolMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateDedicatedIpPoolOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to create a new dedicated IP pool.
type CreateDedicatedIpPoolInput struct {
// The name of the dedicated IP pool.
//
// This member is required.
PoolName *string
// The type of scaling mode.
ScalingMode types.ScalingMode
// An object that defines the tags (keys and values) that you want to associate
// with the pool.
Tags []types.Tag
noSmithyDocumentSerde
}
// An HTTP 200 response if the request succeeds, or an error message if the
// request fails.
type CreateDedicatedIpPoolOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateDedicatedIpPoolMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateDedicatedIpPool{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateDedicatedIpPool{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpCreateDedicatedIpPoolValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDedicatedIpPool(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opCreateDedicatedIpPool(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "CreateDedicatedIpPool",
}
}
| 135 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sesv2/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Create a new predictive inbox placement test. Predictive inbox placement tests
// can help you predict how your messages will be handled by various email
// providers around the world. When you perform a predictive inbox placement test,
// you provide a sample message that contains the content that you plan to send to
// your customers. Amazon SES then sends that message to special email addresses
// spread across several major email providers. After about 24 hours, the test is
// complete, and you can use the GetDeliverabilityTestReport operation to view the
// results of the test.
func (c *Client) CreateDeliverabilityTestReport(ctx context.Context, params *CreateDeliverabilityTestReportInput, optFns ...func(*Options)) (*CreateDeliverabilityTestReportOutput, error) {
if params == nil {
params = &CreateDeliverabilityTestReportInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateDeliverabilityTestReport", params, optFns, c.addOperationCreateDeliverabilityTestReportMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateDeliverabilityTestReportOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to perform a predictive inbox placement test. Predictive inbox
// placement tests can help you predict how your messages will be handled by
// various email providers around the world. When you perform a predictive inbox
// placement test, you provide a sample message that contains the content that you
// plan to send to your customers. We send that message to special email addresses
// spread across several major email providers around the world. The test takes
// about 24 hours to complete. When the test is complete, you can use the
// GetDeliverabilityTestReport operation to view the results of the test.
type CreateDeliverabilityTestReportInput struct {
// The HTML body of the message that you sent when you performed the predictive
// inbox placement test.
//
// This member is required.
Content *types.EmailContent
// The email address that the predictive inbox placement test email was sent from.
//
// This member is required.
FromEmailAddress *string
// A unique name that helps you to identify the predictive inbox placement test
// when you retrieve the results.
ReportName *string
// An array of objects that define the tags (keys and values) that you want to
// associate with the predictive inbox placement test.
Tags []types.Tag
noSmithyDocumentSerde
}
// Information about the predictive inbox placement test that you created.
type CreateDeliverabilityTestReportOutput struct {
// The status of the predictive inbox placement test. If the status is IN_PROGRESS
// , then the predictive inbox placement test is currently running. Predictive
// inbox placement tests are usually complete within 24 hours of creating the test.
// If the status is COMPLETE , then the test is finished, and you can use the
// GetDeliverabilityTestReport to view the results of the test.
//
// This member is required.
DeliverabilityTestStatus types.DeliverabilityTestStatus
// A unique string that identifies the predictive inbox placement test.
//
// This member is required.
ReportId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateDeliverabilityTestReportMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateDeliverabilityTestReport{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateDeliverabilityTestReport{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpCreateDeliverabilityTestReportValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDeliverabilityTestReport(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opCreateDeliverabilityTestReport(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "CreateDeliverabilityTestReport",
}
}
| 166 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sesv2/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Starts the process of verifying an email identity. An identity is an email
// address or domain that you use when you send email. Before you can use an
// identity to send email, you first have to verify it. By verifying an identity,
// you demonstrate that you're the owner of the identity, and that you've given
// Amazon SES API v2 permission to send email from the identity. When you verify an
// email address, Amazon SES sends an email to the address. Your email address is
// verified as soon as you follow the link in the verification email. When you
// verify a domain without specifying the DkimSigningAttributes object, this
// operation provides a set of DKIM tokens. You can convert these tokens into CNAME
// records, which you then add to the DNS configuration for your domain. Your
// domain is verified when Amazon SES detects these records in the DNS
// configuration for your domain. This verification method is known as Easy DKIM (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html)
// . Alternatively, you can perform the verification process by providing your own
// public-private key pair. This verification method is known as Bring Your Own
// DKIM (BYODKIM). To use BYODKIM, your call to the CreateEmailIdentity operation
// has to include the DkimSigningAttributes object. When you specify this object,
// you provide a selector (a component of the DNS record name that identifies the
// public key to use for DKIM authentication) and a private key. When you verify a
// domain, this operation provides a set of DKIM tokens, which you can convert into
// CNAME tokens. You add these CNAME tokens to the DNS configuration for your
// domain. Your domain is verified when Amazon SES detects these records in the DNS
// configuration for your domain. For some DNS providers, it can take 72 hours or
// more to complete the domain verification process. Additionally, you can
// associate an existing configuration set with the email identity that you're
// verifying.
func (c *Client) CreateEmailIdentity(ctx context.Context, params *CreateEmailIdentityInput, optFns ...func(*Options)) (*CreateEmailIdentityOutput, error) {
if params == nil {
params = &CreateEmailIdentityInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateEmailIdentity", params, optFns, c.addOperationCreateEmailIdentityMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateEmailIdentityOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to begin the verification process for an email identity (an email
// address or domain).
type CreateEmailIdentityInput struct {
// The email address or domain to verify.
//
// This member is required.
EmailIdentity *string
// The configuration set to use by default when sending from this identity. Note
// that any configuration set defined in the email sending request takes
// precedence.
ConfigurationSetName *string
// If your request includes this object, Amazon SES configures the identity to use
// Bring Your Own DKIM (BYODKIM) for DKIM authentication purposes, or, configures
// the key length to be used for Easy DKIM (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html)
// . You can only specify this object if the email identity is a domain, as opposed
// to an address.
DkimSigningAttributes *types.DkimSigningAttributes
// An array of objects that define the tags (keys and values) to associate with
// the email identity.
Tags []types.Tag
noSmithyDocumentSerde
}
// If the email identity is a domain, this object contains information about the
// DKIM verification status for the domain. If the email identity is an email
// address, this object is empty.
type CreateEmailIdentityOutput struct {
// An object that contains information about the DKIM attributes for the identity.
DkimAttributes *types.DkimAttributes
// The email identity type. Note: the MANAGED_DOMAIN identity type is not
// supported.
IdentityType types.IdentityType
// Specifies whether or not the identity is verified. You can only send email from
// verified email addresses or domains. For more information about verifying
// identities, see the Amazon Pinpoint User Guide (https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-email-manage-verify.html)
// .
VerifiedForSendingStatus bool
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateEmailIdentityMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateEmailIdentity{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateEmailIdentity{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpCreateEmailIdentityValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateEmailIdentity(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opCreateEmailIdentity(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "CreateEmailIdentity",
}
}
| 180 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates the specified sending authorization policy for the given identity (an
// email address or a domain). This API is for the identity owner only. If you have
// not verified the identity, this API will return an error. Sending authorization
// is a feature that enables an identity owner to authorize other senders to use
// its identities. For information about using sending authorization, see the
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// . You can execute this operation no more than once per second.
func (c *Client) CreateEmailIdentityPolicy(ctx context.Context, params *CreateEmailIdentityPolicyInput, optFns ...func(*Options)) (*CreateEmailIdentityPolicyOutput, error) {
if params == nil {
params = &CreateEmailIdentityPolicyInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateEmailIdentityPolicy", params, optFns, c.addOperationCreateEmailIdentityPolicyMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateEmailIdentityPolicyOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to create a sending authorization policy for an identity.
// Sending authorization is an Amazon SES feature that enables you to authorize
// other senders to use your identities. For information, see the Amazon SES
// Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization-identity-owner-tasks-management.html)
// .
type CreateEmailIdentityPolicyInput struct {
// The email identity.
//
// This member is required.
EmailIdentity *string
// The text of the policy in JSON format. The policy cannot exceed 4 KB. For
// information about the syntax of sending authorization policies, see the Amazon
// SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization-policies.html)
// .
//
// This member is required.
Policy *string
// The name of the policy. The policy name cannot exceed 64 characters and can
// only include alphanumeric characters, dashes, and underscores.
//
// This member is required.
PolicyName *string
noSmithyDocumentSerde
}
// An HTTP 200 response if the request succeeds, or an error message if the
// request fails.
type CreateEmailIdentityPolicyOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateEmailIdentityPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateEmailIdentityPolicy{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateEmailIdentityPolicy{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpCreateEmailIdentityPolicyValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateEmailIdentityPolicy(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opCreateEmailIdentityPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "CreateEmailIdentityPolicy",
}
}
| 147 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sesv2/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates an email template. Email templates enable you to send personalized
// email to one or more destinations in a single API operation. For more
// information, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html)
// . You can execute this operation no more than once per second.
func (c *Client) CreateEmailTemplate(ctx context.Context, params *CreateEmailTemplateInput, optFns ...func(*Options)) (*CreateEmailTemplateOutput, error) {
if params == nil {
params = &CreateEmailTemplateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateEmailTemplate", params, optFns, c.addOperationCreateEmailTemplateMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateEmailTemplateOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to create an email template. For more information, see the
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html)
// .
type CreateEmailTemplateInput struct {
// The content of the email template, composed of a subject line, an HTML part,
// and a text-only part.
//
// This member is required.
TemplateContent *types.EmailTemplateContent
// The name of the template.
//
// This member is required.
TemplateName *string
noSmithyDocumentSerde
}
// If the action is successful, the service sends back an HTTP 200 response with
// an empty HTTP body.
type CreateEmailTemplateOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateEmailTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateEmailTemplate{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateEmailTemplate{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpCreateEmailTemplateValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateEmailTemplate(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opCreateEmailTemplate(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "CreateEmailTemplate",
}
}
| 135 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sesv2/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates an import job for a data destination.
func (c *Client) CreateImportJob(ctx context.Context, params *CreateImportJobInput, optFns ...func(*Options)) (*CreateImportJobOutput, error) {
if params == nil {
params = &CreateImportJobInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateImportJob", params, optFns, c.addOperationCreateImportJobMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateImportJobOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to create an import job from a data source for a data
// destination.
type CreateImportJobInput struct {
// The data source for the import job.
//
// This member is required.
ImportDataSource *types.ImportDataSource
// The destination for the import job.
//
// This member is required.
ImportDestination *types.ImportDestination
noSmithyDocumentSerde
}
// An HTTP 200 response if the request succeeds, or an error message if the
// request fails.
type CreateImportJobOutput struct {
// A string that represents the import job ID.
JobId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateImportJobMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateImportJob{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateImportJob{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpCreateImportJobValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateImportJob(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opCreateImportJob(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "CreateImportJob",
}
}
| 134 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Delete an existing configuration set. Configuration sets are groups of rules
// that you can apply to the emails you send. You apply a configuration set to an
// email by including a reference to the configuration set in the headers of the
// email. When you apply a configuration set to an email, all of the rules in that
// configuration set are applied to the email.
func (c *Client) DeleteConfigurationSet(ctx context.Context, params *DeleteConfigurationSetInput, optFns ...func(*Options)) (*DeleteConfigurationSetOutput, error) {
if params == nil {
params = &DeleteConfigurationSetInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteConfigurationSet", params, optFns, c.addOperationDeleteConfigurationSetMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteConfigurationSetOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to delete a configuration set.
type DeleteConfigurationSetInput struct {
// The name of the configuration set.
//
// This member is required.
ConfigurationSetName *string
noSmithyDocumentSerde
}
// An HTTP 200 response if the request succeeds, or an error message if the
// request fails.
type DeleteConfigurationSetOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteConfigurationSetMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteConfigurationSet{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteConfigurationSet{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteConfigurationSetValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteConfigurationSet(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteConfigurationSet(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteConfigurationSet",
}
}
| 127 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Delete an event destination. Events include message sends, deliveries, opens,
// clicks, bounces, and complaints. Event destinations are places that you can send
// information about these events to. For example, you can send event data to
// Amazon SNS to receive notifications when you receive bounces or complaints, or
// you can use Amazon Kinesis Data Firehose to stream data to Amazon S3 for
// long-term storage.
func (c *Client) DeleteConfigurationSetEventDestination(ctx context.Context, params *DeleteConfigurationSetEventDestinationInput, optFns ...func(*Options)) (*DeleteConfigurationSetEventDestinationOutput, error) {
if params == nil {
params = &DeleteConfigurationSetEventDestinationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteConfigurationSetEventDestination", params, optFns, c.addOperationDeleteConfigurationSetEventDestinationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteConfigurationSetEventDestinationOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to delete an event destination from a configuration set.
type DeleteConfigurationSetEventDestinationInput struct {
// The name of the configuration set that contains the event destination to delete.
//
// This member is required.
ConfigurationSetName *string
// The name of the event destination to delete.
//
// This member is required.
EventDestinationName *string
noSmithyDocumentSerde
}
// An HTTP 200 response if the request succeeds, or an error message if the
// request fails.
type DeleteConfigurationSetEventDestinationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteConfigurationSetEventDestinationMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteConfigurationSetEventDestination{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteConfigurationSetEventDestination{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteConfigurationSetEventDestinationValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteConfigurationSetEventDestination(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteConfigurationSetEventDestination(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteConfigurationSetEventDestination",
}
}
| 133 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Removes a contact from a contact list.
func (c *Client) DeleteContact(ctx context.Context, params *DeleteContactInput, optFns ...func(*Options)) (*DeleteContactOutput, error) {
if params == nil {
params = &DeleteContactInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteContact", params, optFns, c.addOperationDeleteContactMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteContactOutput)
out.ResultMetadata = metadata
return out, nil
}
type DeleteContactInput struct {
// The name of the contact list from which the contact should be removed.
//
// This member is required.
ContactListName *string
// The contact's email address.
//
// This member is required.
EmailAddress *string
noSmithyDocumentSerde
}
type DeleteContactOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteContactMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteContact{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteContact{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteContactValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteContact(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteContact(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteContact",
}
}
| 125 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes a contact list and all of the contacts on that list.
func (c *Client) DeleteContactList(ctx context.Context, params *DeleteContactListInput, optFns ...func(*Options)) (*DeleteContactListOutput, error) {
if params == nil {
params = &DeleteContactListInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteContactList", params, optFns, c.addOperationDeleteContactListMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteContactListOutput)
out.ResultMetadata = metadata
return out, nil
}
type DeleteContactListInput struct {
// The name of the contact list.
//
// This member is required.
ContactListName *string
noSmithyDocumentSerde
}
type DeleteContactListOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteContactListMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteContactList{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteContactList{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteContactListValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteContactList(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteContactList(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteContactList",
}
}
| 120 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes an existing custom verification email template. For more information
// about custom verification email templates, see Using custom verification email
// templates (https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#send-email-verify-address-custom)
// in the Amazon SES Developer Guide. You can execute this operation no more than
// once per second.
func (c *Client) DeleteCustomVerificationEmailTemplate(ctx context.Context, params *DeleteCustomVerificationEmailTemplateInput, optFns ...func(*Options)) (*DeleteCustomVerificationEmailTemplateOutput, error) {
if params == nil {
params = &DeleteCustomVerificationEmailTemplateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteCustomVerificationEmailTemplate", params, optFns, c.addOperationDeleteCustomVerificationEmailTemplateMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteCustomVerificationEmailTemplateOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to delete an existing custom verification email template.
type DeleteCustomVerificationEmailTemplateInput struct {
// The name of the custom verification email template that you want to delete.
//
// This member is required.
TemplateName *string
noSmithyDocumentSerde
}
// If the action is successful, the service sends back an HTTP 200 response with
// an empty HTTP body.
type DeleteCustomVerificationEmailTemplateOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteCustomVerificationEmailTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteCustomVerificationEmailTemplate{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteCustomVerificationEmailTemplate{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteCustomVerificationEmailTemplateValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCustomVerificationEmailTemplate(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteCustomVerificationEmailTemplate(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteCustomVerificationEmailTemplate",
}
}
| 127 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Delete a dedicated IP pool.
func (c *Client) DeleteDedicatedIpPool(ctx context.Context, params *DeleteDedicatedIpPoolInput, optFns ...func(*Options)) (*DeleteDedicatedIpPoolOutput, error) {
if params == nil {
params = &DeleteDedicatedIpPoolInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteDedicatedIpPool", params, optFns, c.addOperationDeleteDedicatedIpPoolMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteDedicatedIpPoolOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to delete a dedicated IP pool.
type DeleteDedicatedIpPoolInput struct {
// The name of the dedicated IP pool that you want to delete.
//
// This member is required.
PoolName *string
noSmithyDocumentSerde
}
// An HTTP 200 response if the request succeeds, or an error message if the
// request fails.
type DeleteDedicatedIpPoolOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteDedicatedIpPoolMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteDedicatedIpPool{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteDedicatedIpPool{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteDedicatedIpPoolValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDedicatedIpPool(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteDedicatedIpPool(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteDedicatedIpPool",
}
}
| 123 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes an email identity. An identity can be either an email address or a
// domain name.
func (c *Client) DeleteEmailIdentity(ctx context.Context, params *DeleteEmailIdentityInput, optFns ...func(*Options)) (*DeleteEmailIdentityOutput, error) {
if params == nil {
params = &DeleteEmailIdentityInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteEmailIdentity", params, optFns, c.addOperationDeleteEmailIdentityMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteEmailIdentityOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to delete an existing email identity. When you delete an identity,
// you lose the ability to send email from that identity. You can restore your
// ability to send email by completing the verification process for the identity
// again.
type DeleteEmailIdentityInput struct {
// The identity (that is, the email address or domain) to delete.
//
// This member is required.
EmailIdentity *string
noSmithyDocumentSerde
}
// An HTTP 200 response if the request succeeds, or an error message if the
// request fails.
type DeleteEmailIdentityOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteEmailIdentityMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteEmailIdentity{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteEmailIdentity{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteEmailIdentityValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteEmailIdentity(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteEmailIdentity(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteEmailIdentity",
}
}
| 127 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes the specified sending authorization policy for the given identity (an
// email address or a domain). This API returns successfully even if a policy with
// the specified name does not exist. This API is for the identity owner only. If
// you have not verified the identity, this API will return an error. Sending
// authorization is a feature that enables an identity owner to authorize other
// senders to use its identities. For information about using sending
// authorization, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html)
// . You can execute this operation no more than once per second.
func (c *Client) DeleteEmailIdentityPolicy(ctx context.Context, params *DeleteEmailIdentityPolicyInput, optFns ...func(*Options)) (*DeleteEmailIdentityPolicyOutput, error) {
if params == nil {
params = &DeleteEmailIdentityPolicyInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteEmailIdentityPolicy", params, optFns, c.addOperationDeleteEmailIdentityPolicyMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteEmailIdentityPolicyOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to delete a sending authorization policy for an identity.
// Sending authorization is an Amazon SES feature that enables you to authorize
// other senders to use your identities. For information, see the Amazon SES
// Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization-identity-owner-tasks-management.html)
// .
type DeleteEmailIdentityPolicyInput struct {
// The email identity.
//
// This member is required.
EmailIdentity *string
// The name of the policy. The policy name cannot exceed 64 characters and can
// only include alphanumeric characters, dashes, and underscores.
//
// This member is required.
PolicyName *string
noSmithyDocumentSerde
}
// An HTTP 200 response if the request succeeds, or an error message if the
// request fails.
type DeleteEmailIdentityPolicyOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteEmailIdentityPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteEmailIdentityPolicy{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteEmailIdentityPolicy{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteEmailIdentityPolicyValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteEmailIdentityPolicy(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteEmailIdentityPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteEmailIdentityPolicy",
}
}
| 140 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes an email template. You can execute this operation no more than once per
// second.
func (c *Client) DeleteEmailTemplate(ctx context.Context, params *DeleteEmailTemplateInput, optFns ...func(*Options)) (*DeleteEmailTemplateOutput, error) {
if params == nil {
params = &DeleteEmailTemplateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteEmailTemplate", params, optFns, c.addOperationDeleteEmailTemplateMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteEmailTemplateOutput)
out.ResultMetadata = metadata
return out, nil
}
// Represents a request to delete an email template. For more information, see the
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html)
// .
type DeleteEmailTemplateInput struct {
// The name of the template to be deleted.
//
// This member is required.
TemplateName *string
noSmithyDocumentSerde
}
// If the action is successful, the service sends back an HTTP 200 response with
// an empty HTTP body.
type DeleteEmailTemplateOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteEmailTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteEmailTemplate{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteEmailTemplate{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteEmailTemplateValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteEmailTemplate(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteEmailTemplate(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteEmailTemplate",
}
}
| 126 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Removes an email address from the suppression list for your account.
func (c *Client) DeleteSuppressedDestination(ctx context.Context, params *DeleteSuppressedDestinationInput, optFns ...func(*Options)) (*DeleteSuppressedDestinationOutput, error) {
if params == nil {
params = &DeleteSuppressedDestinationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteSuppressedDestination", params, optFns, c.addOperationDeleteSuppressedDestinationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteSuppressedDestinationOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to remove an email address from the suppression list for your account.
type DeleteSuppressedDestinationInput struct {
// The suppressed email destination to remove from the account suppression list.
//
// This member is required.
EmailAddress *string
noSmithyDocumentSerde
}
// An HTTP 200 response if the request succeeds, or an error message if the
// request fails.
type DeleteSuppressedDestinationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteSuppressedDestinationMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteSuppressedDestination{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteSuppressedDestination{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteSuppressedDestinationValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSuppressedDestination(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteSuppressedDestination(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "DeleteSuppressedDestination",
}
}
| 123 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sesv2/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Obtain information about the email-sending status and capabilities of your
// Amazon SES account in the current Amazon Web Services Region.
func (c *Client) GetAccount(ctx context.Context, params *GetAccountInput, optFns ...func(*Options)) (*GetAccountOutput, error) {
if params == nil {
params = &GetAccountInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetAccount", params, optFns, c.addOperationGetAccountMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetAccountOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to obtain information about the email-sending capabilities of your
// Amazon SES account.
type GetAccountInput struct {
noSmithyDocumentSerde
}
// A list of details about the email-sending capabilities of your Amazon SES
// account in the current Amazon Web Services Region.
type GetAccountOutput struct {
// Indicates whether or not the automatic warm-up feature is enabled for dedicated
// IP addresses that are associated with your account.
DedicatedIpAutoWarmupEnabled bool
// An object that defines your account details.
Details *types.AccountDetails
// The reputation status of your Amazon SES account. The status can be one of the
// following:
// - HEALTHY – There are no reputation-related issues that currently impact your
// account.
// - PROBATION – We've identified potential issues with your Amazon SES account.
// We're placing your account under review while you work on correcting these
// issues.
// - SHUTDOWN – Your account's ability to send email is currently paused because
// of an issue with the email sent from your account. When you correct the issue,
// you can contact us and request that your account's ability to send email is
// resumed.
EnforcementStatus *string
// Indicates whether or not your account has production access in the current
// Amazon Web Services Region. If the value is false , then your account is in the
// sandbox. When your account is in the sandbox, you can only send email to
// verified identities. Additionally, the maximum number of emails you can send in
// a 24-hour period (your sending quota) is 200, and the maximum number of emails
// you can send per second (your maximum sending rate) is 1. If the value is true ,
// then your account has production access. When your account has production
// access, you can send email to any address. The sending quota and maximum sending
// rate for your account vary based on your specific use case.
ProductionAccessEnabled bool
// An object that contains information about the per-day and per-second sending
// limits for your Amazon SES account in the current Amazon Web Services Region.
SendQuota *types.SendQuota
// Indicates whether or not email sending is enabled for your Amazon SES account
// in the current Amazon Web Services Region.
SendingEnabled bool
// An object that contains information about the email address suppression
// preferences for your account in the current Amazon Web Services Region.
SuppressionAttributes *types.SuppressionAttributes
// The VDM attributes that apply to your Amazon SES account.
VdmAttributes *types.VdmAttributes
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetAccountMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpGetAccount{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetAccount{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccount(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetAccount(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "GetAccount",
}
}
| 164 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package sesv2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sesv2/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Retrieve a list of the blacklists that your dedicated IP addresses appear on.
func (c *Client) GetBlacklistReports(ctx context.Context, params *GetBlacklistReportsInput, optFns ...func(*Options)) (*GetBlacklistReportsOutput, error) {
if params == nil {
params = &GetBlacklistReportsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetBlacklistReports", params, optFns, c.addOperationGetBlacklistReportsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetBlacklistReportsOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to retrieve a list of the blacklists that your dedicated IP addresses
// appear on.
type GetBlacklistReportsInput struct {
// A list of IP addresses that you want to retrieve blacklist information about.
// You can only specify the dedicated IP addresses that you use to send email using
// Amazon SES or Amazon Pinpoint.
//
// This member is required.
BlacklistItemNames []string
noSmithyDocumentSerde
}
// An object that contains information about blacklist events.
type GetBlacklistReportsOutput struct {
// An object that contains information about a blacklist that one of your
// dedicated IP addresses appears on.
//
// This member is required.
BlacklistReport map[string][]types.BlacklistEntry
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetBlacklistReportsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpGetBlacklistReports{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetBlacklistReports{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetBlacklistReportsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBlacklistReports(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetBlacklistReports(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ses",
OperationName: "GetBlacklistReports",
}
}
| 133 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.